summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-11-09 20:34:44 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-11-09 22:12:10 (GMT)
commitc682941cd230ad8caed3f3d457de3dc0cd7172d4 (patch)
treee4d4382a8627409d81bb7c79a62f1bc55f45b410 /Swiften/Client/Client.h
parentf1d74218cb432513c376b46aa115acb3e107ed3a (diff)
downloadswift-contrib-c682941cd230ad8caed3f3d457de3dc0cd7172d4.zip
swift-contrib-c682941cd230ad8caed3f3d457de3dc0cd7172d4.tar.bz2
Refactoring Client.
Diffstat (limited to 'Swiften/Client/Client.h')
-rw-r--r--Swiften/Client/Client.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/Swiften/Client/Client.h b/Swiften/Client/Client.h
index 0e68f55..27c2458 100644
--- a/Swiften/Client/Client.h
+++ b/Swiften/Client/Client.h
@@ -3,7 +3,9 @@
#include <boost/signals.hpp>
#include <boost/shared_ptr.hpp>
+#include <boost/enable_shared_from_this.hpp>
+#include "Swiften/Base/Error.h"
#include "Swiften/Client/ClientSession.h"
#include "Swiften/Client/ClientError.h"
#include "Swiften/Elements/Presence.h"
@@ -22,7 +24,7 @@ namespace Swift {
class ClientSession;
class BasicSessionStream;
- class Client : public StanzaChannel, public IQRouter, public boost::bsignals::trackable {
+ class Client : public StanzaChannel, public IQRouter, public boost::enable_shared_from_this<Client> {
public:
Client(const JID& jid, const String& password);
~Client();
@@ -39,7 +41,7 @@ namespace Swift {
virtual void sendPresence(boost::shared_ptr<Presence>);
public:
- boost::signal<void (ClientError)> onError;
+ boost::signal<void (const ClientError&)> onError;
boost::signal<void ()> onConnected;
boost::signal<void (const String&)> onDataRead;
boost::signal<void (const String&)> onDataWritten;
@@ -49,7 +51,7 @@ namespace Swift {
void send(boost::shared_ptr<Stanza>);
virtual String getNewIQID();
void handleElement(boost::shared_ptr<Element>);
- void handleSessionFinished(const boost::optional<Session::SessionError>& error);
+ void handleSessionFinished(boost::shared_ptr<Error>);
void handleNeedCredentials();
void handleDataRead(const ByteArray&);
void handleDataWritten(const ByteArray&);