DBusSignalStream constructor

DBusSignalStream(
  1. DBusClient client, {
  2. String? sender,
  3. String? interface,
  4. String? name,
  5. DBusObjectPath? path,
  6. DBusObjectPath? pathNamespace,
  7. DBusSignature? signature,
})

Creates a stream of signals that match sender, interface, name, path and/or pathNamespace.

If signature is provided this causes the stream to throw a DBusSignalSignatureException if a signal is received that does not match the provided signature.

Implementation

DBusSignalStream(DBusClient client,
    {String? sender,
    String? interface,
    String? name,
    DBusObjectPath? path,
    DBusObjectPath? pathNamespace,
    DBusSignature? signature})
    : _client = client,
      _rule = DBusMatchRule(
          type: DBusMessageType.signal,
          sender: sender != null ? DBusBusName(sender) : null,
          interface: interface != null ? DBusInterfaceName(interface) : null,
          member: name != null ? DBusMemberName(name) : null,
          path: path,
          pathNamespace: pathNamespace),
      _signature = signature {
  _controller.onListen = _onListen;
  _controller.onCancel = _onCancel;
}