ibusmainloop

ibusmainloop — DBus server and connection setup functions.

Stability Level

Stable, unless otherwise indicated

Synopsis

void                (*DBusConnectionSetupFunc)          (DBusConnection *connection,
                                                         gpointer user_data);
void                (*DBusServerSetupFunc)              (DBusServer *server,
                                                         gpointer user_data);
void                ibus_mainloop_setup                 (DBusConnectionSetupFunc connection_func,
                                                         DBusServerSetupFunc server_func,
                                                         gpointer user_data);
void                ibus_dbus_server_setup              (DBusServer *server);
void                ibus_dbus_connection_setup          (DBusConnection *connection);

Description

This section defines the DBus server and connection setup functions, and prototypes of their callback functions.

Details

DBusConnectionSetupFunc ()

void                (*DBusConnectionSetupFunc)          (DBusConnection *connection,
                                                         gpointer user_data);

A prototype of callback to DBus connection setup function.

connection :

A DBusConnection

user_data :

User data to be passed to callback function.

DBusServerSetupFunc ()

void                (*DBusServerSetupFunc)              (DBusServer *server,
                                                         gpointer user_data);

A prototype of DBus server setup function.

server :

A DBusConnection

user_data :

User data to be passed to callback function.

ibus_mainloop_setup ()

void                ibus_mainloop_setup                 (DBusConnectionSetupFunc connection_func,
                                                         DBusServerSetupFunc server_func,
                                                         gpointer user_data);

Sets the watch and timeout functions of a DBusConnection and DBusServer to integrate the connection with the GLib main loop.

Parameter user_data should be in type GMainContext. It will be passed to both callback functions, however, normally NULL is sufficient.

If called twice for the same user_data, does nothing the second time. If called once with user_data A and once with user_data B, user_data B replaces user_data A as the context monitoring the connection.

see_also: ibus_dbus_connection_setup(), ibus_dbus_server_setup().

connection_func :

A DBus connection setup function.

server_func :

A prototype of DBus server setup function.

user_data :

User data to be passed to callback function.

ibus_dbus_server_setup ()

void                ibus_dbus_server_setup              (DBusServer *server);

Sets the watch and timeout functions of a DBusServer to integrate the server with the GLib main loop.

This function uses the parameter user_data and server_func set with ibus_mainloop_setup(), or fall back to NULL and dbus_server_setup() if those are not defined.

see_also: ibus_mainloop_setup(), dbus_server_setup().

server :

A DBusServer.

ibus_dbus_connection_setup ()

void                ibus_dbus_connection_setup          (DBusConnection *connection);

Sets the watch and timeout functions of a DBusConnection to integrate the connection with the GLib main loop.

This function uses the parameter user_data and connection_func set with ibus_mainloop_setup(), or fall back to NULL and dbus_connection_setup() if those are not defined.

see_also: ibus_mainloop_setup(), dbus_connection_setup().

connection :

A DBusConnection.