DBusAddress.unix constructor

DBusAddress.unix({
  1. String? path,
  2. Directory? dir,
  3. Directory? tmpdir,
  4. String? abstract,
  5. bool runtime = false,
})

Creates a new D-Bus address connecting to a Unix socket.

Implementation

factory DBusAddress.unix(
    {String? path,
    Directory? dir,
    Directory? tmpdir,
    String? abstract,
    bool runtime = false}) {
  var properties = <String, String>{};
  if (path != null) {
    properties['path'] = path;
  }
  if (dir != null) {
    properties['dir'] = dir.path;
  }
  if (tmpdir != null) {
    properties['tmpdir'] = tmpdir.path;
  }
  if (abstract != null) {
    properties['abstract'] = abstract;
  }
  if (runtime) {
    properties['runtime'] = 'yes';
  }
  return DBusAddress.withTransport('unix', properties);
}