summaryrefslogtreecommitdiff
path: root/tubes/inc
diff options
context:
space:
mode:
authorWill Thompson <will.thompson@collabora.co.uk>2012-03-23 16:39:43 +0000
committerMatúš Kukan <matus.kukan@gmail.com>2012-07-17 16:39:56 +0200
commit0dae49a03c9b4816d8cdde69e30bcd2db2e30724 (patch)
treee27f8759d133152608a45017f2591730a9c5bab5 /tubes/inc
parentc72addf2d5445a86be5307c306002565b43f4dcb (diff)
tubes: add a shared TeleManager singleton
Yes, this is in addition to the existing TeleManagerImpl singleton. This class needs to be properly split in half: one Manager part from which the UI can request new sessions and which signals the appearance of new incoming sessions, and another Session part representing the shared editing session (which in turn owns one or more Conferences, which owns exactly one tube, as now). The Manager will dispatch incoming files to the appropriate Conference by UUID or similar. But for now, Michael is opening a new window with the received file, so we want incoming and outgoing events to go to both windows so that it works well enough for a demo.
Diffstat (limited to 'tubes/inc')
-rw-r--r--tubes/inc/tubes/manager.hxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/tubes/inc/tubes/manager.hxx b/tubes/inc/tubes/manager.hxx
index f7edbfa2ff84..6d26b0225222 100644
--- a/tubes/inc/tubes/manager.hxx
+++ b/tubes/inc/tubes/manager.hxx
@@ -80,6 +80,9 @@ public:
TeleManager( bool bCreateOwnGMainLoop = false );
~TeleManager();
+ static TeleManager *get();
+ void unref();
+
/** Prepare the Telepathy Account Manager. Requires connect() to have succeeded.
Invokes an async call that is not ready until meAccountManagerStatus is
@@ -227,13 +230,19 @@ private:
static sal_uInt32 nRefCount;
static rtl::OString aNameSuffix;
+ /* FIXME: double-singletonning is bad. These two are used by ::get and
+ * ::unref, and are a quick hack so that we can have a demo working.
+ */
+ static TeleManager* pSingleton;
+ static sal_uInt32 nAnotherRefCount;
+ TUBES_DLLPRIVATE static ::osl::Mutex& GetAnotherMutex();
+
FileReceivedCallback mpFileReceivedCallback;
void *mpFileReceivedCallbackData;
friend class TeleManagerImpl; // access to mutex
TUBES_DLLPRIVATE static ::osl::Mutex& GetMutex();
-
};