diff options
author | Ryan Lortie <desrt@desrt.ca> | 2005-02-11 18:16:27 +0000 |
---|---|---|
committer | Ryan Lortie <desrt@desrt.ca> | 2005-02-11 18:16:27 +0000 |
commit | e8e4792a5e9a5efae4e4817db93b9afd2757d0a2 (patch) | |
tree | d76d866448cf603896b627f3c7293b07cf72058f /mono | |
parent | aa4f823781185fb18187714798795d7e4b0c9b65 (diff) |
This commit was manufactured by cvs2svn to create tag 'dbus-0.23.1'.dbus-0.23.1
Diffstat (limited to 'mono')
-rw-r--r-- | mono/Service.cs | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/mono/Service.cs b/mono/Service.cs index b5547961..55091cd8 100644 --- a/mono/Service.cs +++ b/mono/Service.cs @@ -41,7 +41,7 @@ namespace DBus // This isn't used for now uint flags = 0; - if (dbus_bus_request_name (connection.RawConnection, name, flags, ref error) == -1) { + if (dbus_bus_acquire_service(connection.RawConnection, name, flags, ref error) == -1) { throw new DBusException(error); } @@ -56,12 +56,12 @@ namespace DBus RemoveFilter (); } - public static bool HasOwner(Connection connection, string name) + public static bool Exists(Connection connection, string name) { Error error = new Error(); error.Init(); - if (dbus_bus_name_has_owner(connection.RawConnection, + if (dbus_bus_service_exists(connection.RawConnection, name, ref error)) { return true; @@ -75,10 +75,10 @@ namespace DBus public static Service Get(Connection connection, string name) { - if (HasOwner(connection, name)) { + if (Exists(connection, name)) { return new Service(name, connection); } else { - throw new ApplicationException("Name '" + name + "' does not exist."); + throw new ApplicationException("Service '" + name + "' does not exist."); } } @@ -125,11 +125,11 @@ namespace DBus dbus_bus_add_match(connection.RawConnection, MatchRule, IntPtr.Zero); } - private void RemoveFilter() + private void RemoveFilter() { dbus_connection_remove_filter (Connection.RawConnection, - this.filterCalled, - IntPtr.Zero); + this.filterCalled, + IntPtr.Zero); this.filterCalled = null; dbus_bus_remove_match (connection.RawConnection, MatchRule, IntPtr.Zero); @@ -201,12 +201,12 @@ namespace DBus } [DllImport("dbus-1")] - private extern static int dbus_bus_request_name(IntPtr rawConnection, - string serviceName, - uint flags, ref Error error); + private extern static int dbus_bus_acquire_service(IntPtr rawConnection, + string serviceName, + uint flags, ref Error error); [DllImport("dbus-1")] - private extern static bool dbus_bus_name_has_owner(IntPtr rawConnection, + private extern static bool dbus_bus_service_exists(IntPtr rawConnection, string serviceName, ref Error error); |