dbus 0.2.1 copy "dbus: ^0.2.1" to clipboard
dbus: ^0.2.1 copied to clipboard

outdated

A native Dart implementation of the D-Bus message bus client. This package allows Dart applications to directly access services on the Linux desktop.

example/example.dart

import 'package:dbus/dbus.dart';

void main() async {
  var client = DBusClient.session();
  var object = DBusRemoteObject(client, 'org.freedesktop.Notifications',
      DBusObjectPath('/org/freedesktop/Notifications'));
  var values = [
    DBusString(''), // App name
    DBusUint32(0), // Replaces
    DBusString(''), // Icon
    DBusString('Hello World!'), // Summary
    DBusString(''), // Body
    DBusArray(DBusSignature('s')), // Actions
    DBusDict(DBusSignature('s'), DBusSignature('v')), // Hints
    DBusInt32(-1), // Expire timeout
  ];
  var result = await object.callMethod(
      'org.freedesktop.Notifications', 'Notify', values);
  var id = result.returnValues[0];
  print('notify ${id.toNative()}');
  await client.close();
}
58
likes
0
pub points
96%
popularity

Publisher

verified publishercanonical.com

A native Dart implementation of the D-Bus message bus client. This package allows Dart applications to directly access services on the Linux desktop.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

args, meta, xml

More

Packages that depend on dbus