diff options
author | Matúš Kukan <matus.kukan@gmail.com> | 2012-07-20 00:12:19 +0200 |
---|---|---|
committer | Matúš Kukan <matus.kukan@gmail.com> | 2012-07-20 12:46:59 +0200 |
commit | 37c67a137882cc1a9e113552dcab42a7d6337358 (patch) | |
tree | 5c1fa1c471f1719e70240a61689e8c9672771326 /tubes/source/conference.cxx | |
parent | d41903eb7b6936bbf98639d39ddc7558409d63be (diff) |
tubes: send a file for collaboration when buddy session starts
Channels for file and for tube are independent in telepathy,
so let sender create UUID and pass it to receiver, who then can
bind the document to the channel.
UUID for tube channel goes through telepathy.
UUID for file channel is encoded in the filename for now.
Tubes specific CreateDocFunc is re-introduced, so we could set
current UUID after file is received and when the document is being
constructed, get channel from TeleManager with this UUID.
This is not immune to constructing other documents in the middle of binding
proccess.
Change-Id: I57c7e57a5d7d3ccd7d94677a8cf2719c78baa2fd
Diffstat (limited to 'tubes/source/conference.cxx')
-rw-r--r-- | tubes/source/conference.cxx | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/tubes/source/conference.cxx b/tubes/source/conference.cxx index 97da5cfe0d80..da182098385b 100644 --- a/tubes/source/conference.cxx +++ b/tubes/source/conference.cxx @@ -28,6 +28,7 @@ #include <tubes/conference.hxx> #include <tubes/manager.hxx> +#include <tubes/constants.h> #if defined SAL_LOG_INFO @@ -196,16 +197,20 @@ void TeleConference::TubeAcceptedHandler( g_error_free( pError); return; } + GHashTable* pParameters = tp_dbus_tube_channel_get_parameters( pChannel); + const char* sUuid = tp_asv_get_string( pParameters, LIBO_TUBES_UUID); + pConference->msUuid = OString( sUuid); pConference->setTube( pTube); } -TeleConference::TeleConference( TeleManager* pManager, TpAccount* pAccount, TpDBusTubeChannel* pChannel ) +TeleConference::TeleConference( TeleManager* pManager, TpAccount* pAccount, TpDBusTubeChannel* pChannel, const OString sUuid ) : mpManager( pManager), mpAccount( NULL), mpChannel( NULL), + msUuid( sUuid), mpAddress( NULL), mpTube( NULL), mbTubeOfferedHandlerInvoked( false) @@ -272,9 +277,13 @@ bool TeleConference::offerTube() if (!mpChannel) return false; + GHashTable* pParameters = tp_asv_new ( + LIBO_TUBES_UUID, G_TYPE_STRING, msUuid.getStr(), + NULL); + tp_dbus_tube_channel_offer_async( mpChannel, - NULL, // no parameters for now + pParameters, &TeleConference::TubeOfferedHandler, this); |