Line |
Branch |
Exec |
Source |
1 |
|
|
/* |
2 |
|
|
* Copyright © 2017 Red Hat, Inc |
3 |
|
|
* |
4 |
|
|
* This program is free software; you can redistribute it and/or |
5 |
|
|
* modify it under the terms of the GNU Lesser General Public |
6 |
|
|
* License as published by the Free Software Foundation; either |
7 |
|
|
* version 2.1 of the License, or (at your option) any later version. |
8 |
|
|
* |
9 |
|
|
* This library is distributed in the hope that it will be useful, |
10 |
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 |
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
12 |
|
|
* Lesser General Public License for more details. |
13 |
|
|
* |
14 |
|
|
* You should have received a copy of the GNU Lesser General Public |
15 |
|
|
* License along with this library. If not, see <http://www.gnu.org/licenses/>. |
16 |
|
|
* |
17 |
|
|
* Authors: |
18 |
|
|
* Christian J. Kellner <christian@kellner.me> |
19 |
|
|
*/ |
20 |
|
|
|
21 |
|
|
#pragma once |
22 |
|
|
|
23 |
|
|
#include <gio/gio.h> |
24 |
|
|
|
25 |
|
|
G_BEGIN_DECLS |
26 |
|
|
|
27 |
|
|
typedef struct BoltProxySignal |
28 |
|
|
{ |
29 |
|
|
|
30 |
|
|
const char *theirs; |
31 |
|
|
void (*handle)(GObject *self, |
32 |
|
|
GDBusProxy *bus_proxy, |
33 |
|
|
GVariant *params); |
34 |
|
|
|
35 |
|
|
} BoltProxySignal; |
36 |
|
|
|
37 |
|
|
#define BOLT_TYPE_PROXY (bolt_proxy_get_type ()) |
38 |
|
✗ |
G_DECLARE_DERIVABLE_TYPE (BoltProxy, bolt_proxy, BOLT, PROXY, GDBusProxy) |
39 |
|
|
|
40 |
|
|
struct _BoltProxyClass |
41 |
|
|
{ |
42 |
|
|
GDBusProxyClass parent; |
43 |
|
|
|
44 |
|
|
/* virtuals */ |
45 |
|
|
const BoltProxySignal * (*get_dbus_signals) (guint *n); |
46 |
|
|
}; |
47 |
|
|
|
48 |
|
|
gboolean bolt_proxy_get_dbus_property (GObject *proxy, |
49 |
|
|
GParamSpec *spec, |
50 |
|
|
GValue *value); |
51 |
|
|
|
52 |
|
|
gboolean bolt_proxy_has_name_owner (BoltProxy *proxy); |
53 |
|
|
|
54 |
|
|
gboolean bolt_proxy_get_property_bool (BoltProxy *proxy, |
55 |
|
|
const char *name, |
56 |
|
|
gboolean *value); |
57 |
|
|
|
58 |
|
|
gboolean bolt_proxy_get_property_enum (BoltProxy *proxy, |
59 |
|
|
const char *name, |
60 |
|
|
gint *value); |
61 |
|
|
|
62 |
|
|
gboolean bolt_proxy_get_property_flags (BoltProxy *proxy, |
63 |
|
|
const char *name, |
64 |
|
|
guint *value); |
65 |
|
|
|
66 |
|
|
gboolean bolt_proxy_get_property_uint32 (BoltProxy *proxy, |
67 |
|
|
const char *name, |
68 |
|
|
guint *value); |
69 |
|
|
|
70 |
|
|
gboolean bolt_proxy_get_property_int64 (BoltProxy *proxy, |
71 |
|
|
const char *name, |
72 |
|
|
gint64 *value); |
73 |
|
|
|
74 |
|
|
gboolean bolt_proxy_get_property_uint64 (BoltProxy *proxy, |
75 |
|
|
const char *name, |
76 |
|
|
guint64 *value); |
77 |
|
|
|
78 |
|
|
const char * bolt_proxy_get_property_string (BoltProxy *proxy, |
79 |
|
|
const char *name); |
80 |
|
|
|
81 |
|
|
gboolean bolt_proxy_set_property (BoltProxy *proxy, |
82 |
|
|
const char *name, |
83 |
|
|
GVariant *value, |
84 |
|
|
GCancellable *cancellable, |
85 |
|
|
GError **error); |
86 |
|
|
|
87 |
|
|
void bolt_proxy_set_property_async (BoltProxy *proxy, |
88 |
|
|
const char *name, |
89 |
|
|
GVariant *value, |
90 |
|
|
GCancellable *cancellable, |
91 |
|
|
GAsyncReadyCallback callback, |
92 |
|
|
gpointer user_data); |
93 |
|
|
|
94 |
|
|
gboolean bolt_proxy_set_property_finish (GAsyncResult *res, |
95 |
|
|
GError **error); |
96 |
|
|
|
97 |
|
|
G_END_DECLS |
98 |
|
|
|