diff options
Diffstat (limited to 'Swiften/Client/Client.h')
-rw-r--r-- | Swiften/Client/Client.h | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/Swiften/Client/Client.h b/Swiften/Client/Client.h index 946bdbd..d876302 100644 --- a/Swiften/Client/Client.h +++ b/Swiften/Client/Client.h @@ -15,44 +15,46 @@ #include "Swiften/Queries/IQRouter.h" #include "Swiften/Parser/PayloadParsers/FullPayloadParserFactoryCollection.h" #include "Swiften/Serializer/PayloadSerializers/FullPayloadSerializerCollection.h" +#include "Swiften/Network/BoostIOServiceThread.h" namespace Swift { class TLSLayerFactory; class ConnectionFactory; class Session; - class Client : public StanzaChannel, public IQRouter { - public: - Client(const JID& jid, const String& password); - ~Client(); + class Client : public StanzaChannel, public IQRouter { + public: + Client(const JID& jid, const String& password); + ~Client(); void setCertificate(const String& certificate); - void connect(); + void connect(); void disconnect(); - virtual void sendIQ(boost::shared_ptr<IQ>); + virtual void sendIQ(boost::shared_ptr<IQ>); virtual void sendMessage(boost::shared_ptr<Message>); virtual void sendPresence(boost::shared_ptr<Presence>); - public: - boost::signal<void (ClientError)> onError; - boost::signal<void ()> onConnected; + public: + boost::signal<void (ClientError)> onError; + boost::signal<void ()> onConnected; boost::signal<void (const String&)> onDataRead; boost::signal<void (const String&)> onDataWritten; private: - void send(boost::shared_ptr<Stanza>); - virtual String getNewIQID(); + void send(boost::shared_ptr<Stanza>); + virtual String getNewIQID(); void handleElement(boost::shared_ptr<Element>); void handleSessionError(Session::SessionError error); void handleNeedCredentials(); void handleDataRead(const ByteArray&); void handleDataWritten(const ByteArray&); - private: + private: + BoostIOServiceThread boostIOServiceThread_; JID jid_; - String password_; + String password_; IDGenerator idGenerator_; ConnectionFactory* connectionFactory_; TLSLayerFactory* tlsLayerFactory_; @@ -60,7 +62,7 @@ namespace Swift { FullPayloadSerializerCollection payloadSerializers_; Session* session_; String certificate_; - }; + }; } #endif |