4 * Created on: Sep 4, 2013
7 * kdbus add-on to dbus daemon
12 #include <dbus/dbus-connection-internal.h>
14 dbus_bool_t make_kdbus_bus(DBusBusType type, DBusError *error)
20 DBusConnection* daemon_as_client(DBusBusType type, DBusError *error)
22 DBusConnection* connection;
24 connection = dbus_bus_get(type, error);
25 if(connection == NULL)
28 if(dbus_bus_request_name(connection, DBUS_SERVICE_DBUS, 0, error) != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER)
31 dbus_bus_add_match(connection, "type='signal', member='NameAcquired'", error);
32 dbus_bus_add_match(connection, "type='signal', member='NameLost'", error);
33 if(dbus_error_is_set(error))
39 _dbus_connection_close_possibly_shared (connection);
40 dbus_connection_unref (connection);