diff options
Diffstat (limited to 'mono/BusDriver.cs')
| -rw-r--r-- | mono/BusDriver.cs | 39 | 
1 files changed, 39 insertions, 0 deletions
diff --git a/mono/BusDriver.cs b/mono/BusDriver.cs new file mode 100644 index 00000000..8b1fc680 --- /dev/null +++ b/mono/BusDriver.cs @@ -0,0 +1,39 @@ +namespace DBus +{ + +  using System; + +  public delegate void ServiceEventHandler (string serviceName); + +  [Interface ("org.freedesktop.DBus")] +  public abstract class BusDriver +  { +    [Method] +    public abstract string[] ListServices (); + +    [Method] +    public abstract string GetServiceOwner (string serviceName); + +    [Method] +    public abstract UInt32 GetConnectionUnixUser (string connectionName); + + +    [Signal] +    public virtual event ServiceEventHandler ServiceCreated; + +    [Signal] +    public virtual event ServiceEventHandler ServiceDeleted; + + +    static public BusDriver New (Connection connection) +    { +      Service service; +      service = Service.Get (connection, "org.freedesktop.DBus"); + +      BusDriver driver; +      driver = (BusDriver) service.GetObject (typeof (BusDriver), "/org/freedesktop/DBus"); +       +      return driver; +    } +  } +}  | 
