summaryrefslogtreecommitdiffstats
path: root/dbus/test_service.h
diff options
context:
space:
mode:
authorsatorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-23 07:29:21 +0000
committersatorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-23 07:29:21 +0000
commit3beaaa4e9b8c41be94e1688a075357b5ae58a280 (patch)
tree1c7b6d7abc4a6d54346334c132ceb5f71869661c /dbus/test_service.h
parent852754acf9190bd253e8c2e9b45d2b761cf7a12a (diff)
downloadchromium_src-3beaaa4e9b8c41be94e1688a075357b5ae58a280.zip
chromium_src-3beaaa4e9b8c41be94e1688a075357b5ae58a280.tar.gz
chromium_src-3beaaa4e9b8c41be94e1688a075357b5ae58a280.tar.bz2
Add support for sending and receiving D-Bus signals.
ObjectProxy is used to receive signals from the remote object. ExportedObject is used to send signals from the exported object. Note that signals are asynchronos so we don't have a test in end_to_end_sync_unittest.cc BUG=90036 TEST=run unit tests Review URL: http://codereview.chromium.org/7655033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97831 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'dbus/test_service.h')
-rw-r--r--dbus/test_service.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/dbus/test_service.h b/dbus/test_service.h
index 7d1abf7..0ed8462 100644
--- a/dbus/test_service.h
+++ b/dbus/test_service.h
@@ -20,7 +20,10 @@ class Response;
// The test service is used for end-to-end tests. The service runs in a
// separate thread, so it does not interfere the test code that runs in
-// the main thread. Methods such as Echo() and SlowEcho() are exported.
+// the main thread.
+//
+// The test service exports an object with methods such as Echo() and
+// SlowEcho(). The object has ability to send "Test" signal.
class TestService : public base::Thread {
public:
// Options for the test service.
@@ -56,8 +59,14 @@ class TestService : public base::Thread {
// Returns true if the bus has the D-Bus thread.
bool HasDBusThread();
+ // Sends "Test" signal with the given message from the exported object.
+ void SendTestSignal(const std::string& message);
+
private:
- // Helper function used in Shutdown().
+ // Helper function for SendTestSignal().
+ void SendTestSignalInternal(const std::string& message);
+
+ // Helper function for Shutdown().
void ShutdownInternal();
// Called when a method is exported.