这篇教程C++ G_IS_SIMPLE_ASYNC_RESULT函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中G_IS_SIMPLE_ASYNC_RESULT函数的典型用法代码示例。如果您正苦于以下问题:C++ G_IS_SIMPLE_ASYNC_RESULT函数的具体用法?C++ G_IS_SIMPLE_ASYNC_RESULT怎么用?C++ G_IS_SIMPLE_ASYNC_RESULT使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了G_IS_SIMPLE_ASYNC_RESULT函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: catch_resource_group_fetch_cbstatic voidcatch_resource_group_fetch_cb (GObject *object, GAsyncResult *result, gpointer user_data){ CatchResourceGroupPrivate *priv; CatchResourceGroup *group; GSimpleAsyncResult *simple = user_data; gboolean ret = FALSE; GError *error = NULL; ENTRY; g_return_if_fail(G_IS_SIMPLE_ASYNC_RESULT(simple)); group = CATCH_RESOURCE_GROUP(g_async_result_get_source_object(user_data)); g_return_if_fail(CATCH_IS_RESOURCE_GROUP(group)); priv = group->priv; if (priv->group) { ret = gom_resource_group_fetch_finish(GOM_RESOURCE_GROUP(object), result, &error); } else { g_assert_not_reached(); } if (!ret) { g_simple_async_result_take_error(simple, error); } g_simple_async_result_set_op_res_gboolean(simple, ret); g_simple_async_result_complete_in_idle(simple); g_object_unref(simple); EXIT;}
开发者ID:chergert,项目名称:catch-glib,代码行数:35,
示例2: news_parser_parse_finish/** * news_parser_parse_finish: * @parser: (in): A #NewsParser. * * Completes an asynchronous request to parse a #NewsFeed from a * #GInputStream. If the feed was successfully parsed, then a * #NewsFeed will be returned; othrewise %NULL and @error is set. * * Returns: None. */NewsFeed *news_parser_parse_finish (NewsParser *parser, GAsyncResult *result, GError **error){ NewsParserPrivate *priv; NewsFeed *feed = NULL; ENTRY; g_return_val_if_fail(NEWS_IS_PARSER(parser), NULL); g_return_val_if_fail(G_IS_SIMPLE_ASYNC_RESULT(result), NULL); priv = parser->priv; if (!priv->feed) { g_simple_async_result_propagate_error(priv->simple, error); } else { feed = g_object_ref(priv->feed); } g_clear_object(&priv->simple); RETURN(feed);}
开发者ID:chergert,项目名称:simply-news,代码行数:35,
示例3: mongo_cursor_foreach_query_cbstatic voidmongo_cursor_foreach_query_cb (GObject *object, GAsyncResult *result, gpointer user_data){ GSimpleAsyncResult *simple = user_data; MongoConnection *connection = (MongoConnection *)object; MongoMessageReply *reply; GError *error = NULL; ENTRY; g_assert(MONGO_IS_CONNECTION(connection)); g_assert(G_IS_SIMPLE_ASYNC_RESULT(simple)); if (!(reply = mongo_connection_query_finish(connection, result, &error))) { g_simple_async_result_take_error(simple, error); mongo_simple_async_result_complete_in_idle(simple); g_object_unref(simple); EXIT; } mongo_cursor_foreach_dispatch(connection, reply, simple); g_object_unref(reply); EXIT;}
开发者ID:Acidburn0zzz,项目名称:mongo-glib,代码行数:27,
示例4: empathy_pixbuf_avatar_from_individual_scaled_finish/* Return a ref on the GdkPixbuf */GdkPixbuf *empathy_pixbuf_avatar_from_individual_scaled_finish ( FolksIndividual *individual, GAsyncResult *result, GError **error){ GSimpleAsyncResult *simple = G_SIMPLE_ASYNC_RESULT (result); gboolean result_valid; GdkPixbuf *pixbuf; g_return_val_if_fail (FOLKS_IS_INDIVIDUAL (individual), NULL); g_return_val_if_fail (G_IS_SIMPLE_ASYNC_RESULT (simple), NULL); if (g_simple_async_result_propagate_error (simple, error)) return NULL; result_valid = g_simple_async_result_is_valid (result, G_OBJECT (individual), empathy_pixbuf_avatar_from_individual_scaled_async); g_return_val_if_fail (result_valid, NULL); pixbuf = g_simple_async_result_get_op_res_gpointer (simple); return pixbuf != NULL ? g_object_ref (pixbuf) : NULL;}
开发者ID:Dhinihan,项目名称:empathy,代码行数:26,
示例5: gom_repository_find_one_fetch_cbstatic voidgom_repository_find_one_fetch_cb (GObject *object, GAsyncResult *result, gpointer user_data){ GSimpleAsyncResult *simple = user_data; GomResourceGroup *group = (GomResourceGroup *)object; GomResource *resource; GError *error = NULL; g_return_if_fail(GOM_IS_RESOURCE_GROUP(group)); g_return_if_fail(G_IS_SIMPLE_ASYNC_RESULT(simple)); if (!gom_resource_group_fetch_finish(group, result, &error)) { g_simple_async_result_take_error(simple, error); g_simple_async_result_complete_in_idle(simple); g_object_unref(simple); return; } resource = gom_resource_group_get_index(group, 0); g_simple_async_result_set_op_res_gpointer(simple, g_object_ref(resource), g_object_unref); g_simple_async_result_complete_in_idle(simple); g_object_unref(simple);}
开发者ID:zyh329,项目名称:ipcam_thirdparties,代码行数:27,
示例6: gom_resource_save_cbstatic voidgom_resource_save_cb (GomAdapter *adapter, gpointer user_data){ GSimpleAsyncResult *simple = user_data; GomResource *resource; gboolean ret; GError *error = NULL; GAsyncQueue *queue; g_return_if_fail(GOM_IS_ADAPTER(adapter)); g_return_if_fail(G_IS_SIMPLE_ASYNC_RESULT(simple)); resource = GOM_RESOURCE(g_async_result_get_source_object(G_ASYNC_RESULT(simple))); g_assert(GOM_IS_RESOURCE(resource)); queue = g_object_get_data(G_OBJECT(simple), "queue"); if (!(ret = gom_resource_do_save(resource, adapter, &error))) { g_simple_async_result_take_error(simple, error); } g_simple_async_result_set_op_res_gboolean(simple, ret); if (!queue) g_simple_async_result_complete_in_idle(simple); else g_async_queue_push(queue, GINT_TO_POINTER(TRUE)); g_object_unref(resource);}
开发者ID:chergert,项目名称:gom,代码行数:29,
示例7: news_sync_task_save_cbstatic voidnews_sync_task_save_cb (GObject *object, GAsyncResult *result, gpointer user_data){ NewsSyncTaskPrivate *priv; GSimpleAsyncResult *simple = user_data; NewsSyncTask *task; GomResource *resource = (GomResource *)object; GError *error = NULL; g_assert(NEWS_IS_FEED(resource)); g_assert(G_IS_SIMPLE_ASYNC_RESULT(simple)); task = (NewsSyncTask *)g_async_result_get_source_object(G_ASYNC_RESULT(simple)); g_assert(NEWS_IS_SYNC_TASK(task)); priv = task->priv; if (!gom_resource_save_finish(resource, result, &error)) { g_simple_async_result_take_error(simple, error); gom_adapter_sqlite_rollback(GOM_ADAPTER_SQLITE(priv->adapter)); } else if (!gom_adapter_sqlite_commit(GOM_ADAPTER_SQLITE(priv->adapter), &error)) { g_simple_async_result_take_error(simple, error); gom_adapter_sqlite_rollback(GOM_ADAPTER_SQLITE(priv->adapter)); } g_simple_async_result_complete_in_idle(simple); g_object_unref(simple);}
开发者ID:chergert,项目名称:simply-news,代码行数:30,
示例8: gom_repository_find_one_cbstatic voidgom_repository_find_one_cb (GObject *object, GAsyncResult *result, gpointer user_data){ GSimpleAsyncResult *simple = user_data; GomResourceGroup *group; GomRepository *repository = (GomRepository *)object; GError *error = NULL; g_return_if_fail(GOM_IS_REPOSITORY(repository)); g_return_if_fail(G_IS_SIMPLE_ASYNC_RESULT(simple)); if (!(group = gom_repository_find_finish(repository, result, &error))) { g_simple_async_result_take_error(simple, error); g_simple_async_result_complete_in_idle(simple); g_object_unref(simple); return; } if (!gom_resource_group_get_count(group)) { g_simple_async_result_set_error(simple, GOM_ERROR, GOM_ERROR_REPOSITORY_EMPTY_RESULT, _("No resources were found.")); g_simple_async_result_complete_in_idle(simple); g_object_unref(simple); g_object_unref(group); return; } gom_resource_group_fetch_async(group, 0, 1, gom_repository_find_one_fetch_cb, simple); g_object_unref(group);}
开发者ID:zyh329,项目名称:ipcam_thirdparties,代码行数:35,
示例9: catch_space_get_objects_cbstatic voidcatch_space_get_objects_cb (GObject *object, GAsyncResult *result, gpointer user_data){ GomResource *resource = (GomResource *)object; GSimpleAsyncResult *simple = user_data; GomResourceGroup *group; GError *error = NULL; ENTRY; g_return_if_fail(GOM_IS_RESOURCE(resource)); g_return_if_fail(G_IS_SIMPLE_ASYNC_RESULT(simple)); if (!(group = gom_resource_fetch_m2m_finish(resource, result, &error))) { g_simple_async_result_take_error(simple, error); } else { g_simple_async_result_set_op_res_gpointer(simple, group, g_object_unref); } g_simple_async_result_complete_in_idle(simple); g_object_unref(simple); EXIT;}
开发者ID:chergert,项目名称:catch-glib,代码行数:26,
示例10: _client_create_tube_finishGSocketConnection *_client_create_tube_finish (GAsyncResult *result, TpChannel **channel, GError **error){ GSimpleAsyncResult *simple; CreateTubeData *data; g_return_val_if_fail (G_IS_SIMPLE_ASYNC_RESULT (result), NULL); simple = G_SIMPLE_ASYNC_RESULT (result); if (g_simple_async_result_propagate_error (simple, error)) return NULL; g_return_val_if_fail (g_simple_async_result_is_valid (result, NULL, _client_create_tube_finish), NULL); data = g_simple_async_result_get_op_res_gpointer ( G_SIMPLE_ASYNC_RESULT (result)); if (channel != NULL) *channel = g_object_ref (data->channel); return g_object_ref (data->connection);}
开发者ID:freedesktop-unofficial-mirror,项目名称:telepathy__telepathy-ssh-contact,代码行数:26,
示例11: gom_repository_automatic_migrate_finishgbooleangom_repository_automatic_migrate_finish (GomRepository *repository, GAsyncResult *result, GError **error){ g_return_val_if_fail(GOM_IS_REPOSITORY(repository), FALSE); g_return_val_if_fail(G_IS_SIMPLE_ASYNC_RESULT(result), FALSE); g_object_set_data(G_OBJECT(repository), "object-types", NULL); return gom_repository_migrate_finish(repository, result, error);}
开发者ID:zyh329,项目名称:ipcam_thirdparties,代码行数:11,
示例12: soup_input_stream_read_finishstatic gssizesoup_input_stream_read_finish (GInputStream *stream, GAsyncResult *result, GError **error){ GSimpleAsyncResult *simple; g_return_val_if_fail (G_IS_SIMPLE_ASYNC_RESULT (result), -1); simple = G_SIMPLE_ASYNC_RESULT (result); g_return_val_if_fail (g_simple_async_result_get_source_tag (simple) == soup_input_stream_read_async, -1); return g_simple_async_result_get_op_res_gssize (simple);}
开发者ID:Andais,项目名称:gvfs,代码行数:13,
示例13: 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 **/gbooleanpk_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,
示例14: news_sync_task_fetch_cbstatic voidnews_sync_task_fetch_cb (GObject *object, GAsyncResult *result, gpointer user_data){ NewsSyncTaskPrivate *priv; GSimpleAsyncResult *simple = (GSimpleAsyncResult *)user_data; GInputStream *stream; NewsSyncTask *task; NewsSource *source = (NewsSource *)object; NewsParser *parser; GError *error = NULL; g_assert(NEWS_IS_SOURCE(source)); g_assert(G_IS_SIMPLE_ASYNC_RESULT(simple)); task = (NewsSyncTask *)g_async_result_get_source_object(G_ASYNC_RESULT(simple)); g_assert(NEWS_IS_SYNC_TASK(task)); priv = task->priv; priv->fraction = 0.333; g_object_notify_by_pspec(G_OBJECT(task), gParamSpecs[PROP_FRACTION]); if (!(stream = news_source_fetch_finish(source, result, &error))) { g_simple_async_result_take_error(simple, error); g_simple_async_result_complete_in_idle(simple); g_object_unref(simple); return; } if (g_cancellable_is_cancelled(priv->cancellable)) { g_simple_async_result_set_error(simple, NEWS_SYNC_TASK_ERROR, NEWS_SYNC_TASK_ERROR_CANCELLED, _("The task was cancelled.")); g_simple_async_result_complete_in_idle(simple); g_object_unref(simple); return; } parser = g_object_new(NEWS_TYPE_PARSER, "adapter", priv->adapter, "source", priv->source, NULL); news_parser_parse_async(parser, stream, priv->cancellable, news_sync_task_parse_cb, simple); g_object_unref(parser);}
开发者ID:chergert,项目名称:simply-news,代码行数:47,
示例15: gom_resource_fetch_m2m_finish/** * gom_resource_fetch_m2m_finish: * @resource: (in): A #GomResource. * @result: (in): A #GAsyncResult. * @error: (out): A location for a #GError, or %NULL. * * Completes the asynchronous request to fetch a group of resources that * are related to the resource through a many-to-many table. * * Returns: (transfer full): A #GomResourceGroup. */GomResourceGroup *gom_resource_fetch_m2m_finish (GomResource *resource, GAsyncResult *result, GError **error){ GSimpleAsyncResult *simple = (GSimpleAsyncResult *)result; GomResourceGroup *group; g_return_val_if_fail(GOM_IS_RESOURCE(resource), NULL); g_return_val_if_fail(G_IS_SIMPLE_ASYNC_RESULT(result), NULL); if (!(group = g_simple_async_result_get_op_res_gpointer(simple))) { g_simple_async_result_propagate_error(simple, error); } return group ? g_object_ref(group) : NULL;}
开发者ID:chergert,项目名称:gom,代码行数:28,
示例16: g_tls_database_real_verify_chain_finishstatic GTlsCertificateFlagsg_tls_database_real_verify_chain_finish (GTlsDatabase *self, GAsyncResult *result, GError **error){ AsyncVerifyChain *args; g_return_val_if_fail (G_IS_SIMPLE_ASYNC_RESULT (result), G_TLS_CERTIFICATE_GENERIC_ERROR); g_return_val_if_fail (g_simple_async_result_is_valid (result, G_OBJECT (self), g_tls_database_real_verify_chain_async), FALSE); if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (result), error)) return G_TLS_CERTIFICATE_GENERIC_ERROR; args = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (result)); return args->verify_result;}
开发者ID:01org,项目名称:android-bluez-glib,代码行数:17,
示例17: gom_repository_find_one_finish/** * gom_repository_find_one_finish: * @repository: (in): A #GomRepository. * @result: (in): A #GAsyncResult. * @error: (out): A location for a #GError, or %NULL. * * Completes an asynchronous request to find a single resource in the * repository. See gom_repository_find_one_async() for more info. * * Returns: (transfer full): A #GomResource if successful, otherwise %NULL. */GomResource *gom_repository_find_one_finish (GomRepository *repository, GAsyncResult *result, GError **error){ GSimpleAsyncResult *simple = (GSimpleAsyncResult *)result; GomResource *ret; g_return_val_if_fail(GOM_IS_REPOSITORY(repository), NULL); g_return_val_if_fail(G_IS_SIMPLE_ASYNC_RESULT(simple), NULL); if (!(ret = g_simple_async_result_get_op_res_gpointer(simple))) { g_simple_async_result_propagate_error(simple, error); } return ret ? g_object_ref(ret) : NULL;}
开发者ID:zyh329,项目名称:ipcam_thirdparties,代码行数:28,
示例18: soup_input_stream_send_finish/** * soup_input_stream_send_finish: * @stream: a #SoupInputStream * @result: a #GAsyncResult. * @error: a #GError location to store the error occuring, or %NULL to * ignore. * * Finishes a soup_input_stream_send_async() operation. * * Return value: %TRUE if the message was sent successfully and * received a successful status code, %FALSE if not. **/gbooleansoup_input_stream_send_finish (GInputStream *stream, GAsyncResult *result, GError **error){ GSimpleAsyncResult *simple; g_return_val_if_fail (G_IS_SIMPLE_ASYNC_RESULT (result), FALSE); simple = G_SIMPLE_ASYNC_RESULT (result); g_return_val_if_fail (g_simple_async_result_get_source_tag (simple) == soup_input_stream_send_async, FALSE); if (g_simple_async_result_propagate_error (simple, error)) return FALSE; return g_simple_async_result_get_op_res_gboolean (simple);}
开发者ID:Andais,项目名称:gvfs,代码行数:29,
示例19: _g_find_file_insensitive_finishstatic GFile *_g_find_file_insensitive_finish (GFile *parent, GAsyncResult *result, GError **error){ GSimpleAsyncResult *simple; GFile *file; g_return_val_if_fail (G_IS_SIMPLE_ASYNC_RESULT (result), NULL); simple = G_SIMPLE_ASYNC_RESULT (result); if (g_simple_async_result_propagate_error (simple, error)) return NULL; file = G_FILE (g_simple_async_result_get_op_res_gpointer (simple)); return g_object_ref (file);}
开发者ID:DarkProfit,项目名称:gvfs,代码行数:18,
示例20: gom_repository_migrate_finishgbooleangom_repository_migrate_finish (GomRepository *repository, GAsyncResult *result, GError **error){ GSimpleAsyncResult *simple = (GSimpleAsyncResult *)result; gboolean ret; g_return_val_if_fail(GOM_IS_REPOSITORY(repository), FALSE); g_return_val_if_fail(G_IS_SIMPLE_ASYNC_RESULT(result), FALSE); if (!(ret = g_simple_async_result_get_op_res_gboolean(simple))) { g_simple_async_result_propagate_error(simple, error); } g_object_unref(simple); return ret;}
开发者ID:zyh329,项目名称:ipcam_thirdparties,代码行数:18,
示例21: cd_sensor_unlock_finishgbooleancd_sensor_unlock_finish (CdSensor *sensor, GAsyncResult *res, GError **error){ GSimpleAsyncResult *simple; gboolean ret = TRUE; g_return_val_if_fail (CD_IS_SENSOR (sensor), 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)) { ret = FALSE; goto out; }out: return ret;}
开发者ID:Hextremist,项目名称:colord,代码行数:18,
示例22: gb_project_format_real_open_finishstatic GbProject *gb_project_format_real_open_finish (GbProjectFormat *format, GAsyncResult *result, GError **error){ GSimpleAsyncResult *simple = (GSimpleAsyncResult *)result; GbProject *ret = NULL; ENTRY; g_return_val_if_fail(G_IS_SIMPLE_ASYNC_RESULT(simple), NULL); if (!(ret = g_simple_async_result_get_op_res_gpointer(simple))) { g_simple_async_result_propagate_error(simple, error); } RETURN(ret ? g_object_ref(ret) : NULL);}
开发者ID:chergert,项目名称:gnome-builder-legacy,代码行数:18,
示例23: g_async_result_legacy_propagate_error/** * g_async_result_legacy_propagate_error: * @res: a #GAsyncResult * @error: (out): a location to propagate the error to. * * If @res is a #GSimpleAsyncResult, this is equivalent to * g_simple_async_result_propagate_error(). Otherwise it returns * %FALSE. * * This can be used for legacy error handling in async * <literal>_finish ()</literal> wrapper functions that traditionally * handled #GSimpleAsyncResult error returns themselves rather than * calling into the virtual method. This should not be used in new * code; #GAsyncResult errors that are set by virtual methods should * also be extracted by virtual methods, to enable subclasses to chain * up correctly. * * Returns: %TRUE if @error is has been filled in with an error from * @res, %FALSE if not. * * Since: 2.34 **/gbooleang_async_result_legacy_propagate_error (GAsyncResult *res, GError **error){ /* This doesn't use a vmethod, because it's only for code that used * to use GSimpleAsyncResult. (But it's a GAsyncResult method so * that callers don't need to worry about GSimpleAsyncResult * deprecation warnings in the future.) */ if (G_IS_SIMPLE_ASYNC_RESULT (res)) { return g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (res), error); } else return FALSE;}
开发者ID:izaackgerard,项目名称:Sintetizador_Voz,代码行数:40,
示例24: gom_resource_delete_finishgbooleangom_resource_delete_finish (GomResource *resource, GAsyncResult *result, GError **error){ GSimpleAsyncResult *simple = (GSimpleAsyncResult *)result; gboolean ret; g_return_val_if_fail(GOM_IS_RESOURCE(resource), FALSE); g_return_val_if_fail(G_IS_SIMPLE_ASYNC_RESULT(simple), FALSE); if (!(ret = g_simple_async_result_get_op_res_gboolean(simple))) { g_simple_async_result_propagate_error(simple, error); } g_object_unref(simple); return ret;}
开发者ID:chergert,项目名称:gom,代码行数:18,
示例25: catch_space_get_objects_finish/** * catch_space_get_objects_finish: * @space: (in): A #CatchSpace. * @result: (in): A #GAsyncResult. * @error: (out): A location for a #GError, or %NULL. * * Completes an asynchronous request to fetch a group of objects. * * Returns: (transfer full): A #GomResourceGroup. */GomResourceGroup *catch_space_get_objects_finish (CatchSpace *space, GAsyncResult *result, GError **error){ GomResourceGroup *group; GSimpleAsyncResult *simple = (GSimpleAsyncResult *)result; ENTRY; g_return_val_if_fail(CATCH_IS_SPACE(space), NULL); g_return_val_if_fail(G_IS_SIMPLE_ASYNC_RESULT(simple), NULL); if (!(group = g_simple_async_result_get_op_res_gpointer(simple))) { g_simple_async_result_propagate_error(simple, error); } RETURN(group ? g_object_ref(group) : NULL);}
开发者ID:chergert,项目名称:catch-glib,代码行数:29,
示例26: tp_yts_status_advertise_status_finish/** * tp_yts_status_advertise_status_finish: * @self: The status proxy * @result: The result object passed to the callback * @error: If an error occurred, this will be set * * Complete an asynchronous operation advertise Ytstenut service status. * * Returns: %TRUE if the operation succeeded. */gbooleantp_yts_status_advertise_status_finish (TpYtsStatus *self, GAsyncResult *result, GError **error){ GSimpleAsyncResult *res; g_return_val_if_fail (TP_IS_YTS_STATUS (self), FALSE); g_return_val_if_fail (G_IS_SIMPLE_ASYNC_RESULT (result), FALSE); res = G_SIMPLE_ASYNC_RESULT (result); g_return_val_if_fail (g_simple_async_result_is_valid (result, G_OBJECT (self), tp_yts_status_advertise_status_async), FALSE); if (g_simple_async_result_propagate_error (res, error)) return FALSE; return TRUE;}
开发者ID:freedesktop-unofficial-mirror,项目名称:ytstenut__telepathy-ytstenut,代码行数:29,
示例27: catch_resource_group_fetch_finish/** * catch_resource_group_fetch_finish: * @group: (in): A #CatchResourceGroup. * @result: (in): A #GAsyncResult. * @error: (out): A locationf or a #GError, or %NULL. * * Completes an asynchronous request to catch_resource_group_fetch_async(). * %TRUE is returned if the resources were loaded, otherwise %FALSE and * @error is set. * * Returns: %TRUE if successful; otherwise %FALSE and @error is set. */gbooleancatch_resource_group_fetch_finish (CatchResourceGroup *group, GAsyncResult *result, GError **error){ GSimpleAsyncResult *simple = (GSimpleAsyncResult *)result; gboolean ret; ENTRY; g_return_val_if_fail(CATCH_IS_RESOURCE_GROUP(group), FALSE); g_return_val_if_fail(G_IS_SIMPLE_ASYNC_RESULT(simple), FALSE); if (!(ret = g_simple_async_result_get_op_res_gboolean(simple))) { g_simple_async_result_propagate_error(simple, error); } RETURN(ret);}
开发者ID:chergert,项目名称:catch-glib,代码行数:31,
示例28: news_sync_task_parse_cbstatic voidnews_sync_task_parse_cb (GObject *object, GAsyncResult *result, gpointer user_data){ NewsSyncTaskPrivate *priv; GSimpleAsyncResult *simple = user_data; NewsSyncTask *task; NewsParser *parser = (NewsParser *)object; GError *error = NULL; g_assert(NEWS_IS_PARSER(parser)); g_assert(G_IS_SIMPLE_ASYNC_RESULT(simple)); task = (NewsSyncTask *)g_async_result_get_source_object(G_ASYNC_RESULT(simple)); g_assert(NEWS_IS_SYNC_TASK(task)); priv = task->priv; priv->fraction = 0.666; g_object_notify_by_pspec(G_OBJECT(task), gParamSpecs[PROP_FRACTION]); if (!(priv->feed = news_parser_parse_finish(parser, result, &error))) { g_simple_async_result_take_error(simple, error); g_simple_async_result_complete_in_idle(simple); g_object_unref(simple); return; } if (g_cancellable_is_cancelled(priv->cancellable)) { g_simple_async_result_set_error(simple, NEWS_SYNC_TASK_ERROR, NEWS_SYNC_TASK_ERROR_CANCELLED, _("The task was cancelled.")); g_simple_async_result_complete_in_idle(simple); g_object_unref(simple); return; } news_sync_task_prepare_save(task); gom_adapter_sqlite_begin(GOM_ADAPTER_SQLITE(priv->adapter)); gom_resource_save_async(GOM_RESOURCE(priv->feed), priv->cancellable, news_sync_task_save_cb, simple);}
开发者ID:chergert,项目名称:simply-news,代码行数:43,
示例29: push_gcm_client_deliver_finishgbooleanpush_gcm_client_deliver_finish (PushGcmClient *client, GAsyncResult *result, GError **error){ GSimpleAsyncResult *simple = (GSimpleAsyncResult *)result; gboolean ret; ENTRY; g_return_val_if_fail(PUSH_IS_GCM_CLIENT(client), FALSE); g_return_val_if_fail(G_IS_SIMPLE_ASYNC_RESULT(simple), FALSE); if (!(ret = g_simple_async_result_get_op_res_gboolean(simple))) { g_simple_async_result_propagate_error(simple, error); } RETURN(ret);}
开发者ID:shadimsaleh,项目名称:push-glib,代码行数:19,
示例30: tp_yts_status_ensure_finish/** * tp_yts_status_ensure_finish: * @account: The Ytstenut enabled account * @result: The result object passed to the callback * @error: If an error occurred, this will be set * * Complete an asynchronous operation to create a #TpYtsStatus object. * * Returns: A new #TpYtsStatus proxy, which you can use to access * the Ytstenut Status service. If the operation failed, %NULL will be returned. */TpYtsStatus *tp_yts_status_ensure_finish (TpAccount *account, GAsyncResult *result, GError **error){ GSimpleAsyncResult *res; g_return_val_if_fail (TP_IS_ACCOUNT (account), NULL); g_return_val_if_fail (G_IS_SIMPLE_ASYNC_RESULT (result), NULL); res = G_SIMPLE_ASYNC_RESULT (result); g_return_val_if_fail (g_simple_async_result_is_valid (result, G_OBJECT (account), tp_yts_status_ensure_async), NULL); 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,代码行数:30,
注:本文中的G_IS_SIMPLE_ASYNC_RESULT函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ G_IS_TASK函数代码示例 C++ G_IS_OBJECT函数代码示例 |