Debian Codegraph @

src/dex-infinite.c

raw symbols SCIP
1 /*
2 * dex-infinite.c
3 *
4 * Copyright 2023 Christian Hergert <[email protected]>
5 *
6 * This library is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General Public License as
8 * published by the Free Software Foundation; either version 2.1 of the
9 * License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program. If not, see <http://www.gnu.org/licenses/>.
18 *
19 * SPDX-License-Identifier: LGPL-2.1-or-later
20 */
21
22 #include "config.h"
23
24 #include "dex-infinite-private.h"
25
26 typedef struct _DexInfinite
27 {
28 DexFuture parent_instance;
29 } DexInfinite;
30
31 typedef struct _DexInfiniteClass
32 {
33 DexFutureClass parent_class;
34 } DexInfiniteClass;
35
36 DEX_DEFINE_FINAL_TYPE (DexInfinite, dex_infinite, DEX_TYPE_FUTURE)
37
38 #undef DEX_TYPE_INFINITE
39 #define DEX_TYPE_INFINITE dex_infinite_type
40
41 static void
42 dex_infinite_discard (DexFuture *future)
43 {
44 }
45
46 static gboolean
47 dex_infinite_propagate (DexFuture *future,
48 DexFuture *completed)
49 {
50 g_return_val_if_reached (FALSE);
51 }
52
53 static void
54 dex_infinite_class_init (DexInfiniteClass *infinite_class)
55 {
56 DexFutureClass *future_class = DEX_FUTURE_CLASS (infinite_class);
57
58 future_class->propagate = dex_infinite_propagate;
59 future_class->discard = dex_infinite_discard;
60 }
61
62 static void
63 dex_infinite_init (DexInfinite *infinite)
64 {
65 }
66
67 DexFuture *
68 dex_infinite_new (void)
69 {
70 return (DexFuture *)dex_object_create_instance (dex_infinite_type);
71 }