Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:59:59

0001 /* GIO - GLib Input, Output and Streaming Library
0002  *
0003  * Copyright (C) 2006-2007 Red Hat, Inc.
0004  *
0005  * SPDX-License-Identifier: LGPL-2.1-or-later
0006  *
0007  * This library is free software; you can redistribute it and/or
0008  * modify it under the terms of the GNU Lesser General Public
0009  * License as published by the Free Software Foundation; either
0010  * version 2.1 of the License, or (at your option) any later version.
0011  *
0012  * This library is distributed in the hope that it will be useful,
0013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0015  * Lesser General Public License for more details.
0016  *
0017  * You should have received a copy of the GNU Lesser General
0018  * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
0019  *
0020  * Author: Alexander Larsson <alexl@redhat.com>
0021  */
0022 
0023 #ifndef __G_SIMPLE_ASYNC_RESULT_H__
0024 #define __G_SIMPLE_ASYNC_RESULT_H__
0025 
0026 #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
0027 #error "Only <gio/gio.h> can be included directly."
0028 #endif
0029 
0030 #include <gio/giotypes.h>
0031 
0032 G_BEGIN_DECLS
0033 
0034 #define G_TYPE_SIMPLE_ASYNC_RESULT         (g_simple_async_result_get_type ())
0035 #define G_SIMPLE_ASYNC_RESULT(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_SIMPLE_ASYNC_RESULT, GSimpleAsyncResult))
0036 #define G_SIMPLE_ASYNC_RESULT_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_SIMPLE_ASYNC_RESULT, GSimpleAsyncResultClass))
0037 #define G_IS_SIMPLE_ASYNC_RESULT(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_SIMPLE_ASYNC_RESULT))
0038 #define G_IS_SIMPLE_ASYNC_RESULT_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_SIMPLE_ASYNC_RESULT))
0039 #define G_SIMPLE_ASYNC_RESULT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_SIMPLE_ASYNC_RESULT, GSimpleAsyncResultClass))
0040 
0041 typedef struct _GSimpleAsyncResultClass   GSimpleAsyncResultClass;
0042 
0043 
0044 GIO_AVAILABLE_IN_ALL
0045 GType               g_simple_async_result_get_type         (void) G_GNUC_CONST;
0046 
0047 GIO_DEPRECATED_IN_2_46_FOR(g_task_new)
0048 GSimpleAsyncResult *g_simple_async_result_new              (GObject                 *source_object,
0049                                 GAsyncReadyCallback      callback,
0050                                 gpointer                 user_data,
0051                                 gpointer                 source_tag);
0052 GIO_DEPRECATED_IN_2_46_FOR(g_task_new)
0053 GSimpleAsyncResult *g_simple_async_result_new_error        (GObject                 *source_object,
0054                                 GAsyncReadyCallback      callback,
0055                                 gpointer                 user_data,
0056                                 GQuark                   domain,
0057                                 gint                     code,
0058                                 const char              *format,
0059                                 ...) G_GNUC_PRINTF (6, 7);
0060 GIO_DEPRECATED_IN_2_46_FOR(g_task_new)
0061 GSimpleAsyncResult *g_simple_async_result_new_from_error   (GObject                 *source_object,
0062                                 GAsyncReadyCallback      callback,
0063                                 gpointer                 user_data,
0064                                 const GError            *error);
0065 GIO_DEPRECATED_IN_2_46_FOR(g_task_new)
0066 GSimpleAsyncResult *g_simple_async_result_new_take_error   (GObject                 *source_object,
0067                                 GAsyncReadyCallback      callback,
0068                                 gpointer                 user_data,
0069                                 GError                  *error);
0070 
0071 GIO_DEPRECATED_IN_2_46
0072 void                g_simple_async_result_set_op_res_gpointer (GSimpleAsyncResult      *simple,
0073                                                                gpointer                 op_res,
0074                                                                GDestroyNotify           destroy_op_res);
0075 GIO_DEPRECATED_IN_2_46
0076 gpointer            g_simple_async_result_get_op_res_gpointer (GSimpleAsyncResult      *simple);
0077 
0078 GIO_DEPRECATED_IN_2_46
0079 void                g_simple_async_result_set_op_res_gssize   (GSimpleAsyncResult      *simple,
0080                                                                gssize                   op_res);
0081 GIO_DEPRECATED_IN_2_46
0082 gssize              g_simple_async_result_get_op_res_gssize   (GSimpleAsyncResult      *simple);
0083 
0084 GIO_DEPRECATED_IN_2_46
0085 void                g_simple_async_result_set_op_res_gboolean (GSimpleAsyncResult      *simple,
0086                                                                gboolean                 op_res);
0087 GIO_DEPRECATED_IN_2_46
0088 gboolean            g_simple_async_result_get_op_res_gboolean (GSimpleAsyncResult      *simple);
0089 
0090 
0091 
0092 GIO_AVAILABLE_IN_2_32 /* Also deprecated, but can't mark something both AVAILABLE and DEPRECATED */
0093 void                g_simple_async_result_set_check_cancellable (GSimpleAsyncResult *simple,
0094                                                                  GCancellable       *check_cancellable);
0095 GIO_DEPRECATED_IN_2_46
0096 gpointer            g_simple_async_result_get_source_tag   (GSimpleAsyncResult      *simple);
0097 GIO_DEPRECATED_IN_2_46
0098 void                g_simple_async_result_set_handle_cancellation (GSimpleAsyncResult      *simple,
0099                                    gboolean          handle_cancellation);
0100 GIO_DEPRECATED_IN_2_46
0101 void                g_simple_async_result_complete         (GSimpleAsyncResult      *simple);
0102 GIO_DEPRECATED_IN_2_46
0103 void                g_simple_async_result_complete_in_idle (GSimpleAsyncResult      *simple);
0104 GIO_DEPRECATED_IN_2_46
0105 void                g_simple_async_result_run_in_thread    (GSimpleAsyncResult      *simple,
0106                                 GSimpleAsyncThreadFunc   func,
0107                                 int                      io_priority,
0108                                 GCancellable            *cancellable);
0109 GIO_DEPRECATED_IN_2_46
0110 void                g_simple_async_result_set_from_error   (GSimpleAsyncResult      *simple,
0111                                 const GError            *error);
0112 GIO_DEPRECATED_IN_2_46
0113 void                g_simple_async_result_take_error       (GSimpleAsyncResult      *simple,
0114                                 GError            *error);
0115 GIO_DEPRECATED_IN_2_46
0116 gboolean            g_simple_async_result_propagate_error  (GSimpleAsyncResult      *simple,
0117                                 GError                 **dest);
0118 GIO_DEPRECATED_IN_2_46
0119 void                g_simple_async_result_set_error        (GSimpleAsyncResult      *simple,
0120                                 GQuark                   domain,
0121                                 gint                     code,
0122                                 const char              *format,
0123                                 ...) G_GNUC_PRINTF (4, 5);
0124 GIO_DEPRECATED_IN_2_46
0125 void                g_simple_async_result_set_error_va     (GSimpleAsyncResult      *simple,
0126                                 GQuark                   domain,
0127                                 gint                     code,
0128                                 const char              *format,
0129                                 va_list                  args)
0130                                 G_GNUC_PRINTF(4, 0);
0131 GIO_DEPRECATED_IN_2_46
0132 gboolean            g_simple_async_result_is_valid         (GAsyncResult            *result,
0133                                                             GObject                 *source,
0134                                                             gpointer                 source_tag);
0135 
0136 GIO_DEPRECATED_IN_2_46_FOR(g_task_report_error)
0137 void g_simple_async_report_error_in_idle  (GObject            *object,
0138                        GAsyncReadyCallback callback,
0139                        gpointer            user_data,
0140                        GQuark              domain,
0141                        gint                code,
0142                        const char         *format,
0143                        ...) G_GNUC_PRINTF(6, 7);
0144 GIO_DEPRECATED_IN_2_46_FOR(g_task_report_error)
0145 void g_simple_async_report_gerror_in_idle (GObject            *object,
0146                        GAsyncReadyCallback callback,
0147                        gpointer            user_data,
0148                        const GError       *error);
0149 GIO_DEPRECATED_IN_2_46_FOR(g_task_report_error)
0150 void g_simple_async_report_take_gerror_in_idle (GObject            *object,
0151                                                 GAsyncReadyCallback callback,
0152                                                 gpointer            user_data,
0153                                                 GError             *error);
0154 
0155 G_END_DECLS
0156 
0157 
0158 
0159 #endif /* __G_SIMPLE_ASYNC_RESULT_H__ */