本文整理汇总了C++中dbus_g_proxy_end_call函数的典型用法代码示例。如果您正苦于以下问题:C++ dbus_g_proxy_end_call函数的具体用法?C++ dbus_g_proxy_end_call怎么用?C++ dbus_g_proxy_end_call使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了dbus_g_proxy_end_call函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: __bluetooth_network_disconnect_request_cb
static void __bluetooth_network_disconnect_request_cb(DBusGProxy *proxy, DBusGProxyCall *call,
gpointer user_data)
{
GError *g_error = NULL;
DBusGConnection *conn = NULL;
int result = BLUETOOTH_ERROR_NONE;
conn = (DBusGConnection *) user_data;
dbus_g_proxy_end_call(proxy, call, &g_error, G_TYPE_INVALID);
g_object_unref(proxy);
dbus_g_connection_unref(conn);
if (g_error != NULL) {
DBG("Network Client disconnection Dbus Call Error: %s\n", g_error->message);
g_error_free(g_error);
result = BLUETOOTH_ERROR_INTERNAL;
} else {
DBG("Network Client disconnection Dbus Call is done\n");
}
_bluetooth_internal_event_cb(BLUETOOTH_EVENT_NETWORK_DISCONNECTED,
result, NULL);
}
开发者ID:tizenorg,项目名称:framework.connectivity.bluetooth-frwk,代码行数:26,代码来源:bluetooth-network-api.c
示例2: add_or_change_cb
static void
add_or_change_cb (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_data)
{
CBInfo *info = user_data;
GError *error = NULL;
char *zone = NULL;
if (!dbus_g_proxy_end_call (proxy, call_id, &error,
G_TYPE_STRING, &zone,
G_TYPE_INVALID)) {
g_assert (error);
if (g_strcmp0 (error->message, "ZONE_ALREADY_SET") != 0) {
nm_log_warn (LOGD_FIREWALL, "(%s) firewall zone add/change failed [%u]: (%d) %s",
info->iface, info->id, error->code, error->message);
} else {
nm_log_dbg (LOGD_FIREWALL, "(%s) firewall zone add/change failed [%u]: (%d) %s",
info->iface, info->id, error->code, error->message);
}
} else {
nm_log_dbg (LOGD_FIREWALL, "(%s) firewall zone add/change succeeded [%u]",
info->iface, info->id);
}
if (info->callback)
info->callback (error, info->user_data);
info->completed = TRUE;
g_free (zone);
g_clear_error (&error);
}
开发者ID:aelarabawy,项目名称:NetworkManager,代码行数:30,代码来源:nm-firewall-manager.c
示例3: get_device_state_cb
static void
get_device_state_cb (DBusGProxy *proxy,
DBusGProxyCall *call,
void *user_data)
{
GValue value = {0,};
GError *error = NULL;
NMDevice *nm_device = (NMDevice *) user_data;
if (!dbus_g_proxy_end_call (proxy,
call,
&error,
G_TYPE_VALUE, &value,
G_TYPE_INVALID)) {
g_warning ("Error reading property: %s\n", error->message);
g_error_free (error);
return;
}
NMDeviceState state = g_value_get_uint (&value);
if (state == NM_DEVICE_STATE_ACTIVATED) {
dbus_g_proxy_begin_call (nm_device->prop_proxy,
"Get",
get_device_interface_cb,
nm_device,
NULL,
G_TYPE_STRING, DEVICE_INTERFACE,
G_TYPE_STRING, "Interface",
G_TYPE_INVALID);
}
g_value_unset (&value);
}
开发者ID:lovebug356,项目名称:gupnp,代码行数:35,代码来源:gupnp-network-manager.c
示例4: loc_props_cb
static void
loc_props_cb (DBusGProxy *proxy, DBusGProxyCall *call, gpointer user_data)
{
GError *error = NULL;
GHashTable *props = NULL;
Modem *modem = user_data;
if (!dbus_g_proxy_end_call (proxy, call, &error,
DBUS_TYPE_G_MAP_OF_VARIANT, &props,
G_TYPE_INVALID)) {
g_warning ("%s: failed to get location interface properties: (%d) %s",
__func__,
error ? error->code : -1,
error && error->message ? error->message : "(unknown)");
g_clear_error (&error);
return;
}
modem_properties_changed (modem->loc_proxy, MM_DBUS_LOC_INTERFACE, props, modem);
g_hash_table_destroy (props);
/* Now that we know the device supports location services, get basic
* modem properties and start grabbing location info.
*/
dbus_g_proxy_begin_call (modem->props_proxy, "GetAll",
modem_props_cb, modem, NULL,
G_TYPE_STRING, MM_DBUS_MODEM_INTERFACE, G_TYPE_INVALID);
}
开发者ID:Aktrisa,项目名称:geoclue,代码行数:28,代码来源:geoclue-gsmloc-mm.c
示例5: set_time_notify
static void
set_time_notify (DBusGProxy *proxy,
DBusGProxyCall *call,
void *user_data)
{
SetTimeCallbackData *data = user_data;
GError *error = NULL;
if (dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID)) {
if (data->callback)
data->callback (data->data, NULL);
}
else {
if (error->domain == DBUS_GERROR &&
error->code == DBUS_GERROR_NO_REPLY) {
/* these errors happen because dbus doesn't
* use monotonic clocks
*/
g_warning ("ignoring no-reply error when setting time");
g_error_free (error);
if (data->callback)
data->callback (data->data, NULL);
}
else {
if (data->callback)
data->callback (data->data, error);
else
g_error_free (error);
}
}
}
开发者ID:TheCoffeMaker,项目名称:Mate-Desktop-Environment,代码行数:31,代码来源:set-timezone.c
示例6: stage1_enable_done
static void
stage1_enable_done (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_data)
{
NMModemGsm *self = NM_MODEM_GSM (user_data);
NMDeviceStateReason reason;
GError *error = NULL;
if (dbus_g_proxy_end_call (proxy, call_id, &error, G_TYPE_INVALID))
do_connect (self);
else {
nm_log_warn (LOGD_MB, "GSM modem enable failed: (%d) %s",
error ? error->code : -1,
error && error->message ? error->message : "(unknown)");
if (dbus_g_error_has_name (error, MM_MODEM_ERROR_SIM_PIN))
handle_enable_pin_required (self);
else {
/* try to translate the error reason */
reason = translate_mm_error (error);
if (reason == NM_DEVICE_STATE_REASON_UNKNOWN)
reason = NM_DEVICE_STATE_REASON_MODEM_INIT_FAILED;
g_signal_emit_by_name (self, NM_MODEM_PREPARE_RESULT, FALSE, reason);
}
g_error_free (error);
}
}
开发者ID:T100012,项目名称:NetworkManager,代码行数:27,代码来源:nm-modem-gsm.c
示例7: get_timezone_notify
static void
get_timezone_notify (DBusGProxy *proxy,
DBusGProxyCall *call,
void *user_data)
{
GError *error = NULL;
gboolean retval;
gchar *string = NULL;
GetTimezoneData *data = user_data;
retval = dbus_g_proxy_end_call (proxy, call, &error,
G_TYPE_STRING, &string,
G_TYPE_INVALID);
if (data->callback) {
if (!retval) {
data->callback (data->data, NULL, error);
g_error_free (error);
}
else {
data->callback (data->data, string, NULL);
g_free (string);
}
}
}
开发者ID:Annatara,项目名称:cinnamon-control-center,代码行数:25,代码来源:set-timezone.c
示例8: set_ap_scan_cb
static void
set_ap_scan_cb (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_data)
{
NMSupplicantInfo *info = (NMSupplicantInfo *) user_data;
NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (info->interface);
GError *err = NULL;
DBusGProxyCall *call;
GHashTable *config_hash;
if (!dbus_g_proxy_end_call (proxy, call_id, &err, G_TYPE_INVALID)) {
nm_log_warn (LOGD_SUPPLICANT, "Couldn't send AP scan mode to the supplicant interface: %s.",
err->message);
emit_error_helper (info->interface, err);
g_error_free (err);
return;
}
nm_log_info (LOGD_SUPPLICANT, "Config: set interface ap_scan to %d",
nm_supplicant_config_get_ap_scan (priv->cfg));
info = nm_supplicant_info_new (info->interface, priv->iface_proxy, info->store);
config_hash = nm_supplicant_config_get_hash (priv->cfg);
call = dbus_g_proxy_begin_call (priv->iface_proxy, "AddNetwork",
add_network_cb,
info,
nm_supplicant_info_destroy,
DBUS_TYPE_G_MAP_OF_VARIANT, config_hash,
G_TYPE_INVALID);
g_hash_table_destroy (config_hash);
nm_supplicant_info_set_call (info, call);
}
开发者ID:alfmatos,项目名称:NetworkManager,代码行数:31,代码来源:nm-supplicant-interface.c
示例9: serving_system_reply
static void
serving_system_reply (DBusGProxy *proxy, DBusGProxyCall *call, gpointer user_data)
{
CdmaDeviceInfo *info = user_data;
GError *error = NULL;
GValueArray *array = NULL;
guint32 new_sid = 0;
GValue *value;
if (dbus_g_proxy_end_call (proxy, call, &error,
SERVING_SYSTEM_TYPE, &array,
G_TYPE_INVALID)) {
if (array->n_values == 3) {
value = g_value_array_get_nth (array, 2);
if (G_VALUE_HOLDS_UINT (value))
new_sid = g_value_get_uint (value);
}
g_value_array_free (array);
}
if (new_sid != info->sid) {
info->sid = new_sid;
g_free (info->provider_name);
info->provider_name = mobile_helper_parse_3gpp2_operator_name (&(info->mobile_providers_database), info->sid);
}
g_clear_error (&error);
}
开发者ID:Jubei-Mitsuyoshi,项目名称:aaa-network-manager-applet,代码行数:29,代码来源:applet-device-cdma.c
示例10: reply_to_stop_dtmf
static void
reply_to_stop_dtmf (DBusGProxy *proxy,
DBusGProxyCall *call,
void *_request)
{
DEBUG ("enter");
ModemRequest *request = _request;
ModemCall *self = modem_request_object (request);
ModemCallReply *callback = modem_request_callback (request);
gpointer user_data = modem_request_user_data (request);
char *stopped;
GError *error = NULL;
if (dbus_g_proxy_end_call (proxy, call, &error,
G_TYPE_STRING, &stopped,
G_TYPE_INVALID))
{
g_free (stopped);
}
else
{
modem_error_fix (&error);
DEBUG ("got " GERROR_MSG_FMT, GERROR_MSG_CODE (error));
}
if (callback)
callback (self, request, error, user_data);
g_clear_error (&error);
}
开发者ID:freedesktop-unofficial-mirror,项目名称:telepathy__telepathy-ring,代码行数:31,代码来源:call.c
示例11: __epris_dbus_proxy_get_all_reply_cb
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);
}
开发者ID:Vinzgore,项目名称:epris,代码行数:7,代码来源:epris-client.c
示例12: query_cb
static void
query_cb (DBusGProxy *proxy,
DBusGProxyCall *call,
GSimpleAsyncResult *result)
{
GPtrArray *strv_array;
GError *error = NULL;
if (dbus_g_proxy_end_call (proxy,
call,
&error,
TYPE_STRV_ARRAY, &strv_array,
G_TYPE_INVALID))
{
GStrv filenames;
guint i;
filenames = g_new0 (char*, strv_array->len + 1);
for (i = 0; i < strv_array->len; i++)
{
GStrv data = g_ptr_array_index (strv_array, i);
filenames[i] = g_strdup (data[0]);
g_strfreev (data);
}
g_ptr_array_free (strv_array, TRUE);
g_simple_async_result_set_op_res_gpointer (result,
filenames,
(GDestroyNotify) g_strfreev);
}
开发者ID:community-ssu,项目名称:hildon-home,代码行数:34,代码来源:hd-search-service.c
示例13: stage1_prepare_done
static void
stage1_prepare_done (DBusGProxy *proxy, DBusGProxyCall *call, gpointer user_data)
{
NMModemGsm *self = NM_MODEM_GSM (user_data);
NMModemGsmPrivate *priv = NM_MODEM_GSM_GET_PRIVATE (self);
GError *error = NULL;
priv->call = NULL;
if (priv->connect_properties) {
g_hash_table_destroy (priv->connect_properties);
priv->connect_properties = NULL;
}
if (dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID))
g_signal_emit_by_name (self, NM_MODEM_PREPARE_RESULT, TRUE, NM_DEVICE_STATE_REASON_NONE);
else {
if (dbus_g_error_has_name (error, MM_MODEM_ERROR_SIM_PIN))
ask_for_pin (self, FALSE);
else if (dbus_g_error_has_name (error, MM_MODEM_ERROR_SIM_WRONG))
ask_for_pin (self, TRUE);
else {
nm_log_warn (LOGD_MB, "GSM connection failed: (%d) %s",
error ? error->code : -1,
error && error->message ? error->message : "(unknown)");
g_signal_emit_by_name (self, NM_MODEM_PREPARE_RESULT, FALSE, translate_mm_error (error));
}
g_error_free (error);
}
}
开发者ID:T100012,项目名称:NetworkManager,代码行数:32,代码来源:nm-modem-gsm.c
示例14: get_all_cb
static void
get_all_cb (DBusGProxy *proxy,
DBusGProxyCall *call,
gpointer user_data)
{
NMRemoteSettings *self = NM_REMOTE_SETTINGS (user_data);
GHashTable *props = NULL;
GError *error = NULL;
if (!dbus_g_proxy_end_call (proxy, call, &error,
DBUS_TYPE_G_MAP_OF_VARIANT, &props,
G_TYPE_INVALID)) {
/* Don't warn when the call times out because the settings service can't
* be activated or whatever.
*/
if (!(error->domain == DBUS_GERROR && error->code == DBUS_GERROR_NO_REPLY)) {
g_warning ("%s: couldn't retrieve system settings properties: (%d) %s.",
__func__,
error ? error->code : -1,
(error && error->message) ? error->message : "(unknown)");
}
g_clear_error (&error);
return;
}
properties_changed_cb (NULL, props, self);
g_hash_table_destroy (props);
}
开发者ID:alfmatos,项目名称:NetworkManager,代码行数:28,代码来源:nm-remote-settings.c
示例15: stage1_pin_done
static void
stage1_pin_done (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_data)
{
NMModemGsm *self = NM_MODEM_GSM (user_data);
NMModemGsmPrivate *priv = NM_MODEM_GSM_GET_PRIVATE (self);
NMDeviceStateReason reason;
GError *error = NULL;
if (dbus_g_proxy_end_call (proxy, call_id, &error, G_TYPE_INVALID)) {
/* Success; try to enable the modem again. Wait a few seconds to ensure
* that ModemManager is ready for the enable right after the unlock.
*/
if (priv->enable_delay_id == 0)
priv->enable_delay_id = g_timeout_add_seconds (4, (GSourceFunc) do_enable, self);
} else {
nm_log_warn (LOGD_MB, "GSM PIN unlock failed: (%d) %s",
error ? error->code : -1,
error && error->message ? error->message : "(unknown)");
/* try to translate the error reason */
reason = translate_mm_error (error);
if (reason == NM_DEVICE_STATE_REASON_UNKNOWN)
reason = NM_DEVICE_STATE_REASON_MODEM_INIT_FAILED;
g_signal_emit_by_name (self, NM_MODEM_PREPARE_RESULT, FALSE, reason);
g_error_free (error);
}
}
开发者ID:T100012,项目名称:NetworkManager,代码行数:28,代码来源:nm-modem-gsm.c
示例16: enumerate_devices_done
static void
enumerate_devices_done (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer data)
{
NMModemManager *manager = NM_MODEM_MANAGER (data);
GPtrArray *modems;
GError *error = NULL;
if (!dbus_g_proxy_end_call (proxy, call_id, &error,
dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_OBJECT_PATH), &modems,
G_TYPE_INVALID)) {
nm_log_warn (LOGD_MB, "could not get modem list: %s", error->message);
g_error_free (error);
} else {
int i;
for (i = 0; i < modems->len; i++) {
char *path = (char *) g_ptr_array_index (modems, i);
create_modem (manager, path);
g_free (path);
}
g_ptr_array_free (modems, TRUE);
}
}
开发者ID:alfmatos,项目名称:NetworkManager,代码行数:25,代码来源:nm-modem-manager.c
示例17: _on_got_playing_status
static void _on_got_playing_status (DBusGProxy *proxy, DBusGProxyCall *call_id, GldiModuleInstance *myApplet)
{
cd_debug ("=== %s ()", __func__);
CD_APPLET_ENTER;
s_pGetStatusCall = NULL;
gchar *cStatus = NULL;
GValue v = G_VALUE_INIT;
GError *erreur = NULL;
dbus_g_proxy_end_call (proxy,
call_id,
&erreur,
G_TYPE_VALUE, &v,
G_TYPE_INVALID);
if (erreur != NULL)
{
cd_warning ("couldn't get MPRIS status (%s)\n", erreur->message);
g_error_free (erreur);
}
else
{
if (G_VALUE_HOLDS_STRING (&v))
{
cStatus = (gchar*)g_value_get_string (&v);
myData.iPlayingStatus = _extract_status (cStatus);
g_free (cStatus); // since we don't destroy the value, we destroy its content.
}
}
cd_mpris2_getSongInfos_async ();
CD_APPLET_LEAVE ();
}
开发者ID:Cairo-Dock,项目名称:cairo-dock-plug-ins,代码行数:33,代码来源:applet-mpris2.c
示例18: _dvb_plugin_factory_start_service_cb_cb
static void _dvb_plugin_factory_start_service_cb_cb (DBusGProxy* proxy, DBusGProxyCall* call, void* user_data) {
GError* error;
guint32 status;
error = NULL;
dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_UINT, &status, G_TYPE_INVALID);
dvb_plugin_factory_start_service_cb (user_data, status, error);
}
开发者ID:zeenix,项目名称:Rygel-Debian,代码行数:7,代码来源:rygel-dvb-plugin-factory.c
示例19: uninhibit_cb
static void
uninhibit_cb (DBusGProxy *proxy,
DBusGProxyCall *call_id,
RBGPMPlugin *plugin)
{
GError *error = NULL;
dbus_g_proxy_end_call (proxy,
call_id,
&error,
G_TYPE_INVALID);
if (error != NULL) {
if (!ignore_error (error)) {
g_warning ("Failed to invoke %s.Inhibit: %s",
dbus_g_proxy_get_interface (proxy),
error->message);
} else {
rb_debug ("uninhibit failed: %s", error->message);
}
g_error_free (error);
} else {
rb_debug ("uninhibited");
plugin->cookie = 0;
}
g_object_unref (plugin);
}
开发者ID:AdamZ,项目名称:rhythmbox-magnatune,代码行数:27,代码来源:rb-power-manager-plugin.c
示例20: manager_get_properties_call_notify
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);
}
开发者ID:bchriste,项目名称:gconnman,代码行数:25,代码来源:cm-manager.c
注:本文中的dbus_g_proxy_end_call函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论