diff options
author | Will Thompson <will.thompson@collabora.co.uk> | 2012-03-23 16:25:34 +0000 |
---|---|---|
committer | Matúš Kukan <matus.kukan@gmail.com> | 2012-07-17 16:39:55 +0200 |
commit | c72addf2d5445a86be5307c306002565b43f4dcb (patch) | |
tree | 202f39af162dc0f9e7785dd85b05e15b27c842ba /tubes/inc | |
parent | 608d52db1edd0eab8e74f1447a486ebe78245f31 (diff) |
tubes: replace packetReceived link with a boost signal
Diffstat (limited to 'tubes/inc')
-rw-r--r-- | tubes/inc/tubes/manager.hxx | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/tubes/inc/tubes/manager.hxx b/tubes/inc/tubes/manager.hxx index defb4f9ec262..f7edbfa2ff84 100644 --- a/tubes/inc/tubes/manager.hxx +++ b/tubes/inc/tubes/manager.hxx @@ -40,6 +40,7 @@ #include <tools/link.hxx> #include <telepathy-glib/telepathy-glib.h> #include <vector> +#include <boost/signals2.hpp> // For testing purposes, we might need more in future. #define LIBO_TUBES_DBUS_MSG_METHOD "LibOMsg" @@ -72,15 +73,11 @@ public: /** Prepare tube manager with account and service to be offered/listened to. - @param rLink - Callback when a packet is received. Called with a TeleConference* - pointing to the instance that received the packet. - @param bCreateOwnGMainLoop Whether to create and iterate an own GMainLoop. For testing purposes when no GMainLoop is available. */ - TeleManager( const Link& rLink, bool bCreateOwnGMainLoop = false ); + TeleManager( bool bCreateOwnGMainLoop = false ); ~TeleManager(); /** Prepare the Telepathy Account Manager. Requires connect() to have succeeded. @@ -139,8 +136,12 @@ public: */ sal_uInt32 sendPacket( const TelePacket& rPacket ) const; - /** Calls the callback Link set with ctor. */ - long callbackOnRecieved( TeleConference* pConference ) const; + /** Emitted when a packet is received, with a TeleConference* + pointing to the instance that received the packet. + */ + boost::signals2::signal<void (TeleConference*)> sigPacketReceived; + /* FIXME: listen to a signal on the conference rather than having it call us */ + void callbackOnRecieved( TeleConference* pConference ) const; /** Pop a received data packet. @@ -218,8 +219,6 @@ public: static void TransferDone( EmpathyFTHandler *handler, TpFileTransferChannel *, gpointer user_data); private: - - Link maLink; TeleConferenceVector maConferences; bool mbChannelReadyHandlerInvoked : 1; |