Debian Codegraph @

src/dex-async-result.h

raw symbols SCIP
1 /* dex-async-result.h
2 *
3 * Copyright 2022 Christian Hergert <[email protected]>
4 *
5 * This library is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as
7 * published by the Free Software Foundation; either version 2.1 of the
8 * License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program. If not, see <http://www.gnu.org/licenses/>.
17 *
18 * SPDX-License-Identifier: LGPL-2.1-or-later
19 */
20
21 #pragma once
22
23 #include <gio/gio.h>
24
25 #include "dex-future.h"
26
27 G_BEGIN_DECLS
28
29 #define DEX_TYPE_ASYNC_RESULT (dex_async_result_get_type())
30
31 DEX_AVAILABLE_IN_ALL
32 G_DECLARE_FINAL_TYPE (DexAsyncResult, dex_async_result, DEX, ASYNC_RESULT, GObject)
33
34 DEX_AVAILABLE_IN_ALL
35 DexAsyncResult *dex_async_result_new (gpointer source_object,
36 GCancellable *cancellable,
37 GAsyncReadyCallback callback,
38 gpointer user_data)
39 G_GNUC_WARN_UNUSED_RESULT;
40 DEX_AVAILABLE_IN_ALL
41 void dex_async_result_set_priority (DexAsyncResult *async_result,
42 int priority);
43 DEX_AVAILABLE_IN_ALL
44 const char *dex_async_result_get_name (DexAsyncResult *async_result);
45 DEX_AVAILABLE_IN_ALL
46 void dex_async_result_set_name (DexAsyncResult *async_result,
47 const char *name);
48 DEX_AVAILABLE_IN_ALL
49 void dex_async_result_set_static_name (DexAsyncResult *async_result,
50 const char *name);
51 DEX_AVAILABLE_IN_ALL
52 void dex_async_result_await (DexAsyncResult *async_result,
53 DexFuture *future);
54 DEX_AVAILABLE_IN_ALL
55 gpointer dex_async_result_propagate_pointer (DexAsyncResult *async_result,
56 GError **error)
57 G_GNUC_WARN_UNUSED_RESULT;
58 DEX_AVAILABLE_IN_ALL
59 gboolean dex_async_result_propagate_boolean (DexAsyncResult *async_result,
60 GError **error);
61 DEX_AVAILABLE_IN_ALL
62 gssize dex_async_result_propagate_int (DexAsyncResult *async_result,
63 GError **error);
64 DEX_AVAILABLE_IN_ALL
65 double dex_async_result_propagate_double (DexAsyncResult *async_result,
66 GError **error);
67 DEX_AVAILABLE_IN_ALL
68 DexFuture *dex_async_result_dup_future (DexAsyncResult *async_result)
69 G_GNUC_WARN_UNUSED_RESULT;
70
71 G_END_DECLS