GetObject() public method

public GetObject ( string bus_name, NDesk.DBus.ObjectPath path ) : object
bus_name string
path NDesk.DBus.ObjectPath
return object
Beispiel #1
0
 private static bool DeviceIsOnUsbBus(Connection conn, string halNameOnDbus, HalDevice device)
 {
     bool deviceIsOnUsbSubsystem;
     bool thereIsAPathToParent;
     do
     {
         string subsystem = TryGetDevicePropertyString(device, "info.subsystem");
         deviceIsOnUsbSubsystem = subsystem.Contains("usb");
         string pathToParent = TryGetDevicePropertyString(device, "info.parent");
         thereIsAPathToParent = String.IsNullOrEmpty(pathToParent);
         device = conn.GetObject<HalDevice>(halNameOnDbus, new ObjectPath(pathToParent));
     } while (!deviceIsOnUsbSubsystem && !thereIsAPathToParent);
     return deviceIsOnUsbSubsystem;
 }
Beispiel #2
0
 public GPS()
 {
     DbusConnection = Bus.System;
     gps = DbusConnection.GetObject<Gpsd> ("org.gpsd", new ObjectPath ("/org/gpsd"));
     gps.fix += HandleGpsfix;
 }