summaryrefslogtreecommitdiffstats
path: root/mono/BusDriver.cs
blob: 4e9b7afaa50a18e56e7326b2608ca816256c6748 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
namespace DBus
{

  using System;

  public delegate void NameOwnerChangedHandler (string name,
						string oldOwner,
						string newOwner);

  [Interface ("org.freedesktop.DBus")]
  public abstract class BusDriver
  {
    [Method]
    public abstract string[] ListNames ();

    [Method]
    public abstract string GetNameOwner (string name);

    [Method]
    public abstract UInt32 GetConnectionUnixUser (string connectionName);


    [Signal]
    public virtual event NameOwnerChangedHandler NameOwnerChanged;

    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;
    }
  }
}