diff options
author | Matúš Kukan <matus.kukan@gmail.com> | 2012-07-13 22:42:48 +0200 |
---|---|---|
committer | Matúš Kukan <matus.kukan@gmail.com> | 2012-07-17 16:40:25 +0200 |
commit | 53b180a49af8aaa25b9b38a8b020113483f0af6b (patch) | |
tree | e784ec91a5a2b6614cfc8c050891c2ff0104d9e4 /tubes/inc | |
parent | 019f35d7e4e4494af3a11429219cb361897a7872 (diff) |
tubes: associate the document directly with TeleConference
Packet communication now goes directly through TeleConference and
TeleManager is used only for receiving files and new channels.
This should also allow collaboration of different documents with
different contacts independently.
Change-Id: Iaf719dce156f1c4c9edc3db4ff0964dec0e0c944
Diffstat (limited to 'tubes/inc')
-rw-r--r-- | tubes/inc/tubes/conference.hxx | 11 | ||||
-rw-r--r-- | tubes/inc/tubes/manager.hxx | 13 |
2 files changed, 11 insertions, 13 deletions
diff --git a/tubes/inc/tubes/conference.hxx b/tubes/inc/tubes/conference.hxx index b5ca996751c1..4849b4254b1e 100644 --- a/tubes/inc/tubes/conference.hxx +++ b/tubes/inc/tubes/conference.hxx @@ -38,6 +38,7 @@ #include <rtl/ustring.hxx> #include <telepathy-glib/telepathy-glib.h> #include <queue> +#include <tubes/warnings_guard_boost_signals2.hpp> typedef ::std::queue<TelePacket> TelePacketQueue; @@ -52,7 +53,7 @@ public: ~TeleConference(); /// Close channel and call finalize() - void close(); + TUBES_DLLPUBLIC void close(); /// Unrefs, unregisters from manager and calls dtor if last reference! void finalize(); @@ -62,18 +63,20 @@ public: /** @param rPacket non-const on purpose, see TelePacket::getData() */ - bool sendPacket( TelePacket& rPacket ); + TUBES_DLLPUBLIC bool sendPacket( TelePacket& rPacket ); /** Pop a received packet. */ - TUBES_DLLPUBLIC bool popPacket( TelePacket& rPacket ); + bool popPacket( TelePacket& rPacket ); /** Queue incoming data as TelePacket */ void queue( const char* pDBusSender, const char* pPacket, int nSize ); void queue( TelePacket &rPacket ); + /** Emitted when a packet is received. */ + boost::signals2::signal<void (TelePacket&)> sigPacketReceived; typedef void (*FileSentCallback)( bool aSuccess, void* pUserData); - void sendFile( rtl::OUString &localUri, FileSentCallback pCallback, void* pUserData); + TUBES_DLLPUBLIC void sendFile( rtl::OUString &localUri, FileSentCallback pCallback, void* pUserData); // --- following only to be called only by manager's callbacks --- // TODO: make friends instead diff --git a/tubes/inc/tubes/manager.hxx b/tubes/inc/tubes/manager.hxx index 6eb7915e31bd..a15d101cb3cf 100644 --- a/tubes/inc/tubes/manager.hxx +++ b/tubes/inc/tubes/manager.hxx @@ -121,7 +121,7 @@ public: empty, only the conference's UUID is used and rConferenceRoom is ignored, hopefully resulting in a local DBus tube. */ - bool startGroupSession( TpAccount *pAccount, + TeleConference* startGroupSession( TpAccount *pAccount, const rtl::OUString& rConferenceRoom, const rtl::OUString& rConferenceServer ); @@ -133,7 +133,7 @@ public: @param pBuddy The buddy to be connected. Must be a contact of pAccount. */ - bool startBuddySession( TpAccount *pAccount, TpContact *pBuddy ); + TeleConference* startBuddySession( TpAccount *pAccount, TpContact *pBuddy ); void unregisterConference( TeleConferencePtr pConference ); @@ -145,13 +145,6 @@ public: */ sal_uInt32 sendPacket( const TelePacket& rPacket ) const; - /** Emitted when a packet is received, with a TeleConference* - pointing to the instance that received the packet. - */ - boost::signals2::signal<void (TeleConference*, TelePacket&)> sigPacketReceived; - /* FIXME: listen to a signal on the conference rather than having it call us */ - void callbackOnRecieved( TeleConference* pConference, TelePacket& rPacket ) const; - /** Pop a received data packet. XXX This needs to be elaborated to pop from a specific conference, or @@ -166,6 +159,8 @@ public: boost::signals2::signal<void ( const rtl::OUString &localUri )> sigFileReceived; + boost::signals2::signal<void (TeleConference*)> sigConferenceCreated; + /// Only for use with MainLoopFlusher GMainLoop* getMainLoop() const; |