Branch data Line data Source code
1 : : /*
2 : : SPDX-License-Identifier: GPL-2.0-or-later AND LGPL-2.0-or-later AND MIT
3 : : SPDX-FileCopyrightText: 2012 Colin Walters <walters@verbum.org>
4 : : SPDX-FileCopyrightText: 2013 Dieter Verfaillie
5 : : */
6 : :
7 : : #include "warnlib.h"
8 : :
9 : : GQuark
10 : 2 : warnlib_unpaired_error_quark (void)
11 : : {
12 : 2 : return g_quark_from_static_string ("warnlib-unpaired-error");
13 : : }
14 : :
15 : : gboolean
16 : 1 : warnlib_throw_unpaired (GError **error)
17 : : {
18 : 1 : g_set_error_literal (error, warnlib_unpaired_error_quark (), 0,
19 : : "Unpaired error");
20 : 1 : return FALSE;
21 : : }
22 : :
23 : : typedef WarnLibWhateverIface WarnLibWhateverInterface;
24 [ + + + - : 12 : G_DEFINE_INTERFACE (WarnLibWhatever, warnlib_whatever, G_TYPE_OBJECT)
+ + ]
25 : :
26 : : static void
27 : 2 : warnlib_whatever_default_init (WarnLibWhateverIface *iface G_GNUC_UNUSED)
28 : : {
29 : 2 : }
30 : :
31 : : void
32 : 1 : warnlib_whatever_do_moo (WarnLibWhatever *self, int x, gpointer y)
33 : : {
34 : 1 : WARNLIB_WHATEVER_GET_IFACE (self)->do_moo (self, x, y);
35 : 1 : }
36 : :
37 : : /**
38 : : * warnlib_whatever_do_boo:
39 : : * @self: a WarnLibWhatever
40 : : * @x: x parameter
41 : : * @y: y parameter
42 : : *
43 : : * Does boo.
44 : : */
45 : : void
46 : 1 : warnlib_whatever_do_boo (WarnLibWhatever *self, int x, gpointer y)
47 : : {
48 : 1 : WARNLIB_WHATEVER_GET_IFACE (self)->do_boo (self, x, y);
49 : 1 : }
|