本文整理汇总了C++中G_SIMPLE_ASYNC_RESULT函数的典型用法代码示例。如果您正苦于以下问题:C++ G_SIMPLE_ASYNC_RESULT函数的具体用法?C++ G_SIMPLE_ASYNC_RESULT怎么用?C++ G_SIMPLE_ASYNC_RESULT使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了G_SIMPLE_ASYNC_RESULT函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: on_status_new_returned
static void
on_status_new_returned (GObject *source_object,
GAsyncResult *result,
gpointer user_data)
{
GSimpleAsyncResult *res = G_SIMPLE_ASYNC_RESULT (user_data);
g_return_if_fail (TP_IS_YTS_STATUS (source_object));
g_simple_async_result_set_op_res_gpointer (res, g_object_ref (source_object),
g_object_unref);
g_simple_async_result_complete (res);
g_object_unref (res);
}
示例2: spice_win_usb_driver_install_finish
/**
* Returns: currently returns 0 (failure) and 1 (success)
* possibly later we'll add error-codes
*/
G_GNUC_INTERNAL
gint spice_win_usb_driver_install_finish(SpiceWinUsbDriver *self,
GAsyncResult *res, GError **err)
{
GSimpleAsyncResult *result = G_SIMPLE_ASYNC_RESULT(res);
g_return_val_if_fail(SPICE_IS_WIN_USB_DRIVER(self), 0);
g_return_val_if_fail(g_simple_async_result_is_valid(res, G_OBJECT(self),
spice_win_usb_driver_op),
FALSE);
if (g_simple_async_result_propagate_error(result, err))
return 0;
return self->priv->reply.status;
}
示例3: um_user_manager_delete_user_finish
gboolean
um_user_manager_delete_user_finish (UmUserManager *manager,
GAsyncResult *result,
GError **error)
{
GSimpleAsyncResult *res;
res = G_SIMPLE_ASYNC_RESULT (result);
if (g_simple_async_result_propagate_error (res, error)) {
return FALSE;
}
return TRUE;
}
示例4: hev_iobj_async_initable_init_finish
static gboolean
hev_iobj_async_initable_init_finish (GAsyncInitable *initable,
GAsyncResult *result, GError **error)
{
g_debug ("%s:%d[%s]", __FILE__, __LINE__, __FUNCTION__);
g_return_val_if_fail (g_simple_async_result_is_valid (result,
G_OBJECT (initable), hev_iobj_async_initable_init_async),
FALSE);
if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (result),
error))
return FALSE;
return TRUE;
}
示例5: hev_serial_port_queue_command_finish
GByteArray * hev_serial_port_queue_command_finish(HevSerialPort *self,
GAsyncResult *res, GError **error)
{
HevSerialPortPrivate *priv = NULL;
g_debug("%s:%d[%s]", __FILE__, __LINE__, __FUNCTION__);
g_return_val_if_fail(HEV_IS_SERIAL_PORT(self), NULL);
priv = HEV_SERIAL_PORT_GET_PRIVATE(self);
/* Pop tail */
g_queue_pop_tail(priv->queue);
if(!g_queue_is_empty(priv->queue))
hev_serial_port_queue_command_handler(self);
g_return_val_if_fail(g_simple_async_result_is_valid(res,
G_OBJECT(self), hev_serial_port_queue_command_async),
NULL);
if(g_simple_async_result_propagate_error(G_SIMPLE_ASYNC_RESULT(res),
error))
return NULL;
return g_simple_async_result_get_op_res_gpointer(G_SIMPLE_ASYNC_RESULT(res));
}
示例6: goa_http_client_check_finish
gboolean
goa_http_client_check_finish (GoaHttpClient *self, GAsyncResult *res, GError **error)
{
GSimpleAsyncResult *simple;
g_return_val_if_fail (g_simple_async_result_is_valid (res, G_OBJECT (self), goa_http_client_check), FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
simple = G_SIMPLE_ASYNC_RESULT (res);
if (g_simple_async_result_propagate_error (simple, error))
return FALSE;
return g_simple_async_result_get_op_res_gboolean (simple);
}
示例7: gclue_locator_stop_finish
gboolean
gclue_locator_stop_finish (GClueLocator *locator,
GAsyncResult *res,
GError **error)
{
GSimpleAsyncResult *simple = G_SIMPLE_ASYNC_RESULT (res);
g_return_val_if_fail (GCLUE_IS_LOCATOR (locator), FALSE);
g_warn_if_fail (g_simple_async_result_get_source_tag (simple) == gclue_locator_stop);
if (g_simple_async_result_propagate_error (simple, error))
return FALSE;
return TRUE;
}
示例8: set_contact_alias_cb
static void
set_contact_alias_cb (TpConnection *conn,
const GError *error,
gpointer user_data,
GObject *weak_object)
{
GSimpleAsyncResult *simple = G_SIMPLE_ASYNC_RESULT (user_data);
if (error != NULL)
{
g_simple_async_result_set_from_error (simple, error);
}
g_simple_async_result_complete (simple);
}
示例9: lookup_by_name_finish
static GList *
lookup_by_name_finish (GResolver *resolver,
GAsyncResult *result,
GError **error)
{
GSimpleAsyncResult *simple;
GWin32ResolverRequest *req;
g_return_val_if_fail (g_simple_async_result_is_valid (result, G_OBJECT (resolver), lookup_by_name_async), NULL);
simple = G_SIMPLE_ASYNC_RESULT (result);
req = g_simple_async_result_get_op_res_gpointer (simple);
return _g_resolver_addresses_from_addrinfo (req->u.name.name, req->u.name.res,
req->u.name.retval, error);
}
示例10: g_vfs_icon_load_finish
static GInputStream *
g_vfs_icon_load_finish (GLoadableIcon *icon,
GAsyncResult *res,
char **type,
GError **error)
{
GSimpleAsyncResult *simple = G_SIMPLE_ASYNC_RESULT (res);
gpointer op;
op = g_simple_async_result_get_op_res_gpointer (simple);
if (op)
return g_object_ref (op);
return NULL;
}
示例11: on_status_advertise_status_returned
static void
on_status_advertise_status_returned (TpYtsStatus *self,
const GError *error,
gpointer user_data,
GObject *weak_object)
{
GSimpleAsyncResult *res = G_SIMPLE_ASYNC_RESULT (user_data);
if (error != NULL)
{
DEBUG ("Status.AdvertiseStatus failed: %s", error->message);
g_simple_async_result_set_from_error (res, error);
}
g_simple_async_result_complete_in_idle (res);
}
示例12: tf_call_channel_init_finish
static gboolean
tf_call_channel_init_finish (GAsyncInitable *initable,
GAsyncResult *res,
GError **error)
{
GSimpleAsyncResult *simple_res;
g_return_val_if_fail (g_simple_async_result_is_valid (res,
G_OBJECT (initable), tf_call_channel_init_async), FALSE);
simple_res = G_SIMPLE_ASYNC_RESULT (res);
if (g_simple_async_result_propagate_error (simple_res, error))
return FALSE;
return g_simple_async_result_get_op_res_gboolean (simple_res);
}
示例13: e_mail_store_go_online_finish
gboolean
e_mail_store_go_online_finish (CamelStore *store,
GAsyncResult *result,
GError **error)
{
GSimpleAsyncResult *simple;
g_return_val_if_fail (
g_simple_async_result_is_valid (
result, G_OBJECT (store), e_mail_store_go_online), FALSE);
simple = G_SIMPLE_ASYNC_RESULT (result);
/* Assume success unless a GError is set. */
return !g_simple_async_result_propagate_error (simple, error);
}
示例14: mail_config_page_submit_finish
static gboolean
mail_config_page_submit_finish (EMailConfigPage *page,
GAsyncResult *result,
GError **error)
{
GSimpleAsyncResult *simple;
g_return_val_if_fail (
g_simple_async_result_is_valid (
result, G_OBJECT (page), mail_config_page_submit), FALSE);
simple = G_SIMPLE_ASYNC_RESULT (result);
/* Assume success unless a GError is set. */
return !g_simple_async_result_propagate_error (simple, error);
}
示例15: empathy_connection_managers_prepare_finish
gboolean
empathy_connection_managers_prepare_finish (
EmpathyConnectionManagers *self,
GAsyncResult *result,
GError **error)
{
GSimpleAsyncResult *simple = G_SIMPLE_ASYNC_RESULT (result);
g_return_val_if_fail (g_simple_async_result_is_valid (result,
G_OBJECT (self), empathy_connection_managers_prepare_finish), FALSE);
if (g_simple_async_result_propagate_error (simple, error))
return FALSE;
return TRUE;
}