summaryrefslogtreecommitdiff
path: root/tubes/inc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2012-03-21 19:31:50 +0100
committerMatúš Kukan <matus.kukan@gmail.com>2012-07-17 16:39:26 +0200
commit5edcd7fa12c69c5b27d6b317f380f266f292008d (patch)
treee9fbbf1a8958032c8fda213c65695701848cf2e2 /tubes/inc
parent1e28e0f28082be69c02fa6dc5c0cb3e59167b7a3 (diff)
make service name configurable for tests
Diffstat (limited to 'tubes/inc')
-rw-r--r--tubes/inc/tubes/constants.h6
-rw-r--r--tubes/inc/tubes/manager.hxx28
2 files changed, 23 insertions, 11 deletions
diff --git a/tubes/inc/tubes/constants.h b/tubes/inc/tubes/constants.h
index 6087115a192f..447910ecec34 100644
--- a/tubes/inc/tubes/constants.h
+++ b/tubes/inc/tubes/constants.h
@@ -39,13 +39,11 @@
* etc. This does not need to include the org.freedesktop.Telepathy.Client
* stuff.
*/
-#define LIBO_DTUBE_SERVICE \
- TP_CLIENT_BUS_NAME_BASE "LibreOfficeTeleTest"
+#define LIBO_DTUBE_SERVICE "org.libreoffice.calc"
/* Client name suffix, for passing as 'name' to
* tp_simple_handler_new_with_am(). */
-#define LIBO_CLIENT_SUFFIX \
- "LibreOffice"
+#define LIBO_CLIENT_SUFFIX "LibreOffice"
#endif // INCLUDED_TUBES_CONSTANTS_H
diff --git a/tubes/inc/tubes/manager.hxx b/tubes/inc/tubes/manager.hxx
index decd548d2bce..6376ca0a6665 100644
--- a/tubes/inc/tubes/manager.hxx
+++ b/tubes/inc/tubes/manager.hxx
@@ -140,12 +140,6 @@ public:
*/
bool popPacket( TelePacket& rPacket );
- /// "org.freedesktop.Telepathy.Client.LibreOfficeWhatEver"
- rtl::OString getFullServiceName() const;
-
- /// "/org/freedesktop/Telepathy/Client/LibreOfficeWhatEver"
- rtl::OString getFullObjectPath() const;
-
/// Only for use with MainLoopFlusher
GMainLoop* getMainLoop() const;
@@ -181,9 +175,28 @@ public:
/** Iterate our GMainLoop, non-blocking, until nothing pending. */
void flushLoop() const;
+ /// "LibreOfficeWhatEver"
+ static rtl::OString getFullClientName();
+
+ /// "org.libreoffice.calcWhatEver"
+ static rtl::OString getFullServiceName();
+
+ /// "/org/libreoffice/calcWhatEver"
+ static rtl::OString getFullObjectPath();
+
+ /** Add a suffix to the client name and DBus tube names, e.g. "WhatEver"
+
+ Normally the client name is LibreOffice and the DBus tube service name
+ is something like org.libreoffice.calc, this modifies the names to
+ "LibreOffice"+pName and "org.libreoffice.calc"+pName to make tests not
+ interfere with the real world. This is not to be used otherwise. If
+ used it must be called before the first TeleManager is instanciated and
+ connects.
+ */
+ static void addSuffixToNames( const char* pName );
+
private:
- rtl::OString maService; // the "WhatEver" part
TeleConferenceVector maConferences;
bool mbChannelReadyHandlerInvoked : 1;
@@ -192,6 +205,7 @@ private:
static TeleManagerImpl* pImpl;
static sal_uInt32 nRefCount;
+ static rtl::OString aNameSuffix;
friend class TeleManagerImpl; // access to mutex