Classes | |
struct | icd_dbus_unique_name_data |
struct | icd_dbus_mcall_table |
struct | icd_dbus_sig_table |
struct | icd_dbus_prop_table |
Typedefs | |
typedef void(*) | icd_dbus_get_unique_name_cb_fn (const gchar *name, const gchar *id, gpointer user_data) |
Functions | |
static DBusConnection * | icd_dbus_get_system_bus (void) |
static gboolean | icd_dbus_connect_path (DBusConnection *connection, const char *path, DBusObjectPathMessageFunction cb, void *user_data) |
gboolean | icd_dbus_connect_system_path (const char *path, DBusObjectPathMessageFunction cb, void *user_data) |
gboolean | icd_dbus_disconnect_system_path (const char *path) |
gboolean | icd_dbus_connect_system_bcast_signal (const char *interface, DBusHandleMessageFunction cb, void *user_data, const char *extra_filters) |
gboolean | icd_dbus_disconnect_system_bcast_signal (const char *interface, DBusHandleMessageFunction cb, void *user_data, const char *extra_filters) |
static gboolean | icd_dbus_register_service (DBusConnection *connection, const char *path, const char *service, guint service_flags, DBusObjectPathMessageFunction cb, void *user_data) |
gboolean | icd_dbus_register_system_service (const char *path, const char *service, guint service_flags, DBusObjectPathMessageFunction cb, void *user_data) |
static void | icd_dbus_unregister_service (DBusConnection *connection, const char *path, const char *service) |
void | icd_dbus_unregister_system_service (const char *path, const char *service) |
static DBusPendingCall * | icd_dbus_mcall_send (DBusConnection *connection, DBusMessage *mcall, gint timeout, DBusPendingCallNotifyFunction cb, void *user_data) |
DBusPendingCall * | icd_dbus_send_system_mcall (DBusMessage *message, gint timeout, DBusPendingCallNotifyFunction cb, void *user_data) |
static gboolean | icd_dbus_send_msg (DBusConnection *connection, DBusMessage *message) |
gboolean | icd_dbus_send_system_msg (DBusMessage *message) |
static GSList ** | icd_dbus_get_unique_name_list (void) |
void | icd_dbus_cancel_unique_name (DBusPendingCall *pending) |
static void | icd_dbus_get_unique_reply (DBusPendingCall *pending, gpointer user_data) |
gboolean | icd_dbus_get_unique_name (const gchar *name, icd_dbus_get_unique_name_cb_fn cb, gpointer user_data) |
void | icd_dbus_close (void) |
Variables | |
static DBusConnection * | dbus_system_connection = NULL |
typedef void(*) icd_dbus_get_unique_name_cb_fn(const gchar *name, const gchar *id, gpointer user_data) |
Callback function for receiving the unique D-Bus id
name | D-Bus service name | |
id | D-Bus id | |
user_data | user data |
void icd_dbus_cancel_unique_name | ( | DBusPendingCall * | pending | ) |
Cancel the unique name pending call
pending | the pending call or NULL to cancel all |
void icd_dbus_close | ( | void | ) |
Close D-Bus system bus.
static gboolean icd_dbus_connect_path | ( | DBusConnection * | connection, | |
const char * | path, | |||
DBusObjectPathMessageFunction | cb, | |||
void * | user_data | |||
) | [static] |
Helper function for connecting D-Bus paths to callbacks.
connection | the D-Bus bus to connect to | |
path | the D-Bus signal path to connect | |
cb | the callback function to call when any signal is received | |
user_data | user data passed to the callback function |
gboolean icd_dbus_connect_system_bcast_signal | ( | const char * | interface, | |
DBusHandleMessageFunction | cb, | |||
void * | user_data, | |||
const char * | extra_filters | |||
) |
Function for connecting a callback to receive broadcast signals.
interface | the interface name of the broadcasted signal | |
cb | the DBusHandleMessageFunction callback for receiving messages | |
user_data | user data to be supplied to the callback function | |
extra_filters | other filters to be included in the match or NULL |
gboolean icd_dbus_connect_system_path | ( | const char * | path, | |
DBusObjectPathMessageFunction | cb, | |||
void * | user_data | |||
) |
Helper function for connecting D-Bus system bus paths to callbacks. Unregister with dbus_connection_unregister_object_path().
path | the D-Bus signal path to connect | |
cb | the callback function to call when any signal is received | |
user_data | user data passed to the callback function |
gboolean icd_dbus_disconnect_system_bcast_signal | ( | const char * | interface, | |
DBusHandleMessageFunction | cb, | |||
void * | user_data, | |||
const char * | extra_filters | |||
) |
Function for disconnecting a broadcast signal callback function
interface | the interface name of the broadcasted signal | |
cb | the previously added DBusHandleMessageFunction callback | |
user_data | the previously supplied user data | |
extra_filters | other filters to be included in the match or NULL |
gboolean icd_dbus_disconnect_system_path | ( | const char * | path | ) |
Helper function for disconnecting a system D-Bus path
path | path |
static DBusConnection* icd_dbus_get_system_bus | ( | void | ) | [static] |
Return the connection to the system D-Bus, initialize if necessary.
gboolean icd_dbus_get_unique_name | ( | const gchar * | name, | |
icd_dbus_get_unique_name_cb_fn | cb, | |||
gpointer | user_data | |||
) |
Get the unique D-Bus bus name for a service
name | D-Bus service name | |
cb | callback | |
user_data | user data |
static GSList** icd_dbus_get_unique_name_list | ( | void | ) | [static] |
Get the static unique name request list
static void icd_dbus_get_unique_reply | ( | DBusPendingCall * | pending, | |
gpointer | user_data | |||
) | [static] |
Handle 'GetNameOwner' reply
pending | the pending call | |
user_data | callback data |
static DBusPendingCall* icd_dbus_mcall_send | ( | DBusConnection * | connection, | |
DBusMessage * | mcall, | |||
gint | timeout, | |||
DBusPendingCallNotifyFunction | cb, | |||
void * | user_data | |||
) | [static] |
Helper function for sending a D-Bus method call message used by the 'icd_dbus_send_message()' and 'icd_dbus_send_session_method_call()' functions. The auto activation flag will also be set in the D-Bus message.
connection | the D-Bus session/system bus connection to use | |
mcall | the D-Bus method call message to send | |
timeout | reply timeout in milliseconds or -1 for D-Bus default value | |
cb | callback function for the pending call, if NULL no callback will be set | |
user_data | user data to pass to the callback |
static gboolean icd_dbus_register_service | ( | DBusConnection * | connection, | |
const char * | path, | |||
const char * | service, | |||
guint | service_flags, | |||
DBusObjectPathMessageFunction | cb, | |||
void * | user_data | |||
) | [static] |
Helper function for registering a D-Bus service.
connection | the dbus connection | |
path | the D-Bus signal path to connect. | |
service | the service to provide | |
service_flags | D-Bus service flags | |
cb | the callback function to call when any signal is received | |
user_data | user data passed to the callback function |
gboolean icd_dbus_register_system_service | ( | const char * | path, | |
const char * | service, | |||
guint | service_flags, | |||
DBusObjectPathMessageFunction | cb, | |||
void * | user_data | |||
) |
Helper function for registering a D-Bus system bus service.
path | the D-Bus signal path to connect. | |
service | the service to provide | |
service_flags | D-Bus service flags | |
cb | the callback function to call when any signal is received | |
user_data | user data passed to the callback function |
static gboolean icd_dbus_send_msg | ( | DBusConnection * | connection, | |
DBusMessage * | message | |||
) | [static] |
Helper function to send the D-Bus message (signal, error, method call reply) over the given bus. Does not unref() the message.
connection | the D-Bus system or session connection | |
message | the D-Bus signal to send |
DBusPendingCall * icd_dbus_send_system_mcall | ( | DBusMessage * | message, | |
gint | timeout, | |||
DBusPendingCallNotifyFunction | cb, | |||
void * | user_data | |||
) |
Function for sending a system D-Bus method call message
message | the D-Bus method call message to send | |
timeout | reply timeout in milliseconds or -1 for D-Bus default value | |
cb | callback function for the pending call, if NULL no callback will be set | |
user_data | user data to pass to the callback |
gboolean icd_dbus_send_system_msg | ( | DBusMessage * | message | ) |
Sends a D-Bus message to the system bus. Does not unref() the message.
message | the D-Bus signal to send |
static void icd_dbus_unregister_service | ( | DBusConnection * | connection, | |
const char * | path, | |||
const char * | service | |||
) | [static] |
Helper function for unregistering a service
connection | the D-Bus connection | |
path | object path | |
service | registered service name |
void icd_dbus_unregister_system_service | ( | const char * | path, | |
const char * | service | |||
) |
Helper function for unregistering a D-Bus system bus service
path | object path | |
service | registered service name |
DBusConnection* dbus_system_connection = NULL [static] |
D-Bus connection