Changeset - 180397daaba0
[Not reviewed]
0 3 0
vitalyster - 8 years ago 2017-06-11 22:44:07
vitalyster@gmail.com
IRC backend: Qt should be included first to prevent conflict with Boost's foreach
3 files changed with 5 insertions and 7 deletions:
0 comments (0 inline, 0 general)
backends/libcommuni/ircnetworkplugin.cpp
Show inline comments
 
@@ -8,28 +8,27 @@
 
 * 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
 
 */
 

	
 
#include "ircnetworkplugin.h"
 
#include <IrcCommand>
 
#include <IrcMessage>
 
#include "ircnetworkplugin.h"
 
#include "transport/Logging.h"
 

	
 
DEFINE_LOGGER(logger, "IRCNetworkPlugin");
 

	
 
#define FROM_UTF8(WHAT) QString::fromUtf8((WHAT).c_str(), (WHAT).size())
 
#define TO_UTF8(WHAT) std::string((WHAT).toUtf8().data(), (WHAT).toUtf8().size())
 

	
 
IRCNetworkPlugin::IRCNetworkPlugin(Config *config, Swift::QtEventLoop *loop, const std::string &host, int port) {
 
	m_config = config;
 
	m_currentServer = 0;
 
	m_firstPing = true;
 

	
backends/libcommuni/ircnetworkplugin.h
Show inline comments
 
@@ -12,29 +12,29 @@
 
 * 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
 

	
 
#ifndef Q_MOC_RUN
 
#include "transport/Config.h"
 
#include "transport/NetworkPlugin.h"
 
#include "session.h"
 
#include <QtCore>
 
#include <QtNetwork>
 
#include "transport/Config.h"
 
#include "transport/NetworkPlugin.h"
 
#include "Swiften/EventLoop/Qt/QtEventLoop.h"
 
#endif
 

	
 
class IRCNetworkPlugin : public QObject, public NetworkPlugin {
 
	Q_OBJECT
 

	
 
	public:
 
		IRCNetworkPlugin(Config *config, Swift::QtEventLoop *loop, const std::string &host, int port);
 

	
 
		void handleLoginRequest(const std::string &user, const std::string &legacyName, const std::string &password);
 

	
 
		void handleLogoutRequest(const std::string &user, const std::string &legacyName);
backends/libcommuni/main.cpp
Show inline comments
 
@@ -8,30 +8,29 @@
 
 * 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
 
 */
 

	
 
#include <QtCore>
 
#include <QtNetwork>
 
#include "transport/Config.h"
 
#include "transport/NetworkPlugin.h"
 
#include "transport/Logging.h"
 
#include <QtCore>
 
#include <QtNetwork>
 
#include "Swiften/EventLoop/Qt/QtEventLoop.h"
 
#include "ircnetworkplugin.h"
 

	
 
using namespace boost::program_options;
 
using namespace Transport;
 

	
 
NetworkPlugin * np = NULL;
 

	
 
int main (int argc, char* argv[]) {
 
	std::string host;
 
	int port;
 

	
0 comments (0 inline, 0 general)