Commit 104cf580 authored by Georg's avatar Georg

Fixed pro file. Added test directory

parent 8caf22d9
# path to local compiled swift 3 lib # path to local compiled swift 3 lib
SWIFT3PATH = ../swift-3.0 SWIFT3PATH = ../../swift-3.0
# from swift-config # from swift-config
SWIFTCXX = -DSWIFTEN_STATIC -DBOOST_ALL_NO_LIB -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_SIGNALS_NO_DEPRECATION_WARNING -DSWIFT_EXPERIMENTAL_FT SWIFTCXX = -DSWIFTEN_STATIC -DBOOST_ALL_NO_LIB -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_SIGNALS_NO_DEPRECATION_WARNING -DSWIFT_EXPERIMENTAL_FT
SWIFTLIB = -lSwiften -lSwiften_Boost -lrt -lz -lssl -lcrypto -lxml2 -lresolv -lpthread -ldl -lm -lc -lstdc++ SWIFTLIB = -lSwiften -lSwiften_Boost -lrt -lz -lssl -lcrypto -lxml2 -lresolv -lpthread -ldl -lm -lc -lstdc++
TEMPLATE = app TEMPLATE = app
QT += qml quick QT += qml quick core
INCLUDEPATH += $${SWIFT3PATH}/3rdParty/Boost/src INCLUDEPATH += $${SWIFT3PATH}/3rdParty/Boost/src
INCLUDEPATH += $${SWIFT3PATH}/ INCLUDEPATH += $${SWIFT3PATH}/
...@@ -14,18 +14,20 @@ INCLUDEPATH += $${SWIFT3PATH}/ ...@@ -14,18 +14,20 @@ INCLUDEPATH += $${SWIFT3PATH}/
CXXFLAGS += $${SWIFTCXX} CXXFLAGS += $${SWIFTCXX}
LIBS += -L$${SWIFT3PATH}/Swiften -L$${SWIFT3PATH}/3rdParty/Boost $${SWIFTLIB} LIBS += -L$${SWIFT3PATH}/Swiften -L$${SWIFT3PATH}/3rdParty/Boost $${SWIFTLIB}
SOURCES += main.cpp \ DEFINES += BOOST_SIGNALS_NO_DEPRECATION_WARNING
EchoBot.cpp
HEADERS += EchoBot.h \ SOURCES += source/main.cpp \
EchoPayload.h \ source/EchoBot.cpp
EchoPayloadParserFactory.h \
EchoPayloadSerializer.h
RESOURCES += qml.qrc HEADERS += source/EchoBot.h \
sourc/EchoPayload.h \
source/EchoPayloadParserFactory.h \
source/EchoPayloadSerializer.h
RESOURCES += resources/qml.qrc
# Additional import path used to resolve QML modules in Qt Creator's code model # Additional import path used to resolve QML modules in Qt Creator's code model
QML_IMPORT_PATH = QML_IMPORT_PATH =
# Default rules for deployment. # Default rules for deployment.
include(deployment.pri) include(resources/deployment.pri)
...@@ -6,15 +6,11 @@ ...@@ -6,15 +6,11 @@
#include "EchoPayload.h" #include "EchoPayload.h"
// FIXME rewrite all binds to qt connects
EchoBot::EchoBot(NetworkFactories* networkFactories) EchoBot::EchoBot(NetworkFactories* networkFactories)
{ {
client = new Swift::Client("jid@jabber.lit", "pass", networkFactories); client = new Swift::Client("jid@...", "pass", networkFactories);
client->setAlwaysTrustCertificates(); client->setAlwaysTrustCertificates();
client->onConnected.connect(boost::bind(&EchoBot::handleConnected, this)); client->onConnected.connect(boost::bind(&EchoBot::handleConnected, this));
client->onMessageReceived.connect( client->onMessageReceived.connect(
boost::bind(&EchoBot::handleMessageReceived, this, _1)); boost::bind(&EchoBot::handleMessageReceived, this, _1));
client->onPresenceReceived.connect( client->onPresenceReceived.connect(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment