summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tubes/inc/tubes/manager.hxx6
-rw-r--r--tubes/qa/test_manager.cxx4
-rw-r--r--tubes/source/manager.cxx11
3 files changed, 8 insertions, 13 deletions
diff --git a/tubes/inc/tubes/manager.hxx b/tubes/inc/tubes/manager.hxx
index 7f325c3cd94d..122b959611c3 100644
--- a/tubes/inc/tubes/manager.hxx
+++ b/tubes/inc/tubes/manager.hxx
@@ -113,7 +113,7 @@ public:
@param rBuddy
The buddy to be connected. Must be a contact of rAccount.
*/
- bool startBuddySession( const rtl::OUString& rAccount, const rtl::OUString& rBuddy );
+ bool startBuddySession( TpAccount *pAccount, const rtl::OUString& rBuddy );
void unregisterConference( TeleConferencePtr pConference );
@@ -195,14 +195,14 @@ public:
*/
static void addSuffixToNames( const char* pName );
+ TpAccount* getAccount( const rtl::OString& rAccountID );
+
private:
TeleConferenceVector maConferences;
bool mbChannelReadyHandlerInvoked : 1;
- TpAccount* getAccount( const rtl::OString& rAccountID );
-
static TeleManagerImpl* pImpl;
static sal_uInt32 nRefCount;
static rtl::OString aNameSuffix;
diff --git a/tubes/qa/test_manager.cxx b/tubes/qa/test_manager.cxx
index 63077dc9f4a1..f7461ba1730c 100644
--- a/tubes/qa/test_manager.cxx
+++ b/tubes/qa/test_manager.cxx
@@ -190,7 +190,9 @@ void TestTeleTubes::testPrepareAccountManager2()
void TestTeleTubes::testStartBuddySession1()
{
- bool bStarted = mpManager1->startBuddySession( maAcc1, maAcc2);
+ TpAccount *pAcc1 = mpManager1->getAccount( OUStringToOString( maAcc1, RTL_TEXTENCODING_UTF8));
+ CPPUNIT_ASSERT ( pAcc1 != 0);
+ bool bStarted = mpManager1->startBuddySession( pAcc1, maAcc2);
CPPUNIT_ASSERT( bStarted == true);
}
diff --git a/tubes/source/manager.cxx b/tubes/source/manager.cxx
index 796e986a3111..2e1c696a8ca1 100644
--- a/tubes/source/manager.cxx
+++ b/tubes/source/manager.cxx
@@ -392,19 +392,12 @@ bool TeleManager::startGroupSession( const rtl::OUString& rUConferenceRoom, cons
/* TODO: factor out common code with startGroupSession() */
-bool TeleManager::startBuddySession( const rtl::OUString& rAccount, const rtl::OUString& rBuddy )
+bool TeleManager::startBuddySession( TpAccount *pAccount, const rtl::OUString& rBuddy )
{
INFO_LOGGER( "TeleManager::startBuddySession");
MainLoopFlusher aFlusher( this);
- OString aAccountID( OUStringToOString( rAccount, RTL_TEXTENCODING_UTF8));
-
- TpAccount* pAccount = getAccount( aAccountID);
- SAL_WARN_IF( !pAccount, "tubes", "TeleManager::startBuddySession: no account");
- if (!pAccount)
- return false;
-
OString aSessionId( TeleManager::createUuid());
TeleConferencePtr pConference( new TeleConference( this, NULL, aSessionId));
@@ -416,7 +409,7 @@ bool TeleManager::startBuddySession( const rtl::OUString& rAccount, const rtl::O
pConference->setTarget( aTarget);
SAL_INFO( "tubes", "TeleManager::startBuddySession: creating channel request from "
- << aAccountID.getStr() << " to " << aTarget.getStr());
+ << tp_account_get_path_suffix( pAccount) << " to " << aTarget.getStr());
GHashTable* pRequest = tp_asv_new(
TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING, TP_IFACE_CHANNEL_TYPE_DBUS_TUBE,