Files
@ 07ee87c60d2d
Branch filter:
Location: libtransport.git/include/transport/AdminInterfaceCommand.h
07ee87c60d2d
3.1 KiB
text/plain
Define 'foreach' in backends/libcommuni/session.cpp
Fixes compilation issue
[ 64%] Building CXX object backends/libcommuni/CMakeFiles/spectrum2_libcommuni_backend.dir/session.cpp.o
cd /var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni && /usr/bin/x86_64-pc-linux-gnu-g++ -DBOOST_FILESYSTEM_VERSION=3 -DDEBUG -DIRC_SHARED -DPURPLE_RUNTIME=0 -DQT_CORE_LIB -DQT_NETWORK_LIB -DQT_NO_KEYWORDS -DSPECTRUM_VERSION=\"2.0.5-git-b15fcedf\" -DSUPPORT_LEGACY_CAPS -DWITH_LIBEVENT -DWITH_LOG4CXX -DWITH_PQXX -DWITH_PROTOBUF -isystem /usr/include/qt4 -isystem /usr/include/qt4/QtCore -I/usr/include/libpurple -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -isystem /usr/include/qt4/QtNetwork -I/usr/include/qt4/Communi/IrcCore -I/usr/include/qt4/Communi/IrcUtil -I/usr/include/qt4/Communi/IrcModel -I/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/include -isystem /usr/share/qt4/mkspecs/default -DBOOST_SIGNALS_NO_DEPRECATION_WARNING -O2 -pipe -O0 -ggdb -o CMakeFiles/spectrum2_libcommuni_backend.dir/session.cpp.o -c /var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp: In member function ‘void MyIrcSession::on_socketError(QAbstractSocket::SocketError)’:
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:208:22: error: expected primary-expression before ‘*’ token
foreach (IrcBuffer *buffer, m_bufferModel->buffers()) {
^
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:208:23: error: ‘buffer’ was not declared in this scope
foreach (IrcBuffer *buffer, m_bufferModel->buffers()) {
^~~~~~
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:208:23: note: suggested alternative:
In file included from /usr/include/boost/asio/detail/reactive_socket_service.hpp:22:0,
from /usr/include/boost/asio/socket_acceptor_service.hpp:29,
from /usr/include/boost/asio/basic_socket_acceptor.hpp:25,
from /usr/include/boost/asio/ip/tcp.hpp:19,
from /usr/include/Swiften/Network/HostAddressPort.h:9,
from /usr/include/Swiften/Elements/S5BProxyRequest.h:22,
from /usr/include/Swiften/Parser/PayloadParsers/S5BProxyRequestParser.h:18,
from /usr/include/Swiften/Swiften.h:112,
from /var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.h:30,
from /var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:21:
/usr/include/boost/asio/buffer.hpp:1231:24: note: ‘boost::asio::buffer’
inline const_buffers_1 buffer(
^~~~~~
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:208:55: error: ‘foreach’ was not declared in this scope
ch (IrcBuffer *buffer, m_bufferModel->buffers()) {
^
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:208:55: note: suggested alternative:
In file included from /usr/include/boost/foreach.hpp:86:0,
from /var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/include/transport/Config.h:24,
from /var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/ircnetworkplugin.h:27,
from /var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:30:
/usr/include/boost/foreach_fwd.hpp:26:11: note: ‘boost::foreach’
namespace foreach
^~~~~~~
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp: In member function ‘void MyIrcSession::on_namesMessageReceived(IrcMessage*)’:
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:348:19: error: expected primary-expression before ‘*’ token
foreach (IrcUser *user, userModel->users()) {
^
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:348:20: error: ‘user’ was not declared in this scope
foreach (IrcUser *user, userModel->users()) {
^~~~
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:348:44: error: ‘foreach’ was not declared in this scope
foreach (IrcUser *user, userModel->users()) {
^
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:348:44: note: suggested alternative:
In file included from /usr/include/boost/foreach.hpp:86:0,
from /var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/include/transport/Config.h:24,
from /var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/ircnetworkplugin.h:27,
from /var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:30:
/usr/include/boost/foreach_fwd.hpp:26:11: note: ‘boost::foreach’
namespace foreach
^~~~~~~
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp: In member function ‘void MyIrcSession::sendMessageToFrontend(const string&, const string&, const string&)’:
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:387:23: error: expected primary-expression before ‘*’ token
foreach (IrcBuffer *buffer, m_bufferModel->buffers()) {
^
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:387:24: error: ‘buffer’ was not declared in this scope
foreach (IrcBuffer *buffer, m_bufferModel->buffers()) {
^~~~~~
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:387:24: note: suggested alternative:
In file included from /usr/include/boost/asio/detail/reactive_socket_service.hpp:22:0,
from /usr/include/boost/asio/socket_acceptor_service.hpp:29,
from /usr/include/boost/asio/basic_socket_acceptor.hpp:25,
from /usr/include/boost/asio/ip/tcp.hpp:19,
from /usr/include/Swiften/Network/HostAddressPort.h:9,
from /usr/include/Swiften/Elements/S5BProxyRequest.h:22,
from /usr/include/Swiften/Parser/PayloadParsers/S5BProxyRequestParser.h:18,
from /usr/include/Swiften/Swiften.h:112,
from /var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.h:30,
from /var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:21:
/usr/include/boost/asio/buffer.hpp:1231:24: note: ‘boost::asio::buffer’
inline const_buffers_1 buffer(
^~~~~~
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:387:56: error: ‘foreach’ was not declared in this scope
ch (IrcBuffer *buffer, m_bufferModel->buffers()) {
^
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:387:56: note: suggested alternative:
In file included from /usr/include/boost/foreach.hpp:86:0,
from /var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/include/transport/Config.h:24,
from /var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/ircnetworkplugin.h:27,
from /var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:30:
/usr/include/boost/foreach_fwd.hpp:26:11: note: ‘boost::foreach’
namespace foreach
^~~~~~~
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp: In member function ‘void MyIrcSession::on_numericMessageReceived(IrcMessage*)’:
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:465:23: error: expected primary-expression before ‘*’ token
foreach (IrcBuffer *buffer, m_bufferModel->buffers()) {
^
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:465:24: error: ‘buffer’ was not declared in this scope
foreach (IrcBuffer *buffer, m_bufferModel->buffers()) {
^~~~~~
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:465:24: note: suggested alternative:
In file included from /usr/include/boost/asio/detail/reactive_socket_service.hpp:22:0,
from /usr/include/boost/asio/socket_acceptor_service.hpp:29,
from /usr/include/boost/asio/basic_socket_acceptor.hpp:25,
from /usr/include/boost/asio/ip/tcp.hpp:19,
from /usr/include/Swiften/Network/HostAddressPort.h:9,
from /usr/include/Swiften/Elements/S5BProxyRequest.h:22,
from /usr/include/Swiften/Parser/PayloadParsers/S5BProxyRequestParser.h:18,
from /usr/include/Swiften/Swiften.h:112,
from /var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.h:30,
from /var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:21:
/usr/include/boost/asio/buffer.hpp:1231:24: note: ‘boost::asio::buffer’
inline const_buffers_1 buffer(
^~~~~~
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:465:56: error: ‘foreach’ was not declared in this scope
ch (IrcBuffer *buffer, m_bufferModel->buffers()) {
^
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:465:56: note: suggested alternative:
In file included from /usr/include/boost/foreach.hpp:86:0,
from /var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/include/transport/Config.h:24,
from /var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/ircnetworkplugin.h:27,
from /var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:30:
/usr/include/boost/foreach_fwd.hpp:26:11: note: ‘boost::foreach’
namespace foreach
^~~~~~~
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:490:23: error: expected primary-expression before ‘*’ token
foreach (IrcBuffer *buffer, m_bufferModel->buffers()) {
^
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp: In member function ‘void MyIrcSession::awayTimeout()’:
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:523:21: error: expected primary-expression before ‘*’ token
foreach (IrcBuffer *buffer, m_bufferModel->buffers()) {
^
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:523:22: error: ‘buffer’ was not declared in this scope
foreach (IrcBuffer *buffer, m_bufferModel->buffers()) {
^~~~~~
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:523:22: note: suggested alternative:
In file included from /usr/include/boost/asio/detail/reactive_socket_service.hpp:22:0,
from /usr/include/boost/asio/socket_acceptor_service.hpp:29,
from /usr/include/boost/asio/basic_socket_acceptor.hpp:25,
from /usr/include/boost/asio/ip/tcp.hpp:19,
from /usr/include/Swiften/Network/HostAddressPort.h:9,
from /usr/include/Swiften/Elements/S5BProxyRequest.h:22,
from /usr/include/Swiften/Parser/PayloadParsers/S5BProxyRequestParser.h:18,
from /usr/include/Swiften/Swiften.h:112,
from /var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.h:30,
from /var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:21:
/usr/include/boost/asio/buffer.hpp:1231:24: note: ‘boost::asio::buffer’
inline const_buffers_1 buffer(
^~~~~~
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:523:54: error: ‘foreach’ was not declared in this scope
ch (IrcBuffer *buffer, m_bufferModel->buffers()) {
^
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:523:54: note: suggested alternative:
In file included from /usr/include/boost/foreach.hpp:86:0,
from /var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/include/transport/Config.h:24,
from /var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/ircnetworkplugin.h:27,
from /var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:30:
/usr/include/boost/foreach_fwd.hpp:26:11: note: ‘boost::foreach’
namespace foreach
^~~~~~~
make[2]: *** [backends/libcommuni/CMakeFiles/spectrum2_libcommuni_backend.dir/build.make:126: backends/libcommuni/CMakeFiles/spectrum2_libcommuni_backend.dir/session.cpp.o] Error 1
make[2]: Leaving directory '/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999'
make[1]: *** [CMakeFiles/Makefile2:646: backends/libcommuni/CMakeFiles/spectrum2_libcommuni_backend.dir/all] Error 2
make[1]: Leaving directory '/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999'
make: *** [Makefile:152: all] Error 2
Fixes compilation issue
[ 64%] Building CXX object backends/libcommuni/CMakeFiles/spectrum2_libcommuni_backend.dir/session.cpp.o
cd /var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni && /usr/bin/x86_64-pc-linux-gnu-g++ -DBOOST_FILESYSTEM_VERSION=3 -DDEBUG -DIRC_SHARED -DPURPLE_RUNTIME=0 -DQT_CORE_LIB -DQT_NETWORK_LIB -DQT_NO_KEYWORDS -DSPECTRUM_VERSION=\"2.0.5-git-b15fcedf\" -DSUPPORT_LEGACY_CAPS -DWITH_LIBEVENT -DWITH_LOG4CXX -DWITH_PQXX -DWITH_PROTOBUF -isystem /usr/include/qt4 -isystem /usr/include/qt4/QtCore -I/usr/include/libpurple -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -isystem /usr/include/qt4/QtNetwork -I/usr/include/qt4/Communi/IrcCore -I/usr/include/qt4/Communi/IrcUtil -I/usr/include/qt4/Communi/IrcModel -I/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/include -isystem /usr/share/qt4/mkspecs/default -DBOOST_SIGNALS_NO_DEPRECATION_WARNING -O2 -pipe -O0 -ggdb -o CMakeFiles/spectrum2_libcommuni_backend.dir/session.cpp.o -c /var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp: In member function ‘void MyIrcSession::on_socketError(QAbstractSocket::SocketError)’:
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:208:22: error: expected primary-expression before ‘*’ token
foreach (IrcBuffer *buffer, m_bufferModel->buffers()) {
^
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:208:23: error: ‘buffer’ was not declared in this scope
foreach (IrcBuffer *buffer, m_bufferModel->buffers()) {
^~~~~~
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:208:23: note: suggested alternative:
In file included from /usr/include/boost/asio/detail/reactive_socket_service.hpp:22:0,
from /usr/include/boost/asio/socket_acceptor_service.hpp:29,
from /usr/include/boost/asio/basic_socket_acceptor.hpp:25,
from /usr/include/boost/asio/ip/tcp.hpp:19,
from /usr/include/Swiften/Network/HostAddressPort.h:9,
from /usr/include/Swiften/Elements/S5BProxyRequest.h:22,
from /usr/include/Swiften/Parser/PayloadParsers/S5BProxyRequestParser.h:18,
from /usr/include/Swiften/Swiften.h:112,
from /var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.h:30,
from /var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:21:
/usr/include/boost/asio/buffer.hpp:1231:24: note: ‘boost::asio::buffer’
inline const_buffers_1 buffer(
^~~~~~
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:208:55: error: ‘foreach’ was not declared in this scope
ch (IrcBuffer *buffer, m_bufferModel->buffers()) {
^
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:208:55: note: suggested alternative:
In file included from /usr/include/boost/foreach.hpp:86:0,
from /var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/include/transport/Config.h:24,
from /var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/ircnetworkplugin.h:27,
from /var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:30:
/usr/include/boost/foreach_fwd.hpp:26:11: note: ‘boost::foreach’
namespace foreach
^~~~~~~
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp: In member function ‘void MyIrcSession::on_namesMessageReceived(IrcMessage*)’:
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:348:19: error: expected primary-expression before ‘*’ token
foreach (IrcUser *user, userModel->users()) {
^
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:348:20: error: ‘user’ was not declared in this scope
foreach (IrcUser *user, userModel->users()) {
^~~~
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:348:44: error: ‘foreach’ was not declared in this scope
foreach (IrcUser *user, userModel->users()) {
^
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:348:44: note: suggested alternative:
In file included from /usr/include/boost/foreach.hpp:86:0,
from /var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/include/transport/Config.h:24,
from /var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/ircnetworkplugin.h:27,
from /var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:30:
/usr/include/boost/foreach_fwd.hpp:26:11: note: ‘boost::foreach’
namespace foreach
^~~~~~~
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp: In member function ‘void MyIrcSession::sendMessageToFrontend(const string&, const string&, const string&)’:
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:387:23: error: expected primary-expression before ‘*’ token
foreach (IrcBuffer *buffer, m_bufferModel->buffers()) {
^
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:387:24: error: ‘buffer’ was not declared in this scope
foreach (IrcBuffer *buffer, m_bufferModel->buffers()) {
^~~~~~
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:387:24: note: suggested alternative:
In file included from /usr/include/boost/asio/detail/reactive_socket_service.hpp:22:0,
from /usr/include/boost/asio/socket_acceptor_service.hpp:29,
from /usr/include/boost/asio/basic_socket_acceptor.hpp:25,
from /usr/include/boost/asio/ip/tcp.hpp:19,
from /usr/include/Swiften/Network/HostAddressPort.h:9,
from /usr/include/Swiften/Elements/S5BProxyRequest.h:22,
from /usr/include/Swiften/Parser/PayloadParsers/S5BProxyRequestParser.h:18,
from /usr/include/Swiften/Swiften.h:112,
from /var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.h:30,
from /var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:21:
/usr/include/boost/asio/buffer.hpp:1231:24: note: ‘boost::asio::buffer’
inline const_buffers_1 buffer(
^~~~~~
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:387:56: error: ‘foreach’ was not declared in this scope
ch (IrcBuffer *buffer, m_bufferModel->buffers()) {
^
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:387:56: note: suggested alternative:
In file included from /usr/include/boost/foreach.hpp:86:0,
from /var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/include/transport/Config.h:24,
from /var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/ircnetworkplugin.h:27,
from /var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:30:
/usr/include/boost/foreach_fwd.hpp:26:11: note: ‘boost::foreach’
namespace foreach
^~~~~~~
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp: In member function ‘void MyIrcSession::on_numericMessageReceived(IrcMessage*)’:
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:465:23: error: expected primary-expression before ‘*’ token
foreach (IrcBuffer *buffer, m_bufferModel->buffers()) {
^
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:465:24: error: ‘buffer’ was not declared in this scope
foreach (IrcBuffer *buffer, m_bufferModel->buffers()) {
^~~~~~
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:465:24: note: suggested alternative:
In file included from /usr/include/boost/asio/detail/reactive_socket_service.hpp:22:0,
from /usr/include/boost/asio/socket_acceptor_service.hpp:29,
from /usr/include/boost/asio/basic_socket_acceptor.hpp:25,
from /usr/include/boost/asio/ip/tcp.hpp:19,
from /usr/include/Swiften/Network/HostAddressPort.h:9,
from /usr/include/Swiften/Elements/S5BProxyRequest.h:22,
from /usr/include/Swiften/Parser/PayloadParsers/S5BProxyRequestParser.h:18,
from /usr/include/Swiften/Swiften.h:112,
from /var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.h:30,
from /var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:21:
/usr/include/boost/asio/buffer.hpp:1231:24: note: ‘boost::asio::buffer’
inline const_buffers_1 buffer(
^~~~~~
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:465:56: error: ‘foreach’ was not declared in this scope
ch (IrcBuffer *buffer, m_bufferModel->buffers()) {
^
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:465:56: note: suggested alternative:
In file included from /usr/include/boost/foreach.hpp:86:0,
from /var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/include/transport/Config.h:24,
from /var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/ircnetworkplugin.h:27,
from /var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:30:
/usr/include/boost/foreach_fwd.hpp:26:11: note: ‘boost::foreach’
namespace foreach
^~~~~~~
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:490:23: error: expected primary-expression before ‘*’ token
foreach (IrcBuffer *buffer, m_bufferModel->buffers()) {
^
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp: In member function ‘void MyIrcSession::awayTimeout()’:
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:523:21: error: expected primary-expression before ‘*’ token
foreach (IrcBuffer *buffer, m_bufferModel->buffers()) {
^
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:523:22: error: ‘buffer’ was not declared in this scope
foreach (IrcBuffer *buffer, m_bufferModel->buffers()) {
^~~~~~
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:523:22: note: suggested alternative:
In file included from /usr/include/boost/asio/detail/reactive_socket_service.hpp:22:0,
from /usr/include/boost/asio/socket_acceptor_service.hpp:29,
from /usr/include/boost/asio/basic_socket_acceptor.hpp:25,
from /usr/include/boost/asio/ip/tcp.hpp:19,
from /usr/include/Swiften/Network/HostAddressPort.h:9,
from /usr/include/Swiften/Elements/S5BProxyRequest.h:22,
from /usr/include/Swiften/Parser/PayloadParsers/S5BProxyRequestParser.h:18,
from /usr/include/Swiften/Swiften.h:112,
from /var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.h:30,
from /var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:21:
/usr/include/boost/asio/buffer.hpp:1231:24: note: ‘boost::asio::buffer’
inline const_buffers_1 buffer(
^~~~~~
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:523:54: error: ‘foreach’ was not declared in this scope
ch (IrcBuffer *buffer, m_bufferModel->buffers()) {
^
/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:523:54: note: suggested alternative:
In file included from /usr/include/boost/foreach.hpp:86:0,
from /var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/include/transport/Config.h:24,
from /var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/ircnetworkplugin.h:27,
from /var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999/backends/libcommuni/session.cpp:30:
/usr/include/boost/foreach_fwd.hpp:26:11: note: ‘boost::foreach’
namespace foreach
^~~~~~~
make[2]: *** [backends/libcommuni/CMakeFiles/spectrum2_libcommuni_backend.dir/build.make:126: backends/libcommuni/CMakeFiles/spectrum2_libcommuni_backend.dir/session.cpp.o] Error 1
make[2]: Leaving directory '/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999'
make[1]: *** [CMakeFiles/Makefile2:646: backends/libcommuni/CMakeFiles/spectrum2_libcommuni_backend.dir/all] Error 2
make[1]: Leaving directory '/var/tmp/portage/net-im/spectrum-9999/work/spectrum-9999'
make: *** [Makefile:152: all] Error 2
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | /**
* libtransport -- C++ library for easy XMPP Transports development
*
* Copyright (C) 2016, Jan Kaluza <hanzz.k@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
*/
#pragma once
#include <string>
#include <map>
#include "Swiften/Elements/Message.h"
#include "transport/StorageBackend.h"
namespace Transport {
class User;
class AdminInterfaceCommand {
public:
typedef enum {
GlobalContext,
UserContext
} Context;
typedef enum {
None = 0,
Get = 1,
Set = 2,
Execute = 4
} Actions;
typedef enum {
AdminMode,
UserMode
} AccessMode;
typedef enum {
General,
Users,
Messages,
Frontend,
Backends,
Memory
} Category;
class Arg {
public:
Arg(const std::string &_name, const std::string &_label, const std::string &_type, const std::string &_example) :
name(_name), label(_label), type(_type), example(_example) {}
~Arg() {}
std::string name;
std::string label;
std::string type;
std::string example;
};
AdminInterfaceCommand(const std::string &name, Category category, Context context, AccessMode accessMode, Actions actions, const std::string &label = "");
virtual ~AdminInterfaceCommand() { }
void setDescription(const std::string &desc) {
m_desc = desc;
}
const std::string &getDescription() {
return m_desc;
}
const std::string &getName() {
return m_name;
}
Actions getActions() {
return m_actions;
}
Category getCategory() {
return m_category;
}
const std::string getCategoryName(Category category);
Context getContext() {
return m_context;
}
AccessMode getAccessMode() {
return m_accessMode;
}
void addArg(const std::string &name, const std::string &label, const std::string &type = "string", const std::string &example = "") {
Arg arg(name, label, type, example);
m_args.push_back(arg);
}
const std::list<Arg> &getArgs() {
return m_args;
}
const std::string &getLabel() {
return m_label;
}
virtual std::string handleSetRequest(UserInfo &uinfo, User *user, std::vector<std::string> &args);
virtual std::string handleGetRequest(UserInfo &uinfo, User *user, std::vector<std::string> &args);
virtual std::string handleExecuteRequest(UserInfo &uinfo, User *user, std::vector<std::string> &args);
private:
std::string m_name;
Category m_category;
Context m_context;
AccessMode m_accessMode;
Actions m_actions;
std::string m_desc;
std::list<Arg> m_args;
std::string m_label;
};
}
|