2004-09-28 Jon Trowbridge <trow@ximian.com>
[platform/upstream/dbus.git] / mono / BusDriver.cs
1 namespace DBus
2 {
3
4   using System;
5
6   public delegate void ServiceEventHandler (string serviceName,
7                                             string oldOwner,
8                                             string newOwner);
9
10   [Interface ("org.freedesktop.DBus")]
11   public abstract class BusDriver
12   {
13     [Method]
14     public abstract string[] ListServices ();
15
16     [Method]
17     public abstract string GetServiceOwner (string serviceName);
18
19     [Method]
20     public abstract UInt32 GetConnectionUnixUser (string connectionName);
21
22
23     [Signal]
24     public virtual event ServiceEventHandler ServiceOwnerChanged;
25
26     static public BusDriver New (Connection connection)
27     {
28       Service service;
29       service = Service.Get (connection, "org.freedesktop.DBus");
30
31       BusDriver driver;
32       driver = (BusDriver) service.GetObject (typeof (BusDriver), "/org/freedesktop/DBus");
33       
34       return driver;
35     }
36   }
37 }