static void compare_gvalue_hash (void) { GHashTable *hash1; GHashTable *hash2; GValue value1 = { 0 }; GValue value2 = { 0 }; g_value_init (&value1, dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE)); g_value_init (&value2, dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE)); hash1 = g_hash_table_new (g_str_hash, g_str_equal); hash2 = g_hash_table_new (g_str_hash, g_str_equal); g_hash_table_insert (hash1, "key1", str_to_gvalue ("hello")); g_hash_table_insert (hash1, "key2", int_to_gvalue (5)); g_hash_table_insert (hash2, "key1", str_to_gvalue ("hello")); g_hash_table_insert (hash2, "key2", int_to_gvalue (5)); g_value_set_boxed (&value1, hash1); g_value_set_boxed (&value2, hash2); g_print ("Comparing identical gvalue hashes: %d\n", _gvalues_compare (&value1, &value2)); g_hash_table_remove (hash2, "key2"); g_value_set_boxed (&value2, hash2); g_print ("Comparing different length str hashes: %d\n", _gvalues_compare (&value1, &value2)); g_hash_table_insert (hash2, "key2", str_to_gvalue ("moon")); g_value_set_boxed (&value2, hash2); g_print ("Comparing different str hashes: %d\n", _gvalues_compare (&value1, &value2)); }
static inline void tp_svc_call_stream_base_init_once (gpointer klass G_GNUC_UNUSED) { static TpDBusPropertiesMixinPropInfo properties[6] = { { 0, TP_DBUS_PROPERTIES_MIXIN_FLAG_READ, "as", 0, NULL, NULL }, /* Interfaces */ { 0, TP_DBUS_PROPERTIES_MIXIN_FLAG_READ, "a{uu}", 0, NULL, NULL }, /* RemoteMembers */ { 0, TP_DBUS_PROPERTIES_MIXIN_FLAG_READ, "a{us}", 0, NULL, NULL }, /* RemoteMemberIdentifiers */ { 0, TP_DBUS_PROPERTIES_MIXIN_FLAG_READ, "u", 0, NULL, NULL }, /* LocalSendingState */ { 0, TP_DBUS_PROPERTIES_MIXIN_FLAG_READ, "b", 0, NULL, NULL }, /* CanRequestReceiving */ { 0, 0, NULL, 0, NULL, NULL } }; static TpDBusPropertiesMixinIfaceInfo interface = { 0, properties, NULL, NULL }; dbus_g_object_type_install_info (tp_svc_call_stream_get_type (), &_tp_svc_call_stream_object_info); interface.dbus_interface = g_quark_from_static_string ("org.freedesktop.Telepathy.Call1.Stream"); properties[0].name = g_quark_from_static_string ("Interfaces"); properties[0].type = G_TYPE_STRV; properties[1].name = g_quark_from_static_string ("RemoteMembers"); properties[1].type = (dbus_g_type_get_map ("GHashTable", G_TYPE_UINT, G_TYPE_UINT)); properties[2].name = g_quark_from_static_string ("RemoteMemberIdentifiers"); properties[2].type = (dbus_g_type_get_map ("GHashTable", G_TYPE_UINT, G_TYPE_STRING)); properties[3].name = g_quark_from_static_string ("LocalSendingState"); properties[3].type = G_TYPE_UINT; properties[4].name = g_quark_from_static_string ("CanRequestReceiving"); properties[4].type = G_TYPE_BOOLEAN; tp_svc_interface_set_dbus_properties_info (TP_TYPE_SVC_CALL_STREAM, &interface); call_stream_signals[SIGNAL_CALL_STREAM_RemoteMembersChanged] = g_signal_new ("remote-members-changed", G_OBJECT_CLASS_TYPE (klass), G_SIGNAL_RUN_LAST|G_SIGNAL_DETAILED, 0, NULL, NULL, g_cclosure_marshal_generic, G_TYPE_NONE, 4, (dbus_g_type_get_map ("GHashTable", G_TYPE_UINT, G_TYPE_UINT)), (dbus_g_type_get_map ("GHashTable", G_TYPE_UINT, G_TYPE_STRING)), DBUS_TYPE_G_UINT_ARRAY, (dbus_g_type_get_struct ("GValueArray", G_TYPE_UINT, G_TYPE_UINT, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INVALID))); call_stream_signals[SIGNAL_CALL_STREAM_LocalSendingStateChanged] = g_signal_new ("local-sending-state-changed", G_OBJECT_CLASS_TYPE (klass), G_SIGNAL_RUN_LAST|G_SIGNAL_DETAILED, 0, NULL, NULL, g_cclosure_marshal_generic, G_TYPE_NONE, 2, G_TYPE_UINT, (dbus_g_type_get_struct ("GValueArray", G_TYPE_UINT, G_TYPE_UINT, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INVALID))); }
static TpProxyPendingCall * hev_cli_authentication_tls_certificate_call_reject(TpProxy *proxy, gint timeout_ms, const GPtrArray *in_rejections, hev_cli_authentication_tls_certificate_callback_for_reject callback, gpointer user_data, GDestroyNotify destroy, GObject *weak_object) { GError *error = NULL; GQuark interface = TP_IFACE_QUARK_AUTHENTICATION_TLS_CERTIFICATE; DBusGProxy *iface = NULL; TpProxyPendingCall *data = NULL; g_debug("%s:%d[%s]", __FILE__, __LINE__, __FUNCTION__); iface = tp_proxy_borrow_interface_by_id(proxy, interface, &error); if(NULL == iface) { if(NULL != callback) callback(proxy, error, user_data, weak_object); if(NULL != destroy) destroy(user_data); g_error_free(error); return NULL; } if(NULL == callback) { dbus_g_proxy_call_no_reply(iface, "Reject", (dbus_g_type_get_collection("GPtrArray", (dbus_g_type_get_struct("GValueArray", G_TYPE_UINT, G_TYPE_STRING, (dbus_g_type_get_map("GHashTable", G_TYPE_STRING, G_TYPE_VALUE)), G_TYPE_INVALID)))), in_rejections, G_TYPE_INVALID); return NULL; } data = tp_proxy_pending_call_v0_new(proxy, interface, "Reject", iface, hev_cli_authentication_tls_certificate_invoke_callback_reject, G_CALLBACK(callback), user_data, destroy, weak_object, FALSE); tp_proxy_pending_call_v0_take_pending_call(data, dbus_g_proxy_begin_call_with_timeout(iface, "Reject", hev_cli_authentication_tls_certificate_collect_callback_reject, data, tp_proxy_pending_call_v0_completed, timeout_ms, (dbus_g_type_get_collection("GPtrArray", (dbus_g_type_get_struct("GValueArray", G_TYPE_UINT, G_TYPE_STRING, (dbus_g_type_get_map("GHashTable", G_TYPE_STRING, G_TYPE_VALUE)), G_TYPE_INVALID)))), in_rejections, G_TYPE_INVALID)); return data; }
static void __epris_dbus_proxy_get_all_reply_cb (DBusGProxy* proxy, DBusGProxyCall* call, void* user_data) { GError* error; GHashTable* props; error = NULL; dbus_g_proxy_end_call (proxy, call, &error, dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE), &props, G_TYPE_INVALID); _epris_dbus_proxy_get_all_reply (user_data, props, error); }
static void service_get_properties_call_notify (DBusGProxy *proxy, DBusGProxyCall *call, gpointer data) { CmService *service = data; GError *error = NULL; GHashTable *properties = NULL; gint count; if (!dbus_g_proxy_end_call ( proxy, call, &error, /* OUT values */ dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE), &properties, G_TYPE_INVALID)) { g_debug ("Error calling dbus_g_proxy_end_call in %s on %s: %s\n", __FUNCTION__, cm_service_get_name (service), error->message); g_error_free (error); return; } count = g_hash_table_size (properties); g_hash_table_foreach (properties, (GHFunc)service_update_property, service); g_hash_table_unref (properties); service_emit_updated (service); }
static inline void tp_svc_client_handler_base_init_once (gpointer klass G_GNUC_UNUSED) { static TpDBusPropertiesMixinPropInfo properties[5] = { { 0, TP_DBUS_PROPERTIES_MIXIN_FLAG_READ, "aa{sv}", 0, NULL, NULL }, /* HandlerChannelFilter */ { 0, TP_DBUS_PROPERTIES_MIXIN_FLAG_READ, "b", 0, NULL, NULL }, /* BypassApproval */ { 0, TP_DBUS_PROPERTIES_MIXIN_FLAG_READ, "as", 0, NULL, NULL }, /* Capabilities */ { 0, TP_DBUS_PROPERTIES_MIXIN_FLAG_READ, "ao", 0, NULL, NULL }, /* HandledChannels */ { 0, 0, NULL, 0, NULL, NULL } }; static TpDBusPropertiesMixinIfaceInfo interface = { 0, properties, NULL, NULL }; dbus_g_object_type_install_info (tp_svc_client_handler_get_type (), &_tp_svc_client_handler_object_info); interface.dbus_interface = g_quark_from_static_string ("org.freedesktop.Telepathy.Client.Handler"); properties[0].name = g_quark_from_static_string ("HandlerChannelFilter"); properties[0].type = (dbus_g_type_get_collection ("GPtrArray", (dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE)))); properties[1].name = g_quark_from_static_string ("BypassApproval"); properties[1].type = G_TYPE_BOOLEAN; properties[2].name = g_quark_from_static_string ("Capabilities"); properties[2].type = G_TYPE_STRV; properties[3].name = g_quark_from_static_string ("HandledChannels"); properties[3].type = dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_OBJECT_PATH); tp_svc_interface_set_dbus_properties_info (TP_TYPE_SVC_CLIENT_HANDLER, &interface); }
static inline void tp_svc_client_observer_base_init_once (gpointer klass G_GNUC_UNUSED) { static TpDBusPropertiesMixinPropInfo properties[4] = { { 0, TP_DBUS_PROPERTIES_MIXIN_FLAG_READ, "aa{sv}", 0, NULL, NULL }, /* ObserverChannelFilter */ { 0, TP_DBUS_PROPERTIES_MIXIN_FLAG_READ, "b", 0, NULL, NULL }, /* Recover */ { 0, TP_DBUS_PROPERTIES_MIXIN_FLAG_READ, "b", 0, NULL, NULL }, /* DelayApprovers */ { 0, 0, NULL, 0, NULL, NULL } }; static TpDBusPropertiesMixinIfaceInfo interface = { 0, properties, NULL, NULL }; dbus_g_object_type_install_info (tp_svc_client_observer_get_type (), &_tp_svc_client_observer_object_info); interface.dbus_interface = g_quark_from_static_string ("org.freedesktop.Telepathy.Client.Observer"); properties[0].name = g_quark_from_static_string ("ObserverChannelFilter"); properties[0].type = (dbus_g_type_get_collection ("GPtrArray", (dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE)))); properties[1].name = g_quark_from_static_string ("Recover"); properties[1].type = G_TYPE_BOOLEAN; properties[2].name = g_quark_from_static_string ("DelayApprovers"); properties[2].type = G_TYPE_BOOLEAN; tp_svc_interface_set_dbus_properties_info (TP_TYPE_SVC_CLIENT_OBSERVER, &interface); }
static void manager_get_properties_call_notify (DBusGProxy *proxy, DBusGProxyCall *call, gpointer data) { CmManager *manager = data; GError *error = NULL; GHashTable *properties = NULL; if (!dbus_g_proxy_end_call ( proxy, call, &error, /* OUT values */ dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE), &properties, G_TYPE_INVALID)) { g_debug ("Error calling dbus_g_proxy_end_call in %s: %s\n", __FUNCTION__, error->message); g_error_free (error); return; } g_hash_table_foreach (properties, (GHFunc)manager_update_property, manager); g_hash_table_unref (properties); manager_emit_updated (manager); }
static void delete_fingerprints(DBusGProxy *dev, const char *username) { GError *error = NULL; GHashTable *props; DBusGProxy *p; p = dbus_g_proxy_new_from_proxy(dev, "org.freedesktop.DBus.Properties", NULL); if (!dbus_g_proxy_call (p, "GetAll", &error, G_TYPE_STRING, "net.reactivated.Fprint.Device", G_TYPE_INVALID, dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE), &props, G_TYPE_INVALID)) { g_print("GetAll on the Properties interface failed: %s\n", error->message); exit (1); } if (!net_reactivated_Fprint_Device_delete_enrolled_fingers(dev, username, &error)) { if (dbus_g_error_has_name (error, "net.reactivated.Fprint.Error.NoEnrolledPrints") == FALSE) { g_print("ListEnrolledFingers failed: %s\n", error->message); exit (1); } else { g_print ("No fingerprints to delete on %s\n", g_value_get_string (g_hash_table_lookup (props, "name"))); } } else { g_print ("Fingerprints deleted on %s\n", g_value_get_string (g_hash_table_lookup (props, "name"))); } g_hash_table_destroy (props); g_object_unref (p); }
static GType signature_iter_to_g_type_dict (const DBusSignatureIter *subiter, gboolean is_client) { DBusSignatureIter iter; GType key_gtype; GType value_gtype; g_assert (dbus_signature_iter_get_current_type (subiter) == DBUS_TYPE_DICT_ENTRY); dbus_signature_iter_recurse (subiter, &iter); key_gtype = _dbus_gtype_from_signature_iter (&iter, is_client); if (key_gtype == G_TYPE_INVALID) return G_TYPE_INVALID; dbus_signature_iter_next (&iter); value_gtype = _dbus_gtype_from_signature_iter (&iter, is_client); if (value_gtype == G_TYPE_INVALID) return G_TYPE_INVALID; if (!_dbus_gtype_is_valid_hash_key (key_gtype) || !_dbus_gtype_is_valid_hash_value (value_gtype)) /* Later we need to return DBUS_TYPE_G_VALUE */ return G_TYPE_INVALID; return dbus_g_type_get_map ("GHashTable", key_gtype, value_gtype); }
/* * Construct a GValueArray from a SwItem. We use this to construct the * data types that the wonderful dbus-glib needs to emit the signal */ GValueArray * _sw_item_to_value_array (SwItem *item) { GValueArray *value_array; time_t time; time = sw_time_t_from_string (sw_item_get (item, "date")); value_array = g_value_array_new (4); value_array = g_value_array_append (value_array, NULL); g_value_init (g_value_array_get_nth (value_array, 0), G_TYPE_STRING); g_value_set_string (g_value_array_get_nth (value_array, 0), sw_service_get_name (sw_item_get_service (item))); value_array = g_value_array_append (value_array, NULL); g_value_init (g_value_array_get_nth (value_array, 1), G_TYPE_STRING); g_value_set_string (g_value_array_get_nth (value_array, 1), sw_item_get (item, "id")); value_array = g_value_array_append (value_array, NULL); g_value_init (g_value_array_get_nth (value_array, 2), G_TYPE_INT64); g_value_set_int64 (g_value_array_get_nth (value_array, 2), time); value_array = g_value_array_append (value_array, NULL); g_value_init (g_value_array_get_nth (value_array, 3), dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_STRING)); g_value_set_boxed (g_value_array_get_nth (value_array, 3), sw_item_peek_hash (item)); return value_array; }
static int __bt_get_transfer_properties(bt_transfer_info_t *transfer_info, const char *transfer_path) { GHashTable *hash = NULL; GValue *value; DBusGProxy *transfer_proxy; char *bdaddress; BT_CHECK_PARAMETER(transfer_info, return); BT_CHECK_PARAMETER(transfer_path, return); transfer_proxy = __bt_get_transfer_proxy(transfer_path); retv_if(transfer_proxy == NULL, BLUETOOTH_ERROR_INTERNAL); dbus_g_proxy_call(transfer_proxy, "GetProperties", NULL, G_TYPE_INVALID, dbus_g_type_get_map("GHashTable", G_TYPE_STRING, G_TYPE_VALUE), &hash, G_TYPE_INVALID); if (hash == NULL) { g_object_unref(transfer_proxy); return BLUETOOTH_ERROR_INTERNAL; } value = g_hash_table_lookup(hash, "Operation"); transfer_info->type = value ? g_strdup(g_value_get_string(value)) : NULL; if (!transfer_info->type) goto fail; value = g_hash_table_lookup(hash, "Filename"); transfer_info->filename = value ? g_strdup(g_value_get_string(value)) : NULL; if (!transfer_info->filename) goto fail; value = g_hash_table_lookup(hash, "Size"); transfer_info->file_size = value ? g_value_get_uint64(value) : 0; transfer_info->path = g_strdup(transfer_path); transfer_info->transfer_id = __bt_get_transfer_id(transfer_path); value = g_hash_table_lookup(hash, "Address"); bdaddress = value ? (char *)g_value_get_string(value) : NULL; if (!bdaddress) goto fail; transfer_info->device_name = __bt_get_remote_device_name(bdaddress); if (!transfer_info->device_name) transfer_info->device_name = g_strdup(bdaddress); g_hash_table_destroy(hash); g_object_unref(transfer_proxy); return BLUETOOTH_ERROR_NONE; fail: g_hash_table_destroy(hash); g_object_unref(transfer_proxy); return BLUETOOTH_ERROR_INTERNAL; }
/** * Get device address by calling BlueZ on device path * Returns path on failure */ static char *get_device_addr(const char *path) { DBusGProxy *proxy; char *addr; const char *caddr; GError *error = NULL; GValue *gaddr; GHashTable *props; proxy = dbus_g_proxy_new_for_name(conn, "org.bluez", path, "org.bluez.Device"); if (!proxy) { ERROR("Can't get org.bluez.Device interface"); return g_strdup(path); } if (!dbus_g_proxy_call(proxy, "GetProperties", &error, G_TYPE_INVALID, dbus_g_type_get_map("GHashTable", G_TYPE_STRING, G_TYPE_VALUE), &props, G_TYPE_INVALID)) { if (error) { ERROR("Can't call device GetProperties: %s", error->message); g_error_free(error); } else { ERROR("Can't call device GetProperties, probably disconnected"); } return g_strdup(path); } gaddr = g_hash_table_lookup(props, "Address"); if (gaddr) { caddr = g_value_get_string(gaddr); if (caddr) { DEBUG("\tDevice address is %s", caddr); } else { ERROR("Address property is not a string"); caddr = path; } } else { ERROR("No Address property in device"); caddr = path; } addr = g_ascii_strdown(caddr, -1); g_hash_table_destroy(props); g_object_unref(proxy); return addr; }
gboolean get_quodlibet_info(struct TrackInfo* ti) { DBusGConnection *connection; DBusGProxy *player, *shell; GError *error = 0; char buf[100], status[100]; static gboolean connected = FALSE; connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error); if (connection == NULL) { trace("Failed to open connection to dbus: %s\n", error->message); g_error_free (error); return FALSE; } if (!dbus_g_running(connection, "net.sacredchao.QuodLibet")) { ti->status = STATUS_OFF; return TRUE; } player = dbus_g_proxy_new_for_name(connection, "net.sacredchao.QuodLibet", "/net/sacredchao/QuodLibet", "net.sacredchao.QuodLibet"); if (!connected) { dbus_g_proxy_add_signal(player, "Paused", G_TYPE_INVALID); dbus_g_proxy_connect_signal(player, "Paused", G_CALLBACK(cb_quodlibet_paused), (gpointer) STATUS_PAUSED, 0); dbus_g_proxy_add_signal(player, "Unpaused", G_TYPE_INVALID); dbus_g_proxy_connect_signal(player, "Unpaused", G_CALLBACK(cb_quodlibet_paused), (gpointer) STATUS_NORMAL, 0); connected = TRUE; } GHashTable *table; if (!dbus_g_proxy_call(player, "CurrentSong", &error, G_TYPE_INVALID, dbus_g_type_get_map("GHashTable", G_TYPE_STRING, G_TYPE_STRING), &table, G_TYPE_INVALID)) { ti->status = STATUS_OFF; return TRUE; } ti->status = g_state; quodlibet_hash_str(table, "artist", ti->artist); quodlibet_hash_str(table, "album", ti->album); quodlibet_hash_str(table, "title", ti->track); quodlibet_hash_str(table, "~#length", buf); sscanf(buf, "%d", &ti->totalSecs); g_hash_table_destroy(table); return TRUE; }
static GType _sw_item_get_struct_type (void) { return dbus_g_type_get_struct ("GValueArray", G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INT64, dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_STRING), G_TYPE_INVALID); }
static char *__bt_get_remote_device_name(const char *bdaddress) { GError *error = NULL; char *device_path = NULL; char *name = NULL; GHashTable *hash = NULL; GValue *value; DBusGProxy *device_proxy = NULL; bt_info_t *bt_internal_info = NULL; DBG("+\n"); if (NULL == bdaddress) return NULL; bt_internal_info = _bluetooth_internal_get_information(); if (bt_internal_info->adapter_proxy == NULL) return NULL; dbus_g_proxy_call(bt_internal_info->adapter_proxy, "FindDevice", &error, G_TYPE_STRING, bdaddress, G_TYPE_INVALID, DBUS_TYPE_G_OBJECT_PATH, &device_path, G_TYPE_INVALID); if (error != NULL) { DBG("Error occured in FindDevice Proxy call [%s]\n", error->message); g_error_free(error); return NULL; } device_proxy = _bluetooth_internal_find_device_by_path(device_path); if (!device_proxy) return NULL; if (!dbus_g_proxy_call(device_proxy, "GetProperties", &error, G_TYPE_INVALID, dbus_g_type_get_map("GHashTable", G_TYPE_STRING, G_TYPE_VALUE), &hash, G_TYPE_INVALID)) { DBG( "error in GetBasicProperties [%s]\n", error->message); g_error_free(error); return NULL; } if (hash != NULL) { value = g_hash_table_lookup(hash, "Name"); name = value ? g_value_dup_string(value) : NULL; } DBG("-"); return name; }
GType modem_type_dbus_dict (void) { static gsize type = 0; if (g_once_init_enter (&type)) { GType t = dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE); g_once_init_leave (&type, t); } return type; }
static char *__bt_get_remote_device_name(const char *bdaddress) { GError *error = NULL; char *device_path = NULL; char *name = NULL; GHashTable *hash = NULL; GValue *value; DBusGProxy *device_proxy; DBusGProxy *adapter_proxy; DBusGConnection *conn; retv_if(bdaddress == NULL, NULL); adapter_proxy = _bt_get_adapter_proxy(); retv_if(adapter_proxy == NULL, NULL); conn = _bt_get_system_gconn(); retv_if(conn == NULL, NULL); dbus_g_proxy_call(adapter_proxy, "FindDevice", NULL, G_TYPE_STRING, bdaddress, G_TYPE_INVALID, DBUS_TYPE_G_OBJECT_PATH, &device_path, G_TYPE_INVALID); retv_if(device_path == NULL, NULL); device_proxy = dbus_g_proxy_new_for_name(conn, BT_BLUEZ_NAME, device_path, BT_DEVICE_INTERFACE); g_free(device_path); retv_if(device_proxy == NULL, NULL); if (!dbus_g_proxy_call(device_proxy, "GetProperties", &error, G_TYPE_INVALID, dbus_g_type_get_map("GHashTable", G_TYPE_STRING, G_TYPE_VALUE), &hash, G_TYPE_INVALID)) { if (error) { BT_ERR( "error in GetBasicProperties [%s]\n", error->message); g_error_free(error); } g_object_unref(device_proxy); return NULL; } if (hash != NULL) { value = g_hash_table_lookup(hash, "Alias"); name = value ? g_value_dup_string(value) : NULL; g_hash_table_destroy(hash); } g_object_unref(device_proxy); return name; }
static GHashTable *get_rhythmbox_song_properties( DBusGProxy *rhythmbox_shell_proxy, gchar const *uri) { GHashTable *ht = NULL; GType type = dbus_g_type_get_map( "GHashTable", G_TYPE_STRING, G_TYPE_VALUE); dbus_g_proxy_call( rhythmbox_shell_proxy, "getSongProperties", NULL, G_TYPE_STRING, uri, G_TYPE_INVALID, type, &ht, G_TYPE_INVALID); return ht; }
static inline void tp_svc_protocol_interface_presence_base_init_once (gpointer klass G_GNUC_UNUSED) { static TpDBusPropertiesMixinPropInfo properties[2] = { { 0, TP_DBUS_PROPERTIES_MIXIN_FLAG_READ, "a{s(ubb)}", 0, NULL, NULL }, /* Statuses */ { 0, 0, NULL, 0, NULL, NULL } }; static TpDBusPropertiesMixinIfaceInfo interface = { 0, properties, NULL, NULL }; dbus_g_object_type_install_info (tp_svc_protocol_interface_presence_get_type (), &_tp_svc_protocol_interface_presence_object_info); interface.dbus_interface = g_quark_from_static_string ("org.freedesktop.Telepathy.Protocol.Interface.Presence"); properties[0].name = g_quark_from_static_string ("Statuses"); properties[0].type = (dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, (dbus_g_type_get_struct ("GValueArray", G_TYPE_UINT, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, G_TYPE_INVALID)))); tp_svc_interface_set_dbus_properties_info (TP_TYPE_SVC_PROTOCOL_INTERFACE_PRESENCE, &interface); }
DBusGProxyCall* _SSO_AuthSession_process_async_timeout (DBusGProxy *proxy, const GHashTable* IN_sessionDataVa, const char * IN_mechanism, SSO_AuthSession_process_reply callback, gpointer userdata, int timeout) { DBusGAsyncData *stuff; stuff = g_slice_new (DBusGAsyncData); stuff->cb = G_CALLBACK (callback); stuff->userdata = userdata; return dbus_g_proxy_begin_call_with_timeout (proxy, "process", SSO_AuthSession_process_async_callback, stuff, _dbus_glib_async_data_free, timeout, dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE), IN_sessionDataVa, G_TYPE_STRING, IN_mechanism, G_TYPE_INVALID); }
static inline void tp_svc_dbus_properties_base_init_once (gpointer klass G_GNUC_UNUSED) { dbus_g_object_type_install_info (tp_svc_dbus_properties_get_type (), &_tp_svc_dbus_properties_object_info); dbus_properties_signals[SIGNAL_DBUS_PROPERTIES_PropertiesChanged] = g_signal_new ("properties-changed", G_OBJECT_CLASS_TYPE (klass), G_SIGNAL_RUN_LAST|G_SIGNAL_DETAILED, 0, NULL, NULL, g_cclosure_marshal_generic, G_TYPE_NONE, 3, G_TYPE_STRING, (dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE)), G_TYPE_STRV); }
static int __bt_transfer_get_properties(transfer_info_t *transfer_info) { GHashTable *hash = NULL; GValue *value; dbus_g_proxy_call(transfer_info->transfer_proxy, "GetProperties", NULL, G_TYPE_INVALID, dbus_g_type_get_map("GHashTable", G_TYPE_STRING, G_TYPE_VALUE), &hash, G_TYPE_INVALID); if (NULL == hash) { DBG("hash faliled"); return -1; } value = g_hash_table_lookup(hash, "Operation"); transfer_info->type = value ? g_strdup(g_value_get_string(value)) : NULL; if (transfer_info->type == NULL) { g_hash_table_destroy(hash); DBG("Operation faliled"); return -1; } value = g_hash_table_lookup(hash, "Filename"); transfer_info->filename = value ? g_strdup(g_value_get_string(value)) : NULL; if (transfer_info->filename == NULL) { g_hash_table_destroy(hash); return -1; } value = g_hash_table_lookup(hash, "Size"); transfer_info->file_size = value ? g_value_get_uint64(value) : 0; g_hash_table_destroy(hash); DBG("Operation %s :",transfer_info->type); DBG("FileName %s :", transfer_info->filename); DBG("Size %d :", transfer_info->file_size); return 0; }
/** * up_wakeups_ensure_properties: **/ static void up_wakeups_ensure_properties (UpWakeups *wakeups) { gboolean ret; GError *error; GHashTable *props; GValue *value; props = NULL; if (wakeups->priv->have_properties) goto out; error = NULL; ret = dbus_g_proxy_call (wakeups->priv->prop_proxy, "GetAll", &error, G_TYPE_STRING, "org.freedesktop.UPower.Wakeups", G_TYPE_INVALID, dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE), &props, G_TYPE_INVALID); if (!ret) { g_warning ("Error invoking GetAll() to get properties: %s", error->message); g_error_free (error); goto out; } value = g_hash_table_lookup (props, "HasCapability"); if (value == NULL) { g_warning ("No 'HasCapability' property"); goto out; } wakeups->priv->has_capability = g_value_get_boolean (value); /* cached */ wakeups->priv->have_properties = TRUE; out: if (props != NULL) g_hash_table_unref (props); }
static GHashTable *_get_device_props(DBusGProxy *proxy, const char *object_path) { DBusGProxy *prop_proxy; GError *error; GHashTable *device_props; prop_proxy = dbus_g_proxy_new_for_name(dbus_bus, "org.freedesktop.UDisks", object_path, "org.freedesktop.DBus.Properties"); error = NULL; device_props = NULL; if (!dbus_g_proxy_call(prop_proxy, "GetAll", &error, G_TYPE_STRING, "org.freedesktop.UDisks.Device", G_TYPE_INVALID, dbus_g_type_get_map("GHashTable", G_TYPE_STRING, G_TYPE_VALUE), &device_props, G_TYPE_INVALID)) g_message("Couldn't call GetAll() to get properties for %s: %s", object_path, error->message); g_object_unref(prop_proxy); return device_props; }
static void send_ip4_config (DBusGConnection *connection, GHashTable *config) { DBusGProxy *proxy; GError *err = NULL; proxy = dbus_g_proxy_new_for_name (connection, NM_DBUS_SERVICE_OPENSSH, NM_VPN_DBUS_PLUGIN_PATH, NM_VPN_DBUS_PLUGIN_INTERFACE); dbus_g_proxy_call (proxy, "SetIp4Config", &err, dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE), config, G_TYPE_INVALID, G_TYPE_INVALID); if (err) { nm_warning ("Could not send failure information: %s", err->message); g_error_free (err); } g_object_unref (proxy); }
/** * Finds current adapters and connect to them */ static void find_current_adapters() { GHashTable *props; GError *error = NULL; GValue *gv; GPtrArray *array; unsigned int i; if (!dbus_g_proxy_call(manager, "GetProperties", &error, G_TYPE_INVALID, dbus_g_type_get_map("GHashTable", G_TYPE_STRING, G_TYPE_VALUE), &props, G_TYPE_INVALID)) { if (error) { ERROR("Can't get adapter list: %s", error->message); g_error_free(error); } else { ERROR("Can't get adapter list, probably disconnected"); } return; } gv = g_hash_table_lookup(props, "Adapters"); if (gv) { array = g_value_get_boxed(gv); if (array) for (i = 0; i < array->len; ++i) connect_adapter(g_ptr_array_index(array, i)); } else { DEBUG("No Adapters property in manager properties"); } g_hash_table_destroy(props); }
static void create_adapter(adapter_data *adapter) { GHashTable *hash = NULL; GValue *value; DBusGProxy *default_proxy; const gchar *name; gboolean powered, discoverable; guint timeout; GtkWidget *mainbox; GtkWidget *vbox; GtkWidget *alignment; GtkWidget *table; GtkWidget *label; GtkWidget *image; GtkWidget *button; GtkWidget *entry; GtkWidget *buttonbox; int page_num; dbus_g_proxy_call(adapter->proxy, "GetProperties", NULL, G_TYPE_INVALID, dbus_g_type_get_map("GHashTable", G_TYPE_STRING, G_TYPE_VALUE), &hash, G_TYPE_INVALID); if (hash != NULL) { value = g_hash_table_lookup(hash, "Name"); name = value ? g_value_get_string(value) : NULL; value = g_hash_table_lookup(hash, "Powered"); powered = value ? g_value_get_boolean(value) : FALSE; value = g_hash_table_lookup(hash, "Discoverable"); discoverable = value ? g_value_get_boolean(value) : FALSE; value = g_hash_table_lookup(hash, "DiscoverableTimeout"); timeout = value ? g_value_get_uint(value) : 0; } else { name = NULL; powered = FALSE; discoverable = FALSE; timeout = 0; } adapter->powered = powered; adapter->discoverable = discoverable; adapter->timeout_value = timeout; default_proxy = bluetooth_client_get_default_adapter (client); if (default_proxy != NULL) { adapter->is_default = g_str_equal (dbus_g_proxy_get_path (default_proxy), dbus_g_proxy_get_path (adapter->proxy)); g_object_unref (default_proxy); } mainbox = gtk_vbox_new(FALSE, 6); gtk_container_set_border_width(GTK_CONTAINER(mainbox), 12); page_num = gtk_notebook_prepend_page(GTK_NOTEBOOK(adapter->notebook), mainbox, NULL); adapter->child = mainbox; vbox = gtk_vbox_new(FALSE, 6); gtk_box_pack_start(GTK_BOX(mainbox), vbox, FALSE, TRUE, 0); /* The discoverable checkbox */ button = gtk_check_button_new_with_mnemonic (_("Make computer _visible")); if (powered == FALSE) discoverable = FALSE; if (discoverable != FALSE && timeout == 0) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE); else if (discoverable == FALSE) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), FALSE); else { gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE); gtk_toggle_button_set_inconsistent (GTK_TOGGLE_BUTTON (button), TRUE); } gtk_widget_set_sensitive (button, adapter->powered); adapter->button_discoverable = button; adapter->signal_discoverable = g_signal_connect(G_OBJECT(button), "toggled", G_CALLBACK(discoverable_changed_cb), adapter); gtk_box_pack_start(GTK_BOX(vbox), button, FALSE, FALSE, 0); /* The friendly name */ vbox = gtk_vbox_new(FALSE, 6); gtk_box_pack_start(GTK_BOX(mainbox), vbox, FALSE, FALSE, 0); label = create_label(_("Friendly name")); gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0); alignment = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_show (alignment); gtk_box_pack_start (GTK_BOX (vbox), alignment, TRUE, TRUE, 0); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 0, 0, 12, 0); entry = gtk_entry_new(); gtk_entry_set_max_length(GTK_ENTRY(entry), 248); gtk_widget_set_size_request(entry, 240, -1); gtk_container_add (GTK_CONTAINER (alignment), entry); if (name != NULL) gtk_entry_set_text(GTK_ENTRY(entry), name); adapter->entry = entry; adapter->name_vbox = vbox; g_signal_connect(G_OBJECT(entry), "changed", G_CALLBACK(name_callback), adapter); g_signal_connect(G_OBJECT(entry), "focus-out-event", G_CALLBACK(focus_callback), adapter); gtk_widget_set_sensitive (adapter->name_vbox, adapter->powered); /* The known devices */ table = gtk_table_new(2, 2, FALSE); gtk_box_pack_start(GTK_BOX(mainbox), table, TRUE, TRUE, 0); label = create_label(_("Devices")); gtk_table_attach(GTK_TABLE(table), label, 0, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_SHRINK, 0, 6); /* Note that this will only ever show the devices on the default * adapter, this is on purpose */ adapter->chooser = bluetooth_chooser_new (NULL); g_object_set (adapter->chooser, "show-searching", FALSE, "show-device-type", FALSE, "show-device-category", FALSE, "show-pairing", TRUE, "show-connected", TRUE, "device-category-filter", BLUETOOTH_CATEGORY_PAIRED_OR_TRUSTED, NULL); g_signal_connect (adapter->chooser, "notify::device-selected", G_CALLBACK(device_selected_cb), adapter); gtk_table_attach(GTK_TABLE(table), adapter->chooser, 0, 1, 1, 2, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); adapter->devices_table = table; buttonbox = gtk_vbutton_box_new(); gtk_button_box_set_layout(GTK_BUTTON_BOX(buttonbox), GTK_BUTTONBOX_START); gtk_box_set_spacing(GTK_BOX(buttonbox), 6); gtk_box_set_homogeneous(GTK_BOX(buttonbox), FALSE); gtk_table_attach(GTK_TABLE(table), buttonbox, 1, 2, 1, 2, GTK_FILL, GTK_FILL, 6, 6); button = gtk_button_new_with_mnemonic(_("Set up _new device...")); image = gtk_image_new_from_stock(GTK_STOCK_ADD, GTK_ICON_SIZE_BUTTON); gtk_button_set_image(GTK_BUTTON(button), image); gtk_box_pack_start(GTK_BOX(buttonbox), button, FALSE, FALSE, 0); g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(wizard_callback), adapter); button = gtk_button_new_with_label(_("Disconnect")); image = gtk_image_new_from_stock(GTK_STOCK_DISCONNECT, GTK_ICON_SIZE_BUTTON); gtk_button_set_image(GTK_BUTTON(button), image); gtk_box_pack_end(GTK_BOX(buttonbox), button, FALSE, FALSE, 0); gtk_button_box_set_child_secondary(GTK_BUTTON_BOX(buttonbox), button, TRUE); gtk_widget_set_sensitive(button, FALSE); g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(disconnect_callback), adapter); adapter->button_disconnect = button; button = gtk_button_new_with_mnemonic(_("_Remove")); image = gtk_image_new_from_stock(GTK_STOCK_REMOVE, GTK_ICON_SIZE_BUTTON); gtk_button_set_image(GTK_BUTTON(button), image); gtk_box_pack_end(GTK_BOX(buttonbox), button, FALSE, FALSE, 0); gtk_button_box_set_child_secondary(GTK_BUTTON_BOX(buttonbox), button, TRUE); gtk_widget_set_sensitive(button, FALSE); g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(remove_callback), adapter); adapter->button_delete = button; gtk_widget_set_sensitive (adapter->devices_table, adapter->powered); g_object_set_data(G_OBJECT(mainbox), "adapter", adapter); gtk_widget_show_all(mainbox); if (adapter->is_default != FALSE) gtk_notebook_set_current_page (GTK_NOTEBOOK (adapter->notebook), page_num); }
/** * Connect adapter and devices D-Bus signals */ static void connect_adapter(const char *adapter) { /* Find devices and connect to ChannelConnected/Destroyed signals */ DBusGProxy *proxy; GHashTable *props; GValue *devlist; GError *error = NULL; GPtrArray *array; unsigned int i; DEBUG("connecting adapter: %s", adapter); proxy = dbus_g_proxy_new_for_name(conn, "org.bluez", adapter, "org.bluez.Adapter"); if (!proxy) { ERROR("Adapter interface not found"); return; } add_adapter(adapter, proxy); dbus_g_proxy_add_signal(proxy, "DeviceCreated", DBUS_TYPE_G_OBJECT_PATH, G_TYPE_INVALID); dbus_g_proxy_add_signal(proxy, "DeviceRemoved", DBUS_TYPE_G_OBJECT_PATH, G_TYPE_INVALID); dbus_g_proxy_connect_signal(proxy, "DeviceCreated", G_CALLBACK(device_created), NULL, NULL); dbus_g_proxy_connect_signal(proxy, "DeviceRemoved", G_CALLBACK(device_removed), NULL, NULL); if (!dbus_g_proxy_call(proxy, "GetProperties", &error, G_TYPE_INVALID, dbus_g_type_get_map("GHashTable", G_TYPE_STRING, G_TYPE_VALUE), &props, G_TYPE_INVALID)) { if (error) { ERROR("Can't get device list: %s", error->message); g_error_free(error); } else { ERROR("Can't get device list, probably disconnected"); } return; } DEBUG("Getting known devices list"); devlist = g_hash_table_lookup(props, "Devices"); if (devlist) { array = g_value_get_boxed(devlist); if (array) for (i = 0; i < array->len; ++i) connect_device_signals(g_ptr_array_index(array, i), adapter); } else { DEBUG("No Devices property in adapter properties"); } g_hash_table_destroy(props); }
static inline void tp_svc_call_stream_interface_media_base_init_once (gpointer klass G_GNUC_UNUSED) { static TpDBusPropertiesMixinPropInfo properties[11] = { { 0, TP_DBUS_PROPERTIES_MIXIN_FLAG_READ, "u", 0, NULL, NULL }, /* SendingState */ { 0, TP_DBUS_PROPERTIES_MIXIN_FLAG_READ, "u", 0, NULL, NULL }, /* ReceivingState */ { 0, TP_DBUS_PROPERTIES_MIXIN_FLAG_READ, "u", 0, NULL, NULL }, /* Transport */ { 0, TP_DBUS_PROPERTIES_MIXIN_FLAG_READ, "a(usua{sv})", 0, NULL, NULL }, /* LocalCandidates */ { 0, TP_DBUS_PROPERTIES_MIXIN_FLAG_READ, "(ss)", 0, NULL, NULL }, /* LocalCredentials */ { 0, TP_DBUS_PROPERTIES_MIXIN_FLAG_READ, "a(sq)", 0, NULL, NULL }, /* STUNServers */ { 0, TP_DBUS_PROPERTIES_MIXIN_FLAG_READ, "aa{sv}", 0, NULL, NULL }, /* RelayInfo */ { 0, TP_DBUS_PROPERTIES_MIXIN_FLAG_READ, "b", 0, NULL, NULL }, /* HasServerInfo */ { 0, TP_DBUS_PROPERTIES_MIXIN_FLAG_READ, "ao", 0, NULL, NULL }, /* Endpoints */ { 0, TP_DBUS_PROPERTIES_MIXIN_FLAG_READ, "b", 0, NULL, NULL }, /* ICERestartPending */ { 0, 0, NULL, 0, NULL, NULL } }; static TpDBusPropertiesMixinIfaceInfo interface = { 0, properties, NULL, NULL }; dbus_g_object_type_install_info (tp_svc_call_stream_interface_media_get_type (), &_tp_svc_call_stream_interface_media_object_info); interface.dbus_interface = g_quark_from_static_string ("org.freedesktop.Telepathy.Call1.Stream.Interface.Media"); properties[0].name = g_quark_from_static_string ("SendingState"); properties[0].type = G_TYPE_UINT; properties[1].name = g_quark_from_static_string ("ReceivingState"); properties[1].type = G_TYPE_UINT; properties[2].name = g_quark_from_static_string ("Transport"); properties[2].type = G_TYPE_UINT; properties[3].name = g_quark_from_static_string ("LocalCandidates"); properties[3].type = (dbus_g_type_get_collection ("GPtrArray", (dbus_g_type_get_struct ("GValueArray", G_TYPE_UINT, G_TYPE_STRING, G_TYPE_UINT, (dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE)), G_TYPE_INVALID)))); properties[4].name = g_quark_from_static_string ("LocalCredentials"); properties[4].type = (dbus_g_type_get_struct ("GValueArray", G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INVALID)); properties[5].name = g_quark_from_static_string ("STUNServers"); properties[5].type = (dbus_g_type_get_collection ("GPtrArray", (dbus_g_type_get_struct ("GValueArray", G_TYPE_STRING, G_TYPE_UINT, G_TYPE_INVALID)))); properties[6].name = g_quark_from_static_string ("RelayInfo"); properties[6].type = (dbus_g_type_get_collection ("GPtrArray", (dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE)))); properties[7].name = g_quark_from_static_string ("HasServerInfo"); properties[7].type = G_TYPE_BOOLEAN; properties[8].name = g_quark_from_static_string ("Endpoints"); properties[8].type = dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_OBJECT_PATH); properties[9].name = g_quark_from_static_string ("ICERestartPending"); properties[9].type = G_TYPE_BOOLEAN; tp_svc_interface_set_dbus_properties_info (TP_TYPE_SVC_CALL_STREAM_INTERFACE_MEDIA, &interface); call_stream_interface_media_signals[SIGNAL_CALL_STREAM_INTERFACE_MEDIA_SendingStateChanged] = g_signal_new ("sending-state-changed", G_OBJECT_CLASS_TYPE (klass), G_SIGNAL_RUN_LAST|G_SIGNAL_DETAILED, 0, NULL, NULL, g_cclosure_marshal_generic, G_TYPE_NONE, 1, G_TYPE_UINT); call_stream_interface_media_signals[SIGNAL_CALL_STREAM_INTERFACE_MEDIA_ReceivingStateChanged] = g_signal_new ("receiving-state-changed", G_OBJECT_CLASS_TYPE (klass), G_SIGNAL_RUN_LAST|G_SIGNAL_DETAILED, 0, NULL, NULL, g_cclosure_marshal_generic, G_TYPE_NONE, 1, G_TYPE_UINT); call_stream_interface_media_signals[SIGNAL_CALL_STREAM_INTERFACE_MEDIA_LocalCandidatesAdded] = g_signal_new ("local-candidates-added", G_OBJECT_CLASS_TYPE (klass), G_SIGNAL_RUN_LAST|G_SIGNAL_DETAILED, 0, NULL, NULL, g_cclosure_marshal_generic, G_TYPE_NONE, 1, (dbus_g_type_get_collection ("GPtrArray", (dbus_g_type_get_struct ("GValueArray", G_TYPE_UINT, G_TYPE_STRING, G_TYPE_UINT, (dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE)), G_TYPE_INVALID))))); call_stream_interface_media_signals[SIGNAL_CALL_STREAM_INTERFACE_MEDIA_LocalCredentialsChanged] = g_signal_new ("local-credentials-changed", G_OBJECT_CLASS_TYPE (klass), G_SIGNAL_RUN_LAST|G_SIGNAL_DETAILED, 0, NULL, NULL, g_cclosure_marshal_generic, G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING); call_stream_interface_media_signals[SIGNAL_CALL_STREAM_INTERFACE_MEDIA_RelayInfoChanged] = g_signal_new ("relay-info-changed", G_OBJECT_CLASS_TYPE (klass), G_SIGNAL_RUN_LAST|G_SIGNAL_DETAILED, 0, NULL, NULL, g_cclosure_marshal_generic, G_TYPE_NONE, 1, (dbus_g_type_get_collection ("GPtrArray", (dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE))))); call_stream_interface_media_signals[SIGNAL_CALL_STREAM_INTERFACE_MEDIA_STUNServersChanged] = g_signal_new ("s-tu-nservers-changed", G_OBJECT_CLASS_TYPE (klass), G_SIGNAL_RUN_LAST|G_SIGNAL_DETAILED, 0, NULL, NULL, g_cclosure_marshal_generic, G_TYPE_NONE, 1, (dbus_g_type_get_collection ("GPtrArray", (dbus_g_type_get_struct ("GValueArray", G_TYPE_STRING, G_TYPE_UINT, G_TYPE_INVALID))))); call_stream_interface_media_signals[SIGNAL_CALL_STREAM_INTERFACE_MEDIA_ServerInfoRetrieved] = g_signal_new ("server-info-retrieved", G_OBJECT_CLASS_TYPE (klass), G_SIGNAL_RUN_LAST|G_SIGNAL_DETAILED, 0, NULL, NULL, g_cclosure_marshal_generic, G_TYPE_NONE, 0); call_stream_interface_media_signals[SIGNAL_CALL_STREAM_INTERFACE_MEDIA_EndpointsChanged] = g_signal_new ("endpoints-changed", G_OBJECT_CLASS_TYPE (klass), G_SIGNAL_RUN_LAST|G_SIGNAL_DETAILED, 0, NULL, NULL, g_cclosure_marshal_generic, G_TYPE_NONE, 2, dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_OBJECT_PATH), dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_OBJECT_PATH)); call_stream_interface_media_signals[SIGNAL_CALL_STREAM_INTERFACE_MEDIA_ICERestartRequested] = g_signal_new ("i-ce-restart-requested", G_OBJECT_CLASS_TYPE (klass), G_SIGNAL_RUN_LAST|G_SIGNAL_DETAILED, 0, NULL, NULL, g_cclosure_marshal_generic, G_TYPE_NONE, 0); }