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

discontinued
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_client/dbus_client.dart';
import 'dart:collection';

main() async {
  var client = DBusClient.session();
  await client.connect();
  var proxy = DBusObjectProxy(client, 'org.freedesktop.Notifications',
      '/org/freedesktop/Notifications');
  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'),
        LinkedHashMap<DBusValue, DBusValue>()), // Hints
    new DBusInt32(-1), // Expire timeout
  ];
  var result =
      await proxy.callMethod('org.freedesktop.Notifications', 'Notify', values);
  var id = (result[0] as DBusUint32).value;
  print('notify ${id}');
  await client.disconnect();
}
3
likes
0
pub points
0%
popularity

Publisher

unverified uploader

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)

More

Packages that depend on dbus_client