2004-08-31 03:59:14 +00:00
|
|
|
namespace DBus
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
using System;
|
|
|
|
|
|
2004-09-29 01:46:45 +00:00
|
|
|
public delegate void ServiceEventHandler (string serviceName,
|
|
|
|
|
string oldOwner,
|
|
|
|
|
string newOwner);
|
2004-08-31 03:59:14 +00:00
|
|
|
|
|
|
|
|
[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]
|
2004-09-29 01:46:45 +00:00
|
|
|
public virtual event ServiceEventHandler ServiceOwnerChanged;
|
2004-08-31 03:59:14 +00:00
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|