dbus_client 0.0.0-dev.3 copy "dbus_client: ^0.0.0-dev.3" to clipboard
dbus_client: ^0.0.0-dev.3 copied to clipboard

discontinued
outdated

Native DBus client library.

example/example.dart

import 'package:dbus_client/dbus_client.dart';

main() async {
  var client = DBusClient.session();
  await client.connect();
  var values = [
    new DBusString(''),                                           // App name
    new DBusUint32(0),                                            // Replaces
    new DBusString(''),                                           // Icon
    new DBusString('Hello World!'),                               // Summary
    new DBusString(''),                                           // Body
    new DBusArray(new DBusSignature('s')),                        // Actions
    new DBusDict(new DBusSignature('s'), new DBusSignature('v')), // Hints
    new DBusInt32(-1),                                            // Expire timeout
  ];
  var result = await client.callMethod(destination: 'org.freedesktop.Notifications',
                                       path: '/org/freedesktop/Notifications',
                                       interface: 'org.freedesktop.Notifications',
                                       member: 'Notify',
                                       values: values);
  var id = (result[0] as DBusUint32).value;
  print('notify ${id}');
}
3
likes
0
pub points
9%
popularity

Publisher

unverified uploader

Native DBus client library.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

unix_domain_socket

More

Packages that depend on dbus_client