* ]|
*/
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
static void g_simple_async_result_async_result_iface_init (GAsyncResultIface *iface);
struct _GSimpleAsyncResult
* this function returns.
*
* Returns: a #GSimpleAsyncResult.
+ *
+ * Deprecated: 2.46: Use g_task_new() instead.
**/
GSimpleAsyncResult *
g_simple_async_result_new (GObject *source_object,
* Creates a #GSimpleAsyncResult from an error condition.
*
* Returns: a #GSimpleAsyncResult.
+ *
+ * Deprecated: 2.46: Use g_task_new() and g_task_return_error() instead.
**/
GSimpleAsyncResult *
g_simple_async_result_new_from_error (GObject *source_object,
* Returns: a #GSimpleAsyncResult
*
* Since: 2.28
+ *
+ * Deprecated: 2.46: Use g_task_new() and g_task_return_error() instead.
**/
GSimpleAsyncResult *
g_simple_async_result_new_take_error (GObject *source_object,
* Creates a new #GSimpleAsyncResult with a set error.
*
* Returns: a #GSimpleAsyncResult.
+ *
+ * Deprecated: 2.46: Use g_task_new() and g_task_return_new_error() instead.
**/
GSimpleAsyncResult *
g_simple_async_result_new_error (GObject *source_object,
* This function has nothing to do with
* g_simple_async_result_set_check_cancellable(). It only refers to the
* #GCancellable passed to g_simple_async_result_run_in_thread().
+ *
+ * Deprecated: 2.46
**/
void
g_simple_async_result_set_handle_cancellation (GSimpleAsyncResult *simple,
* Gets the source tag 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
g_simple_async_result_get_source_tag (GSimpleAsyncResult *simple)
* function will return %TRUE with @dest set appropriately.
*
* Returns: %TRUE if the error was propagated to @dest. %FALSE otherwise.
+ *
+ * Deprecated: 2.46: Use #GTask instead.
**/
gboolean
g_simple_async_result_propagate_error (GSimpleAsyncResult *simple,
* @destroy_op_res: a #GDestroyNotify function.
*
* Sets the operation result within the asynchronous result to a pointer.
+ *
+ * Deprecated: 2.46: Use #GTask and g_task_return_pointer() instead.
**/
void
g_simple_async_result_set_op_res_gpointer (GSimpleAsyncResult *simple,
* Gets a pointer result as returned by the asynchronous function.
*
* Returns: a pointer from the result.
+ *
+ * Deprecated: 2.46: Use #GTask and g_task_propagate_pointer() instead.
**/
gpointer
g_simple_async_result_get_op_res_gpointer (GSimpleAsyncResult *simple)
*
* Sets the operation result within the asynchronous result to
* the given @op_res.
+ *
+ * Deprecated: 2.46: Use #GTask and g_task_return_int() instead.
**/
void
g_simple_async_result_set_op_res_gssize (GSimpleAsyncResult *simple,
* Gets a gssize from the asynchronous result.
*
* Returns: a gssize returned from the asynchronous function.
+ *
+ * Deprecated: 2.46: Use #GTask and g_task_propagate_int() instead.
**/
gssize
g_simple_async_result_get_op_res_gssize (GSimpleAsyncResult *simple)
* @op_res: a #gboolean.
*
* Sets the operation result to a boolean within the asynchronous result.
+ *
+ * Deprecated: 2.46: Use #GTask and g_task_return_boolean() instead.
**/
void
g_simple_async_result_set_op_res_gboolean (GSimpleAsyncResult *simple,
*
* Returns: %TRUE if the operation's result was %TRUE, %FALSE
* if the operation's result was %FALSE.
+ *
+ * Deprecated: 2.46: Use #GTask and g_task_propagate_boolean() instead.
**/
gboolean
g_simple_async_result_get_op_res_gboolean (GSimpleAsyncResult *simple)
* @error: #GError.
*
* Sets the result from a #GError.
+ *
+ * Deprecated: 2.46: Use #GTask and g_task_return_error() instead.
**/
void
g_simple_async_result_set_from_error (GSimpleAsyncResult *simple,
* of @error, so the caller does not need to free it any more.
*
* Since: 2.28
+ *
+ * Deprecated: 2.46: Use #GTask and g_task_return_error() instead.
**/
void
g_simple_async_result_take_error (GSimpleAsyncResult *simple,
*
* Sets an error within the asynchronous result without a #GError.
* Unless writing a binding, see g_simple_async_result_set_error().
+ *
+ * Deprecated: 2.46: Use #GTask and g_task_return_error() instead.
**/
void
g_simple_async_result_set_error_va (GSimpleAsyncResult *simple,
* @...: a list of variables to fill in @format.
*
* Sets an error within the asynchronous result without a #GError.
+ *
+ * Deprecated: 2.46: Use #GTask and g_task_return_new_error() instead.
**/
void
g_simple_async_result_set_error (GSimpleAsyncResult *simple,
*
* Calling this function takes a reference to @simple for as long as
* is needed to complete the call.
+ *
+ * Deprecated: 2.46: Use #GTask instead.
**/
void
g_simple_async_result_complete (GSimpleAsyncResult *simple)
*
* Calling this function takes a reference to @simple for as long as
* is needed to complete the call.
+ *
+ * Deprecated: 2.46: Use #GTask instead.
*/
void
g_simple_async_result_complete_in_idle (GSimpleAsyncResult *simple)
*
* Calling this function takes a reference to @simple for as long as
* is needed to run the job and report its completion.
+ *
+ * Deprecated: 2.46: Use #GTask and g_task_run_in_thread() instead.
*/
void
g_simple_async_result_run_in_thread (GSimpleAsyncResult *simple,
* Returns: #TRUE if all checks passed or #FALSE if any failed.
*
* Since: 2.20
+ *
+ * Deprecated: 2.46: Use #GTask and g_task_is_valid() instead.
**/
gboolean
g_simple_async_result_is_valid (GAsyncResult *result,
* Reports an error in an asynchronous function in an idle function by
* directly setting the contents of the #GAsyncResult with the given error
* information.
+ *
+ * Deprecated: 2.46: Use g_task_report_error().
**/
void
g_simple_async_report_error_in_idle (GObject *object,
* Reports an error in an idle function. Similar to
* g_simple_async_report_error_in_idle(), but takes a #GError rather
* than building a new one.
+ *
+ * Deprecated: 2.46: Use g_task_report_error().
**/
void
g_simple_async_report_gerror_in_idle (GObject *object,
* ownership of @error, so the caller does not have to free it any more.
*
* Since: 2.28
+ *
+ * Deprecated: 2.46: Use g_task_report_error().
**/
void
g_simple_async_report_take_gerror_in_idle (GObject *object,
* unrelated g_simple_async_result_set_handle_cancellation() function.
*
* Since: 2.32
+ *
+ * Deprecated: 2.46: Use #GTask instead.
**/
void
g_simple_async_result_set_check_cancellable (GSimpleAsyncResult *simple,
if (check_cancellable)
simple->check_cancellable = g_object_ref (check_cancellable);
}
+
+G_GNUC_END_IGNORE_DEPRECATIONS
GLIB_AVAILABLE_IN_ALL
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,
GAsyncReadyCallback callback,
gpointer user_data,
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,
GAsyncReadyCallback callback,
gpointer user_data,
gint code,
const char *format,
...) 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,
GAsyncReadyCallback callback,
gpointer user_data,
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,
GAsyncReadyCallback callback,
gpointer user_data,
GError *error);
-GLIB_AVAILABLE_IN_ALL
+GLIB_DEPRECATED_IN_2_46
void g_simple_async_result_set_op_res_gpointer (GSimpleAsyncResult *simple,
gpointer 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);
-GLIB_AVAILABLE_IN_ALL
+GLIB_DEPRECATED_IN_2_46
void g_simple_async_result_set_op_res_gssize (GSimpleAsyncResult *simple,
gssize op_res);
-GLIB_AVAILABLE_IN_ALL
+GLIB_DEPRECATED_IN_2_46
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,
gboolean op_res);
-GLIB_AVAILABLE_IN_ALL
+GLIB_DEPRECATED_IN_2_46
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,
GCancellable *check_cancellable);
-GLIB_AVAILABLE_IN_ALL
+GLIB_DEPRECATED_IN_2_46
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,
gboolean handle_cancellation);
-GLIB_AVAILABLE_IN_ALL
+GLIB_DEPRECATED_IN_2_46
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);
-GLIB_AVAILABLE_IN_ALL
+GLIB_DEPRECATED_IN_2_46
void g_simple_async_result_run_in_thread (GSimpleAsyncResult *simple,
GSimpleAsyncThreadFunc func,
int io_priority,
GCancellable *cancellable);
-GLIB_AVAILABLE_IN_ALL
+GLIB_DEPRECATED_IN_2_46
void g_simple_async_result_set_from_error (GSimpleAsyncResult *simple,
const GError *error);
-GLIB_AVAILABLE_IN_ALL
+GLIB_DEPRECATED_IN_2_46
void g_simple_async_result_take_error (GSimpleAsyncResult *simple,
GError *error);
-GLIB_AVAILABLE_IN_ALL
+GLIB_DEPRECATED_IN_2_46
gboolean g_simple_async_result_propagate_error (GSimpleAsyncResult *simple,
GError **dest);
-GLIB_AVAILABLE_IN_ALL
+GLIB_DEPRECATED_IN_2_46
void g_simple_async_result_set_error (GSimpleAsyncResult *simple,
GQuark domain,
gint code,
const char *format,
...) G_GNUC_PRINTF (4, 5);
-GLIB_AVAILABLE_IN_ALL
+GLIB_DEPRECATED_IN_2_46
void g_simple_async_result_set_error_va (GSimpleAsyncResult *simple,
GQuark domain,
gint code,
const char *format,
va_list args)
G_GNUC_PRINTF(4, 0);
-GLIB_AVAILABLE_IN_ALL
+GLIB_DEPRECATED_IN_2_46
gboolean g_simple_async_result_is_valid (GAsyncResult *result,
GObject *source,
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,
GAsyncReadyCallback callback,
gpointer user_data,
gint code,
const char *format,
...) 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,
GAsyncReadyCallback callback,
gpointer user_data,
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,
GAsyncReadyCallback callback,
gpointer user_data,