# Module: `dbus`

A deprecated low-level D-Bus API **DO NOT USE**.

`lgi.GDBus` is always better. This module will eventually be removed. If it ever breaks due to an upstream API change, it wont be fixed.

It still exists for compatibility reasons since some user have used it in the past.

### 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

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

  ### Parameters:

  Name |  | Type(s) | Description
  --- | --- | --- | ---
  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:

  Name |  | Type(s) | Description
  --- | --- | --- | ---
  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:

  Name |  | Type(s) | Description
  --- | --- | --- | ---
  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:

  Name |  | Type(s) | Description
  --- | --- | --- | ---
  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:

  Name |  | Type(s) | Description
  --- | --- | --- | ---
  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:

  Name |  | Type(s) | Description
  --- | --- | --- | ---
  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:

  Name |  | Type(s) | Description
  --- | --- | --- | ---
  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.5.0