diff options
author | Matúš Kukan <matus.kukan@gmail.com> | 2012-07-26 10:30:44 +0200 |
---|---|---|
committer | Matúš Kukan <matus.kukan@gmail.com> | 2012-07-26 15:59:18 +0200 |
commit | c55b2d0b32dd210c2a809ce2b5ebca12bfb5b1d8 (patch) | |
tree | 9305ee0a0d9c2a763a76f476006bd715f753f856 /tubes/source | |
parent | 27d3fc221d042decbd84b72719107547562d2e12 (diff) |
tubes: TeleManger's GMainLoop* now unused
Change-Id: I99b482a60155c596c4b64534f62ce4c9d4d9a94b
Diffstat (limited to 'tubes/source')
-rw-r--r-- | tubes/source/manager.cxx | 35 |
1 files changed, 5 insertions, 30 deletions
diff --git a/tubes/source/manager.cxx b/tubes/source/manager.cxx index 80f9c1c5b06b..c60388ffd296 100644 --- a/tubes/source/manager.cxx +++ b/tubes/source/manager.cxx @@ -89,7 +89,6 @@ TeleManager* TeleManager::pSingleton = NULL; class TeleManagerImpl { public: - GMainLoop* mpLoop; TpAutomaticClientFactory* mpFactory; TpBaseClient* mpClient; TpBaseClient* mpFileTransferClient; @@ -387,7 +386,7 @@ static void TeleManager_AccountManagerReadyHandler( } -TeleManager::TeleManager( bool bCreateOwnGMainLoop ) +TeleManager::TeleManager() : mbChannelReadyHandlerInvoked( false) { @@ -399,11 +398,6 @@ TeleManager::TeleManager( bool bCreateOwnGMainLoop ) ++nRefCount; if (!pImpl) pImpl = new TeleManagerImpl; - - // We need a main loop, else no callbacks. - /* TODO: could the loop be run in another thread? */ - if (bCreateOwnGMainLoop && !pImpl->mpLoop) - pImpl->mpLoop = g_main_loop_new( NULL, FALSE); } @@ -860,53 +854,37 @@ rtl::OString TeleManager::getFullObjectPath() void TeleManager::iterateLoop() { - GMainContext* pContext = getMainContext(); - g_main_context_iteration( pContext, TRUE); + g_main_context_iteration( NULL, TRUE ); } void TeleManager::iterateLoop( CallBackInvokedFunc pFunc ) { - GMainContext* pContext = getMainContext(); while (!(*pFunc)()) { - g_main_context_iteration( pContext, TRUE); + g_main_context_iteration( NULL, TRUE ); } } void TeleManager::iterateLoop( ManagerCallBackInvokedFunc pFunc ) { - GMainContext* pContext = getMainContext(); while (!(this->*pFunc)()) { - g_main_context_iteration( pContext, TRUE); + g_main_context_iteration( NULL, TRUE ); } } void TeleManager::iterateLoop( const TeleConference* pConference, ConferenceCallBackInvokedFunc pFunc ) { - GMainContext* pContext = getMainContext(); while (!(pConference->*pFunc)()) { - g_main_context_iteration( pContext, TRUE); + g_main_context_iteration( NULL, TRUE ); } } -GMainLoop* TeleManager::getMainLoop() const -{ - return pImpl->mpLoop; -} - - -GMainContext* TeleManager::getMainContext() const -{ - return (pImpl->mpLoop ? g_main_loop_get_context( pImpl->mpLoop) : NULL); -} - - // static rtl::OString TeleManager::createUuid() { @@ -958,7 +936,6 @@ void TeleManager::addSuffixToNames( const char* pName ) TeleManagerImpl::TeleManagerImpl() : - mpLoop( NULL), mpFactory( NULL), mpClient( NULL), mpFileTransferClient( NULL), @@ -986,8 +963,6 @@ TeleManagerImpl::~TeleManagerImpl() g_object_unref( mpAccountManager); if (mpContactList) delete mpContactList; - if (mpLoop) - g_main_loop_unref( mpLoop); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |