diff options
author | Mateusz Piekos <mateuszpiekos@gmail.com> | 2012-08-08 11:43:56 (GMT) |
---|---|---|
committer | Mateusz Piekos <mateuszpiekos@gmail.com> | 2012-08-08 11:43:56 (GMT) |
commit | 3fa0d466150981d33f535108190f1e9744fb3e09 (patch) | |
tree | 1f41ed407741e3e9719dedce8b8405ea18c4c78d /Swiften/Whiteboard/WhiteboardSessionManager.h | |
parent | 84cc4e93c5e3f68d055cbddf8072025d91c44a23 (diff) | |
download | swift-contrib-3fa0d466150981d33f535108190f1e9744fb3e09.zip swift-contrib-3fa0d466150981d33f535108190f1e9744fb3e09.tar.bz2 |
Handling of sessions with contacts which become unavailable
Diffstat (limited to 'Swiften/Whiteboard/WhiteboardSessionManager.h')
-rw-r--r-- | Swiften/Whiteboard/WhiteboardSessionManager.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Swiften/Whiteboard/WhiteboardSessionManager.h b/Swiften/Whiteboard/WhiteboardSessionManager.h index faccb97..f696eb8 100644 --- a/Swiften/Whiteboard/WhiteboardSessionManager.h +++ b/Swiften/Whiteboard/WhiteboardSessionManager.h @@ -10,6 +10,7 @@ #include <Swiften/Queries/IQRouter.h> #include <Swiften/JID/JID.h> +#include <Swiften/Client/StanzaChannel.h> #include <Swiften/Base/boost_bsignals.h> #include <Swiften/Whiteboard/WhiteboardSession.h> #include <Swiften/Whiteboard/IncomingWhiteboardSession.h> @@ -24,28 +25,27 @@ namespace Swift { class WhiteboardSessionManager { friend class WhiteboardResponder; public: - WhiteboardSessionManager(IQRouter* router, PresenceOracle* presenceOracle, EntityCapsProvider* capsProvider); + WhiteboardSessionManager(IQRouter* router, StanzaChannel* stanzaChannel, PresenceOracle* presenceOracle, EntityCapsProvider* capsProvider); ~WhiteboardSessionManager(); WhiteboardSession::ref getSession(const JID& to); WhiteboardSession::ref requestSession(const JID& to); public: - /*boost::signal< void (const JID&, bool senderIsSelf)> onSessionRequest; - boost::signal< void (const JID&)> onSessionTerminate; - boost::signal< void (const JID&)> onRequestAccepted; - boost::signal< void (const JID&)> onRequestRejected;*/ boost::signal< void (IncomingWhiteboardSession::ref)> onSessionRequest; private: JID getFullJID(const JID& bareJID); OutgoingWhiteboardSession::ref createOutgoingSession(const JID& to); void handleIncomingSession(IncomingWhiteboardSession::ref session); + void handlePresenceReceived(Presence::ref presence); + void handleAvailableChanged(bool available); void deleteSessionEntry(const JID& contact); private: std::map<JID, boost::shared_ptr<WhiteboardSession> > sessions_; IQRouter* router_; + StanzaChannel* stanzaChannel_; PresenceOracle* presenceOracle_; EntityCapsProvider* capsProvider_; WhiteboardResponder* responder; |