DBusRemoteObject constructor

DBusRemoteObject(
  1. DBusClient client, {
  2. required String name,
  3. required DBusObjectPath path,
})

Creates an object that access accesses a remote D-Bus object using bus name with path.

Implementation

DBusRemoteObject(this.client, {required this.name, required this.path}) {
  var rawPropertiesChanged = DBusRemoteObjectSignalStream(
      object: this,
      interface: 'org.freedesktop.DBus.Properties',
      name: 'PropertiesChanged');
  propertiesChanged = rawPropertiesChanged.map((signal) {
    if (signal.signature == DBusSignature('sa{sv}as')) {
      return DBusPropertiesChangedSignal(signal);
    } else {
      throw 'org.freedesktop.DBus.Properties.PropertiesChanged contains invalid values ${signal.values}';
    }
  });
}