summaryrefslogtreecommitdiffstats
path: root/dbus/test_service.h
diff options
context:
space:
mode:
Diffstat (limited to 'dbus/test_service.h')
-rw-r--r--dbus/test_service.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/dbus/test_service.h b/dbus/test_service.h
index 197b8d2..523864c 100644
--- a/dbus/test_service.h
+++ b/dbus/test_service.h
@@ -74,6 +74,10 @@ class TestService : public base::Thread {
// completed.
void RequestOwnership(base::Callback<void(bool)> callback);
+ // Release the ownership of the well-known name "TestService".
+ // |callback| will be called when the ownership has been released.
+ void ReleaseOwnership(base::Closure callback);
+
// Returns whether this instance has the name ownership or not.
bool has_ownership() const { return has_ownership_; }
@@ -166,6 +170,25 @@ class TestService : public base::Thread {
// Helper function for RequestOwnership().
void RequestOwnershipInternal(base::Callback<void(bool)> callback);
+ // Helper function for ReleaseOwnership().
+ void ReleaseOwnershipInternal(base::Closure callback);
+
+ // Sends the response on completion of the performed action.
+ void PerformActionResponse(
+ MethodCall* method_call,
+ dbus::ExportedObject::ResponseSender response_sender);
+
+ // Re-requests ownership of the well-known name after releasing it.
+ void OwnershipReleased(
+ MethodCall* method_call,
+ dbus::ExportedObject::ResponseSender response_sender);
+
+ // Sends the action response after regaining the well-known name.
+ void OwnershipRegained(
+ MethodCall* method_call,
+ dbus::ExportedObject::ResponseSender response_sender,
+ bool success);
+
// Options to use when requesting service ownership.
Bus::ServiceOwnershipOptions request_ownership_options_;