Module: dbus

awesome D-Bus API

Info:

  • Copyright: 2008-2009 Julien Danjou
  • Originally authored by: Julien Danjou <julien@danjou.info>
    (Full contributors list available on our github project)

Functions

dbus.request_name (bus, name) Register a D-Bus name to receive messages from.
dbus.release_name (bus, name) Release a D-Bus name.
dbus.add_match (bus, name) Add a match rule to match messages going through the message bus.
dbus.remove_match (bus, name) Remove a previously added match rule "by value" (the most recently-added identical rule gets removed).
dbus.connect_signal (interface, func) Add a signal receiver on the D-Bus.
dbus.disconnect_signal (interface, func) Remove a signal receiver on the D-Bus.
dbus.emit_signal (bus, path, interface, method, type_1st_arg, value_1st_arg, type_2nd_arg, value_2nd_arg) Emit a signal on the D-Bus.


Functions

Methods
dbus.request_name (bus, name)
Register a D-Bus name to receive messages from.

Parameters:

  • bus A string indicating if we are using system or session bus.
  • name A string with the name of the D-Bus name to register.

Returns:

    True if everything worked fine, false otherwise.
dbus.release_name (bus, name)
Release a D-Bus name.

Parameters:

  • bus A string indicating if we are using system or session bus.
  • name A string with the name of the D-Bus name to unregister.

Returns:

    True if everything worked fine, false otherwise.
dbus.add_match (bus, name)
Add a match rule to match messages going through the message bus.

Parameters:

  • bus A string indicating if we are using system or session bus.
  • name A string with the name of the match rule.
dbus.remove_match (bus, name)
Remove a previously added match rule "by value" (the most recently-added identical rule gets removed).

Parameters:

  • bus A string indicating if we are using system or session bus.
  • name A string with the name of the match rule.
dbus.connect_signal (interface, func)
Add a signal receiver on the D-Bus.

Parameters:

  • interface A string with the interface name.
  • func The function to call.

Returns:

    true on success, nil + error if the signal could not be connected because another function is already connected.
dbus.disconnect_signal (interface, func)
Remove a signal receiver on the D-Bus.

Parameters:

  • interface A string with the interface name.
  • func The function to call.
dbus.emit_signal (bus, path, interface, method, type_1st_arg, value_1st_arg, type_2nd_arg, value_2nd_arg)
Emit a signal on the D-Bus.

Parameters:

  • bus A string indicating if we are using system or session bus.
  • path A string with the dbus path.
  • interface A string with the dbus interface.
  • method A string with the dbus method name.
  • type_1st_arg type of 1st argument
  • value_1st_arg value of 1st argument
  • type_2nd_arg type of 2nd argument
  • value_2nd_arg value of 2nd argument ... etc
generated by LDoc 1.4.6 Last updated 2021-11-13 00:35:50