DBusClient class
A client connection to a D-Bus server.
Constructors
- DBusClient(DBusAddress address, {bool introspectable = true, bool messageBus = true})
-
Creates a new DBus client to connect on
address
. IfmessageBus
is false, then the server is not running a message bus and no adresses or client to client communication is suported. - DBusClient.session({bool introspectable = true})
-
Creates a new DBus client to communicate with the session bus.
factory
- DBusClient.system({bool introspectable = true})
-
Creates a new DBus client to communicate with the system bus.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- introspectable → bool
-
True if this client allows other clients to introspect it.
final
-
nameAcquired
→ Stream<
String> -
Stream of names as they are acquired by this client.
no setter
-
nameLost
→ Stream<
String> -
Stream of names as this client loses them.
no setter
-
nameOwnerChanged
→ Stream<
DBusNameOwnerChangedEvent> -
Stream of name change events.
no setter
-
ownedNames
→ Iterable<
String> -
Gets the names owned by this connection.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- uniqueName → String
-
Gets the unique name this connection uses.
no setter
Methods
-
callMethod(
{String? destination, required DBusObjectPath path, String? interface, required String name, Iterable< DBusValue> values = const [], DBusSignature? replySignature, bool noReplyExpected = false, bool noAutoStart = false, bool allowInteractiveAuthorization = false}) → Future<DBusMethodSuccessResponse> - Invokes a method on a D-Bus object. Throws DBusMethodResponseException if the remote side returns an error.
-
close(
) → Future< void> - Terminates all active connections. If a client remains unclosed, the Dart process may not terminate.
-
emitSignal(
{String? destination, required DBusObjectPath path, required String interface, required String name, Iterable< DBusValue> values = const []}) → Future<void> - Emits a signal from a D-Bus object.
-
getConnectionCredentials(
String name) → Future< DBusProcessCredentials> -
Returns credentials for the process running the client that owns
name
. -
getConnectionUnixProcessId(
String name) → Future< int> -
Returns the Unix process ID of the process running the client that owns
name
. -
getConnectionUnixUser(
String name) → Future< int> -
Returns the Unix user ID of the process running the client that owns
name
. -
getId(
) → Future< String> - Gets the unique ID of the bus.
-
getMachineId(
[String destination = 'org.freedesktop.DBus']) → Future< String> -
Gets the machine ID of the client at the given
destination
. Ifdestination
is not set, gets the machine the D-Bus server is running on. -
getNameOwner(
String name) → Future< String?> -
Returns the unique connection name of the client that owns
name
. -
listActivatableNames(
) → Future< List< String> > - Returns a list of names that activate services.
-
listNames(
) → Future< List< String> > - Lists the registered names on the bus.
-
listQueuedOwners(
String name) → Future< List< String> > -
Lists the unique bus names of the clients queued to own the well-known bus
name
. -
nameHasOwner(
String name) → Future< bool> -
Returns true if the
name
is currently registered on the bus. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
ping(
[String destination = 'org.freedesktop.DBus']) → Future< void> -
Sends a ping request to the client at the given
destination
. Ifdestination
is not set, pings the D-Bus server. -
registerObject(
DBusObject object) → Future< void> -
Registers an
object
on the bus. -
releaseName(
String name) → Future< DBusReleaseNameReply> - Releases the D-Bus object name previously acquired using requestName().
-
requestName(
String name, {Set< DBusRequestNameFlag> flags = const {}}) → Future<DBusRequestNameReply> -
Requests usage of
name
as a D-Bus object name. -
startServiceByName(
String name) → Future< DBusStartServiceByNameReply> -
Starts the service with
name
. -
toString(
) → String -
A string representation of this object.
override
-
unregisterObject(
DBusObject object) → Future< void> -
Unregisters an
object
on the bus.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited