• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ G_SIMPLE_ASYNC_RESULT函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中G_SIMPLE_ASYNC_RESULT函数的典型用法代码示例。如果您正苦于以下问题:C++ G_SIMPLE_ASYNC_RESULT函数的具体用法?C++ G_SIMPLE_ASYNC_RESULT怎么用?C++ G_SIMPLE_ASYNC_RESULT使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了G_SIMPLE_ASYNC_RESULT函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: pk_package_sack_merge_generic_finish

/**
 * pk_package_sack_merge_generic_finish:
 * @sack: a valid #PkPackageSack instance
 * @res: the #GAsyncResult
 * @error: A #GError or %NULL
 *
 * Gets the result from the asynchronous function.
 *
 * Return value: %TRUE for success
 *
 * Since: 0.5.2
 **/
gboolean
pk_package_sack_merge_generic_finish (PkPackageSack *sack, GAsyncResult *res, GError **error)
{
	GSimpleAsyncResult *simple;

	g_return_val_if_fail (PK_IS_PACKAGE_SACK (sack), FALSE);
	g_return_val_if_fail (G_IS_SIMPLE_ASYNC_RESULT (res), 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:coolo,项目名称:packagekit,代码行数:28,代码来源:pk-package-sack.c


示例17: pp_maintenance_command_execute_finish

gboolean
pp_maintenance_command_execute_finish (PpMaintenanceCommand  *command,
                                       GAsyncResult          *res,
                                       GError               **error)
{
  GSimpleAsyncResult *simple = G_SIMPLE_ASYNC_RESULT (res);

  g_warn_if_fail (g_simple_async_result_get_source_tag (simple) == pp_maintenance_command_execute_async);

  if (g_simple_async_result_propagate_error (simple, error))
    {
      return FALSE;
    }

  return g_simple_async_result_get_op_res_gboolean (simple);
}
开发者ID:1dot75cm,项目名称:gnome-control-center,代码行数:16,代码来源:pp-maintenance-command.c


示例18: lookup_service_finish

static GList *
lookup_service_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_service_async), NULL);
  simple = G_SIMPLE_ASYNC_RESULT (result);

  req = g_simple_async_result_get_op_res_gpointer (simple);
  return _g_resolver_targets_from_DnsQuery (req->u.service.rrname,
                                            req->u.service.retval,
                                            req->u.service.results, error);
}
开发者ID:MacIrssi,项目名称:MILibs,代码行数:16,代码来源:gwin32resolver.c


示例19: tp_yts_client_request_channel_finish

/**
 * tp_yts_client_request_channel_finish:
 * @self: A client object
 * @result: The operation result
 * @error: If not %NULL, then raise an error here when returning %NULL.
 *
 * Get the result of an operation to create a new Ytstenut channel.
 *
 * Returns: A newly created Ytstenut channel, or %NULL if failed. The caller
 *      is responsible to close and release the channel.
 */
TpYtsChannel *
tp_yts_client_request_channel_finish (TpYtsClient *self,
    GAsyncResult *result,
    GError **error)
{
  GSimpleAsyncResult *res;

  g_return_val_if_fail (TP_IS_YTS_CLIENT (self), NULL);
  g_return_val_if_fail (g_simple_async_result_is_valid (result, G_OBJECT (self),
      tp_yts_client_request_channel_async), NULL);

  res = G_SIMPLE_ASYNC_RESULT (result);
  if (g_simple_async_result_propagate_error (res, error))
    return NULL;

  return g_object_ref (g_simple_async_result_get_op_res_gpointer (res));
}
开发者ID:freedesktop-unofficial-mirror,项目名称:ytstenut__telepathy-ytstenut,代码行数:28,代码来源:client.c


示例20: e_mail_session_send_to_finish

gboolean
e_mail_session_send_to_finish (EMailSession *session,
                               GAsyncResult *result,
                               GError **error)
{
	GSimpleAsyncResult *simple;

	g_return_val_if_fail (
		g_simple_async_result_is_valid (
		result, G_OBJECT (session),
		e_mail_session_send_to), FALSE);

	simple = G_SIMPLE_ASYNC_RESULT (result);

	/* Assume success unless a GError is set. */
	return !g_simple_async_result_propagate_error (simple, error);
}
开发者ID:sragavan,项目名称:e-mail-factory,代码行数:17,代码来源:e-mail-session-utils.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ G_STRINGIFY函数代码示例发布时间:2022-05-30
下一篇:
C++ G_SEEKABLE函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap