当前位置: 首页>>代码示例>>C++>>正文


C++ G_SIMPLE_ASYNC_RESULT函数代码示例

本文整理汇总了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);
}
开发者ID:freedesktop-unofficial-mirror,项目名称:ytstenut__telepathy-ytstenut,代码行数:15,代码来源:status.c

示例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;
}
开发者ID:hwc56,项目名称:spicy,代码行数:19,代码来源:win-usb-driver-install.c

示例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;
}
开发者ID:3dfxmadscientist,项目名称:cinnamon-control-center,代码行数:15,代码来源:um-user-manager.c

示例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;
}
开发者ID:heiher,项目名称:gobject-template,代码行数:15,代码来源:hev-iobj.c

示例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));
}
开发者ID:LiTianjue,项目名称:hev-idcard-reader,代码行数:24,代码来源:hev-serial-port.c

示例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);
}
开发者ID:ntonnaett,项目名称:gnome-online-accounts,代码行数:15,代码来源:goahttpclient.c

示例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;
}
开发者ID:kalev,项目名称:geoclue,代码行数:15,代码来源:gclue-locator.c

示例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);
}
开发者ID:WildHunter,项目名称:folks,代码行数:15,代码来源:tp-lowlevel.c

示例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);
}
开发者ID:MacIrssi,项目名称:MILibs,代码行数:15,代码来源:gwin32resolver.c

示例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;
}
开发者ID:Alustriel,项目名称:gvfs,代码行数:15,代码来源:gvfsiconloadable.c

示例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);
}
开发者ID:freedesktop-unofficial-mirror,项目名称:ytstenut__telepathy-ytstenut,代码行数:16,代码来源:status.c

示例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);
}
开发者ID:freedesktop-unofficial-mirror,项目名称:telepathy__telepathy-farstream,代码行数:16,代码来源:call-channel.c

示例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);
}
开发者ID:jdapena,项目名称:evolution,代码行数:16,代码来源:e-mail-store-utils.c

示例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);
}
开发者ID:Distrotech,项目名称:evolution,代码行数:16,代码来源:e-mail-config-page.c

示例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;
}
开发者ID:DylanMcCall,项目名称:Empathy---Hide-contact-groups,代码行数:16,代码来源:empathy-connection-managers.c


注:本文中的G_SIMPLE_ASYNC_RESULT函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。