![]() |
![]() |
![]() |
D-Bus GLib bindings - Reference Manual | ![]() |
---|---|---|---|---|
DBusGConnection; DBusGConnection* dbus_g_bus_get (DBusBusType type, GError **error); void dbus_g_thread_init (void); DBusGConnection* dbus_g_connection_open (const gchar *address, GError **error); DBusGConnection* dbus_g_connection_ref (DBusGConnection *connection); void dbus_g_connection_unref (DBusGConnection *connection); void dbus_g_connection_flush (DBusGConnection *connection); DBusConnection* dbus_g_connection_get_connection (DBusGConnection *gconnection); void dbus_g_connection_register_g_object (DBusGConnection *connection, const char *at_path, GObject *object); GObject* dbus_g_connection_lookup_g_object (DBusGConnection *connection, const char *at_path);
DBusGConnection* dbus_g_bus_get (DBusBusType type, GError **error);
Returns a connection to the given bus. The connection is a global variable shared with other callers of this function.
(Internally, calls dbus_bus_get()
then calls
dbus_connection_setup_with_g_main()
on the result.)
|
bus type |
|
address where an error can be returned. |
Returns : |
a DBusConnection |
void dbus_g_thread_init (void);
Initializes the D-BUS thread system. This function may only be called once and must be called prior to calling any other function in the D-BUS API.
DBusGConnection* dbus_g_connection_open (const gchar *address, GError **error);
Returns a connection to the given address.
(Internally, calls dbus_connection_open()
then calls
dbus_connection_setup_with_g_main()
on the result.)
|
address of the connection to open |
|
address where an error can be returned. |
Returns : |
a DBusConnection |
DBusGConnection* dbus_g_connection_ref (DBusGConnection *connection);
Increment refcount on a DBusGConnection
|
|
Returns : |
the connection that was ref'd |
void dbus_g_connection_unref (DBusGConnection *connection);
Decrement refcount on a DBusGConnection
|
void dbus_g_connection_flush (DBusGConnection *connection);
Blocks until outgoing calls and signal emissions have been sent.
|
the DBusGConnection to flush |
DBusConnection* dbus_g_connection_get_connection (DBusGConnection *gconnection);
Get the DBusConnection corresponding to this DBusGConnection. The return value does not have its refcount incremented.
|
a DBusGConnection |
Returns : |
DBusConnection |
void dbus_g_connection_register_g_object (DBusGConnection *connection, const char *at_path, GObject *object);
Registers a GObject at the given path. Properties, methods, and signals
of the object can then be accessed remotely. Methods are only available
if method introspection data has been added to the object's class
with g_object_class_install_info()
.
The registration will be cancelled if either the DBusConnection or the GObject gets finalized.
|
the D-BUS connection |
|
the path where the object will live (the object's name) |
|
the object |
GObject* dbus_g_connection_lookup_g_object (DBusGConnection *connection, const char *at_path);
FIXME
|
a DBusGConnection |
|
path |
Returns : |
the object at path at_path
|