gio: deprecate GSimpleAsyncResult

GTask has been around for a long time now, everything in GLib is using
it, and the run-in-thread deadlock problems should be fixed now.

https://bugzilla.gnome.org/show_bug.cgi?id=661767
This commit is contained in:
Dan Winship
2012-04-17 10:38:37 -04:00
parent f10b6550ff
commit ec9c248d7d
5 changed files with 87 additions and 25 deletions

View File

@@ -286,6 +286,7 @@ g_async_initable_real_init_finish (GAsyncInitable *initable,
* even though g_async_initable_real_init_async doesn't generate * even though g_async_initable_real_init_async doesn't generate
* them any more. * them any more.
*/ */
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
if (G_IS_SIMPLE_ASYNC_RESULT (res)) if (G_IS_SIMPLE_ASYNC_RESULT (res))
{ {
GSimpleAsyncResult *simple = G_SIMPLE_ASYNC_RESULT (res); GSimpleAsyncResult *simple = G_SIMPLE_ASYNC_RESULT (res);
@@ -294,6 +295,7 @@ g_async_initable_real_init_finish (GAsyncInitable *initable,
else else
return TRUE; return TRUE;
} }
G_GNUC_END_IGNORE_DEPRECATIONS
g_return_val_if_fail (g_task_is_valid (res, initable), FALSE); g_return_val_if_fail (g_task_is_valid (res, initable), FALSE);

View File

@@ -193,6 +193,7 @@ g_async_result_legacy_propagate_error (GAsyncResult *res,
* deprecation warnings in the future.) * deprecation warnings in the future.)
*/ */
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
if (G_IS_SIMPLE_ASYNC_RESULT (res)) if (G_IS_SIMPLE_ASYNC_RESULT (res))
{ {
return g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (res), return g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (res),
@@ -200,6 +201,7 @@ g_async_result_legacy_propagate_error (GAsyncResult *res,
} }
else else
return FALSE; return FALSE;
G_GNUC_END_IGNORE_DEPRECATIONS
} }
/** /**

View File

@@ -202,6 +202,8 @@
* ]| * ]|
*/ */
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
static void g_simple_async_result_async_result_iface_init (GAsyncResultIface *iface); static void g_simple_async_result_async_result_iface_init (GAsyncResultIface *iface);
struct _GSimpleAsyncResult struct _GSimpleAsyncResult
@@ -305,6 +307,8 @@ g_simple_async_result_init (GSimpleAsyncResult *simple)
* this function returns. * this function returns.
* *
* Returns: a #GSimpleAsyncResult. * Returns: a #GSimpleAsyncResult.
*
* Deprecated: 2.46: Use g_task_new() instead.
**/ **/
GSimpleAsyncResult * GSimpleAsyncResult *
g_simple_async_result_new (GObject *source_object, g_simple_async_result_new (GObject *source_object,
@@ -338,6 +342,8 @@ g_simple_async_result_new (GObject *source_object,
* Creates a #GSimpleAsyncResult from an error condition. * Creates a #GSimpleAsyncResult from an error condition.
* *
* Returns: a #GSimpleAsyncResult. * Returns: a #GSimpleAsyncResult.
*
* Deprecated: 2.46: Use g_task_new() and g_task_return_error() instead.
**/ **/
GSimpleAsyncResult * GSimpleAsyncResult *
g_simple_async_result_new_from_error (GObject *source_object, g_simple_async_result_new_from_error (GObject *source_object,
@@ -370,6 +376,8 @@ g_simple_async_result_new_from_error (GObject *source_object,
* Returns: a #GSimpleAsyncResult * Returns: a #GSimpleAsyncResult
* *
* Since: 2.28 * Since: 2.28
*
* Deprecated: 2.46: Use g_task_new() and g_task_return_error() instead.
**/ **/
GSimpleAsyncResult * GSimpleAsyncResult *
g_simple_async_result_new_take_error (GObject *source_object, g_simple_async_result_new_take_error (GObject *source_object,
@@ -402,6 +410,8 @@ g_simple_async_result_new_take_error (GObject *source_object,
* Creates a new #GSimpleAsyncResult with a set error. * Creates a new #GSimpleAsyncResult with a set error.
* *
* Returns: a #GSimpleAsyncResult. * Returns: a #GSimpleAsyncResult.
*
* Deprecated: 2.46: Use g_task_new() and g_task_return_new_error() instead.
**/ **/
GSimpleAsyncResult * GSimpleAsyncResult *
g_simple_async_result_new_error (GObject *source_object, g_simple_async_result_new_error (GObject *source_object,
@@ -470,6 +480,8 @@ g_simple_async_result_async_result_iface_init (GAsyncResultIface *iface)
* This function has nothing to do with * This function has nothing to do with
* g_simple_async_result_set_check_cancellable(). It only refers to the * g_simple_async_result_set_check_cancellable(). It only refers to the
* #GCancellable passed to g_simple_async_result_run_in_thread(). * #GCancellable passed to g_simple_async_result_run_in_thread().
*
* Deprecated: 2.46
**/ **/
void void
g_simple_async_result_set_handle_cancellation (GSimpleAsyncResult *simple, g_simple_async_result_set_handle_cancellation (GSimpleAsyncResult *simple,
@@ -486,6 +498,8 @@ g_simple_async_result_set_handle_cancellation (GSimpleAsyncResult *simple,
* Gets the source tag for the #GSimpleAsyncResult. * Gets the source tag for the #GSimpleAsyncResult.
* *
* Returns: a #gpointer to the source object for the #GSimpleAsyncResult. * Returns: a #gpointer to the source object for the #GSimpleAsyncResult.
*
* Deprecated: 2.46. Use #GTask and g_task_get_source_tag() instead.
**/ **/
gpointer gpointer
g_simple_async_result_get_source_tag (GSimpleAsyncResult *simple) g_simple_async_result_get_source_tag (GSimpleAsyncResult *simple)
@@ -507,6 +521,8 @@ g_simple_async_result_get_source_tag (GSimpleAsyncResult *simple)
* function will return %TRUE with @dest set appropriately. * function will return %TRUE with @dest set appropriately.
* *
* Returns: %TRUE if the error was propagated to @dest. %FALSE otherwise. * Returns: %TRUE if the error was propagated to @dest. %FALSE otherwise.
*
* Deprecated: 2.46: Use #GTask instead.
**/ **/
gboolean gboolean
g_simple_async_result_propagate_error (GSimpleAsyncResult *simple, g_simple_async_result_propagate_error (GSimpleAsyncResult *simple,
@@ -534,6 +550,8 @@ g_simple_async_result_propagate_error (GSimpleAsyncResult *simple,
* @destroy_op_res: a #GDestroyNotify function. * @destroy_op_res: a #GDestroyNotify function.
* *
* Sets the operation result within the asynchronous result to a pointer. * Sets the operation result within the asynchronous result to a pointer.
*
* Deprecated: 2.46: Use #GTask and g_task_return_pointer() instead.
**/ **/
void void
g_simple_async_result_set_op_res_gpointer (GSimpleAsyncResult *simple, g_simple_async_result_set_op_res_gpointer (GSimpleAsyncResult *simple,
@@ -554,6 +572,8 @@ g_simple_async_result_set_op_res_gpointer (GSimpleAsyncResult *simple,
* Gets a pointer result as returned by the asynchronous function. * Gets a pointer result as returned by the asynchronous function.
* *
* Returns: a pointer from the result. * Returns: a pointer from the result.
*
* Deprecated: 2.46: Use #GTask and g_task_propagate_pointer() instead.
**/ **/
gpointer gpointer
g_simple_async_result_get_op_res_gpointer (GSimpleAsyncResult *simple) g_simple_async_result_get_op_res_gpointer (GSimpleAsyncResult *simple)
@@ -569,6 +589,8 @@ g_simple_async_result_get_op_res_gpointer (GSimpleAsyncResult *simple)
* *
* Sets the operation result within the asynchronous result to * Sets the operation result within the asynchronous result to
* the given @op_res. * the given @op_res.
*
* Deprecated: 2.46: Use #GTask and g_task_return_int() instead.
**/ **/
void void
g_simple_async_result_set_op_res_gssize (GSimpleAsyncResult *simple, g_simple_async_result_set_op_res_gssize (GSimpleAsyncResult *simple,
@@ -586,6 +608,8 @@ g_simple_async_result_set_op_res_gssize (GSimpleAsyncResult *simple,
* Gets a gssize from the asynchronous result. * Gets a gssize from the asynchronous result.
* *
* Returns: a gssize returned from the asynchronous function. * Returns: a gssize returned from the asynchronous function.
*
* Deprecated: 2.46: Use #GTask and g_task_propagate_int() instead.
**/ **/
gssize gssize
g_simple_async_result_get_op_res_gssize (GSimpleAsyncResult *simple) g_simple_async_result_get_op_res_gssize (GSimpleAsyncResult *simple)
@@ -600,6 +624,8 @@ g_simple_async_result_get_op_res_gssize (GSimpleAsyncResult *simple)
* @op_res: a #gboolean. * @op_res: a #gboolean.
* *
* Sets the operation result to a boolean within the asynchronous result. * Sets the operation result to a boolean within the asynchronous result.
*
* Deprecated: 2.46: Use #GTask and g_task_return_boolean() instead.
**/ **/
void void
g_simple_async_result_set_op_res_gboolean (GSimpleAsyncResult *simple, g_simple_async_result_set_op_res_gboolean (GSimpleAsyncResult *simple,
@@ -618,6 +644,8 @@ g_simple_async_result_set_op_res_gboolean (GSimpleAsyncResult *simple,
* *
* Returns: %TRUE if the operation's result was %TRUE, %FALSE * Returns: %TRUE if the operation's result was %TRUE, %FALSE
* if the operation's result was %FALSE. * if the operation's result was %FALSE.
*
* Deprecated: 2.46: Use #GTask and g_task_propagate_boolean() instead.
**/ **/
gboolean gboolean
g_simple_async_result_get_op_res_gboolean (GSimpleAsyncResult *simple) g_simple_async_result_get_op_res_gboolean (GSimpleAsyncResult *simple)
@@ -632,6 +660,8 @@ g_simple_async_result_get_op_res_gboolean (GSimpleAsyncResult *simple)
* @error: #GError. * @error: #GError.
* *
* Sets the result from a #GError. * Sets the result from a #GError.
*
* Deprecated: 2.46: Use #GTask and g_task_return_error() instead.
**/ **/
void void
g_simple_async_result_set_from_error (GSimpleAsyncResult *simple, g_simple_async_result_set_from_error (GSimpleAsyncResult *simple,
@@ -655,6 +685,8 @@ g_simple_async_result_set_from_error (GSimpleAsyncResult *simple,
* of @error, so the caller does not need to free it any more. * of @error, so the caller does not need to free it any more.
* *
* Since: 2.28 * Since: 2.28
*
* Deprecated: 2.46: Use #GTask and g_task_return_error() instead.
**/ **/
void void
g_simple_async_result_take_error (GSimpleAsyncResult *simple, g_simple_async_result_take_error (GSimpleAsyncResult *simple,
@@ -679,6 +711,8 @@ g_simple_async_result_take_error (GSimpleAsyncResult *simple,
* *
* Sets an error within the asynchronous result without a #GError. * Sets an error within the asynchronous result without a #GError.
* Unless writing a binding, see g_simple_async_result_set_error(). * Unless writing a binding, see g_simple_async_result_set_error().
*
* Deprecated: 2.46: Use #GTask and g_task_return_error() instead.
**/ **/
void void
g_simple_async_result_set_error_va (GSimpleAsyncResult *simple, g_simple_async_result_set_error_va (GSimpleAsyncResult *simple,
@@ -706,6 +740,8 @@ g_simple_async_result_set_error_va (GSimpleAsyncResult *simple,
* @...: a list of variables to fill in @format. * @...: a list of variables to fill in @format.
* *
* Sets an error within the asynchronous result without a #GError. * Sets an error within the asynchronous result without a #GError.
*
* Deprecated: 2.46: Use #GTask and g_task_return_new_error() instead.
**/ **/
void void
g_simple_async_result_set_error (GSimpleAsyncResult *simple, g_simple_async_result_set_error (GSimpleAsyncResult *simple,
@@ -736,6 +772,8 @@ g_simple_async_result_set_error (GSimpleAsyncResult *simple,
* *
* Calling this function takes a reference to @simple for as long as * Calling this function takes a reference to @simple for as long as
* is needed to complete the call. * is needed to complete the call.
*
* Deprecated: 2.46: Use #GTask instead.
**/ **/
void void
g_simple_async_result_complete (GSimpleAsyncResult *simple) g_simple_async_result_complete (GSimpleAsyncResult *simple)
@@ -788,6 +826,8 @@ complete_in_idle_cb (gpointer data)
* *
* Calling this function takes a reference to @simple for as long as * Calling this function takes a reference to @simple for as long as
* is needed to complete the call. * is needed to complete the call.
*
* Deprecated: 2.46: Use #GTask instead.
*/ */
void void
g_simple_async_result_complete_in_idle (GSimpleAsyncResult *simple) g_simple_async_result_complete_in_idle (GSimpleAsyncResult *simple)
@@ -883,6 +923,8 @@ run_in_thread (GIOSchedulerJob *job,
* *
* Calling this function takes a reference to @simple for as long as * Calling this function takes a reference to @simple for as long as
* is needed to run the job and report its completion. * is needed to run the job and report its completion.
*
* Deprecated: 2.46: Use #GTask and g_task_run_in_thread() instead.
*/ */
void void
g_simple_async_result_run_in_thread (GSimpleAsyncResult *simple, g_simple_async_result_run_in_thread (GSimpleAsyncResult *simple,
@@ -928,6 +970,8 @@ g_simple_async_result_run_in_thread (GSimpleAsyncResult *simple,
* Returns: #TRUE if all checks passed or #FALSE if any failed. * Returns: #TRUE if all checks passed or #FALSE if any failed.
* *
* Since: 2.20 * Since: 2.20
*
* Deprecated: 2.46: Use #GTask and g_task_is_valid() instead.
**/ **/
gboolean gboolean
g_simple_async_result_is_valid (GAsyncResult *result, g_simple_async_result_is_valid (GAsyncResult *result,
@@ -970,6 +1014,8 @@ g_simple_async_result_is_valid (GAsyncResult *result,
* Reports an error in an asynchronous function in an idle function by * Reports an error in an asynchronous function in an idle function by
* directly setting the contents of the #GAsyncResult with the given error * directly setting the contents of the #GAsyncResult with the given error
* information. * information.
*
* Deprecated: 2.46: Use g_task_report_error().
**/ **/
void void
g_simple_async_report_error_in_idle (GObject *object, g_simple_async_report_error_in_idle (GObject *object,
@@ -1008,6 +1054,8 @@ g_simple_async_report_error_in_idle (GObject *object,
* Reports an error in an idle function. Similar to * Reports an error in an idle function. Similar to
* g_simple_async_report_error_in_idle(), but takes a #GError rather * g_simple_async_report_error_in_idle(), but takes a #GError rather
* than building a new one. * than building a new one.
*
* Deprecated: 2.46: Use g_task_report_error().
**/ **/
void void
g_simple_async_report_gerror_in_idle (GObject *object, g_simple_async_report_gerror_in_idle (GObject *object,
@@ -1040,6 +1088,8 @@ g_simple_async_report_gerror_in_idle (GObject *object,
* ownership of @error, so the caller does not have to free it any more. * ownership of @error, so the caller does not have to free it any more.
* *
* Since: 2.28 * Since: 2.28
*
* Deprecated: 2.46: Use g_task_report_error().
**/ **/
void void
g_simple_async_report_take_gerror_in_idle (GObject *object, g_simple_async_report_take_gerror_in_idle (GObject *object,
@@ -1082,6 +1132,8 @@ g_simple_async_report_take_gerror_in_idle (GObject *object,
* unrelated g_simple_async_result_set_handle_cancellation() function. * unrelated g_simple_async_result_set_handle_cancellation() function.
* *
* Since: 2.32 * Since: 2.32
*
* Deprecated: 2.46: Use #GTask instead.
**/ **/
void void
g_simple_async_result_set_check_cancellable (GSimpleAsyncResult *simple, g_simple_async_result_set_check_cancellable (GSimpleAsyncResult *simple,
@@ -1094,3 +1146,5 @@ g_simple_async_result_set_check_cancellable (GSimpleAsyncResult *simple,
if (check_cancellable) if (check_cancellable)
simple->check_cancellable = g_object_ref (check_cancellable); simple->check_cancellable = g_object_ref (check_cancellable);
} }
G_GNUC_END_IGNORE_DEPRECATIONS

View File

@@ -47,12 +47,12 @@ typedef struct _GSimpleAsyncResultClass GSimpleAsyncResultClass;
GLIB_AVAILABLE_IN_ALL GLIB_AVAILABLE_IN_ALL
GType g_simple_async_result_get_type (void) G_GNUC_CONST; GType g_simple_async_result_get_type (void) G_GNUC_CONST;
GLIB_AVAILABLE_IN_ALL GLIB_DEPRECATED_IN_2_46_FOR(g_task_new)
GSimpleAsyncResult *g_simple_async_result_new (GObject *source_object, GSimpleAsyncResult *g_simple_async_result_new (GObject *source_object,
GAsyncReadyCallback callback, GAsyncReadyCallback callback,
gpointer user_data, gpointer user_data,
gpointer source_tag); gpointer source_tag);
GLIB_AVAILABLE_IN_ALL GLIB_DEPRECATED_IN_2_46_FOR(g_task_new)
GSimpleAsyncResult *g_simple_async_result_new_error (GObject *source_object, GSimpleAsyncResult *g_simple_async_result_new_error (GObject *source_object,
GAsyncReadyCallback callback, GAsyncReadyCallback callback,
gpointer user_data, gpointer user_data,
@@ -60,83 +60,83 @@ GSimpleAsyncResult *g_simple_async_result_new_error (GObject
gint code, gint code,
const char *format, const char *format,
...) G_GNUC_PRINTF (6, 7); ...) G_GNUC_PRINTF (6, 7);
GLIB_AVAILABLE_IN_ALL GLIB_DEPRECATED_IN_2_46_FOR(g_task_new)
GSimpleAsyncResult *g_simple_async_result_new_from_error (GObject *source_object, GSimpleAsyncResult *g_simple_async_result_new_from_error (GObject *source_object,
GAsyncReadyCallback callback, GAsyncReadyCallback callback,
gpointer user_data, gpointer user_data,
const GError *error); const GError *error);
GLIB_AVAILABLE_IN_ALL GLIB_DEPRECATED_IN_2_46_FOR(g_task_new)
GSimpleAsyncResult *g_simple_async_result_new_take_error (GObject *source_object, GSimpleAsyncResult *g_simple_async_result_new_take_error (GObject *source_object,
GAsyncReadyCallback callback, GAsyncReadyCallback callback,
gpointer user_data, gpointer user_data,
GError *error); GError *error);
GLIB_AVAILABLE_IN_ALL GLIB_DEPRECATED_IN_2_46
void g_simple_async_result_set_op_res_gpointer (GSimpleAsyncResult *simple, void g_simple_async_result_set_op_res_gpointer (GSimpleAsyncResult *simple,
gpointer op_res, gpointer op_res,
GDestroyNotify destroy_op_res); GDestroyNotify destroy_op_res);
GLIB_AVAILABLE_IN_ALL GLIB_DEPRECATED_IN_2_46
gpointer g_simple_async_result_get_op_res_gpointer (GSimpleAsyncResult *simple); gpointer g_simple_async_result_get_op_res_gpointer (GSimpleAsyncResult *simple);
GLIB_AVAILABLE_IN_ALL GLIB_DEPRECATED_IN_2_46
void g_simple_async_result_set_op_res_gssize (GSimpleAsyncResult *simple, void g_simple_async_result_set_op_res_gssize (GSimpleAsyncResult *simple,
gssize op_res); gssize op_res);
GLIB_AVAILABLE_IN_ALL GLIB_DEPRECATED_IN_2_46
gssize g_simple_async_result_get_op_res_gssize (GSimpleAsyncResult *simple); gssize g_simple_async_result_get_op_res_gssize (GSimpleAsyncResult *simple);
GLIB_AVAILABLE_IN_ALL GLIB_DEPRECATED_IN_2_46
void g_simple_async_result_set_op_res_gboolean (GSimpleAsyncResult *simple, void g_simple_async_result_set_op_res_gboolean (GSimpleAsyncResult *simple,
gboolean op_res); gboolean op_res);
GLIB_AVAILABLE_IN_ALL GLIB_DEPRECATED_IN_2_46
gboolean g_simple_async_result_get_op_res_gboolean (GSimpleAsyncResult *simple); gboolean g_simple_async_result_get_op_res_gboolean (GSimpleAsyncResult *simple);
GLIB_AVAILABLE_IN_2_32 GLIB_AVAILABLE_IN_2_32 /* Also deprecated, but can't mark something both AVAILABLE and DEPRECATED */
void g_simple_async_result_set_check_cancellable (GSimpleAsyncResult *simple, void g_simple_async_result_set_check_cancellable (GSimpleAsyncResult *simple,
GCancellable *check_cancellable); GCancellable *check_cancellable);
GLIB_AVAILABLE_IN_ALL GLIB_DEPRECATED_IN_2_46
gpointer g_simple_async_result_get_source_tag (GSimpleAsyncResult *simple); gpointer g_simple_async_result_get_source_tag (GSimpleAsyncResult *simple);
GLIB_AVAILABLE_IN_ALL GLIB_DEPRECATED_IN_2_46
void g_simple_async_result_set_handle_cancellation (GSimpleAsyncResult *simple, void g_simple_async_result_set_handle_cancellation (GSimpleAsyncResult *simple,
gboolean handle_cancellation); gboolean handle_cancellation);
GLIB_AVAILABLE_IN_ALL GLIB_DEPRECATED_IN_2_46
void g_simple_async_result_complete (GSimpleAsyncResult *simple); void g_simple_async_result_complete (GSimpleAsyncResult *simple);
GLIB_AVAILABLE_IN_ALL GLIB_DEPRECATED_IN_2_46
void g_simple_async_result_complete_in_idle (GSimpleAsyncResult *simple); void g_simple_async_result_complete_in_idle (GSimpleAsyncResult *simple);
GLIB_AVAILABLE_IN_ALL GLIB_DEPRECATED_IN_2_46
void g_simple_async_result_run_in_thread (GSimpleAsyncResult *simple, void g_simple_async_result_run_in_thread (GSimpleAsyncResult *simple,
GSimpleAsyncThreadFunc func, GSimpleAsyncThreadFunc func,
int io_priority, int io_priority,
GCancellable *cancellable); GCancellable *cancellable);
GLIB_AVAILABLE_IN_ALL GLIB_DEPRECATED_IN_2_46
void g_simple_async_result_set_from_error (GSimpleAsyncResult *simple, void g_simple_async_result_set_from_error (GSimpleAsyncResult *simple,
const GError *error); const GError *error);
GLIB_AVAILABLE_IN_ALL GLIB_DEPRECATED_IN_2_46
void g_simple_async_result_take_error (GSimpleAsyncResult *simple, void g_simple_async_result_take_error (GSimpleAsyncResult *simple,
GError *error); GError *error);
GLIB_AVAILABLE_IN_ALL GLIB_DEPRECATED_IN_2_46
gboolean g_simple_async_result_propagate_error (GSimpleAsyncResult *simple, gboolean g_simple_async_result_propagate_error (GSimpleAsyncResult *simple,
GError **dest); GError **dest);
GLIB_AVAILABLE_IN_ALL GLIB_DEPRECATED_IN_2_46
void g_simple_async_result_set_error (GSimpleAsyncResult *simple, void g_simple_async_result_set_error (GSimpleAsyncResult *simple,
GQuark domain, GQuark domain,
gint code, gint code,
const char *format, const char *format,
...) G_GNUC_PRINTF (4, 5); ...) G_GNUC_PRINTF (4, 5);
GLIB_AVAILABLE_IN_ALL GLIB_DEPRECATED_IN_2_46
void g_simple_async_result_set_error_va (GSimpleAsyncResult *simple, void g_simple_async_result_set_error_va (GSimpleAsyncResult *simple,
GQuark domain, GQuark domain,
gint code, gint code,
const char *format, const char *format,
va_list args) va_list args)
G_GNUC_PRINTF(4, 0); G_GNUC_PRINTF(4, 0);
GLIB_AVAILABLE_IN_ALL GLIB_DEPRECATED_IN_2_46
gboolean g_simple_async_result_is_valid (GAsyncResult *result, gboolean g_simple_async_result_is_valid (GAsyncResult *result,
GObject *source, GObject *source,
gpointer source_tag); gpointer source_tag);
GLIB_AVAILABLE_IN_ALL GLIB_DEPRECATED_IN_2_46_FOR(g_task_report_error)
void g_simple_async_report_error_in_idle (GObject *object, void g_simple_async_report_error_in_idle (GObject *object,
GAsyncReadyCallback callback, GAsyncReadyCallback callback,
gpointer user_data, gpointer user_data,
@@ -144,12 +144,12 @@ void g_simple_async_report_error_in_idle (GObject *object,
gint code, gint code,
const char *format, const char *format,
...) G_GNUC_PRINTF(6, 7); ...) G_GNUC_PRINTF(6, 7);
GLIB_AVAILABLE_IN_ALL GLIB_DEPRECATED_IN_2_46_FOR(g_task_report_error)
void g_simple_async_report_gerror_in_idle (GObject *object, void g_simple_async_report_gerror_in_idle (GObject *object,
GAsyncReadyCallback callback, GAsyncReadyCallback callback,
gpointer user_data, gpointer user_data,
const GError *error); const GError *error);
GLIB_AVAILABLE_IN_ALL GLIB_DEPRECATED_IN_2_46_FOR(g_task_report_error)
void g_simple_async_report_take_gerror_in_idle (GObject *object, void g_simple_async_report_take_gerror_in_idle (GObject *object,
GAsyncReadyCallback callback, GAsyncReadyCallback callback,
gpointer user_data, gpointer user_data,

View File

@@ -14,6 +14,8 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
static GObject *got_source; static GObject *got_source;
static GAsyncResult *got_result; static GAsyncResult *got_result;
static gpointer got_user_data; static gpointer got_user_data;
@@ -193,3 +195,5 @@ main (int argc, char **argv)
return g_test_run(); return g_test_run();
} }
G_GNUC_END_IGNORE_DEPRECATIONS