diff options
author | Matúš Kukan <matus.kukan@gmail.com> | 2012-07-20 21:31:30 +0200 |
---|---|---|
committer | Matúš Kukan <matus.kukan@gmail.com> | 2012-07-24 13:51:10 +0200 |
commit | b12954531953fb8ad585847fe42677d714991ef1 (patch) | |
tree | 27a93059da4a0e36fb19af6545f46d0fd083be60 /tubes | |
parent | 22d551b3f636c15468e9411b93872f7ab3aecdea (diff) |
tubes: init TeleManager in desktop
- register clients when we run --invisible
- create ScDocFuncSend only if we are going to use it
Change-Id: I7e33cd5a2e42e34a055146dc6c2bdac3657d6529
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() { |