diff options
Diffstat (limited to 'tubes')
-rw-r--r-- | tubes/inc/tubes/manager.hxx | 1 | ||||
-rw-r--r-- | tubes/source/manager.cxx | 17 |
2 files changed, 18 insertions, 0 deletions
diff --git a/tubes/inc/tubes/manager.hxx b/tubes/inc/tubes/manager.hxx index a112b6118a94..a47a5663852e 100644 --- a/tubes/inc/tubes/manager.hxx +++ b/tubes/inc/tubes/manager.hxx @@ -81,6 +81,7 @@ public: TUBES_DLLPUBLIC static TeleManager* get(); TUBES_DLLPUBLIC void unref(); + TUBES_DLLPUBLIC bool init( bool bListen ); /** Connect to DBus and create AccountManager. */ TUBES_DLLPUBLIC bool createAccountManager(); diff --git a/tubes/source/manager.cxx b/tubes/source/manager.cxx index d16422dacb8c..eeccbe922b89 100644 --- a/tubes/source/manager.cxx +++ b/tubes/source/manager.cxx @@ -420,6 +420,7 @@ TeleManager * TeleManager::get() { MutexGuard aGuard( GetAnotherMutex()); + SAL_INFO( "tubes", "TeleManager::get: count: " << nAnotherRefCount ); if (!pSingleton) pSingleton = new TeleManager(); @@ -435,8 +436,24 @@ TeleManager::unref() delete pSingleton; pSingleton = NULL; } + SAL_INFO( "tubes", "TeleManager::unref: count: " << nAnotherRefCount ); } +bool TeleManager::init( bool bListen ) +{ + if (createAccountManager()) + { + prepareAccountManager(); + if (bListen && !registerClients()) + SAL_WARN( "tubes", "TeleManager::init: Could not register client handlers." ); + + return true; + } + else + SAL_WARN( "tubes", "TeleManager::init: Could not create AccountManager." ); + + return false; +} bool TeleManager::createAccountManager() { |