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 |
References icd_dbus_get_unique_name_list().
Referenced by icd_dbus_close(), and icd_dbus_get_unique_reply().
void icd_dbus_close | ( | void | ) |
Close D-Bus system bus.
References dbus_system_connection, and icd_dbus_cancel_unique_name().
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 |
References ILOG_ERR.
Referenced by icd_dbus_connect_system_path(), and icd_dbus_register_service().
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 |
References icd_dbus_get_system_bus(), and ILOG_ERR.
Referenced by icd_name_owner_add_filter(), icd_osso_ic_init(), and icd_policy_init().
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 |
References icd_dbus_connect_path(), icd_dbus_get_system_bus(), and ILOG_ERR.
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 |
References icd_dbus_get_system_bus(), and ILOG_ERR.
Referenced by icd_name_owner_remove_filter(), icd_osso_ic_deinit(), policy_always_online_destruct(), and policy_change_destruct().
gboolean icd_dbus_disconnect_system_path | ( | const char * | path | ) |
Helper function for disconnecting a system D-Bus path
path | path |
References icd_dbus_get_system_bus().
static DBusConnection* icd_dbus_get_system_bus | ( | void | ) | [static] |
Return the connection to the system D-Bus, initialize if necessary.
References dbus_system_connection, and ILOG_ERR.
Referenced by icd_dbus_connect_system_bcast_signal(), icd_dbus_connect_system_path(), icd_dbus_disconnect_system_bcast_signal(), icd_dbus_disconnect_system_path(), icd_dbus_register_system_service(), icd_dbus_send_system_mcall(), icd_dbus_send_system_msg(), and icd_dbus_unregister_system_service().
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 |
name | D-Bus service name | |
cb | callback | |
user_data | user data |
References icd_dbus_get_unique_name_list(), icd_dbus_get_unique_reply(), icd_dbus_send_system_mcall(), and ILOG_ERR.
static GSList** icd_dbus_get_unique_name_list | ( | void | ) | [static] |
Get the static unique name request list
Referenced by icd_dbus_cancel_unique_name(), and icd_dbus_get_unique_name().
static void icd_dbus_get_unique_reply | ( | DBusPendingCall * | pending, | |
gpointer | user_data | |||
) | [static] |
Handle 'GetNameOwner' reply
pending | the pending call | |
user_data | callback data |
References icd_dbus_cancel_unique_name().
Referenced by icd_dbus_get_unique_name().
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 |
References ILOG_ERR.
Referenced by icd_dbus_send_system_mcall().
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 |
References icd_dbus_connect_path(), and ILOG_ERR.
Referenced by icd_dbus_register_system_service().
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 |
References icd_dbus_get_system_bus(), and icd_dbus_register_service().
Referenced by icd_dbus_api_init(), and icd_osso_ic_init().
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 |
References ILOG_ERR.
Referenced by icd_dbus_send_system_msg().
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 |
References icd_dbus_get_system_bus(), and icd_dbus_mcall_send().
Referenced by icd_dbus_get_unique_name(), icd_osso_ic_shutdown(), icd_osso_ui_send_retry(), icd_osso_ui_send_save(), policy_always_online_flightmode_init(), policy_change_confirm(), policy_iap_ask_flightmode(), and policy_iap_ask_request().
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 |
References icd_dbus_get_system_bus(), and icd_dbus_send_msg().
Referenced by icd_dbus_api_addrinfo_cb(), icd_dbus_api_addrinfo_req(), icd_dbus_api_addrinfo_send(), icd_dbus_api_connect_req(), icd_dbus_api_disconnect_req(), icd_dbus_api_request(), icd_dbus_api_scan_cancel(), icd_dbus_api_scan_req(), icd_dbus_api_scan_result(), icd_dbus_api_select_req(), icd_dbus_api_send_connect_sig(), icd_dbus_api_state_req(), icd_dbus_api_state_scan_send(), icd_dbus_api_statistics_ip_cb(), icd_dbus_api_statistics_req(), icd_dbus_api_update_search(), icd_dbus_api_update_state(), icd_osso_ic_connstats_error(), icd_osso_ic_connstats_ip_cb(), icd_osso_ic_ipinfo_cb(), icd_osso_ic_request(), icd_osso_ic_send_ack(), icd_osso_ic_send_nack(), and icd_status_send_signal().
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 |
References ILOG_ERR.
Referenced by icd_dbus_unregister_system_service().
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 |
References icd_dbus_get_system_bus(), and icd_dbus_unregister_service().
Referenced by icd_dbus_api_deinit(), icd_osso_ic_deinit(), and icd_osso_ic_init().
DBusConnection* dbus_system_connection = NULL [static] |
D-Bus connection
Referenced by icd_dbus_close(), and icd_dbus_get_system_bus().