summaryrefslogtreecommitdiff
path: root/tubes
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@gmail.com>2012-08-04 19:59:39 +0200
committerMatúš Kukan <matus.kukan@gmail.com>2012-08-04 22:51:34 +0200
commit8269d572d084d6db200f2c02a439c7d95a235643 (patch)
tree931a031f375d48d08890461b6a673942d1df08a4 /tubes
parent525b1ad345ab04eb56e69cb67c38df1229897d83 (diff)
tubes: remove unused parameter
Change-Id: I22cd7cc866696dd7def7d7cb20d00da68d408137
Diffstat (limited to 'tubes')
-rw-r--r--tubes/inc/tubes/conference.hxx6
-rw-r--r--tubes/inc/tubes/manager.hxx2
-rw-r--r--tubes/source/conference.cxx11
-rw-r--r--tubes/source/manager.cxx17
4 files changed, 10 insertions, 26 deletions
diff --git a/tubes/inc/tubes/conference.hxx b/tubes/inc/tubes/conference.hxx
index 150e77ffe2fd..1a8627b48fb6 100644
--- a/tubes/inc/tubes/conference.hxx
+++ b/tubes/inc/tubes/conference.hxx
@@ -35,7 +35,6 @@
#include <tubes/warnings_guard_boost_signals2.hpp>
class Collaboration;
-class TeleManager;
class TeleConferenceImpl;
typedef struct _TpAccount TpAccount;
typedef struct _TpContact TpContact;
@@ -47,8 +46,7 @@ class TeleConference
{
public:
- TeleConference( TeleManager* pManager,
- TpAccount* pAccount,
+ TeleConference( TpAccount* pAccount,
TpDBusTubeChannel* pChannel,
const OString sUuid = OString(),
bool bMaster = false );
@@ -82,7 +80,6 @@ public:
void setChannel( TpAccount* pAccount, TpDBusTubeChannel* pChannel );
bool offerTube();
bool acceptTube();
- TeleManager* getManager() const { return mpManager; }
// Only for callbacks.
bool setTube( GDBusConnection* pTube );
@@ -103,7 +100,6 @@ private:
bool spinUntilTubeEstablished();
Collaboration* mpCollaboration;
- TeleManager* mpManager;
TpAccount* mpAccount;
TpDBusTubeChannel* mpChannel;
OString msUuid;
diff --git a/tubes/inc/tubes/manager.hxx b/tubes/inc/tubes/manager.hxx
index 7c895e4dac22..ab5e39a0ae51 100644
--- a/tubes/inc/tubes/manager.hxx
+++ b/tubes/inc/tubes/manager.hxx
@@ -144,7 +144,7 @@ public:
// Only for callbacks.
static void addConference( TeleConference* pConference );
- void setChannelReadyHandlerInvoked( bool b );
+ static void setChannelReadyHandlerInvoked( bool b );
bool isChannelReadyHandlerInvoked() const;
void setAccountManagerReadyHandlerInvoked( bool b );
bool isAccountManagerReadyHandlerInvoked() const;
diff --git a/tubes/source/conference.cxx b/tubes/source/conference.cxx
index c1592bfe3763..76fb0ae5b750 100644
--- a/tubes/source/conference.cxx
+++ b/tubes/source/conference.cxx
@@ -96,11 +96,6 @@ static void TeleConference_MethodCallHandler(
if (!pConference)
return;
- TeleManager* pManager = pConference->getManager();
- SAL_WARN_IF( !pManager, "tubes", "TeleConference_MethodCallHandler: no manager");
- if (!pManager)
- return;
-
if (tp_strdiff (pMethodName, LIBO_TUBES_DBUS_MSG_METHOD))
{
g_dbus_method_invocation_return_error ( pInvocation,
@@ -232,10 +227,9 @@ static void TeleConference_TubeAcceptedHandler(
}
-TeleConference::TeleConference( TeleManager* pManager, TpAccount* pAccount,
+TeleConference::TeleConference( TpAccount* pAccount,
TpDBusTubeChannel* pChannel, const OString sUuid, bool bMaster )
:
- mpManager( pManager ),
mpAccount( NULL ),
mpChannel( NULL ),
msUuid( sUuid ),
@@ -426,9 +420,8 @@ bool TeleConference::sendPacket( const OString& rPacket )
return true;
}
- OSL_ENSURE( mpManager, "tubes: TeleConference::sendPacket: no TeleManager");
SAL_WARN_IF( !pImpl->mpTube, "tubes", "TeleConference::sendPacket: no tube");
- if (!(mpManager && pImpl->mpTube))
+ if (!pImpl->mpTube)
return false;
/* FIXME: in GLib 2.32 we can use g_variant_new_fixed_array(). It does
diff --git a/tubes/source/manager.cxx b/tubes/source/manager.cxx
index ae79e5afed30..e8368df62305 100644
--- a/tubes/source/manager.cxx
+++ b/tubes/source/manager.cxx
@@ -173,7 +173,7 @@ void TeleManager_DBusChannelHandler(
SAL_INFO( "tubes", "accepting");
aAccepted = true;
- TeleConference* pConference = new TeleConference( pManager, pAccount, TP_DBUS_TUBE_CHANNEL( pChannel ) );
+ TeleConference* pConference = new TeleConference( pAccount, TP_DBUS_TUBE_CHANNEL( pChannel ) );
pConference->acceptTube();
pManager->addConference( pConference );
@@ -264,7 +264,7 @@ SAL_DLLPUBLIC_EXPORT void TeleManager_fileReceived( const rtl::OUString &rStr )
if (sUuid == "demo")
{
sUuid = TeleManager::createUuid();
- TeleConference* pConference = new TeleConference( NULL, NULL, NULL, sUuid );
+ TeleConference* pConference = new TeleConference( NULL, NULL, sUuid );
TeleManager::addConference( pConference );
TeleManager::registerDemoConference( pConference );
}
@@ -405,12 +405,7 @@ static void TeleManager_ChannelReadyHandler(
if (!pConference)
return;
- TeleManager* pManager = pConference->getManager();
- SAL_WARN_IF( !pManager, "tubes", "TeleManager_ChannelReadyHandler: no manager");
- if (!pManager)
- return;
-
- pManager->setChannelReadyHandlerInvoked( true);
+ TeleManager::setChannelReadyHandlerInvoked( true );
TpAccountChannelRequest* pChannelRequest = TP_ACCOUNT_CHANNEL_REQUEST( pSourceObject);
GError* pError = NULL;
@@ -628,7 +623,7 @@ TeleConference* TeleManager::startDemoSession()
{
INFO_LOGGER( "TeleManager::startDemoSession");
- TeleConference* pConference = new TeleConference( NULL, NULL, NULL, "demo" );
+ TeleConference* pConference = new TeleConference( NULL, NULL, "demo" );
registerDemoConference( pConference );
return pConference;
@@ -681,7 +676,7 @@ TeleConference* TeleManager::startGroupSession( TpAccount *pAccount,
setChannelReadyHandlerInvoked( false);
- TeleConference* pConference = new TeleConference( this, NULL, NULL, aSessionId );
+ TeleConference* pConference = new TeleConference( NULL, NULL, aSessionId );
tp_account_channel_request_create_and_handle_channel_async(
pChannelRequest, NULL, TeleManager_ChannelReadyHandler, pConference);
@@ -759,7 +754,7 @@ TeleConference* TeleManager::startBuddySession( TpAccount *pAccount, TpContact *
setChannelReadyHandlerInvoked( false);
- TeleConference* pConference = new TeleConference( this, NULL, NULL, createUuid(), true );
+ TeleConference* pConference = new TeleConference( NULL, NULL, createUuid(), true );
tp_account_channel_request_create_and_handle_channel_async(
pChannelRequest, NULL, TeleManager_ChannelReadyHandler, pConference );