00001 namespace DBus 00002 { 00003 00004 using System; 00005 00006 public delegate void NameOwnerChangedHandler (string name, 00007 string oldOwner, 00008 string newOwner); 00009 00010 [Interface ("org.freedesktop.DBus")] 00011 public abstract class BusDriver 00012 { 00013 [Method] 00014 public abstract string[] ListNames (); 00015 00016 [Method] 00017 public abstract string GetNameOwner (string name); 00018 00019 [Method] 00020 public abstract UInt32 GetConnectionUnixUser (string connectionName); 00021 00022 00023 [Signal] 00024 public virtual event NameOwnerChangedHandler NameOwnerChanged; 00025 00026 static public BusDriver New (Connection connection) 00027 { 00028 Service service; 00029 service = Service.Get (connection, "org.freedesktop.DBus"); 00030 00031 BusDriver driver; 00032 driver = (BusDriver) service.GetObject (typeof (BusDriver), "/org/freedesktop/DBus"); 00033 00034 return driver; 00035 } 00036 } 00037 }