Line |
Branch |
Exec |
Source |
1 |
|
|
/* |
2 |
|
|
* This file is generated by gdbus-codegen, do not modify it. |
3 |
|
|
* |
4 |
|
|
* The license of this code is the same as for the D-Bus interface description |
5 |
|
|
* it was derived from. Note that it links to GLib, so must comply with the |
6 |
|
|
* LGPL linking clauses. |
7 |
|
|
*/ |
8 |
|
|
|
9 |
|
|
#ifdef HAVE_CONFIG_H |
10 |
|
|
# include "config.h" |
11 |
|
|
#endif |
12 |
|
|
|
13 |
|
|
#include "cc-fprintd-generated.h" |
14 |
|
|
|
15 |
|
|
#include <string.h> |
16 |
|
|
#ifdef G_OS_UNIX |
17 |
|
|
# include <gio/gunixfdlist.h> |
18 |
|
|
#endif |
19 |
|
|
|
20 |
|
|
#ifdef G_ENABLE_DEBUG |
21 |
|
|
#define g_marshal_value_peek_boolean(v) g_value_get_boolean (v) |
22 |
|
|
#define g_marshal_value_peek_char(v) g_value_get_schar (v) |
23 |
|
|
#define g_marshal_value_peek_uchar(v) g_value_get_uchar (v) |
24 |
|
|
#define g_marshal_value_peek_int(v) g_value_get_int (v) |
25 |
|
|
#define g_marshal_value_peek_uint(v) g_value_get_uint (v) |
26 |
|
|
#define g_marshal_value_peek_long(v) g_value_get_long (v) |
27 |
|
|
#define g_marshal_value_peek_ulong(v) g_value_get_ulong (v) |
28 |
|
|
#define g_marshal_value_peek_int64(v) g_value_get_int64 (v) |
29 |
|
|
#define g_marshal_value_peek_uint64(v) g_value_get_uint64 (v) |
30 |
|
|
#define g_marshal_value_peek_enum(v) g_value_get_enum (v) |
31 |
|
|
#define g_marshal_value_peek_flags(v) g_value_get_flags (v) |
32 |
|
|
#define g_marshal_value_peek_float(v) g_value_get_float (v) |
33 |
|
|
#define g_marshal_value_peek_double(v) g_value_get_double (v) |
34 |
|
|
#define g_marshal_value_peek_string(v) (char*) g_value_get_string (v) |
35 |
|
|
#define g_marshal_value_peek_param(v) g_value_get_param (v) |
36 |
|
|
#define g_marshal_value_peek_boxed(v) g_value_get_boxed (v) |
37 |
|
|
#define g_marshal_value_peek_pointer(v) g_value_get_pointer (v) |
38 |
|
|
#define g_marshal_value_peek_object(v) g_value_get_object (v) |
39 |
|
|
#define g_marshal_value_peek_variant(v) g_value_get_variant (v) |
40 |
|
|
#else /* !G_ENABLE_DEBUG */ |
41 |
|
|
/* WARNING: This code accesses GValues directly, which is UNSUPPORTED API. |
42 |
|
|
* Do not access GValues directly in your code. Instead, use the |
43 |
|
|
* g_value_get_*() functions |
44 |
|
|
*/ |
45 |
|
|
#define g_marshal_value_peek_boolean(v) (v)->data[0].v_int |
46 |
|
|
#define g_marshal_value_peek_char(v) (v)->data[0].v_int |
47 |
|
|
#define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint |
48 |
|
|
#define g_marshal_value_peek_int(v) (v)->data[0].v_int |
49 |
|
|
#define g_marshal_value_peek_uint(v) (v)->data[0].v_uint |
50 |
|
|
#define g_marshal_value_peek_long(v) (v)->data[0].v_long |
51 |
|
|
#define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong |
52 |
|
|
#define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 |
53 |
|
|
#define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 |
54 |
|
|
#define g_marshal_value_peek_enum(v) (v)->data[0].v_long |
55 |
|
|
#define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong |
56 |
|
|
#define g_marshal_value_peek_float(v) (v)->data[0].v_float |
57 |
|
|
#define g_marshal_value_peek_double(v) (v)->data[0].v_double |
58 |
|
|
#define g_marshal_value_peek_string(v) (v)->data[0].v_pointer |
59 |
|
|
#define g_marshal_value_peek_param(v) (v)->data[0].v_pointer |
60 |
|
|
#define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer |
61 |
|
|
#define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer |
62 |
|
|
#define g_marshal_value_peek_object(v) (v)->data[0].v_pointer |
63 |
|
|
#define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer |
64 |
|
|
#endif /* !G_ENABLE_DEBUG */ |
65 |
|
|
|
66 |
|
|
typedef struct |
67 |
|
|
{ |
68 |
|
|
GDBusArgInfo parent_struct; |
69 |
|
|
gboolean use_gvariant; |
70 |
|
|
} _ExtendedGDBusArgInfo; |
71 |
|
|
|
72 |
|
|
typedef struct |
73 |
|
|
{ |
74 |
|
|
GDBusMethodInfo parent_struct; |
75 |
|
|
const gchar *signal_name; |
76 |
|
|
gboolean pass_fdlist; |
77 |
|
|
} _ExtendedGDBusMethodInfo; |
78 |
|
|
|
79 |
|
|
typedef struct |
80 |
|
|
{ |
81 |
|
|
GDBusSignalInfo parent_struct; |
82 |
|
|
const gchar *signal_name; |
83 |
|
|
} _ExtendedGDBusSignalInfo; |
84 |
|
|
|
85 |
|
|
typedef struct |
86 |
|
|
{ |
87 |
|
|
GDBusPropertyInfo parent_struct; |
88 |
|
|
const gchar *hyphen_name; |
89 |
|
|
guint use_gvariant : 1; |
90 |
|
|
guint emits_changed_signal : 1; |
91 |
|
|
} _ExtendedGDBusPropertyInfo; |
92 |
|
|
|
93 |
|
|
typedef struct |
94 |
|
|
{ |
95 |
|
|
GDBusInterfaceInfo parent_struct; |
96 |
|
|
const gchar *hyphen_name; |
97 |
|
|
} _ExtendedGDBusInterfaceInfo; |
98 |
|
|
|
99 |
|
|
typedef struct |
100 |
|
|
{ |
101 |
|
|
const _ExtendedGDBusPropertyInfo *info; |
102 |
|
|
guint prop_id; |
103 |
|
|
GValue orig_value; /* the value before the change */ |
104 |
|
|
} ChangedProperty; |
105 |
|
|
|
106 |
|
|
static void |
107 |
|
✗ |
_changed_property_free (ChangedProperty *data) |
108 |
|
|
{ |
109 |
|
✗ |
g_value_unset (&data->orig_value); |
110 |
|
✗ |
g_free (data); |
111 |
|
✗ |
} |
112 |
|
|
|
113 |
|
|
static gboolean |
114 |
|
✗ |
_g_strv_equal0 (gchar **a, gchar **b) |
115 |
|
|
{ |
116 |
|
✗ |
gboolean ret = FALSE; |
117 |
|
|
guint n; |
118 |
|
✗ |
if (a == NULL && b == NULL) |
119 |
|
|
{ |
120 |
|
✗ |
ret = TRUE; |
121 |
|
✗ |
goto out; |
122 |
|
|
} |
123 |
|
✗ |
if (a == NULL || b == NULL) |
124 |
|
✗ |
goto out; |
125 |
|
✗ |
if (g_strv_length (a) != g_strv_length (b)) |
126 |
|
✗ |
goto out; |
127 |
|
✗ |
for (n = 0; a[n] != NULL; n++) |
128 |
|
✗ |
if (g_strcmp0 (a[n], b[n]) != 0) |
129 |
|
✗ |
goto out; |
130 |
|
✗ |
ret = TRUE; |
131 |
|
✗ |
out: |
132 |
|
✗ |
return ret; |
133 |
|
|
} |
134 |
|
|
|
135 |
|
|
static gboolean |
136 |
|
✗ |
_g_variant_equal0 (GVariant *a, GVariant *b) |
137 |
|
|
{ |
138 |
|
✗ |
gboolean ret = FALSE; |
139 |
|
✗ |
if (a == NULL && b == NULL) |
140 |
|
|
{ |
141 |
|
✗ |
ret = TRUE; |
142 |
|
✗ |
goto out; |
143 |
|
|
} |
144 |
|
✗ |
if (a == NULL || b == NULL) |
145 |
|
✗ |
goto out; |
146 |
|
✗ |
ret = g_variant_equal (a, b); |
147 |
|
✗ |
out: |
148 |
|
✗ |
return ret; |
149 |
|
|
} |
150 |
|
|
|
151 |
|
|
G_GNUC_UNUSED static gboolean |
152 |
|
✗ |
_g_value_equal (const GValue *a, const GValue *b) |
153 |
|
|
{ |
154 |
|
✗ |
gboolean ret = FALSE; |
155 |
|
✗ |
g_assert (G_VALUE_TYPE (a) == G_VALUE_TYPE (b)); |
156 |
|
✗ |
switch (G_VALUE_TYPE (a)) |
157 |
|
|
{ |
158 |
|
✗ |
case G_TYPE_BOOLEAN: |
159 |
|
✗ |
ret = (g_value_get_boolean (a) == g_value_get_boolean (b)); |
160 |
|
✗ |
break; |
161 |
|
✗ |
case G_TYPE_UCHAR: |
162 |
|
✗ |
ret = (g_value_get_uchar (a) == g_value_get_uchar (b)); |
163 |
|
✗ |
break; |
164 |
|
✗ |
case G_TYPE_INT: |
165 |
|
✗ |
ret = (g_value_get_int (a) == g_value_get_int (b)); |
166 |
|
✗ |
break; |
167 |
|
✗ |
case G_TYPE_UINT: |
168 |
|
✗ |
ret = (g_value_get_uint (a) == g_value_get_uint (b)); |
169 |
|
✗ |
break; |
170 |
|
✗ |
case G_TYPE_INT64: |
171 |
|
✗ |
ret = (g_value_get_int64 (a) == g_value_get_int64 (b)); |
172 |
|
✗ |
break; |
173 |
|
✗ |
case G_TYPE_UINT64: |
174 |
|
✗ |
ret = (g_value_get_uint64 (a) == g_value_get_uint64 (b)); |
175 |
|
✗ |
break; |
176 |
|
✗ |
case G_TYPE_DOUBLE: |
177 |
|
|
{ |
178 |
|
|
/* Avoid -Wfloat-equal warnings by doing a direct bit compare */ |
179 |
|
✗ |
gdouble da = g_value_get_double (a); |
180 |
|
✗ |
gdouble db = g_value_get_double (b); |
181 |
|
✗ |
ret = memcmp (&da, &db, sizeof (gdouble)) == 0; |
182 |
|
|
} |
183 |
|
✗ |
break; |
184 |
|
✗ |
case G_TYPE_STRING: |
185 |
|
✗ |
ret = (g_strcmp0 (g_value_get_string (a), g_value_get_string (b)) == 0); |
186 |
|
✗ |
break; |
187 |
|
✗ |
case G_TYPE_VARIANT: |
188 |
|
✗ |
ret = _g_variant_equal0 (g_value_get_variant (a), g_value_get_variant (b)); |
189 |
|
✗ |
break; |
190 |
|
✗ |
default: |
191 |
|
✗ |
if (G_VALUE_TYPE (a) == G_TYPE_STRV) |
192 |
|
✗ |
ret = _g_strv_equal0 (g_value_get_boxed (a), g_value_get_boxed (b)); |
193 |
|
|
else |
194 |
|
✗ |
g_critical ("_g_value_equal() does not handle type %s", g_type_name (G_VALUE_TYPE (a))); |
195 |
|
✗ |
break; |
196 |
|
|
} |
197 |
|
✗ |
return ret; |
198 |
|
|
} |
199 |
|
|
|
200 |
|
|
static void |
201 |
|
✗ |
_g_dbus_codegen_marshal_VOID__STRING_BOOLEAN ( |
202 |
|
|
GClosure *closure, |
203 |
|
|
GValue *return_value G_GNUC_UNUSED, |
204 |
|
|
unsigned int n_param_values, |
205 |
|
|
const GValue *param_values, |
206 |
|
|
void *invocation_hint G_GNUC_UNUSED, |
207 |
|
|
void *marshal_data) |
208 |
|
|
{ |
209 |
|
|
typedef void (*_GDbusCodegenMarshalVoid_StringBooleanFunc) |
210 |
|
|
(void *data1, |
211 |
|
|
const gchar *arg_result, |
212 |
|
|
gboolean arg_done, |
213 |
|
|
void *data2); |
214 |
|
|
_GDbusCodegenMarshalVoid_StringBooleanFunc callback; |
215 |
|
✗ |
GCClosure *cc = (GCClosure*) closure; |
216 |
|
|
void *data1, *data2; |
217 |
|
|
|
218 |
|
✗ |
g_return_if_fail (n_param_values == 3); |
219 |
|
|
|
220 |
|
✗ |
if (G_CCLOSURE_SWAP_DATA (closure)) |
221 |
|
|
{ |
222 |
|
✗ |
data1 = closure->data; |
223 |
|
✗ |
data2 = g_value_peek_pointer (param_values + 0); |
224 |
|
|
} |
225 |
|
|
else |
226 |
|
|
{ |
227 |
|
✗ |
data1 = g_value_peek_pointer (param_values + 0); |
228 |
|
✗ |
data2 = closure->data; |
229 |
|
|
} |
230 |
|
|
|
231 |
|
✗ |
callback = (_GDbusCodegenMarshalVoid_StringBooleanFunc) |
232 |
|
✗ |
(marshal_data ? marshal_data : cc->callback); |
233 |
|
|
|
234 |
|
✗ |
callback (data1, |
235 |
|
✗ |
g_marshal_value_peek_string (param_values + 1), |
236 |
|
✗ |
g_marshal_value_peek_boolean (param_values + 2), |
237 |
|
|
data2); |
238 |
|
|
} |
239 |
|
|
|
240 |
|
|
static void |
241 |
|
✗ |
_g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING ( |
242 |
|
|
GClosure *closure, |
243 |
|
|
GValue *return_value, |
244 |
|
|
unsigned int n_param_values, |
245 |
|
|
const GValue *param_values, |
246 |
|
|
void *invocation_hint G_GNUC_UNUSED, |
247 |
|
|
void *marshal_data) |
248 |
|
|
{ |
249 |
|
|
typedef gboolean (*_GDbusCodegenMarshalBoolean_ObjectStringFunc) |
250 |
|
|
(void *data1, |
251 |
|
|
GDBusMethodInvocation *arg_method_invocation, |
252 |
|
|
const gchar *arg_username, |
253 |
|
|
void *data2); |
254 |
|
|
_GDbusCodegenMarshalBoolean_ObjectStringFunc callback; |
255 |
|
✗ |
GCClosure *cc = (GCClosure*) closure; |
256 |
|
|
void *data1, *data2; |
257 |
|
|
gboolean v_return; |
258 |
|
|
|
259 |
|
✗ |
g_return_if_fail (return_value != NULL); |
260 |
|
✗ |
g_return_if_fail (n_param_values == 3); |
261 |
|
|
|
262 |
|
✗ |
if (G_CCLOSURE_SWAP_DATA (closure)) |
263 |
|
|
{ |
264 |
|
✗ |
data1 = closure->data; |
265 |
|
✗ |
data2 = g_value_peek_pointer (param_values + 0); |
266 |
|
|
} |
267 |
|
|
else |
268 |
|
|
{ |
269 |
|
✗ |
data1 = g_value_peek_pointer (param_values + 0); |
270 |
|
✗ |
data2 = closure->data; |
271 |
|
|
} |
272 |
|
|
|
273 |
|
✗ |
callback = (_GDbusCodegenMarshalBoolean_ObjectStringFunc) |
274 |
|
✗ |
(marshal_data ? marshal_data : cc->callback); |
275 |
|
|
|
276 |
|
|
v_return = |
277 |
|
✗ |
callback (data1, |
278 |
|
✗ |
g_marshal_value_peek_object (param_values + 1), |
279 |
|
✗ |
g_marshal_value_peek_string (param_values + 2), |
280 |
|
|
data2); |
281 |
|
|
|
282 |
|
✗ |
g_value_set_boolean (return_value, v_return); |
283 |
|
|
} |
284 |
|
|
|
285 |
|
|
static void |
286 |
|
✗ |
_g_dbus_codegen_marshal_BOOLEAN__OBJECT ( |
287 |
|
|
GClosure *closure, |
288 |
|
|
GValue *return_value, |
289 |
|
|
unsigned int n_param_values, |
290 |
|
|
const GValue *param_values, |
291 |
|
|
void *invocation_hint G_GNUC_UNUSED, |
292 |
|
|
void *marshal_data) |
293 |
|
|
{ |
294 |
|
|
typedef gboolean (*_GDbusCodegenMarshalBoolean_ObjectFunc) |
295 |
|
|
(void *data1, |
296 |
|
|
GDBusMethodInvocation *arg_method_invocation, |
297 |
|
|
void *data2); |
298 |
|
|
_GDbusCodegenMarshalBoolean_ObjectFunc callback; |
299 |
|
✗ |
GCClosure *cc = (GCClosure*) closure; |
300 |
|
|
void *data1, *data2; |
301 |
|
|
gboolean v_return; |
302 |
|
|
|
303 |
|
✗ |
g_return_if_fail (return_value != NULL); |
304 |
|
✗ |
g_return_if_fail (n_param_values == 2); |
305 |
|
|
|
306 |
|
✗ |
if (G_CCLOSURE_SWAP_DATA (closure)) |
307 |
|
|
{ |
308 |
|
✗ |
data1 = closure->data; |
309 |
|
✗ |
data2 = g_value_peek_pointer (param_values + 0); |
310 |
|
|
} |
311 |
|
|
else |
312 |
|
|
{ |
313 |
|
✗ |
data1 = g_value_peek_pointer (param_values + 0); |
314 |
|
✗ |
data2 = closure->data; |
315 |
|
|
} |
316 |
|
|
|
317 |
|
✗ |
callback = (_GDbusCodegenMarshalBoolean_ObjectFunc) |
318 |
|
✗ |
(marshal_data ? marshal_data : cc->callback); |
319 |
|
|
|
320 |
|
|
v_return = |
321 |
|
✗ |
callback (data1, |
322 |
|
✗ |
g_marshal_value_peek_object (param_values + 1), |
323 |
|
|
data2); |
324 |
|
|
|
325 |
|
✗ |
g_value_set_boolean (return_value, v_return); |
326 |
|
|
} |
327 |
|
|
|
328 |
|
|
/* ------------------------------------------------------------------------ |
329 |
|
|
* Code for interface net.reactivated.Fprint.Device |
330 |
|
|
* ------------------------------------------------------------------------ |
331 |
|
|
*/ |
332 |
|
|
|
333 |
|
|
/** |
334 |
|
|
* SECTION:CcFprintdDevice |
335 |
|
|
* @title: CcFprintdDevice |
336 |
|
|
* @short_description: Generated C code for the net.reactivated.Fprint.Device D-Bus interface |
337 |
|
|
* |
338 |
|
|
* This section contains code for working with the <link linkend="gdbus-interface-net-reactivated-Fprint-Device.top_of_page">net.reactivated.Fprint.Device</link> D-Bus interface in C. |
339 |
|
|
*/ |
340 |
|
|
|
341 |
|
|
enum |
342 |
|
|
{ |
343 |
|
|
CC_FPRINTD__DEVICE_VERIFY_FINGER_SELECTED, |
344 |
|
|
CC_FPRINTD__DEVICE_VERIFY_STATUS, |
345 |
|
|
CC_FPRINTD__DEVICE_ENROLL_STATUS, |
346 |
|
|
}; |
347 |
|
|
|
348 |
|
|
static unsigned CC_FPRINTD__DEVICE_SIGNALS[3] = { 0 }; |
349 |
|
|
|
350 |
|
|
/* ---- Introspection data for net.reactivated.Fprint.Device ---- */ |
351 |
|
|
|
352 |
|
|
static const _ExtendedGDBusArgInfo _cc_fprintd_device_method_info_list_enrolled_fingers_IN_ARG_username = |
353 |
|
|
{ |
354 |
|
|
{ |
355 |
|
|
-1, |
356 |
|
|
(gchar *) "username", |
357 |
|
|
(gchar *) "s", |
358 |
|
|
NULL |
359 |
|
|
}, |
360 |
|
|
FALSE |
361 |
|
|
}; |
362 |
|
|
|
363 |
|
|
static const GDBusArgInfo * const _cc_fprintd_device_method_info_list_enrolled_fingers_IN_ARG_pointers[] = |
364 |
|
|
{ |
365 |
|
|
&_cc_fprintd_device_method_info_list_enrolled_fingers_IN_ARG_username.parent_struct, |
366 |
|
|
NULL |
367 |
|
|
}; |
368 |
|
|
|
369 |
|
|
static const _ExtendedGDBusArgInfo _cc_fprintd_device_method_info_list_enrolled_fingers_OUT_ARG_enrolled_fingers = |
370 |
|
|
{ |
371 |
|
|
{ |
372 |
|
|
-1, |
373 |
|
|
(gchar *) "enrolled_fingers", |
374 |
|
|
(gchar *) "as", |
375 |
|
|
NULL |
376 |
|
|
}, |
377 |
|
|
FALSE |
378 |
|
|
}; |
379 |
|
|
|
380 |
|
|
static const GDBusArgInfo * const _cc_fprintd_device_method_info_list_enrolled_fingers_OUT_ARG_pointers[] = |
381 |
|
|
{ |
382 |
|
|
&_cc_fprintd_device_method_info_list_enrolled_fingers_OUT_ARG_enrolled_fingers.parent_struct, |
383 |
|
|
NULL |
384 |
|
|
}; |
385 |
|
|
|
386 |
|
|
static const _ExtendedGDBusMethodInfo _cc_fprintd_device_method_info_list_enrolled_fingers = |
387 |
|
|
{ |
388 |
|
|
{ |
389 |
|
|
-1, |
390 |
|
|
(gchar *) "ListEnrolledFingers", |
391 |
|
|
(GDBusArgInfo **) &_cc_fprintd_device_method_info_list_enrolled_fingers_IN_ARG_pointers, |
392 |
|
|
(GDBusArgInfo **) &_cc_fprintd_device_method_info_list_enrolled_fingers_OUT_ARG_pointers, |
393 |
|
|
NULL |
394 |
|
|
}, |
395 |
|
|
"handle-list-enrolled-fingers", |
396 |
|
|
FALSE |
397 |
|
|
}; |
398 |
|
|
|
399 |
|
|
static const _ExtendedGDBusArgInfo _cc_fprintd_device_method_info_delete_enrolled_fingers_IN_ARG_username = |
400 |
|
|
{ |
401 |
|
|
{ |
402 |
|
|
-1, |
403 |
|
|
(gchar *) "username", |
404 |
|
|
(gchar *) "s", |
405 |
|
|
NULL |
406 |
|
|
}, |
407 |
|
|
FALSE |
408 |
|
|
}; |
409 |
|
|
|
410 |
|
|
static const GDBusArgInfo * const _cc_fprintd_device_method_info_delete_enrolled_fingers_IN_ARG_pointers[] = |
411 |
|
|
{ |
412 |
|
|
&_cc_fprintd_device_method_info_delete_enrolled_fingers_IN_ARG_username.parent_struct, |
413 |
|
|
NULL |
414 |
|
|
}; |
415 |
|
|
|
416 |
|
|
static const _ExtendedGDBusMethodInfo _cc_fprintd_device_method_info_delete_enrolled_fingers = |
417 |
|
|
{ |
418 |
|
|
{ |
419 |
|
|
-1, |
420 |
|
|
(gchar *) "DeleteEnrolledFingers", |
421 |
|
|
(GDBusArgInfo **) &_cc_fprintd_device_method_info_delete_enrolled_fingers_IN_ARG_pointers, |
422 |
|
|
NULL, |
423 |
|
|
NULL |
424 |
|
|
}, |
425 |
|
|
"handle-delete-enrolled-fingers", |
426 |
|
|
FALSE |
427 |
|
|
}; |
428 |
|
|
|
429 |
|
|
static const _ExtendedGDBusMethodInfo _cc_fprintd_device_method_info_delete_enrolled_fingers2 = |
430 |
|
|
{ |
431 |
|
|
{ |
432 |
|
|
-1, |
433 |
|
|
(gchar *) "DeleteEnrolledFingers2", |
434 |
|
|
NULL, |
435 |
|
|
NULL, |
436 |
|
|
NULL |
437 |
|
|
}, |
438 |
|
|
"handle-delete-enrolled-fingers2", |
439 |
|
|
FALSE |
440 |
|
|
}; |
441 |
|
|
|
442 |
|
|
static const _ExtendedGDBusArgInfo _cc_fprintd_device_method_info_claim_IN_ARG_username = |
443 |
|
|
{ |
444 |
|
|
{ |
445 |
|
|
-1, |
446 |
|
|
(gchar *) "username", |
447 |
|
|
(gchar *) "s", |
448 |
|
|
NULL |
449 |
|
|
}, |
450 |
|
|
FALSE |
451 |
|
|
}; |
452 |
|
|
|
453 |
|
|
static const GDBusArgInfo * const _cc_fprintd_device_method_info_claim_IN_ARG_pointers[] = |
454 |
|
|
{ |
455 |
|
|
&_cc_fprintd_device_method_info_claim_IN_ARG_username.parent_struct, |
456 |
|
|
NULL |
457 |
|
|
}; |
458 |
|
|
|
459 |
|
|
static const _ExtendedGDBusMethodInfo _cc_fprintd_device_method_info_claim = |
460 |
|
|
{ |
461 |
|
|
{ |
462 |
|
|
-1, |
463 |
|
|
(gchar *) "Claim", |
464 |
|
|
(GDBusArgInfo **) &_cc_fprintd_device_method_info_claim_IN_ARG_pointers, |
465 |
|
|
NULL, |
466 |
|
|
NULL |
467 |
|
|
}, |
468 |
|
|
"handle-claim", |
469 |
|
|
FALSE |
470 |
|
|
}; |
471 |
|
|
|
472 |
|
|
static const _ExtendedGDBusMethodInfo _cc_fprintd_device_method_info_release = |
473 |
|
|
{ |
474 |
|
|
{ |
475 |
|
|
-1, |
476 |
|
|
(gchar *) "Release", |
477 |
|
|
NULL, |
478 |
|
|
NULL, |
479 |
|
|
NULL |
480 |
|
|
}, |
481 |
|
|
"handle-release", |
482 |
|
|
FALSE |
483 |
|
|
}; |
484 |
|
|
|
485 |
|
|
static const _ExtendedGDBusArgInfo _cc_fprintd_device_method_info_verify_start_IN_ARG_finger_name = |
486 |
|
|
{ |
487 |
|
|
{ |
488 |
|
|
-1, |
489 |
|
|
(gchar *) "finger_name", |
490 |
|
|
(gchar *) "s", |
491 |
|
|
NULL |
492 |
|
|
}, |
493 |
|
|
FALSE |
494 |
|
|
}; |
495 |
|
|
|
496 |
|
|
static const GDBusArgInfo * const _cc_fprintd_device_method_info_verify_start_IN_ARG_pointers[] = |
497 |
|
|
{ |
498 |
|
|
&_cc_fprintd_device_method_info_verify_start_IN_ARG_finger_name.parent_struct, |
499 |
|
|
NULL |
500 |
|
|
}; |
501 |
|
|
|
502 |
|
|
static const _ExtendedGDBusMethodInfo _cc_fprintd_device_method_info_verify_start = |
503 |
|
|
{ |
504 |
|
|
{ |
505 |
|
|
-1, |
506 |
|
|
(gchar *) "VerifyStart", |
507 |
|
|
(GDBusArgInfo **) &_cc_fprintd_device_method_info_verify_start_IN_ARG_pointers, |
508 |
|
|
NULL, |
509 |
|
|
NULL |
510 |
|
|
}, |
511 |
|
|
"handle-verify-start", |
512 |
|
|
FALSE |
513 |
|
|
}; |
514 |
|
|
|
515 |
|
|
static const _ExtendedGDBusMethodInfo _cc_fprintd_device_method_info_verify_stop = |
516 |
|
|
{ |
517 |
|
|
{ |
518 |
|
|
-1, |
519 |
|
|
(gchar *) "VerifyStop", |
520 |
|
|
NULL, |
521 |
|
|
NULL, |
522 |
|
|
NULL |
523 |
|
|
}, |
524 |
|
|
"handle-verify-stop", |
525 |
|
|
FALSE |
526 |
|
|
}; |
527 |
|
|
|
528 |
|
|
static const _ExtendedGDBusArgInfo _cc_fprintd_device_method_info_enroll_start_IN_ARG_finger_name = |
529 |
|
|
{ |
530 |
|
|
{ |
531 |
|
|
-1, |
532 |
|
|
(gchar *) "finger_name", |
533 |
|
|
(gchar *) "s", |
534 |
|
|
NULL |
535 |
|
|
}, |
536 |
|
|
FALSE |
537 |
|
|
}; |
538 |
|
|
|
539 |
|
|
static const GDBusArgInfo * const _cc_fprintd_device_method_info_enroll_start_IN_ARG_pointers[] = |
540 |
|
|
{ |
541 |
|
|
&_cc_fprintd_device_method_info_enroll_start_IN_ARG_finger_name.parent_struct, |
542 |
|
|
NULL |
543 |
|
|
}; |
544 |
|
|
|
545 |
|
|
static const _ExtendedGDBusMethodInfo _cc_fprintd_device_method_info_enroll_start = |
546 |
|
|
{ |
547 |
|
|
{ |
548 |
|
|
-1, |
549 |
|
|
(gchar *) "EnrollStart", |
550 |
|
|
(GDBusArgInfo **) &_cc_fprintd_device_method_info_enroll_start_IN_ARG_pointers, |
551 |
|
|
NULL, |
552 |
|
|
NULL |
553 |
|
|
}, |
554 |
|
|
"handle-enroll-start", |
555 |
|
|
FALSE |
556 |
|
|
}; |
557 |
|
|
|
558 |
|
|
static const _ExtendedGDBusMethodInfo _cc_fprintd_device_method_info_enroll_stop = |
559 |
|
|
{ |
560 |
|
|
{ |
561 |
|
|
-1, |
562 |
|
|
(gchar *) "EnrollStop", |
563 |
|
|
NULL, |
564 |
|
|
NULL, |
565 |
|
|
NULL |
566 |
|
|
}, |
567 |
|
|
"handle-enroll-stop", |
568 |
|
|
FALSE |
569 |
|
|
}; |
570 |
|
|
|
571 |
|
|
static const GDBusMethodInfo * const _cc_fprintd_device_method_info_pointers[] = |
572 |
|
|
{ |
573 |
|
|
&_cc_fprintd_device_method_info_list_enrolled_fingers.parent_struct, |
574 |
|
|
&_cc_fprintd_device_method_info_delete_enrolled_fingers.parent_struct, |
575 |
|
|
&_cc_fprintd_device_method_info_delete_enrolled_fingers2.parent_struct, |
576 |
|
|
&_cc_fprintd_device_method_info_claim.parent_struct, |
577 |
|
|
&_cc_fprintd_device_method_info_release.parent_struct, |
578 |
|
|
&_cc_fprintd_device_method_info_verify_start.parent_struct, |
579 |
|
|
&_cc_fprintd_device_method_info_verify_stop.parent_struct, |
580 |
|
|
&_cc_fprintd_device_method_info_enroll_start.parent_struct, |
581 |
|
|
&_cc_fprintd_device_method_info_enroll_stop.parent_struct, |
582 |
|
|
NULL |
583 |
|
|
}; |
584 |
|
|
|
585 |
|
|
static const _ExtendedGDBusArgInfo _cc_fprintd_device_signal_info_verify_finger_selected_ARG_finger_name = |
586 |
|
|
{ |
587 |
|
|
{ |
588 |
|
|
-1, |
589 |
|
|
(gchar *) "finger_name", |
590 |
|
|
(gchar *) "s", |
591 |
|
|
NULL |
592 |
|
|
}, |
593 |
|
|
FALSE |
594 |
|
|
}; |
595 |
|
|
|
596 |
|
|
static const GDBusArgInfo * const _cc_fprintd_device_signal_info_verify_finger_selected_ARG_pointers[] = |
597 |
|
|
{ |
598 |
|
|
&_cc_fprintd_device_signal_info_verify_finger_selected_ARG_finger_name.parent_struct, |
599 |
|
|
NULL |
600 |
|
|
}; |
601 |
|
|
|
602 |
|
|
static const _ExtendedGDBusSignalInfo _cc_fprintd_device_signal_info_verify_finger_selected = |
603 |
|
|
{ |
604 |
|
|
{ |
605 |
|
|
-1, |
606 |
|
|
(gchar *) "VerifyFingerSelected", |
607 |
|
|
(GDBusArgInfo **) &_cc_fprintd_device_signal_info_verify_finger_selected_ARG_pointers, |
608 |
|
|
NULL |
609 |
|
|
}, |
610 |
|
|
"verify-finger-selected" |
611 |
|
|
}; |
612 |
|
|
|
613 |
|
|
static const _ExtendedGDBusArgInfo _cc_fprintd_device_signal_info_verify_status_ARG_result = |
614 |
|
|
{ |
615 |
|
|
{ |
616 |
|
|
-1, |
617 |
|
|
(gchar *) "result", |
618 |
|
|
(gchar *) "s", |
619 |
|
|
NULL |
620 |
|
|
}, |
621 |
|
|
FALSE |
622 |
|
|
}; |
623 |
|
|
|
624 |
|
|
static const _ExtendedGDBusArgInfo _cc_fprintd_device_signal_info_verify_status_ARG_done = |
625 |
|
|
{ |
626 |
|
|
{ |
627 |
|
|
-1, |
628 |
|
|
(gchar *) "done", |
629 |
|
|
(gchar *) "b", |
630 |
|
|
NULL |
631 |
|
|
}, |
632 |
|
|
FALSE |
633 |
|
|
}; |
634 |
|
|
|
635 |
|
|
static const GDBusArgInfo * const _cc_fprintd_device_signal_info_verify_status_ARG_pointers[] = |
636 |
|
|
{ |
637 |
|
|
&_cc_fprintd_device_signal_info_verify_status_ARG_result.parent_struct, |
638 |
|
|
&_cc_fprintd_device_signal_info_verify_status_ARG_done.parent_struct, |
639 |
|
|
NULL |
640 |
|
|
}; |
641 |
|
|
|
642 |
|
|
static const _ExtendedGDBusSignalInfo _cc_fprintd_device_signal_info_verify_status = |
643 |
|
|
{ |
644 |
|
|
{ |
645 |
|
|
-1, |
646 |
|
|
(gchar *) "VerifyStatus", |
647 |
|
|
(GDBusArgInfo **) &_cc_fprintd_device_signal_info_verify_status_ARG_pointers, |
648 |
|
|
NULL |
649 |
|
|
}, |
650 |
|
|
"verify-status" |
651 |
|
|
}; |
652 |
|
|
|
653 |
|
|
static const _ExtendedGDBusArgInfo _cc_fprintd_device_signal_info_enroll_status_ARG_result = |
654 |
|
|
{ |
655 |
|
|
{ |
656 |
|
|
-1, |
657 |
|
|
(gchar *) "result", |
658 |
|
|
(gchar *) "s", |
659 |
|
|
NULL |
660 |
|
|
}, |
661 |
|
|
FALSE |
662 |
|
|
}; |
663 |
|
|
|
664 |
|
|
static const _ExtendedGDBusArgInfo _cc_fprintd_device_signal_info_enroll_status_ARG_done = |
665 |
|
|
{ |
666 |
|
|
{ |
667 |
|
|
-1, |
668 |
|
|
(gchar *) "done", |
669 |
|
|
(gchar *) "b", |
670 |
|
|
NULL |
671 |
|
|
}, |
672 |
|
|
FALSE |
673 |
|
|
}; |
674 |
|
|
|
675 |
|
|
static const GDBusArgInfo * const _cc_fprintd_device_signal_info_enroll_status_ARG_pointers[] = |
676 |
|
|
{ |
677 |
|
|
&_cc_fprintd_device_signal_info_enroll_status_ARG_result.parent_struct, |
678 |
|
|
&_cc_fprintd_device_signal_info_enroll_status_ARG_done.parent_struct, |
679 |
|
|
NULL |
680 |
|
|
}; |
681 |
|
|
|
682 |
|
|
static const _ExtendedGDBusSignalInfo _cc_fprintd_device_signal_info_enroll_status = |
683 |
|
|
{ |
684 |
|
|
{ |
685 |
|
|
-1, |
686 |
|
|
(gchar *) "EnrollStatus", |
687 |
|
|
(GDBusArgInfo **) &_cc_fprintd_device_signal_info_enroll_status_ARG_pointers, |
688 |
|
|
NULL |
689 |
|
|
}, |
690 |
|
|
"enroll-status" |
691 |
|
|
}; |
692 |
|
|
|
693 |
|
|
static const GDBusSignalInfo * const _cc_fprintd_device_signal_info_pointers[] = |
694 |
|
|
{ |
695 |
|
|
&_cc_fprintd_device_signal_info_verify_finger_selected.parent_struct, |
696 |
|
|
&_cc_fprintd_device_signal_info_verify_status.parent_struct, |
697 |
|
|
&_cc_fprintd_device_signal_info_enroll_status.parent_struct, |
698 |
|
|
NULL |
699 |
|
|
}; |
700 |
|
|
|
701 |
|
|
static const _ExtendedGDBusPropertyInfo _cc_fprintd_device_property_info_name = |
702 |
|
|
{ |
703 |
|
|
{ |
704 |
|
|
-1, |
705 |
|
|
(gchar *) "name", |
706 |
|
|
(gchar *) "s", |
707 |
|
|
G_DBUS_PROPERTY_INFO_FLAGS_READABLE, |
708 |
|
|
NULL |
709 |
|
|
}, |
710 |
|
|
"name", |
711 |
|
|
FALSE, |
712 |
|
|
TRUE |
713 |
|
|
}; |
714 |
|
|
|
715 |
|
|
static const _ExtendedGDBusPropertyInfo _cc_fprintd_device_property_info_num_enroll_stages = |
716 |
|
|
{ |
717 |
|
|
{ |
718 |
|
|
-1, |
719 |
|
|
(gchar *) "num-enroll-stages", |
720 |
|
|
(gchar *) "i", |
721 |
|
|
G_DBUS_PROPERTY_INFO_FLAGS_READABLE, |
722 |
|
|
NULL |
723 |
|
|
}, |
724 |
|
|
"num-enroll-stages", |
725 |
|
|
FALSE, |
726 |
|
|
TRUE |
727 |
|
|
}; |
728 |
|
|
|
729 |
|
|
static const _ExtendedGDBusPropertyInfo _cc_fprintd_device_property_info_scan_type = |
730 |
|
|
{ |
731 |
|
|
{ |
732 |
|
|
-1, |
733 |
|
|
(gchar *) "scan-type", |
734 |
|
|
(gchar *) "s", |
735 |
|
|
G_DBUS_PROPERTY_INFO_FLAGS_READABLE, |
736 |
|
|
NULL |
737 |
|
|
}, |
738 |
|
|
"scan-type", |
739 |
|
|
FALSE, |
740 |
|
|
TRUE |
741 |
|
|
}; |
742 |
|
|
|
743 |
|
|
static const GDBusPropertyInfo * const _cc_fprintd_device_property_info_pointers[] = |
744 |
|
|
{ |
745 |
|
|
&_cc_fprintd_device_property_info_name.parent_struct, |
746 |
|
|
&_cc_fprintd_device_property_info_num_enroll_stages.parent_struct, |
747 |
|
|
&_cc_fprintd_device_property_info_scan_type.parent_struct, |
748 |
|
|
NULL |
749 |
|
|
}; |
750 |
|
|
|
751 |
|
|
static const _ExtendedGDBusInterfaceInfo _cc_fprintd_device_interface_info = |
752 |
|
|
{ |
753 |
|
|
{ |
754 |
|
|
-1, |
755 |
|
|
(gchar *) "net.reactivated.Fprint.Device", |
756 |
|
|
(GDBusMethodInfo **) &_cc_fprintd_device_method_info_pointers, |
757 |
|
|
(GDBusSignalInfo **) &_cc_fprintd_device_signal_info_pointers, |
758 |
|
|
(GDBusPropertyInfo **) &_cc_fprintd_device_property_info_pointers, |
759 |
|
|
NULL |
760 |
|
|
}, |
761 |
|
|
"device", |
762 |
|
|
}; |
763 |
|
|
|
764 |
|
|
|
765 |
|
|
/** |
766 |
|
|
* cc_fprintd_device_interface_info: |
767 |
|
|
* |
768 |
|
|
* Gets a machine-readable description of the <link linkend="gdbus-interface-net-reactivated-Fprint-Device.top_of_page">net.reactivated.Fprint.Device</link> D-Bus interface. |
769 |
|
|
* |
770 |
|
|
* Returns: (transfer none): A #GDBusInterfaceInfo. Do not free. |
771 |
|
|
*/ |
772 |
|
|
GDBusInterfaceInfo * |
773 |
|
✗ |
cc_fprintd_device_interface_info (void) |
774 |
|
|
{ |
775 |
|
✗ |
return (GDBusInterfaceInfo *) &_cc_fprintd_device_interface_info.parent_struct; |
776 |
|
|
} |
777 |
|
|
|
778 |
|
|
/** |
779 |
|
|
* cc_fprintd_device_override_properties: |
780 |
|
|
* @klass: The class structure for a #GObject derived class. |
781 |
|
|
* @property_id_begin: The property id to assign to the first overridden property. |
782 |
|
|
* |
783 |
|
|
* Overrides all #GObject properties in the #CcFprintdDevice interface for a concrete class. |
784 |
|
|
* The properties are overridden in the order they are defined. |
785 |
|
|
* |
786 |
|
|
* Returns: The last property id. |
787 |
|
|
*/ |
788 |
|
|
guint |
789 |
|
✗ |
cc_fprintd_device_override_properties (GObjectClass *klass, guint property_id_begin) |
790 |
|
|
{ |
791 |
|
✗ |
g_object_class_override_property (klass, property_id_begin++, "name"); |
792 |
|
✗ |
g_object_class_override_property (klass, property_id_begin++, "num-enroll-stages"); |
793 |
|
✗ |
g_object_class_override_property (klass, property_id_begin++, "scan-type"); |
794 |
|
✗ |
return property_id_begin - 1; |
795 |
|
|
} |
796 |
|
|
|
797 |
|
|
|
798 |
|
|
inline static void |
799 |
|
✗ |
cc_fprintd_device_signal_marshal_verify_finger_selected ( |
800 |
|
|
GClosure *closure, |
801 |
|
|
GValue *return_value, |
802 |
|
|
unsigned int n_param_values, |
803 |
|
|
const GValue *param_values, |
804 |
|
|
void *invocation_hint, |
805 |
|
|
void *marshal_data) |
806 |
|
|
{ |
807 |
|
✗ |
g_cclosure_marshal_VOID__STRING (closure, |
808 |
|
|
return_value, n_param_values, param_values, invocation_hint, marshal_data); |
809 |
|
✗ |
} |
810 |
|
|
|
811 |
|
|
inline static void |
812 |
|
✗ |
cc_fprintd_device_signal_marshal_verify_status ( |
813 |
|
|
GClosure *closure, |
814 |
|
|
GValue *return_value, |
815 |
|
|
unsigned int n_param_values, |
816 |
|
|
const GValue *param_values, |
817 |
|
|
void *invocation_hint, |
818 |
|
|
void *marshal_data) |
819 |
|
|
{ |
820 |
|
✗ |
_g_dbus_codegen_marshal_VOID__STRING_BOOLEAN (closure, |
821 |
|
|
return_value, n_param_values, param_values, invocation_hint, marshal_data); |
822 |
|
✗ |
} |
823 |
|
|
|
824 |
|
|
inline static void |
825 |
|
✗ |
cc_fprintd_device_signal_marshal_enroll_status ( |
826 |
|
|
GClosure *closure, |
827 |
|
|
GValue *return_value, |
828 |
|
|
unsigned int n_param_values, |
829 |
|
|
const GValue *param_values, |
830 |
|
|
void *invocation_hint, |
831 |
|
|
void *marshal_data) |
832 |
|
|
{ |
833 |
|
✗ |
_g_dbus_codegen_marshal_VOID__STRING_BOOLEAN (closure, |
834 |
|
|
return_value, n_param_values, param_values, invocation_hint, marshal_data); |
835 |
|
✗ |
} |
836 |
|
|
|
837 |
|
|
inline static void |
838 |
|
✗ |
cc_fprintd_device_method_marshal_list_enrolled_fingers ( |
839 |
|
|
GClosure *closure, |
840 |
|
|
GValue *return_value, |
841 |
|
|
unsigned int n_param_values, |
842 |
|
|
const GValue *param_values, |
843 |
|
|
void *invocation_hint, |
844 |
|
|
void *marshal_data) |
845 |
|
|
{ |
846 |
|
✗ |
_g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING (closure, |
847 |
|
|
return_value, n_param_values, param_values, invocation_hint, marshal_data); |
848 |
|
✗ |
} |
849 |
|
|
|
850 |
|
|
inline static void |
851 |
|
✗ |
cc_fprintd_device_method_marshal_delete_enrolled_fingers ( |
852 |
|
|
GClosure *closure, |
853 |
|
|
GValue *return_value, |
854 |
|
|
unsigned int n_param_values, |
855 |
|
|
const GValue *param_values, |
856 |
|
|
void *invocation_hint, |
857 |
|
|
void *marshal_data) |
858 |
|
|
{ |
859 |
|
✗ |
_g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING (closure, |
860 |
|
|
return_value, n_param_values, param_values, invocation_hint, marshal_data); |
861 |
|
✗ |
} |
862 |
|
|
|
863 |
|
|
inline static void |
864 |
|
✗ |
cc_fprintd_device_method_marshal_delete_enrolled_fingers2 ( |
865 |
|
|
GClosure *closure, |
866 |
|
|
GValue *return_value, |
867 |
|
|
unsigned int n_param_values, |
868 |
|
|
const GValue *param_values, |
869 |
|
|
void *invocation_hint, |
870 |
|
|
void *marshal_data) |
871 |
|
|
{ |
872 |
|
✗ |
_g_dbus_codegen_marshal_BOOLEAN__OBJECT (closure, |
873 |
|
|
return_value, n_param_values, param_values, invocation_hint, marshal_data); |
874 |
|
✗ |
} |
875 |
|
|
|
876 |
|
|
inline static void |
877 |
|
✗ |
cc_fprintd_device_method_marshal_claim ( |
878 |
|
|
GClosure *closure, |
879 |
|
|
GValue *return_value, |
880 |
|
|
unsigned int n_param_values, |
881 |
|
|
const GValue *param_values, |
882 |
|
|
void *invocation_hint, |
883 |
|
|
void *marshal_data) |
884 |
|
|
{ |
885 |
|
✗ |
_g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING (closure, |
886 |
|
|
return_value, n_param_values, param_values, invocation_hint, marshal_data); |
887 |
|
✗ |
} |
888 |
|
|
|
889 |
|
|
inline static void |
890 |
|
✗ |
cc_fprintd_device_method_marshal_release ( |
891 |
|
|
GClosure *closure, |
892 |
|
|
GValue *return_value, |
893 |
|
|
unsigned int n_param_values, |
894 |
|
|
const GValue *param_values, |
895 |
|
|
void *invocation_hint, |
896 |
|
|
void *marshal_data) |
897 |
|
|
{ |
898 |
|
✗ |
_g_dbus_codegen_marshal_BOOLEAN__OBJECT (closure, |
899 |
|
|
return_value, n_param_values, param_values, invocation_hint, marshal_data); |
900 |
|
✗ |
} |
901 |
|
|
|
902 |
|
|
inline static void |
903 |
|
✗ |
cc_fprintd_device_method_marshal_verify_start ( |
904 |
|
|
GClosure *closure, |
905 |
|
|
GValue *return_value, |
906 |
|
|
unsigned int n_param_values, |
907 |
|
|
const GValue *param_values, |
908 |
|
|
void *invocation_hint, |
909 |
|
|
void *marshal_data) |
910 |
|
|
{ |
911 |
|
✗ |
_g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING (closure, |
912 |
|
|
return_value, n_param_values, param_values, invocation_hint, marshal_data); |
913 |
|
✗ |
} |
914 |
|
|
|
915 |
|
|
inline static void |
916 |
|
✗ |
cc_fprintd_device_method_marshal_verify_stop ( |
917 |
|
|
GClosure *closure, |
918 |
|
|
GValue *return_value, |
919 |
|
|
unsigned int n_param_values, |
920 |
|
|
const GValue *param_values, |
921 |
|
|
void *invocation_hint, |
922 |
|
|
void *marshal_data) |
923 |
|
|
{ |
924 |
|
✗ |
_g_dbus_codegen_marshal_BOOLEAN__OBJECT (closure, |
925 |
|
|
return_value, n_param_values, param_values, invocation_hint, marshal_data); |
926 |
|
✗ |
} |
927 |
|
|
|
928 |
|
|
inline static void |
929 |
|
✗ |
cc_fprintd_device_method_marshal_enroll_start ( |
930 |
|
|
GClosure *closure, |
931 |
|
|
GValue *return_value, |
932 |
|
|
unsigned int n_param_values, |
933 |
|
|
const GValue *param_values, |
934 |
|
|
void *invocation_hint, |
935 |
|
|
void *marshal_data) |
936 |
|
|
{ |
937 |
|
✗ |
_g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING (closure, |
938 |
|
|
return_value, n_param_values, param_values, invocation_hint, marshal_data); |
939 |
|
✗ |
} |
940 |
|
|
|
941 |
|
|
inline static void |
942 |
|
✗ |
cc_fprintd_device_method_marshal_enroll_stop ( |
943 |
|
|
GClosure *closure, |
944 |
|
|
GValue *return_value, |
945 |
|
|
unsigned int n_param_values, |
946 |
|
|
const GValue *param_values, |
947 |
|
|
void *invocation_hint, |
948 |
|
|
void *marshal_data) |
949 |
|
|
{ |
950 |
|
✗ |
_g_dbus_codegen_marshal_BOOLEAN__OBJECT (closure, |
951 |
|
|
return_value, n_param_values, param_values, invocation_hint, marshal_data); |
952 |
|
✗ |
} |
953 |
|
|
|
954 |
|
|
|
955 |
|
|
/** |
956 |
|
|
* CcFprintdDevice: |
957 |
|
|
* |
958 |
|
|
* Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-net-reactivated-Fprint-Device.top_of_page">net.reactivated.Fprint.Device</link>. |
959 |
|
|
*/ |
960 |
|
|
|
961 |
|
|
/** |
962 |
|
|
* CcFprintdDeviceIface: |
963 |
|
|
* @parent_iface: The parent interface. |
964 |
|
|
* @handle_claim: Handler for the #CcFprintdDevice::handle-claim signal. |
965 |
|
|
* @handle_delete_enrolled_fingers: Handler for the #CcFprintdDevice::handle-delete-enrolled-fingers signal. |
966 |
|
|
* @handle_delete_enrolled_fingers2: Handler for the #CcFprintdDevice::handle-delete-enrolled-fingers2 signal. |
967 |
|
|
* @handle_enroll_start: Handler for the #CcFprintdDevice::handle-enroll-start signal. |
968 |
|
|
* @handle_enroll_stop: Handler for the #CcFprintdDevice::handle-enroll-stop signal. |
969 |
|
|
* @handle_list_enrolled_fingers: Handler for the #CcFprintdDevice::handle-list-enrolled-fingers signal. |
970 |
|
|
* @handle_release: Handler for the #CcFprintdDevice::handle-release signal. |
971 |
|
|
* @handle_verify_start: Handler for the #CcFprintdDevice::handle-verify-start signal. |
972 |
|
|
* @handle_verify_stop: Handler for the #CcFprintdDevice::handle-verify-stop signal. |
973 |
|
|
* @get_name: Getter for the #CcFprintdDevice:name property. |
974 |
|
|
* @get_num_enroll_stages: Getter for the #CcFprintdDevice:num-enroll-stages property. |
975 |
|
|
* @get_scan_type: Getter for the #CcFprintdDevice:scan-type property. |
976 |
|
|
* @enroll_status: Handler for the #CcFprintdDevice::enroll-status signal. |
977 |
|
|
* @verify_finger_selected: Handler for the #CcFprintdDevice::verify-finger-selected signal. |
978 |
|
|
* @verify_status: Handler for the #CcFprintdDevice::verify-status signal. |
979 |
|
|
* |
980 |
|
|
* Virtual table for the D-Bus interface <link linkend="gdbus-interface-net-reactivated-Fprint-Device.top_of_page">net.reactivated.Fprint.Device</link>. |
981 |
|
|
*/ |
982 |
|
|
|
983 |
|
|
typedef CcFprintdDeviceIface CcFprintdDeviceInterface; |
984 |
|
✗ |
G_DEFINE_INTERFACE (CcFprintdDevice, cc_fprintd_device, G_TYPE_OBJECT) |
985 |
|
|
|
986 |
|
|
static void |
987 |
|
✗ |
cc_fprintd_device_default_init (CcFprintdDeviceIface *iface) |
988 |
|
|
{ |
989 |
|
|
/* GObject signals for incoming D-Bus method calls: */ |
990 |
|
|
/** |
991 |
|
|
* CcFprintdDevice::handle-list-enrolled-fingers: |
992 |
|
|
* @object: A #CcFprintdDevice. |
993 |
|
|
* @invocation: A #GDBusMethodInvocation. |
994 |
|
|
* @arg_username: Argument passed by remote caller. |
995 |
|
|
* |
996 |
|
|
* Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-net-reactivated-Fprint-Device.ListEnrolledFingers">ListEnrolledFingers()</link> D-Bus method. |
997 |
|
|
* |
998 |
|
|
* If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call cc_fprintd_device_complete_list_enrolled_fingers() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. |
999 |
|
|
* |
1000 |
|
|
* Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run. |
1001 |
|
|
*/ |
1002 |
|
✗ |
g_signal_new ("handle-list-enrolled-fingers", |
1003 |
|
|
G_TYPE_FROM_INTERFACE (iface), |
1004 |
|
|
G_SIGNAL_RUN_LAST, |
1005 |
|
|
G_STRUCT_OFFSET (CcFprintdDeviceIface, handle_list_enrolled_fingers), |
1006 |
|
|
g_signal_accumulator_true_handled, |
1007 |
|
|
NULL, |
1008 |
|
|
cc_fprintd_device_method_marshal_list_enrolled_fingers, |
1009 |
|
|
G_TYPE_BOOLEAN, |
1010 |
|
|
2, |
1011 |
|
|
G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING); |
1012 |
|
|
|
1013 |
|
|
/** |
1014 |
|
|
* CcFprintdDevice::handle-delete-enrolled-fingers: |
1015 |
|
|
* @object: A #CcFprintdDevice. |
1016 |
|
|
* @invocation: A #GDBusMethodInvocation. |
1017 |
|
|
* @arg_username: Argument passed by remote caller. |
1018 |
|
|
* |
1019 |
|
|
* Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-net-reactivated-Fprint-Device.DeleteEnrolledFingers">DeleteEnrolledFingers()</link> D-Bus method. |
1020 |
|
|
* |
1021 |
|
|
* If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call cc_fprintd_device_complete_delete_enrolled_fingers() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. |
1022 |
|
|
* |
1023 |
|
|
* Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run. |
1024 |
|
|
*/ |
1025 |
|
✗ |
g_signal_new ("handle-delete-enrolled-fingers", |
1026 |
|
|
G_TYPE_FROM_INTERFACE (iface), |
1027 |
|
|
G_SIGNAL_RUN_LAST, |
1028 |
|
|
G_STRUCT_OFFSET (CcFprintdDeviceIface, handle_delete_enrolled_fingers), |
1029 |
|
|
g_signal_accumulator_true_handled, |
1030 |
|
|
NULL, |
1031 |
|
|
cc_fprintd_device_method_marshal_delete_enrolled_fingers, |
1032 |
|
|
G_TYPE_BOOLEAN, |
1033 |
|
|
2, |
1034 |
|
|
G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING); |
1035 |
|
|
|
1036 |
|
|
/** |
1037 |
|
|
* CcFprintdDevice::handle-delete-enrolled-fingers2: |
1038 |
|
|
* @object: A #CcFprintdDevice. |
1039 |
|
|
* @invocation: A #GDBusMethodInvocation. |
1040 |
|
|
* |
1041 |
|
|
* Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-net-reactivated-Fprint-Device.DeleteEnrolledFingers2">DeleteEnrolledFingers2()</link> D-Bus method. |
1042 |
|
|
* |
1043 |
|
|
* If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call cc_fprintd_device_complete_delete_enrolled_fingers2() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. |
1044 |
|
|
* |
1045 |
|
|
* Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run. |
1046 |
|
|
*/ |
1047 |
|
✗ |
g_signal_new ("handle-delete-enrolled-fingers2", |
1048 |
|
|
G_TYPE_FROM_INTERFACE (iface), |
1049 |
|
|
G_SIGNAL_RUN_LAST, |
1050 |
|
|
G_STRUCT_OFFSET (CcFprintdDeviceIface, handle_delete_enrolled_fingers2), |
1051 |
|
|
g_signal_accumulator_true_handled, |
1052 |
|
|
NULL, |
1053 |
|
|
cc_fprintd_device_method_marshal_delete_enrolled_fingers2, |
1054 |
|
|
G_TYPE_BOOLEAN, |
1055 |
|
|
1, |
1056 |
|
|
G_TYPE_DBUS_METHOD_INVOCATION); |
1057 |
|
|
|
1058 |
|
|
/** |
1059 |
|
|
* CcFprintdDevice::handle-claim: |
1060 |
|
|
* @object: A #CcFprintdDevice. |
1061 |
|
|
* @invocation: A #GDBusMethodInvocation. |
1062 |
|
|
* @arg_username: Argument passed by remote caller. |
1063 |
|
|
* |
1064 |
|
|
* Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-net-reactivated-Fprint-Device.Claim">Claim()</link> D-Bus method. |
1065 |
|
|
* |
1066 |
|
|
* If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call cc_fprintd_device_complete_claim() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. |
1067 |
|
|
* |
1068 |
|
|
* Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run. |
1069 |
|
|
*/ |
1070 |
|
✗ |
g_signal_new ("handle-claim", |
1071 |
|
|
G_TYPE_FROM_INTERFACE (iface), |
1072 |
|
|
G_SIGNAL_RUN_LAST, |
1073 |
|
|
G_STRUCT_OFFSET (CcFprintdDeviceIface, handle_claim), |
1074 |
|
|
g_signal_accumulator_true_handled, |
1075 |
|
|
NULL, |
1076 |
|
|
cc_fprintd_device_method_marshal_claim, |
1077 |
|
|
G_TYPE_BOOLEAN, |
1078 |
|
|
2, |
1079 |
|
|
G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING); |
1080 |
|
|
|
1081 |
|
|
/** |
1082 |
|
|
* CcFprintdDevice::handle-release: |
1083 |
|
|
* @object: A #CcFprintdDevice. |
1084 |
|
|
* @invocation: A #GDBusMethodInvocation. |
1085 |
|
|
* |
1086 |
|
|
* Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-net-reactivated-Fprint-Device.Release">Release()</link> D-Bus method. |
1087 |
|
|
* |
1088 |
|
|
* If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call cc_fprintd_device_complete_release() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. |
1089 |
|
|
* |
1090 |
|
|
* Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run. |
1091 |
|
|
*/ |
1092 |
|
✗ |
g_signal_new ("handle-release", |
1093 |
|
|
G_TYPE_FROM_INTERFACE (iface), |
1094 |
|
|
G_SIGNAL_RUN_LAST, |
1095 |
|
|
G_STRUCT_OFFSET (CcFprintdDeviceIface, handle_release), |
1096 |
|
|
g_signal_accumulator_true_handled, |
1097 |
|
|
NULL, |
1098 |
|
|
cc_fprintd_device_method_marshal_release, |
1099 |
|
|
G_TYPE_BOOLEAN, |
1100 |
|
|
1, |
1101 |
|
|
G_TYPE_DBUS_METHOD_INVOCATION); |
1102 |
|
|
|
1103 |
|
|
/** |
1104 |
|
|
* CcFprintdDevice::handle-verify-start: |
1105 |
|
|
* @object: A #CcFprintdDevice. |
1106 |
|
|
* @invocation: A #GDBusMethodInvocation. |
1107 |
|
|
* @arg_finger_name: Argument passed by remote caller. |
1108 |
|
|
* |
1109 |
|
|
* Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-net-reactivated-Fprint-Device.VerifyStart">VerifyStart()</link> D-Bus method. |
1110 |
|
|
* |
1111 |
|
|
* If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call cc_fprintd_device_complete_verify_start() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. |
1112 |
|
|
* |
1113 |
|
|
* Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run. |
1114 |
|
|
*/ |
1115 |
|
✗ |
g_signal_new ("handle-verify-start", |
1116 |
|
|
G_TYPE_FROM_INTERFACE (iface), |
1117 |
|
|
G_SIGNAL_RUN_LAST, |
1118 |
|
|
G_STRUCT_OFFSET (CcFprintdDeviceIface, handle_verify_start), |
1119 |
|
|
g_signal_accumulator_true_handled, |
1120 |
|
|
NULL, |
1121 |
|
|
cc_fprintd_device_method_marshal_verify_start, |
1122 |
|
|
G_TYPE_BOOLEAN, |
1123 |
|
|
2, |
1124 |
|
|
G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING); |
1125 |
|
|
|
1126 |
|
|
/** |
1127 |
|
|
* CcFprintdDevice::handle-verify-stop: |
1128 |
|
|
* @object: A #CcFprintdDevice. |
1129 |
|
|
* @invocation: A #GDBusMethodInvocation. |
1130 |
|
|
* |
1131 |
|
|
* Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-net-reactivated-Fprint-Device.VerifyStop">VerifyStop()</link> D-Bus method. |
1132 |
|
|
* |
1133 |
|
|
* If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call cc_fprintd_device_complete_verify_stop() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. |
1134 |
|
|
* |
1135 |
|
|
* Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run. |
1136 |
|
|
*/ |
1137 |
|
✗ |
g_signal_new ("handle-verify-stop", |
1138 |
|
|
G_TYPE_FROM_INTERFACE (iface), |
1139 |
|
|
G_SIGNAL_RUN_LAST, |
1140 |
|
|
G_STRUCT_OFFSET (CcFprintdDeviceIface, handle_verify_stop), |
1141 |
|
|
g_signal_accumulator_true_handled, |
1142 |
|
|
NULL, |
1143 |
|
|
cc_fprintd_device_method_marshal_verify_stop, |
1144 |
|
|
G_TYPE_BOOLEAN, |
1145 |
|
|
1, |
1146 |
|
|
G_TYPE_DBUS_METHOD_INVOCATION); |
1147 |
|
|
|
1148 |
|
|
/** |
1149 |
|
|
* CcFprintdDevice::handle-enroll-start: |
1150 |
|
|
* @object: A #CcFprintdDevice. |
1151 |
|
|
* @invocation: A #GDBusMethodInvocation. |
1152 |
|
|
* @arg_finger_name: Argument passed by remote caller. |
1153 |
|
|
* |
1154 |
|
|
* Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-net-reactivated-Fprint-Device.EnrollStart">EnrollStart()</link> D-Bus method. |
1155 |
|
|
* |
1156 |
|
|
* If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call cc_fprintd_device_complete_enroll_start() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. |
1157 |
|
|
* |
1158 |
|
|
* Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run. |
1159 |
|
|
*/ |
1160 |
|
✗ |
g_signal_new ("handle-enroll-start", |
1161 |
|
|
G_TYPE_FROM_INTERFACE (iface), |
1162 |
|
|
G_SIGNAL_RUN_LAST, |
1163 |
|
|
G_STRUCT_OFFSET (CcFprintdDeviceIface, handle_enroll_start), |
1164 |
|
|
g_signal_accumulator_true_handled, |
1165 |
|
|
NULL, |
1166 |
|
|
cc_fprintd_device_method_marshal_enroll_start, |
1167 |
|
|
G_TYPE_BOOLEAN, |
1168 |
|
|
2, |
1169 |
|
|
G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING); |
1170 |
|
|
|
1171 |
|
|
/** |
1172 |
|
|
* CcFprintdDevice::handle-enroll-stop: |
1173 |
|
|
* @object: A #CcFprintdDevice. |
1174 |
|
|
* @invocation: A #GDBusMethodInvocation. |
1175 |
|
|
* |
1176 |
|
|
* Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-net-reactivated-Fprint-Device.EnrollStop">EnrollStop()</link> D-Bus method. |
1177 |
|
|
* |
1178 |
|
|
* If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call cc_fprintd_device_complete_enroll_stop() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. |
1179 |
|
|
* |
1180 |
|
|
* Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run. |
1181 |
|
|
*/ |
1182 |
|
✗ |
g_signal_new ("handle-enroll-stop", |
1183 |
|
|
G_TYPE_FROM_INTERFACE (iface), |
1184 |
|
|
G_SIGNAL_RUN_LAST, |
1185 |
|
|
G_STRUCT_OFFSET (CcFprintdDeviceIface, handle_enroll_stop), |
1186 |
|
|
g_signal_accumulator_true_handled, |
1187 |
|
|
NULL, |
1188 |
|
|
cc_fprintd_device_method_marshal_enroll_stop, |
1189 |
|
|
G_TYPE_BOOLEAN, |
1190 |
|
|
1, |
1191 |
|
|
G_TYPE_DBUS_METHOD_INVOCATION); |
1192 |
|
|
|
1193 |
|
|
/* GObject signals for received D-Bus signals: */ |
1194 |
|
|
/** |
1195 |
|
|
* CcFprintdDevice::verify-finger-selected: |
1196 |
|
|
* @object: A #CcFprintdDevice. |
1197 |
|
|
* @arg_finger_name: Argument. |
1198 |
|
|
* |
1199 |
|
|
* On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-net-reactivated-Fprint-Device.VerifyFingerSelected">"VerifyFingerSelected"</link> is received. |
1200 |
|
|
* |
1201 |
|
|
* On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal. |
1202 |
|
|
*/ |
1203 |
|
✗ |
CC_FPRINTD__DEVICE_SIGNALS[CC_FPRINTD__DEVICE_VERIFY_FINGER_SELECTED] = |
1204 |
|
✗ |
g_signal_new ("verify-finger-selected", |
1205 |
|
|
G_TYPE_FROM_INTERFACE (iface), |
1206 |
|
|
G_SIGNAL_RUN_LAST, |
1207 |
|
|
G_STRUCT_OFFSET (CcFprintdDeviceIface, verify_finger_selected), |
1208 |
|
|
NULL, |
1209 |
|
|
NULL, |
1210 |
|
|
cc_fprintd_device_signal_marshal_verify_finger_selected, |
1211 |
|
|
G_TYPE_NONE, |
1212 |
|
|
1, G_TYPE_STRING); |
1213 |
|
|
|
1214 |
|
|
/** |
1215 |
|
|
* CcFprintdDevice::verify-status: |
1216 |
|
|
* @object: A #CcFprintdDevice. |
1217 |
|
|
* @arg_result: Argument. |
1218 |
|
|
* @arg_done: Argument. |
1219 |
|
|
* |
1220 |
|
|
* On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-net-reactivated-Fprint-Device.VerifyStatus">"VerifyStatus"</link> is received. |
1221 |
|
|
* |
1222 |
|
|
* On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal. |
1223 |
|
|
*/ |
1224 |
|
✗ |
CC_FPRINTD__DEVICE_SIGNALS[CC_FPRINTD__DEVICE_VERIFY_STATUS] = |
1225 |
|
✗ |
g_signal_new ("verify-status", |
1226 |
|
|
G_TYPE_FROM_INTERFACE (iface), |
1227 |
|
|
G_SIGNAL_RUN_LAST, |
1228 |
|
|
G_STRUCT_OFFSET (CcFprintdDeviceIface, verify_status), |
1229 |
|
|
NULL, |
1230 |
|
|
NULL, |
1231 |
|
|
cc_fprintd_device_signal_marshal_verify_status, |
1232 |
|
|
G_TYPE_NONE, |
1233 |
|
|
2, G_TYPE_STRING, G_TYPE_BOOLEAN); |
1234 |
|
|
|
1235 |
|
|
/** |
1236 |
|
|
* CcFprintdDevice::enroll-status: |
1237 |
|
|
* @object: A #CcFprintdDevice. |
1238 |
|
|
* @arg_result: Argument. |
1239 |
|
|
* @arg_done: Argument. |
1240 |
|
|
* |
1241 |
|
|
* On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-net-reactivated-Fprint-Device.EnrollStatus">"EnrollStatus"</link> is received. |
1242 |
|
|
* |
1243 |
|
|
* On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal. |
1244 |
|
|
*/ |
1245 |
|
✗ |
CC_FPRINTD__DEVICE_SIGNALS[CC_FPRINTD__DEVICE_ENROLL_STATUS] = |
1246 |
|
✗ |
g_signal_new ("enroll-status", |
1247 |
|
|
G_TYPE_FROM_INTERFACE (iface), |
1248 |
|
|
G_SIGNAL_RUN_LAST, |
1249 |
|
|
G_STRUCT_OFFSET (CcFprintdDeviceIface, enroll_status), |
1250 |
|
|
NULL, |
1251 |
|
|
NULL, |
1252 |
|
|
cc_fprintd_device_signal_marshal_enroll_status, |
1253 |
|
|
G_TYPE_NONE, |
1254 |
|
|
2, G_TYPE_STRING, G_TYPE_BOOLEAN); |
1255 |
|
|
|
1256 |
|
|
/* GObject properties for D-Bus properties: */ |
1257 |
|
|
/** |
1258 |
|
|
* CcFprintdDevice:name: |
1259 |
|
|
* |
1260 |
|
|
* Represents the D-Bus property <link linkend="gdbus-property-net-reactivated-Fprint-Device.name">"name"</link>. |
1261 |
|
|
* |
1262 |
|
|
* Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. |
1263 |
|
|
*/ |
1264 |
|
✗ |
g_object_interface_install_property (iface, |
1265 |
|
|
g_param_spec_string ("name", "name", "name", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); |
1266 |
|
|
/** |
1267 |
|
|
* CcFprintdDevice:num-enroll-stages: |
1268 |
|
|
* |
1269 |
|
|
* Represents the D-Bus property <link linkend="gdbus-property-net-reactivated-Fprint-Device.num-enroll-stages">"num-enroll-stages"</link>. |
1270 |
|
|
* |
1271 |
|
|
* Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. |
1272 |
|
|
*/ |
1273 |
|
✗ |
g_object_interface_install_property (iface, |
1274 |
|
|
g_param_spec_int ("num-enroll-stages", "num-enroll-stages", "num-enroll-stages", G_MININT32, G_MAXINT32, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); |
1275 |
|
|
/** |
1276 |
|
|
* CcFprintdDevice:scan-type: |
1277 |
|
|
* |
1278 |
|
|
* Represents the D-Bus property <link linkend="gdbus-property-net-reactivated-Fprint-Device.scan-type">"scan-type"</link>. |
1279 |
|
|
* |
1280 |
|
|
* Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. |
1281 |
|
|
*/ |
1282 |
|
✗ |
g_object_interface_install_property (iface, |
1283 |
|
|
g_param_spec_string ("scan-type", "scan-type", "scan-type", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); |
1284 |
|
✗ |
} |
1285 |
|
|
|
1286 |
|
|
/** |
1287 |
|
|
* cc_fprintd_device_get_name: (skip) |
1288 |
|
|
* @object: A #CcFprintdDevice. |
1289 |
|
|
* |
1290 |
|
|
* Gets the value of the <link linkend="gdbus-property-net-reactivated-Fprint-Device.name">"name"</link> D-Bus property. |
1291 |
|
|
* |
1292 |
|
|
* Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. |
1293 |
|
|
* |
1294 |
|
|
* The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use cc_fprintd_device_dup_name() if on another thread. |
1295 |
|
|
* |
1296 |
|
|
* Returns: (transfer none) (nullable): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object. |
1297 |
|
|
*/ |
1298 |
|
|
const gchar * |
1299 |
|
✗ |
cc_fprintd_device_get_name (CcFprintdDevice *object) |
1300 |
|
|
{ |
1301 |
|
✗ |
g_return_val_if_fail (CC_FPRINTD_IS_DEVICE (object), NULL); |
1302 |
|
|
|
1303 |
|
✗ |
return CC_FPRINTD_DEVICE_GET_IFACE (object)->get_name (object); |
1304 |
|
|
} |
1305 |
|
|
|
1306 |
|
|
/** |
1307 |
|
|
* cc_fprintd_device_dup_name: (skip) |
1308 |
|
|
* @object: A #CcFprintdDevice. |
1309 |
|
|
* |
1310 |
|
|
* Gets a copy of the <link linkend="gdbus-property-net-reactivated-Fprint-Device.name">"name"</link> D-Bus property. |
1311 |
|
|
* |
1312 |
|
|
* Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. |
1313 |
|
|
* |
1314 |
|
|
* Returns: (transfer full) (nullable): The property value or %NULL if the property is not set. The returned value should be freed with g_free(). |
1315 |
|
|
*/ |
1316 |
|
|
gchar * |
1317 |
|
✗ |
cc_fprintd_device_dup_name (CcFprintdDevice *object) |
1318 |
|
|
{ |
1319 |
|
|
gchar *value; |
1320 |
|
✗ |
g_object_get (G_OBJECT (object), "name", &value, NULL); |
1321 |
|
✗ |
return value; |
1322 |
|
|
} |
1323 |
|
|
|
1324 |
|
|
/** |
1325 |
|
|
* cc_fprintd_device_set_name: (skip) |
1326 |
|
|
* @object: A #CcFprintdDevice. |
1327 |
|
|
* @value: The value to set. |
1328 |
|
|
* |
1329 |
|
|
* Sets the <link linkend="gdbus-property-net-reactivated-Fprint-Device.name">"name"</link> D-Bus property to @value. |
1330 |
|
|
* |
1331 |
|
|
* Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. |
1332 |
|
|
*/ |
1333 |
|
|
void |
1334 |
|
✗ |
cc_fprintd_device_set_name (CcFprintdDevice *object, const gchar *value) |
1335 |
|
|
{ |
1336 |
|
✗ |
g_object_set (G_OBJECT (object), "name", value, NULL); |
1337 |
|
✗ |
} |
1338 |
|
|
|
1339 |
|
|
/** |
1340 |
|
|
* cc_fprintd_device_get_num_enroll_stages: (skip) |
1341 |
|
|
* @object: A #CcFprintdDevice. |
1342 |
|
|
* |
1343 |
|
|
* Gets the value of the <link linkend="gdbus-property-net-reactivated-Fprint-Device.num-enroll-stages">"num-enroll-stages"</link> D-Bus property. |
1344 |
|
|
* |
1345 |
|
|
* Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. |
1346 |
|
|
* |
1347 |
|
|
* Returns: The property value. |
1348 |
|
|
*/ |
1349 |
|
|
gint |
1350 |
|
✗ |
cc_fprintd_device_get_num_enroll_stages (CcFprintdDevice *object) |
1351 |
|
|
{ |
1352 |
|
✗ |
g_return_val_if_fail (CC_FPRINTD_IS_DEVICE (object), 0); |
1353 |
|
|
|
1354 |
|
✗ |
return CC_FPRINTD_DEVICE_GET_IFACE (object)->get_num_enroll_stages (object); |
1355 |
|
|
} |
1356 |
|
|
|
1357 |
|
|
/** |
1358 |
|
|
* cc_fprintd_device_set_num_enroll_stages: (skip) |
1359 |
|
|
* @object: A #CcFprintdDevice. |
1360 |
|
|
* @value: The value to set. |
1361 |
|
|
* |
1362 |
|
|
* Sets the <link linkend="gdbus-property-net-reactivated-Fprint-Device.num-enroll-stages">"num-enroll-stages"</link> D-Bus property to @value. |
1363 |
|
|
* |
1364 |
|
|
* Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. |
1365 |
|
|
*/ |
1366 |
|
|
void |
1367 |
|
✗ |
cc_fprintd_device_set_num_enroll_stages (CcFprintdDevice *object, gint value) |
1368 |
|
|
{ |
1369 |
|
✗ |
g_object_set (G_OBJECT (object), "num-enroll-stages", value, NULL); |
1370 |
|
✗ |
} |
1371 |
|
|
|
1372 |
|
|
/** |
1373 |
|
|
* cc_fprintd_device_get_scan_type: (skip) |
1374 |
|
|
* @object: A #CcFprintdDevice. |
1375 |
|
|
* |
1376 |
|
|
* Gets the value of the <link linkend="gdbus-property-net-reactivated-Fprint-Device.scan-type">"scan-type"</link> D-Bus property. |
1377 |
|
|
* |
1378 |
|
|
* Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. |
1379 |
|
|
* |
1380 |
|
|
* The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use cc_fprintd_device_dup_scan_type() if on another thread. |
1381 |
|
|
* |
1382 |
|
|
* Returns: (transfer none) (nullable): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object. |
1383 |
|
|
*/ |
1384 |
|
|
const gchar * |
1385 |
|
✗ |
cc_fprintd_device_get_scan_type (CcFprintdDevice *object) |
1386 |
|
|
{ |
1387 |
|
✗ |
g_return_val_if_fail (CC_FPRINTD_IS_DEVICE (object), NULL); |
1388 |
|
|
|
1389 |
|
✗ |
return CC_FPRINTD_DEVICE_GET_IFACE (object)->get_scan_type (object); |
1390 |
|
|
} |
1391 |
|
|
|
1392 |
|
|
/** |
1393 |
|
|
* cc_fprintd_device_dup_scan_type: (skip) |
1394 |
|
|
* @object: A #CcFprintdDevice. |
1395 |
|
|
* |
1396 |
|
|
* Gets a copy of the <link linkend="gdbus-property-net-reactivated-Fprint-Device.scan-type">"scan-type"</link> D-Bus property. |
1397 |
|
|
* |
1398 |
|
|
* Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. |
1399 |
|
|
* |
1400 |
|
|
* Returns: (transfer full) (nullable): The property value or %NULL if the property is not set. The returned value should be freed with g_free(). |
1401 |
|
|
*/ |
1402 |
|
|
gchar * |
1403 |
|
✗ |
cc_fprintd_device_dup_scan_type (CcFprintdDevice *object) |
1404 |
|
|
{ |
1405 |
|
|
gchar *value; |
1406 |
|
✗ |
g_object_get (G_OBJECT (object), "scan-type", &value, NULL); |
1407 |
|
✗ |
return value; |
1408 |
|
|
} |
1409 |
|
|
|
1410 |
|
|
/** |
1411 |
|
|
* cc_fprintd_device_set_scan_type: (skip) |
1412 |
|
|
* @object: A #CcFprintdDevice. |
1413 |
|
|
* @value: The value to set. |
1414 |
|
|
* |
1415 |
|
|
* Sets the <link linkend="gdbus-property-net-reactivated-Fprint-Device.scan-type">"scan-type"</link> D-Bus property to @value. |
1416 |
|
|
* |
1417 |
|
|
* Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. |
1418 |
|
|
*/ |
1419 |
|
|
void |
1420 |
|
✗ |
cc_fprintd_device_set_scan_type (CcFprintdDevice *object, const gchar *value) |
1421 |
|
|
{ |
1422 |
|
✗ |
g_object_set (G_OBJECT (object), "scan-type", value, NULL); |
1423 |
|
✗ |
} |
1424 |
|
|
|
1425 |
|
|
/** |
1426 |
|
|
* cc_fprintd_device_emit_verify_finger_selected: |
1427 |
|
|
* @object: A #CcFprintdDevice. |
1428 |
|
|
* @arg_finger_name: Argument to pass with the signal. |
1429 |
|
|
* |
1430 |
|
|
* Emits the <link linkend="gdbus-signal-net-reactivated-Fprint-Device.VerifyFingerSelected">"VerifyFingerSelected"</link> D-Bus signal. |
1431 |
|
|
*/ |
1432 |
|
|
void |
1433 |
|
✗ |
cc_fprintd_device_emit_verify_finger_selected ( |
1434 |
|
|
CcFprintdDevice *object, |
1435 |
|
|
const gchar *arg_finger_name) |
1436 |
|
|
{ |
1437 |
|
✗ |
g_signal_emit (object, CC_FPRINTD__DEVICE_SIGNALS[CC_FPRINTD__DEVICE_VERIFY_FINGER_SELECTED], 0, arg_finger_name); |
1438 |
|
✗ |
} |
1439 |
|
|
|
1440 |
|
|
/** |
1441 |
|
|
* cc_fprintd_device_emit_verify_status: |
1442 |
|
|
* @object: A #CcFprintdDevice. |
1443 |
|
|
* @arg_result: Argument to pass with the signal. |
1444 |
|
|
* @arg_done: Argument to pass with the signal. |
1445 |
|
|
* |
1446 |
|
|
* Emits the <link linkend="gdbus-signal-net-reactivated-Fprint-Device.VerifyStatus">"VerifyStatus"</link> D-Bus signal. |
1447 |
|
|
*/ |
1448 |
|
|
void |
1449 |
|
✗ |
cc_fprintd_device_emit_verify_status ( |
1450 |
|
|
CcFprintdDevice *object, |
1451 |
|
|
const gchar *arg_result, |
1452 |
|
|
gboolean arg_done) |
1453 |
|
|
{ |
1454 |
|
✗ |
g_signal_emit (object, CC_FPRINTD__DEVICE_SIGNALS[CC_FPRINTD__DEVICE_VERIFY_STATUS], 0, arg_result, arg_done); |
1455 |
|
✗ |
} |
1456 |
|
|
|
1457 |
|
|
/** |
1458 |
|
|
* cc_fprintd_device_emit_enroll_status: |
1459 |
|
|
* @object: A #CcFprintdDevice. |
1460 |
|
|
* @arg_result: Argument to pass with the signal. |
1461 |
|
|
* @arg_done: Argument to pass with the signal. |
1462 |
|
|
* |
1463 |
|
|
* Emits the <link linkend="gdbus-signal-net-reactivated-Fprint-Device.EnrollStatus">"EnrollStatus"</link> D-Bus signal. |
1464 |
|
|
*/ |
1465 |
|
|
void |
1466 |
|
✗ |
cc_fprintd_device_emit_enroll_status ( |
1467 |
|
|
CcFprintdDevice *object, |
1468 |
|
|
const gchar *arg_result, |
1469 |
|
|
gboolean arg_done) |
1470 |
|
|
{ |
1471 |
|
✗ |
g_signal_emit (object, CC_FPRINTD__DEVICE_SIGNALS[CC_FPRINTD__DEVICE_ENROLL_STATUS], 0, arg_result, arg_done); |
1472 |
|
✗ |
} |
1473 |
|
|
|
1474 |
|
|
/** |
1475 |
|
|
* cc_fprintd_device_call_list_enrolled_fingers: |
1476 |
|
|
* @proxy: A #CcFprintdDeviceProxy. |
1477 |
|
|
* @arg_username: Argument to pass with the method invocation. |
1478 |
|
|
* @cancellable: (nullable): A #GCancellable or %NULL. |
1479 |
|
|
* @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. |
1480 |
|
|
* @user_data: User data to pass to @callback. |
1481 |
|
|
* |
1482 |
|
|
* Asynchronously invokes the <link linkend="gdbus-method-net-reactivated-Fprint-Device.ListEnrolledFingers">ListEnrolledFingers()</link> D-Bus method on @proxy. |
1483 |
|
|
* When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
1484 |
|
|
* You can then call cc_fprintd_device_call_list_enrolled_fingers_finish() to get the result of the operation. |
1485 |
|
|
* |
1486 |
|
|
* See cc_fprintd_device_call_list_enrolled_fingers_sync() for the synchronous, blocking version of this method. |
1487 |
|
|
*/ |
1488 |
|
|
void |
1489 |
|
✗ |
cc_fprintd_device_call_list_enrolled_fingers ( |
1490 |
|
|
CcFprintdDevice *proxy, |
1491 |
|
|
const gchar *arg_username, |
1492 |
|
|
GCancellable *cancellable, |
1493 |
|
|
GAsyncReadyCallback callback, |
1494 |
|
|
gpointer user_data) |
1495 |
|
|
{ |
1496 |
|
✗ |
g_dbus_proxy_call (G_DBUS_PROXY (proxy), |
1497 |
|
|
"ListEnrolledFingers", |
1498 |
|
|
g_variant_new ("(s)", |
1499 |
|
|
arg_username), |
1500 |
|
|
G_DBUS_CALL_FLAGS_NONE, |
1501 |
|
|
-1, |
1502 |
|
|
cancellable, |
1503 |
|
|
callback, |
1504 |
|
|
user_data); |
1505 |
|
✗ |
} |
1506 |
|
|
|
1507 |
|
|
/** |
1508 |
|
|
* cc_fprintd_device_call_list_enrolled_fingers_finish: |
1509 |
|
|
* @proxy: A #CcFprintdDeviceProxy. |
1510 |
|
|
* @out_enrolled_fingers: (out) (optional) (array zero-terminated=1): Return location for return parameter or %NULL to ignore. |
1511 |
|
|
* @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to cc_fprintd_device_call_list_enrolled_fingers(). |
1512 |
|
|
* @error: Return location for error or %NULL. |
1513 |
|
|
* |
1514 |
|
|
* Finishes an operation started with cc_fprintd_device_call_list_enrolled_fingers(). |
1515 |
|
|
* |
1516 |
|
|
* Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set. |
1517 |
|
|
*/ |
1518 |
|
|
gboolean |
1519 |
|
✗ |
cc_fprintd_device_call_list_enrolled_fingers_finish ( |
1520 |
|
|
CcFprintdDevice *proxy, |
1521 |
|
|
gchar ***out_enrolled_fingers, |
1522 |
|
|
GAsyncResult *res, |
1523 |
|
|
GError **error) |
1524 |
|
|
{ |
1525 |
|
|
GVariant *_ret; |
1526 |
|
✗ |
_ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); |
1527 |
|
✗ |
if (_ret == NULL) |
1528 |
|
✗ |
goto _out; |
1529 |
|
✗ |
g_variant_get (_ret, |
1530 |
|
|
"(^as)", |
1531 |
|
|
out_enrolled_fingers); |
1532 |
|
✗ |
g_variant_unref (_ret); |
1533 |
|
✗ |
_out: |
1534 |
|
✗ |
return _ret != NULL; |
1535 |
|
|
} |
1536 |
|
|
|
1537 |
|
|
/** |
1538 |
|
|
* cc_fprintd_device_call_list_enrolled_fingers_sync: |
1539 |
|
|
* @proxy: A #CcFprintdDeviceProxy. |
1540 |
|
|
* @arg_username: Argument to pass with the method invocation. |
1541 |
|
|
* @out_enrolled_fingers: (out) (optional) (array zero-terminated=1): Return location for return parameter or %NULL to ignore. |
1542 |
|
|
* @cancellable: (nullable): A #GCancellable or %NULL. |
1543 |
|
|
* @error: Return location for error or %NULL. |
1544 |
|
|
* |
1545 |
|
|
* Synchronously invokes the <link linkend="gdbus-method-net-reactivated-Fprint-Device.ListEnrolledFingers">ListEnrolledFingers()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. |
1546 |
|
|
* |
1547 |
|
|
* See cc_fprintd_device_call_list_enrolled_fingers() for the asynchronous version of this method. |
1548 |
|
|
* |
1549 |
|
|
* Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set. |
1550 |
|
|
*/ |
1551 |
|
|
gboolean |
1552 |
|
✗ |
cc_fprintd_device_call_list_enrolled_fingers_sync ( |
1553 |
|
|
CcFprintdDevice *proxy, |
1554 |
|
|
const gchar *arg_username, |
1555 |
|
|
gchar ***out_enrolled_fingers, |
1556 |
|
|
GCancellable *cancellable, |
1557 |
|
|
GError **error) |
1558 |
|
|
{ |
1559 |
|
|
GVariant *_ret; |
1560 |
|
✗ |
_ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), |
1561 |
|
|
"ListEnrolledFingers", |
1562 |
|
|
g_variant_new ("(s)", |
1563 |
|
|
arg_username), |
1564 |
|
|
G_DBUS_CALL_FLAGS_NONE, |
1565 |
|
|
-1, |
1566 |
|
|
cancellable, |
1567 |
|
|
error); |
1568 |
|
✗ |
if (_ret == NULL) |
1569 |
|
✗ |
goto _out; |
1570 |
|
✗ |
g_variant_get (_ret, |
1571 |
|
|
"(^as)", |
1572 |
|
|
out_enrolled_fingers); |
1573 |
|
✗ |
g_variant_unref (_ret); |
1574 |
|
✗ |
_out: |
1575 |
|
✗ |
return _ret != NULL; |
1576 |
|
|
} |
1577 |
|
|
|
1578 |
|
|
/** |
1579 |
|
|
* cc_fprintd_device_call_delete_enrolled_fingers: |
1580 |
|
|
* @proxy: A #CcFprintdDeviceProxy. |
1581 |
|
|
* @arg_username: Argument to pass with the method invocation. |
1582 |
|
|
* @cancellable: (nullable): A #GCancellable or %NULL. |
1583 |
|
|
* @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. |
1584 |
|
|
* @user_data: User data to pass to @callback. |
1585 |
|
|
* |
1586 |
|
|
* Asynchronously invokes the <link linkend="gdbus-method-net-reactivated-Fprint-Device.DeleteEnrolledFingers">DeleteEnrolledFingers()</link> D-Bus method on @proxy. |
1587 |
|
|
* When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
1588 |
|
|
* You can then call cc_fprintd_device_call_delete_enrolled_fingers_finish() to get the result of the operation. |
1589 |
|
|
* |
1590 |
|
|
* See cc_fprintd_device_call_delete_enrolled_fingers_sync() for the synchronous, blocking version of this method. |
1591 |
|
|
*/ |
1592 |
|
|
void |
1593 |
|
✗ |
cc_fprintd_device_call_delete_enrolled_fingers ( |
1594 |
|
|
CcFprintdDevice *proxy, |
1595 |
|
|
const gchar *arg_username, |
1596 |
|
|
GCancellable *cancellable, |
1597 |
|
|
GAsyncReadyCallback callback, |
1598 |
|
|
gpointer user_data) |
1599 |
|
|
{ |
1600 |
|
✗ |
g_dbus_proxy_call (G_DBUS_PROXY (proxy), |
1601 |
|
|
"DeleteEnrolledFingers", |
1602 |
|
|
g_variant_new ("(s)", |
1603 |
|
|
arg_username), |
1604 |
|
|
G_DBUS_CALL_FLAGS_NONE, |
1605 |
|
|
-1, |
1606 |
|
|
cancellable, |
1607 |
|
|
callback, |
1608 |
|
|
user_data); |
1609 |
|
✗ |
} |
1610 |
|
|
|
1611 |
|
|
/** |
1612 |
|
|
* cc_fprintd_device_call_delete_enrolled_fingers_finish: |
1613 |
|
|
* @proxy: A #CcFprintdDeviceProxy. |
1614 |
|
|
* @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to cc_fprintd_device_call_delete_enrolled_fingers(). |
1615 |
|
|
* @error: Return location for error or %NULL. |
1616 |
|
|
* |
1617 |
|
|
* Finishes an operation started with cc_fprintd_device_call_delete_enrolled_fingers(). |
1618 |
|
|
* |
1619 |
|
|
* Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set. |
1620 |
|
|
*/ |
1621 |
|
|
gboolean |
1622 |
|
✗ |
cc_fprintd_device_call_delete_enrolled_fingers_finish ( |
1623 |
|
|
CcFprintdDevice *proxy, |
1624 |
|
|
GAsyncResult *res, |
1625 |
|
|
GError **error) |
1626 |
|
|
{ |
1627 |
|
|
GVariant *_ret; |
1628 |
|
✗ |
_ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); |
1629 |
|
✗ |
if (_ret == NULL) |
1630 |
|
✗ |
goto _out; |
1631 |
|
✗ |
g_variant_get (_ret, |
1632 |
|
|
"()"); |
1633 |
|
✗ |
g_variant_unref (_ret); |
1634 |
|
✗ |
_out: |
1635 |
|
✗ |
return _ret != NULL; |
1636 |
|
|
} |
1637 |
|
|
|
1638 |
|
|
/** |
1639 |
|
|
* cc_fprintd_device_call_delete_enrolled_fingers_sync: |
1640 |
|
|
* @proxy: A #CcFprintdDeviceProxy. |
1641 |
|
|
* @arg_username: Argument to pass with the method invocation. |
1642 |
|
|
* @cancellable: (nullable): A #GCancellable or %NULL. |
1643 |
|
|
* @error: Return location for error or %NULL. |
1644 |
|
|
* |
1645 |
|
|
* Synchronously invokes the <link linkend="gdbus-method-net-reactivated-Fprint-Device.DeleteEnrolledFingers">DeleteEnrolledFingers()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. |
1646 |
|
|
* |
1647 |
|
|
* See cc_fprintd_device_call_delete_enrolled_fingers() for the asynchronous version of this method. |
1648 |
|
|
* |
1649 |
|
|
* Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set. |
1650 |
|
|
*/ |
1651 |
|
|
gboolean |
1652 |
|
✗ |
cc_fprintd_device_call_delete_enrolled_fingers_sync ( |
1653 |
|
|
CcFprintdDevice *proxy, |
1654 |
|
|
const gchar *arg_username, |
1655 |
|
|
GCancellable *cancellable, |
1656 |
|
|
GError **error) |
1657 |
|
|
{ |
1658 |
|
|
GVariant *_ret; |
1659 |
|
✗ |
_ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), |
1660 |
|
|
"DeleteEnrolledFingers", |
1661 |
|
|
g_variant_new ("(s)", |
1662 |
|
|
arg_username), |
1663 |
|
|
G_DBUS_CALL_FLAGS_NONE, |
1664 |
|
|
-1, |
1665 |
|
|
cancellable, |
1666 |
|
|
error); |
1667 |
|
✗ |
if (_ret == NULL) |
1668 |
|
✗ |
goto _out; |
1669 |
|
✗ |
g_variant_get (_ret, |
1670 |
|
|
"()"); |
1671 |
|
✗ |
g_variant_unref (_ret); |
1672 |
|
✗ |
_out: |
1673 |
|
✗ |
return _ret != NULL; |
1674 |
|
|
} |
1675 |
|
|
|
1676 |
|
|
/** |
1677 |
|
|
* cc_fprintd_device_call_delete_enrolled_fingers2: |
1678 |
|
|
* @proxy: A #CcFprintdDeviceProxy. |
1679 |
|
|
* @cancellable: (nullable): A #GCancellable or %NULL. |
1680 |
|
|
* @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. |
1681 |
|
|
* @user_data: User data to pass to @callback. |
1682 |
|
|
* |
1683 |
|
|
* Asynchronously invokes the <link linkend="gdbus-method-net-reactivated-Fprint-Device.DeleteEnrolledFingers2">DeleteEnrolledFingers2()</link> D-Bus method on @proxy. |
1684 |
|
|
* When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
1685 |
|
|
* You can then call cc_fprintd_device_call_delete_enrolled_fingers2_finish() to get the result of the operation. |
1686 |
|
|
* |
1687 |
|
|
* See cc_fprintd_device_call_delete_enrolled_fingers2_sync() for the synchronous, blocking version of this method. |
1688 |
|
|
*/ |
1689 |
|
|
void |
1690 |
|
✗ |
cc_fprintd_device_call_delete_enrolled_fingers2 ( |
1691 |
|
|
CcFprintdDevice *proxy, |
1692 |
|
|
GCancellable *cancellable, |
1693 |
|
|
GAsyncReadyCallback callback, |
1694 |
|
|
gpointer user_data) |
1695 |
|
|
{ |
1696 |
|
✗ |
g_dbus_proxy_call (G_DBUS_PROXY (proxy), |
1697 |
|
|
"DeleteEnrolledFingers2", |
1698 |
|
|
g_variant_new ("()"), |
1699 |
|
|
G_DBUS_CALL_FLAGS_NONE, |
1700 |
|
|
-1, |
1701 |
|
|
cancellable, |
1702 |
|
|
callback, |
1703 |
|
|
user_data); |
1704 |
|
✗ |
} |
1705 |
|
|
|
1706 |
|
|
/** |
1707 |
|
|
* cc_fprintd_device_call_delete_enrolled_fingers2_finish: |
1708 |
|
|
* @proxy: A #CcFprintdDeviceProxy. |
1709 |
|
|
* @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to cc_fprintd_device_call_delete_enrolled_fingers2(). |
1710 |
|
|
* @error: Return location for error or %NULL. |
1711 |
|
|
* |
1712 |
|
|
* Finishes an operation started with cc_fprintd_device_call_delete_enrolled_fingers2(). |
1713 |
|
|
* |
1714 |
|
|
* Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set. |
1715 |
|
|
*/ |
1716 |
|
|
gboolean |
1717 |
|
✗ |
cc_fprintd_device_call_delete_enrolled_fingers2_finish ( |
1718 |
|
|
CcFprintdDevice *proxy, |
1719 |
|
|
GAsyncResult *res, |
1720 |
|
|
GError **error) |
1721 |
|
|
{ |
1722 |
|
|
GVariant *_ret; |
1723 |
|
✗ |
_ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); |
1724 |
|
✗ |
if (_ret == NULL) |
1725 |
|
✗ |
goto _out; |
1726 |
|
✗ |
g_variant_get (_ret, |
1727 |
|
|
"()"); |
1728 |
|
✗ |
g_variant_unref (_ret); |
1729 |
|
✗ |
_out: |
1730 |
|
✗ |
return _ret != NULL; |
1731 |
|
|
} |
1732 |
|
|
|
1733 |
|
|
/** |
1734 |
|
|
* cc_fprintd_device_call_delete_enrolled_fingers2_sync: |
1735 |
|
|
* @proxy: A #CcFprintdDeviceProxy. |
1736 |
|
|
* @cancellable: (nullable): A #GCancellable or %NULL. |
1737 |
|
|
* @error: Return location for error or %NULL. |
1738 |
|
|
* |
1739 |
|
|
* Synchronously invokes the <link linkend="gdbus-method-net-reactivated-Fprint-Device.DeleteEnrolledFingers2">DeleteEnrolledFingers2()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. |
1740 |
|
|
* |
1741 |
|
|
* See cc_fprintd_device_call_delete_enrolled_fingers2() for the asynchronous version of this method. |
1742 |
|
|
* |
1743 |
|
|
* Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set. |
1744 |
|
|
*/ |
1745 |
|
|
gboolean |
1746 |
|
✗ |
cc_fprintd_device_call_delete_enrolled_fingers2_sync ( |
1747 |
|
|
CcFprintdDevice *proxy, |
1748 |
|
|
GCancellable *cancellable, |
1749 |
|
|
GError **error) |
1750 |
|
|
{ |
1751 |
|
|
GVariant *_ret; |
1752 |
|
✗ |
_ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), |
1753 |
|
|
"DeleteEnrolledFingers2", |
1754 |
|
|
g_variant_new ("()"), |
1755 |
|
|
G_DBUS_CALL_FLAGS_NONE, |
1756 |
|
|
-1, |
1757 |
|
|
cancellable, |
1758 |
|
|
error); |
1759 |
|
✗ |
if (_ret == NULL) |
1760 |
|
✗ |
goto _out; |
1761 |
|
✗ |
g_variant_get (_ret, |
1762 |
|
|
"()"); |
1763 |
|
✗ |
g_variant_unref (_ret); |
1764 |
|
✗ |
_out: |
1765 |
|
✗ |
return _ret != NULL; |
1766 |
|
|
} |
1767 |
|
|
|
1768 |
|
|
/** |
1769 |
|
|
* cc_fprintd_device_call_claim: |
1770 |
|
|
* @proxy: A #CcFprintdDeviceProxy. |
1771 |
|
|
* @arg_username: Argument to pass with the method invocation. |
1772 |
|
|
* @cancellable: (nullable): A #GCancellable or %NULL. |
1773 |
|
|
* @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. |
1774 |
|
|
* @user_data: User data to pass to @callback. |
1775 |
|
|
* |
1776 |
|
|
* Asynchronously invokes the <link linkend="gdbus-method-net-reactivated-Fprint-Device.Claim">Claim()</link> D-Bus method on @proxy. |
1777 |
|
|
* When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
1778 |
|
|
* You can then call cc_fprintd_device_call_claim_finish() to get the result of the operation. |
1779 |
|
|
* |
1780 |
|
|
* See cc_fprintd_device_call_claim_sync() for the synchronous, blocking version of this method. |
1781 |
|
|
*/ |
1782 |
|
|
void |
1783 |
|
✗ |
cc_fprintd_device_call_claim ( |
1784 |
|
|
CcFprintdDevice *proxy, |
1785 |
|
|
const gchar *arg_username, |
1786 |
|
|
GCancellable *cancellable, |
1787 |
|
|
GAsyncReadyCallback callback, |
1788 |
|
|
gpointer user_data) |
1789 |
|
|
{ |
1790 |
|
✗ |
g_dbus_proxy_call (G_DBUS_PROXY (proxy), |
1791 |
|
|
"Claim", |
1792 |
|
|
g_variant_new ("(s)", |
1793 |
|
|
arg_username), |
1794 |
|
|
G_DBUS_CALL_FLAGS_NONE, |
1795 |
|
|
-1, |
1796 |
|
|
cancellable, |
1797 |
|
|
callback, |
1798 |
|
|
user_data); |
1799 |
|
✗ |
} |
1800 |
|
|
|
1801 |
|
|
/** |
1802 |
|
|
* cc_fprintd_device_call_claim_finish: |
1803 |
|
|
* @proxy: A #CcFprintdDeviceProxy. |
1804 |
|
|
* @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to cc_fprintd_device_call_claim(). |
1805 |
|
|
* @error: Return location for error or %NULL. |
1806 |
|
|
* |
1807 |
|
|
* Finishes an operation started with cc_fprintd_device_call_claim(). |
1808 |
|
|
* |
1809 |
|
|
* Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set. |
1810 |
|
|
*/ |
1811 |
|
|
gboolean |
1812 |
|
✗ |
cc_fprintd_device_call_claim_finish ( |
1813 |
|
|
CcFprintdDevice *proxy, |
1814 |
|
|
GAsyncResult *res, |
1815 |
|
|
GError **error) |
1816 |
|
|
{ |
1817 |
|
|
GVariant *_ret; |
1818 |
|
✗ |
_ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); |
1819 |
|
✗ |
if (_ret == NULL) |
1820 |
|
✗ |
goto _out; |
1821 |
|
✗ |
g_variant_get (_ret, |
1822 |
|
|
"()"); |
1823 |
|
✗ |
g_variant_unref (_ret); |
1824 |
|
✗ |
_out: |
1825 |
|
✗ |
return _ret != NULL; |
1826 |
|
|
} |
1827 |
|
|
|
1828 |
|
|
/** |
1829 |
|
|
* cc_fprintd_device_call_claim_sync: |
1830 |
|
|
* @proxy: A #CcFprintdDeviceProxy. |
1831 |
|
|
* @arg_username: Argument to pass with the method invocation. |
1832 |
|
|
* @cancellable: (nullable): A #GCancellable or %NULL. |
1833 |
|
|
* @error: Return location for error or %NULL. |
1834 |
|
|
* |
1835 |
|
|
* Synchronously invokes the <link linkend="gdbus-method-net-reactivated-Fprint-Device.Claim">Claim()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. |
1836 |
|
|
* |
1837 |
|
|
* See cc_fprintd_device_call_claim() for the asynchronous version of this method. |
1838 |
|
|
* |
1839 |
|
|
* Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set. |
1840 |
|
|
*/ |
1841 |
|
|
gboolean |
1842 |
|
✗ |
cc_fprintd_device_call_claim_sync ( |
1843 |
|
|
CcFprintdDevice *proxy, |
1844 |
|
|
const gchar *arg_username, |
1845 |
|
|
GCancellable *cancellable, |
1846 |
|
|
GError **error) |
1847 |
|
|
{ |
1848 |
|
|
GVariant *_ret; |
1849 |
|
✗ |
_ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), |
1850 |
|
|
"Claim", |
1851 |
|
|
g_variant_new ("(s)", |
1852 |
|
|
arg_username), |
1853 |
|
|
G_DBUS_CALL_FLAGS_NONE, |
1854 |
|
|
-1, |
1855 |
|
|
cancellable, |
1856 |
|
|
error); |
1857 |
|
✗ |
if (_ret == NULL) |
1858 |
|
✗ |
goto _out; |
1859 |
|
✗ |
g_variant_get (_ret, |
1860 |
|
|
"()"); |
1861 |
|
✗ |
g_variant_unref (_ret); |
1862 |
|
✗ |
_out: |
1863 |
|
✗ |
return _ret != NULL; |
1864 |
|
|
} |
1865 |
|
|
|
1866 |
|
|
/** |
1867 |
|
|
* cc_fprintd_device_call_release: |
1868 |
|
|
* @proxy: A #CcFprintdDeviceProxy. |
1869 |
|
|
* @cancellable: (nullable): A #GCancellable or %NULL. |
1870 |
|
|
* @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. |
1871 |
|
|
* @user_data: User data to pass to @callback. |
1872 |
|
|
* |
1873 |
|
|
* Asynchronously invokes the <link linkend="gdbus-method-net-reactivated-Fprint-Device.Release">Release()</link> D-Bus method on @proxy. |
1874 |
|
|
* When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
1875 |
|
|
* You can then call cc_fprintd_device_call_release_finish() to get the result of the operation. |
1876 |
|
|
* |
1877 |
|
|
* See cc_fprintd_device_call_release_sync() for the synchronous, blocking version of this method. |
1878 |
|
|
*/ |
1879 |
|
|
void |
1880 |
|
✗ |
cc_fprintd_device_call_release ( |
1881 |
|
|
CcFprintdDevice *proxy, |
1882 |
|
|
GCancellable *cancellable, |
1883 |
|
|
GAsyncReadyCallback callback, |
1884 |
|
|
gpointer user_data) |
1885 |
|
|
{ |
1886 |
|
✗ |
g_dbus_proxy_call (G_DBUS_PROXY (proxy), |
1887 |
|
|
"Release", |
1888 |
|
|
g_variant_new ("()"), |
1889 |
|
|
G_DBUS_CALL_FLAGS_NONE, |
1890 |
|
|
-1, |
1891 |
|
|
cancellable, |
1892 |
|
|
callback, |
1893 |
|
|
user_data); |
1894 |
|
✗ |
} |
1895 |
|
|
|
1896 |
|
|
/** |
1897 |
|
|
* cc_fprintd_device_call_release_finish: |
1898 |
|
|
* @proxy: A #CcFprintdDeviceProxy. |
1899 |
|
|
* @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to cc_fprintd_device_call_release(). |
1900 |
|
|
* @error: Return location for error or %NULL. |
1901 |
|
|
* |
1902 |
|
|
* Finishes an operation started with cc_fprintd_device_call_release(). |
1903 |
|
|
* |
1904 |
|
|
* Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set. |
1905 |
|
|
*/ |
1906 |
|
|
gboolean |
1907 |
|
✗ |
cc_fprintd_device_call_release_finish ( |
1908 |
|
|
CcFprintdDevice *proxy, |
1909 |
|
|
GAsyncResult *res, |
1910 |
|
|
GError **error) |
1911 |
|
|
{ |
1912 |
|
|
GVariant *_ret; |
1913 |
|
✗ |
_ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); |
1914 |
|
✗ |
if (_ret == NULL) |
1915 |
|
✗ |
goto _out; |
1916 |
|
✗ |
g_variant_get (_ret, |
1917 |
|
|
"()"); |
1918 |
|
✗ |
g_variant_unref (_ret); |
1919 |
|
✗ |
_out: |
1920 |
|
✗ |
return _ret != NULL; |
1921 |
|
|
} |
1922 |
|
|
|
1923 |
|
|
/** |
1924 |
|
|
* cc_fprintd_device_call_release_sync: |
1925 |
|
|
* @proxy: A #CcFprintdDeviceProxy. |
1926 |
|
|
* @cancellable: (nullable): A #GCancellable or %NULL. |
1927 |
|
|
* @error: Return location for error or %NULL. |
1928 |
|
|
* |
1929 |
|
|
* Synchronously invokes the <link linkend="gdbus-method-net-reactivated-Fprint-Device.Release">Release()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. |
1930 |
|
|
* |
1931 |
|
|
* See cc_fprintd_device_call_release() for the asynchronous version of this method. |
1932 |
|
|
* |
1933 |
|
|
* Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set. |
1934 |
|
|
*/ |
1935 |
|
|
gboolean |
1936 |
|
✗ |
cc_fprintd_device_call_release_sync ( |
1937 |
|
|
CcFprintdDevice *proxy, |
1938 |
|
|
GCancellable *cancellable, |
1939 |
|
|
GError **error) |
1940 |
|
|
{ |
1941 |
|
|
GVariant *_ret; |
1942 |
|
✗ |
_ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), |
1943 |
|
|
"Release", |
1944 |
|
|
g_variant_new ("()"), |
1945 |
|
|
G_DBUS_CALL_FLAGS_NONE, |
1946 |
|
|
-1, |
1947 |
|
|
cancellable, |
1948 |
|
|
error); |
1949 |
|
✗ |
if (_ret == NULL) |
1950 |
|
✗ |
goto _out; |
1951 |
|
✗ |
g_variant_get (_ret, |
1952 |
|
|
"()"); |
1953 |
|
✗ |
g_variant_unref (_ret); |
1954 |
|
✗ |
_out: |
1955 |
|
✗ |
return _ret != NULL; |
1956 |
|
|
} |
1957 |
|
|
|
1958 |
|
|
/** |
1959 |
|
|
* cc_fprintd_device_call_verify_start: |
1960 |
|
|
* @proxy: A #CcFprintdDeviceProxy. |
1961 |
|
|
* @arg_finger_name: Argument to pass with the method invocation. |
1962 |
|
|
* @cancellable: (nullable): A #GCancellable or %NULL. |
1963 |
|
|
* @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. |
1964 |
|
|
* @user_data: User data to pass to @callback. |
1965 |
|
|
* |
1966 |
|
|
* Asynchronously invokes the <link linkend="gdbus-method-net-reactivated-Fprint-Device.VerifyStart">VerifyStart()</link> D-Bus method on @proxy. |
1967 |
|
|
* When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
1968 |
|
|
* You can then call cc_fprintd_device_call_verify_start_finish() to get the result of the operation. |
1969 |
|
|
* |
1970 |
|
|
* See cc_fprintd_device_call_verify_start_sync() for the synchronous, blocking version of this method. |
1971 |
|
|
*/ |
1972 |
|
|
void |
1973 |
|
✗ |
cc_fprintd_device_call_verify_start ( |
1974 |
|
|
CcFprintdDevice *proxy, |
1975 |
|
|
const gchar *arg_finger_name, |
1976 |
|
|
GCancellable *cancellable, |
1977 |
|
|
GAsyncReadyCallback callback, |
1978 |
|
|
gpointer user_data) |
1979 |
|
|
{ |
1980 |
|
✗ |
g_dbus_proxy_call (G_DBUS_PROXY (proxy), |
1981 |
|
|
"VerifyStart", |
1982 |
|
|
g_variant_new ("(s)", |
1983 |
|
|
arg_finger_name), |
1984 |
|
|
G_DBUS_CALL_FLAGS_NONE, |
1985 |
|
|
-1, |
1986 |
|
|
cancellable, |
1987 |
|
|
callback, |
1988 |
|
|
user_data); |
1989 |
|
✗ |
} |
1990 |
|
|
|
1991 |
|
|
/** |
1992 |
|
|
* cc_fprintd_device_call_verify_start_finish: |
1993 |
|
|
* @proxy: A #CcFprintdDeviceProxy. |
1994 |
|
|
* @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to cc_fprintd_device_call_verify_start(). |
1995 |
|
|
* @error: Return location for error or %NULL. |
1996 |
|
|
* |
1997 |
|
|
* Finishes an operation started with cc_fprintd_device_call_verify_start(). |
1998 |
|
|
* |
1999 |
|
|
* Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set. |
2000 |
|
|
*/ |
2001 |
|
|
gboolean |
2002 |
|
✗ |
cc_fprintd_device_call_verify_start_finish ( |
2003 |
|
|
CcFprintdDevice *proxy, |
2004 |
|
|
GAsyncResult *res, |
2005 |
|
|
GError **error) |
2006 |
|
|
{ |
2007 |
|
|
GVariant *_ret; |
2008 |
|
✗ |
_ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); |
2009 |
|
✗ |
if (_ret == NULL) |
2010 |
|
✗ |
goto _out; |
2011 |
|
✗ |
g_variant_get (_ret, |
2012 |
|
|
"()"); |
2013 |
|
✗ |
g_variant_unref (_ret); |
2014 |
|
✗ |
_out: |
2015 |
|
✗ |
return _ret != NULL; |
2016 |
|
|
} |
2017 |
|
|
|
2018 |
|
|
/** |
2019 |
|
|
* cc_fprintd_device_call_verify_start_sync: |
2020 |
|
|
* @proxy: A #CcFprintdDeviceProxy. |
2021 |
|
|
* @arg_finger_name: Argument to pass with the method invocation. |
2022 |
|
|
* @cancellable: (nullable): A #GCancellable or %NULL. |
2023 |
|
|
* @error: Return location for error or %NULL. |
2024 |
|
|
* |
2025 |
|
|
* Synchronously invokes the <link linkend="gdbus-method-net-reactivated-Fprint-Device.VerifyStart">VerifyStart()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. |
2026 |
|
|
* |
2027 |
|
|
* See cc_fprintd_device_call_verify_start() for the asynchronous version of this method. |
2028 |
|
|
* |
2029 |
|
|
* Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set. |
2030 |
|
|
*/ |
2031 |
|
|
gboolean |
2032 |
|
✗ |
cc_fprintd_device_call_verify_start_sync ( |
2033 |
|
|
CcFprintdDevice *proxy, |
2034 |
|
|
const gchar *arg_finger_name, |
2035 |
|
|
GCancellable *cancellable, |
2036 |
|
|
GError **error) |
2037 |
|
|
{ |
2038 |
|
|
GVariant *_ret; |
2039 |
|
✗ |
_ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), |
2040 |
|
|
"VerifyStart", |
2041 |
|
|
g_variant_new ("(s)", |
2042 |
|
|
arg_finger_name), |
2043 |
|
|
G_DBUS_CALL_FLAGS_NONE, |
2044 |
|
|
-1, |
2045 |
|
|
cancellable, |
2046 |
|
|
error); |
2047 |
|
✗ |
if (_ret == NULL) |
2048 |
|
✗ |
goto _out; |
2049 |
|
✗ |
g_variant_get (_ret, |
2050 |
|
|
"()"); |
2051 |
|
✗ |
g_variant_unref (_ret); |
2052 |
|
✗ |
_out: |
2053 |
|
✗ |
return _ret != NULL; |
2054 |
|
|
} |
2055 |
|
|
|
2056 |
|
|
/** |
2057 |
|
|
* cc_fprintd_device_call_verify_stop: |
2058 |
|
|
* @proxy: A #CcFprintdDeviceProxy. |
2059 |
|
|
* @cancellable: (nullable): A #GCancellable or %NULL. |
2060 |
|
|
* @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. |
2061 |
|
|
* @user_data: User data to pass to @callback. |
2062 |
|
|
* |
2063 |
|
|
* Asynchronously invokes the <link linkend="gdbus-method-net-reactivated-Fprint-Device.VerifyStop">VerifyStop()</link> D-Bus method on @proxy. |
2064 |
|
|
* When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
2065 |
|
|
* You can then call cc_fprintd_device_call_verify_stop_finish() to get the result of the operation. |
2066 |
|
|
* |
2067 |
|
|
* See cc_fprintd_device_call_verify_stop_sync() for the synchronous, blocking version of this method. |
2068 |
|
|
*/ |
2069 |
|
|
void |
2070 |
|
✗ |
cc_fprintd_device_call_verify_stop ( |
2071 |
|
|
CcFprintdDevice *proxy, |
2072 |
|
|
GCancellable *cancellable, |
2073 |
|
|
GAsyncReadyCallback callback, |
2074 |
|
|
gpointer user_data) |
2075 |
|
|
{ |
2076 |
|
✗ |
g_dbus_proxy_call (G_DBUS_PROXY (proxy), |
2077 |
|
|
"VerifyStop", |
2078 |
|
|
g_variant_new ("()"), |
2079 |
|
|
G_DBUS_CALL_FLAGS_NONE, |
2080 |
|
|
-1, |
2081 |
|
|
cancellable, |
2082 |
|
|
callback, |
2083 |
|
|
user_data); |
2084 |
|
✗ |
} |
2085 |
|
|
|
2086 |
|
|
/** |
2087 |
|
|
* cc_fprintd_device_call_verify_stop_finish: |
2088 |
|
|
* @proxy: A #CcFprintdDeviceProxy. |
2089 |
|
|
* @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to cc_fprintd_device_call_verify_stop(). |
2090 |
|
|
* @error: Return location for error or %NULL. |
2091 |
|
|
* |
2092 |
|
|
* Finishes an operation started with cc_fprintd_device_call_verify_stop(). |
2093 |
|
|
* |
2094 |
|
|
* Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set. |
2095 |
|
|
*/ |
2096 |
|
|
gboolean |
2097 |
|
✗ |
cc_fprintd_device_call_verify_stop_finish ( |
2098 |
|
|
CcFprintdDevice *proxy, |
2099 |
|
|
GAsyncResult *res, |
2100 |
|
|
GError **error) |
2101 |
|
|
{ |
2102 |
|
|
GVariant *_ret; |
2103 |
|
✗ |
_ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); |
2104 |
|
✗ |
if (_ret == NULL) |
2105 |
|
✗ |
goto _out; |
2106 |
|
✗ |
g_variant_get (_ret, |
2107 |
|
|
"()"); |
2108 |
|
✗ |
g_variant_unref (_ret); |
2109 |
|
✗ |
_out: |
2110 |
|
✗ |
return _ret != NULL; |
2111 |
|
|
} |
2112 |
|
|
|
2113 |
|
|
/** |
2114 |
|
|
* cc_fprintd_device_call_verify_stop_sync: |
2115 |
|
|
* @proxy: A #CcFprintdDeviceProxy. |
2116 |
|
|
* @cancellable: (nullable): A #GCancellable or %NULL. |
2117 |
|
|
* @error: Return location for error or %NULL. |
2118 |
|
|
* |
2119 |
|
|
* Synchronously invokes the <link linkend="gdbus-method-net-reactivated-Fprint-Device.VerifyStop">VerifyStop()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. |
2120 |
|
|
* |
2121 |
|
|
* See cc_fprintd_device_call_verify_stop() for the asynchronous version of this method. |
2122 |
|
|
* |
2123 |
|
|
* Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set. |
2124 |
|
|
*/ |
2125 |
|
|
gboolean |
2126 |
|
✗ |
cc_fprintd_device_call_verify_stop_sync ( |
2127 |
|
|
CcFprintdDevice *proxy, |
2128 |
|
|
GCancellable *cancellable, |
2129 |
|
|
GError **error) |
2130 |
|
|
{ |
2131 |
|
|
GVariant *_ret; |
2132 |
|
✗ |
_ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), |
2133 |
|
|
"VerifyStop", |
2134 |
|
|
g_variant_new ("()"), |
2135 |
|
|
G_DBUS_CALL_FLAGS_NONE, |
2136 |
|
|
-1, |
2137 |
|
|
cancellable, |
2138 |
|
|
error); |
2139 |
|
✗ |
if (_ret == NULL) |
2140 |
|
✗ |
goto _out; |
2141 |
|
✗ |
g_variant_get (_ret, |
2142 |
|
|
"()"); |
2143 |
|
✗ |
g_variant_unref (_ret); |
2144 |
|
✗ |
_out: |
2145 |
|
✗ |
return _ret != NULL; |
2146 |
|
|
} |
2147 |
|
|
|
2148 |
|
|
/** |
2149 |
|
|
* cc_fprintd_device_call_enroll_start: |
2150 |
|
|
* @proxy: A #CcFprintdDeviceProxy. |
2151 |
|
|
* @arg_finger_name: Argument to pass with the method invocation. |
2152 |
|
|
* @cancellable: (nullable): A #GCancellable or %NULL. |
2153 |
|
|
* @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. |
2154 |
|
|
* @user_data: User data to pass to @callback. |
2155 |
|
|
* |
2156 |
|
|
* Asynchronously invokes the <link linkend="gdbus-method-net-reactivated-Fprint-Device.EnrollStart">EnrollStart()</link> D-Bus method on @proxy. |
2157 |
|
|
* When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
2158 |
|
|
* You can then call cc_fprintd_device_call_enroll_start_finish() to get the result of the operation. |
2159 |
|
|
* |
2160 |
|
|
* See cc_fprintd_device_call_enroll_start_sync() for the synchronous, blocking version of this method. |
2161 |
|
|
*/ |
2162 |
|
|
void |
2163 |
|
✗ |
cc_fprintd_device_call_enroll_start ( |
2164 |
|
|
CcFprintdDevice *proxy, |
2165 |
|
|
const gchar *arg_finger_name, |
2166 |
|
|
GCancellable *cancellable, |
2167 |
|
|
GAsyncReadyCallback callback, |
2168 |
|
|
gpointer user_data) |
2169 |
|
|
{ |
2170 |
|
✗ |
g_dbus_proxy_call (G_DBUS_PROXY (proxy), |
2171 |
|
|
"EnrollStart", |
2172 |
|
|
g_variant_new ("(s)", |
2173 |
|
|
arg_finger_name), |
2174 |
|
|
G_DBUS_CALL_FLAGS_NONE, |
2175 |
|
|
-1, |
2176 |
|
|
cancellable, |
2177 |
|
|
callback, |
2178 |
|
|
user_data); |
2179 |
|
✗ |
} |
2180 |
|
|
|
2181 |
|
|
/** |
2182 |
|
|
* cc_fprintd_device_call_enroll_start_finish: |
2183 |
|
|
* @proxy: A #CcFprintdDeviceProxy. |
2184 |
|
|
* @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to cc_fprintd_device_call_enroll_start(). |
2185 |
|
|
* @error: Return location for error or %NULL. |
2186 |
|
|
* |
2187 |
|
|
* Finishes an operation started with cc_fprintd_device_call_enroll_start(). |
2188 |
|
|
* |
2189 |
|
|
* Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set. |
2190 |
|
|
*/ |
2191 |
|
|
gboolean |
2192 |
|
✗ |
cc_fprintd_device_call_enroll_start_finish ( |
2193 |
|
|
CcFprintdDevice *proxy, |
2194 |
|
|
GAsyncResult *res, |
2195 |
|
|
GError **error) |
2196 |
|
|
{ |
2197 |
|
|
GVariant *_ret; |
2198 |
|
✗ |
_ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); |
2199 |
|
✗ |
if (_ret == NULL) |
2200 |
|
✗ |
goto _out; |
2201 |
|
✗ |
g_variant_get (_ret, |
2202 |
|
|
"()"); |
2203 |
|
✗ |
g_variant_unref (_ret); |
2204 |
|
✗ |
_out: |
2205 |
|
✗ |
return _ret != NULL; |
2206 |
|
|
} |
2207 |
|
|
|
2208 |
|
|
/** |
2209 |
|
|
* cc_fprintd_device_call_enroll_start_sync: |
2210 |
|
|
* @proxy: A #CcFprintdDeviceProxy. |
2211 |
|
|
* @arg_finger_name: Argument to pass with the method invocation. |
2212 |
|
|
* @cancellable: (nullable): A #GCancellable or %NULL. |
2213 |
|
|
* @error: Return location for error or %NULL. |
2214 |
|
|
* |
2215 |
|
|
* Synchronously invokes the <link linkend="gdbus-method-net-reactivated-Fprint-Device.EnrollStart">EnrollStart()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. |
2216 |
|
|
* |
2217 |
|
|
* See cc_fprintd_device_call_enroll_start() for the asynchronous version of this method. |
2218 |
|
|
* |
2219 |
|
|
* Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set. |
2220 |
|
|
*/ |
2221 |
|
|
gboolean |
2222 |
|
✗ |
cc_fprintd_device_call_enroll_start_sync ( |
2223 |
|
|
CcFprintdDevice *proxy, |
2224 |
|
|
const gchar *arg_finger_name, |
2225 |
|
|
GCancellable *cancellable, |
2226 |
|
|
GError **error) |
2227 |
|
|
{ |
2228 |
|
|
GVariant *_ret; |
2229 |
|
✗ |
_ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), |
2230 |
|
|
"EnrollStart", |
2231 |
|
|
g_variant_new ("(s)", |
2232 |
|
|
arg_finger_name), |
2233 |
|
|
G_DBUS_CALL_FLAGS_NONE, |
2234 |
|
|
-1, |
2235 |
|
|
cancellable, |
2236 |
|
|
error); |
2237 |
|
✗ |
if (_ret == NULL) |
2238 |
|
✗ |
goto _out; |
2239 |
|
✗ |
g_variant_get (_ret, |
2240 |
|
|
"()"); |
2241 |
|
✗ |
g_variant_unref (_ret); |
2242 |
|
✗ |
_out: |
2243 |
|
✗ |
return _ret != NULL; |
2244 |
|
|
} |
2245 |
|
|
|
2246 |
|
|
/** |
2247 |
|
|
* cc_fprintd_device_call_enroll_stop: |
2248 |
|
|
* @proxy: A #CcFprintdDeviceProxy. |
2249 |
|
|
* @cancellable: (nullable): A #GCancellable or %NULL. |
2250 |
|
|
* @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. |
2251 |
|
|
* @user_data: User data to pass to @callback. |
2252 |
|
|
* |
2253 |
|
|
* Asynchronously invokes the <link linkend="gdbus-method-net-reactivated-Fprint-Device.EnrollStop">EnrollStop()</link> D-Bus method on @proxy. |
2254 |
|
|
* When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
2255 |
|
|
* You can then call cc_fprintd_device_call_enroll_stop_finish() to get the result of the operation. |
2256 |
|
|
* |
2257 |
|
|
* See cc_fprintd_device_call_enroll_stop_sync() for the synchronous, blocking version of this method. |
2258 |
|
|
*/ |
2259 |
|
|
void |
2260 |
|
✗ |
cc_fprintd_device_call_enroll_stop ( |
2261 |
|
|
CcFprintdDevice *proxy, |
2262 |
|
|
GCancellable *cancellable, |
2263 |
|
|
GAsyncReadyCallback callback, |
2264 |
|
|
gpointer user_data) |
2265 |
|
|
{ |
2266 |
|
✗ |
g_dbus_proxy_call (G_DBUS_PROXY (proxy), |
2267 |
|
|
"EnrollStop", |
2268 |
|
|
g_variant_new ("()"), |
2269 |
|
|
G_DBUS_CALL_FLAGS_NONE, |
2270 |
|
|
-1, |
2271 |
|
|
cancellable, |
2272 |
|
|
callback, |
2273 |
|
|
user_data); |
2274 |
|
✗ |
} |
2275 |
|
|
|
2276 |
|
|
/** |
2277 |
|
|
* cc_fprintd_device_call_enroll_stop_finish: |
2278 |
|
|
* @proxy: A #CcFprintdDeviceProxy. |
2279 |
|
|
* @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to cc_fprintd_device_call_enroll_stop(). |
2280 |
|
|
* @error: Return location for error or %NULL. |
2281 |
|
|
* |
2282 |
|
|
* Finishes an operation started with cc_fprintd_device_call_enroll_stop(). |
2283 |
|
|
* |
2284 |
|
|
* Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set. |
2285 |
|
|
*/ |
2286 |
|
|
gboolean |
2287 |
|
✗ |
cc_fprintd_device_call_enroll_stop_finish ( |
2288 |
|
|
CcFprintdDevice *proxy, |
2289 |
|
|
GAsyncResult *res, |
2290 |
|
|
GError **error) |
2291 |
|
|
{ |
2292 |
|
|
GVariant *_ret; |
2293 |
|
✗ |
_ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); |
2294 |
|
✗ |
if (_ret == NULL) |
2295 |
|
✗ |
goto _out; |
2296 |
|
✗ |
g_variant_get (_ret, |
2297 |
|
|
"()"); |
2298 |
|
✗ |
g_variant_unref (_ret); |
2299 |
|
✗ |
_out: |
2300 |
|
✗ |
return _ret != NULL; |
2301 |
|
|
} |
2302 |
|
|
|
2303 |
|
|
/** |
2304 |
|
|
* cc_fprintd_device_call_enroll_stop_sync: |
2305 |
|
|
* @proxy: A #CcFprintdDeviceProxy. |
2306 |
|
|
* @cancellable: (nullable): A #GCancellable or %NULL. |
2307 |
|
|
* @error: Return location for error or %NULL. |
2308 |
|
|
* |
2309 |
|
|
* Synchronously invokes the <link linkend="gdbus-method-net-reactivated-Fprint-Device.EnrollStop">EnrollStop()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. |
2310 |
|
|
* |
2311 |
|
|
* See cc_fprintd_device_call_enroll_stop() for the asynchronous version of this method. |
2312 |
|
|
* |
2313 |
|
|
* Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set. |
2314 |
|
|
*/ |
2315 |
|
|
gboolean |
2316 |
|
✗ |
cc_fprintd_device_call_enroll_stop_sync ( |
2317 |
|
|
CcFprintdDevice *proxy, |
2318 |
|
|
GCancellable *cancellable, |
2319 |
|
|
GError **error) |
2320 |
|
|
{ |
2321 |
|
|
GVariant *_ret; |
2322 |
|
✗ |
_ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), |
2323 |
|
|
"EnrollStop", |
2324 |
|
|
g_variant_new ("()"), |
2325 |
|
|
G_DBUS_CALL_FLAGS_NONE, |
2326 |
|
|
-1, |
2327 |
|
|
cancellable, |
2328 |
|
|
error); |
2329 |
|
✗ |
if (_ret == NULL) |
2330 |
|
✗ |
goto _out; |
2331 |
|
✗ |
g_variant_get (_ret, |
2332 |
|
|
"()"); |
2333 |
|
✗ |
g_variant_unref (_ret); |
2334 |
|
✗ |
_out: |
2335 |
|
✗ |
return _ret != NULL; |
2336 |
|
|
} |
2337 |
|
|
|
2338 |
|
|
/** |
2339 |
|
|
* cc_fprintd_device_complete_list_enrolled_fingers: |
2340 |
|
|
* @object: A #CcFprintdDevice. |
2341 |
|
|
* @invocation: (transfer full): A #GDBusMethodInvocation. |
2342 |
|
|
* @enrolled_fingers: Parameter to return. |
2343 |
|
|
* |
2344 |
|
|
* Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-net-reactivated-Fprint-Device.ListEnrolledFingers">ListEnrolledFingers()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. |
2345 |
|
|
* |
2346 |
|
|
* This method will free @invocation, you cannot use it afterwards. |
2347 |
|
|
*/ |
2348 |
|
|
void |
2349 |
|
✗ |
cc_fprintd_device_complete_list_enrolled_fingers ( |
2350 |
|
|
CcFprintdDevice *object G_GNUC_UNUSED, |
2351 |
|
|
GDBusMethodInvocation *invocation, |
2352 |
|
|
const gchar *const *enrolled_fingers) |
2353 |
|
|
{ |
2354 |
|
✗ |
g_dbus_method_invocation_return_value (invocation, |
2355 |
|
|
g_variant_new ("(^as)", |
2356 |
|
|
enrolled_fingers)); |
2357 |
|
✗ |
} |
2358 |
|
|
|
2359 |
|
|
/** |
2360 |
|
|
* cc_fprintd_device_complete_delete_enrolled_fingers: |
2361 |
|
|
* @object: A #CcFprintdDevice. |
2362 |
|
|
* @invocation: (transfer full): A #GDBusMethodInvocation. |
2363 |
|
|
* |
2364 |
|
|
* Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-net-reactivated-Fprint-Device.DeleteEnrolledFingers">DeleteEnrolledFingers()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. |
2365 |
|
|
* |
2366 |
|
|
* This method will free @invocation, you cannot use it afterwards. |
2367 |
|
|
*/ |
2368 |
|
|
void |
2369 |
|
✗ |
cc_fprintd_device_complete_delete_enrolled_fingers ( |
2370 |
|
|
CcFprintdDevice *object G_GNUC_UNUSED, |
2371 |
|
|
GDBusMethodInvocation *invocation) |
2372 |
|
|
{ |
2373 |
|
✗ |
g_dbus_method_invocation_return_value (invocation, |
2374 |
|
|
g_variant_new ("()")); |
2375 |
|
✗ |
} |
2376 |
|
|
|
2377 |
|
|
/** |
2378 |
|
|
* cc_fprintd_device_complete_delete_enrolled_fingers2: |
2379 |
|
|
* @object: A #CcFprintdDevice. |
2380 |
|
|
* @invocation: (transfer full): A #GDBusMethodInvocation. |
2381 |
|
|
* |
2382 |
|
|
* Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-net-reactivated-Fprint-Device.DeleteEnrolledFingers2">DeleteEnrolledFingers2()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. |
2383 |
|
|
* |
2384 |
|
|
* This method will free @invocation, you cannot use it afterwards. |
2385 |
|
|
*/ |
2386 |
|
|
void |
2387 |
|
✗ |
cc_fprintd_device_complete_delete_enrolled_fingers2 ( |
2388 |
|
|
CcFprintdDevice *object G_GNUC_UNUSED, |
2389 |
|
|
GDBusMethodInvocation *invocation) |
2390 |
|
|
{ |
2391 |
|
✗ |
g_dbus_method_invocation_return_value (invocation, |
2392 |
|
|
g_variant_new ("()")); |
2393 |
|
✗ |
} |
2394 |
|
|
|
2395 |
|
|
/** |
2396 |
|
|
* cc_fprintd_device_complete_claim: |
2397 |
|
|
* @object: A #CcFprintdDevice. |
2398 |
|
|
* @invocation: (transfer full): A #GDBusMethodInvocation. |
2399 |
|
|
* |
2400 |
|
|
* Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-net-reactivated-Fprint-Device.Claim">Claim()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. |
2401 |
|
|
* |
2402 |
|
|
* This method will free @invocation, you cannot use it afterwards. |
2403 |
|
|
*/ |
2404 |
|
|
void |
2405 |
|
✗ |
cc_fprintd_device_complete_claim ( |
2406 |
|
|
CcFprintdDevice *object G_GNUC_UNUSED, |
2407 |
|
|
GDBusMethodInvocation *invocation) |
2408 |
|
|
{ |
2409 |
|
✗ |
g_dbus_method_invocation_return_value (invocation, |
2410 |
|
|
g_variant_new ("()")); |
2411 |
|
✗ |
} |
2412 |
|
|
|
2413 |
|
|
/** |
2414 |
|
|
* cc_fprintd_device_complete_release: |
2415 |
|
|
* @object: A #CcFprintdDevice. |
2416 |
|
|
* @invocation: (transfer full): A #GDBusMethodInvocation. |
2417 |
|
|
* |
2418 |
|
|
* Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-net-reactivated-Fprint-Device.Release">Release()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. |
2419 |
|
|
* |
2420 |
|
|
* This method will free @invocation, you cannot use it afterwards. |
2421 |
|
|
*/ |
2422 |
|
|
void |
2423 |
|
✗ |
cc_fprintd_device_complete_release ( |
2424 |
|
|
CcFprintdDevice *object G_GNUC_UNUSED, |
2425 |
|
|
GDBusMethodInvocation *invocation) |
2426 |
|
|
{ |
2427 |
|
✗ |
g_dbus_method_invocation_return_value (invocation, |
2428 |
|
|
g_variant_new ("()")); |
2429 |
|
✗ |
} |
2430 |
|
|
|
2431 |
|
|
/** |
2432 |
|
|
* cc_fprintd_device_complete_verify_start: |
2433 |
|
|
* @object: A #CcFprintdDevice. |
2434 |
|
|
* @invocation: (transfer full): A #GDBusMethodInvocation. |
2435 |
|
|
* |
2436 |
|
|
* Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-net-reactivated-Fprint-Device.VerifyStart">VerifyStart()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. |
2437 |
|
|
* |
2438 |
|
|
* This method will free @invocation, you cannot use it afterwards. |
2439 |
|
|
*/ |
2440 |
|
|
void |
2441 |
|
✗ |
cc_fprintd_device_complete_verify_start ( |
2442 |
|
|
CcFprintdDevice *object G_GNUC_UNUSED, |
2443 |
|
|
GDBusMethodInvocation *invocation) |
2444 |
|
|
{ |
2445 |
|
✗ |
g_dbus_method_invocation_return_value (invocation, |
2446 |
|
|
g_variant_new ("()")); |
2447 |
|
✗ |
} |
2448 |
|
|
|
2449 |
|
|
/** |
2450 |
|
|
* cc_fprintd_device_complete_verify_stop: |
2451 |
|
|
* @object: A #CcFprintdDevice. |
2452 |
|
|
* @invocation: (transfer full): A #GDBusMethodInvocation. |
2453 |
|
|
* |
2454 |
|
|
* Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-net-reactivated-Fprint-Device.VerifyStop">VerifyStop()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. |
2455 |
|
|
* |
2456 |
|
|
* This method will free @invocation, you cannot use it afterwards. |
2457 |
|
|
*/ |
2458 |
|
|
void |
2459 |
|
✗ |
cc_fprintd_device_complete_verify_stop ( |
2460 |
|
|
CcFprintdDevice *object G_GNUC_UNUSED, |
2461 |
|
|
GDBusMethodInvocation *invocation) |
2462 |
|
|
{ |
2463 |
|
✗ |
g_dbus_method_invocation_return_value (invocation, |
2464 |
|
|
g_variant_new ("()")); |
2465 |
|
✗ |
} |
2466 |
|
|
|
2467 |
|
|
/** |
2468 |
|
|
* cc_fprintd_device_complete_enroll_start: |
2469 |
|
|
* @object: A #CcFprintdDevice. |
2470 |
|
|
* @invocation: (transfer full): A #GDBusMethodInvocation. |
2471 |
|
|
* |
2472 |
|
|
* Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-net-reactivated-Fprint-Device.EnrollStart">EnrollStart()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. |
2473 |
|
|
* |
2474 |
|
|
* This method will free @invocation, you cannot use it afterwards. |
2475 |
|
|
*/ |
2476 |
|
|
void |
2477 |
|
✗ |
cc_fprintd_device_complete_enroll_start ( |
2478 |
|
|
CcFprintdDevice *object G_GNUC_UNUSED, |
2479 |
|
|
GDBusMethodInvocation *invocation) |
2480 |
|
|
{ |
2481 |
|
✗ |
g_dbus_method_invocation_return_value (invocation, |
2482 |
|
|
g_variant_new ("()")); |
2483 |
|
✗ |
} |
2484 |
|
|
|
2485 |
|
|
/** |
2486 |
|
|
* cc_fprintd_device_complete_enroll_stop: |
2487 |
|
|
* @object: A #CcFprintdDevice. |
2488 |
|
|
* @invocation: (transfer full): A #GDBusMethodInvocation. |
2489 |
|
|
* |
2490 |
|
|
* Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-net-reactivated-Fprint-Device.EnrollStop">EnrollStop()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. |
2491 |
|
|
* |
2492 |
|
|
* This method will free @invocation, you cannot use it afterwards. |
2493 |
|
|
*/ |
2494 |
|
|
void |
2495 |
|
✗ |
cc_fprintd_device_complete_enroll_stop ( |
2496 |
|
|
CcFprintdDevice *object G_GNUC_UNUSED, |
2497 |
|
|
GDBusMethodInvocation *invocation) |
2498 |
|
|
{ |
2499 |
|
✗ |
g_dbus_method_invocation_return_value (invocation, |
2500 |
|
|
g_variant_new ("()")); |
2501 |
|
✗ |
} |
2502 |
|
|
|
2503 |
|
|
/* ------------------------------------------------------------------------ */ |
2504 |
|
|
|
2505 |
|
|
/** |
2506 |
|
|
* CcFprintdDeviceProxy: |
2507 |
|
|
* |
2508 |
|
|
* The #CcFprintdDeviceProxy structure contains only private data and should only be accessed using the provided API. |
2509 |
|
|
*/ |
2510 |
|
|
|
2511 |
|
|
/** |
2512 |
|
|
* CcFprintdDeviceProxyClass: |
2513 |
|
|
* @parent_class: The parent class. |
2514 |
|
|
* |
2515 |
|
|
* Class structure for #CcFprintdDeviceProxy. |
2516 |
|
|
*/ |
2517 |
|
|
|
2518 |
|
|
struct _CcFprintdDeviceProxyPrivate |
2519 |
|
|
{ |
2520 |
|
|
GData *qdata; |
2521 |
|
|
}; |
2522 |
|
|
|
2523 |
|
|
static void cc_fprintd_device_proxy_iface_init (CcFprintdDeviceIface *iface); |
2524 |
|
|
|
2525 |
|
|
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 |
2526 |
|
✗ |
G_DEFINE_TYPE_WITH_CODE (CcFprintdDeviceProxy, cc_fprintd_device_proxy, G_TYPE_DBUS_PROXY, |
2527 |
|
|
G_ADD_PRIVATE (CcFprintdDeviceProxy) |
2528 |
|
|
G_IMPLEMENT_INTERFACE (CC_FPRINTD_TYPE_DEVICE, cc_fprintd_device_proxy_iface_init)) |
2529 |
|
|
|
2530 |
|
|
#else |
2531 |
|
|
G_DEFINE_TYPE_WITH_CODE (CcFprintdDeviceProxy, cc_fprintd_device_proxy, G_TYPE_DBUS_PROXY, |
2532 |
|
|
G_IMPLEMENT_INTERFACE (CC_FPRINTD_TYPE_DEVICE, cc_fprintd_device_proxy_iface_init)) |
2533 |
|
|
|
2534 |
|
|
#endif |
2535 |
|
|
static void |
2536 |
|
✗ |
cc_fprintd_device_proxy_finalize (GObject *object) |
2537 |
|
|
{ |
2538 |
|
✗ |
CcFprintdDeviceProxy *proxy = CC_FPRINTD_DEVICE_PROXY (object); |
2539 |
|
✗ |
g_datalist_clear (&proxy->priv->qdata); |
2540 |
|
✗ |
G_OBJECT_CLASS (cc_fprintd_device_proxy_parent_class)->finalize (object); |
2541 |
|
✗ |
} |
2542 |
|
|
|
2543 |
|
|
static void |
2544 |
|
✗ |
cc_fprintd_device_proxy_get_property (GObject *object, |
2545 |
|
|
guint prop_id, |
2546 |
|
|
GValue *value, |
2547 |
|
|
GParamSpec *pspec G_GNUC_UNUSED) |
2548 |
|
|
{ |
2549 |
|
|
const _ExtendedGDBusPropertyInfo *info; |
2550 |
|
|
GVariant *variant; |
2551 |
|
✗ |
g_assert (prop_id != 0 && prop_id - 1 < 3); |
2552 |
|
✗ |
info = (const _ExtendedGDBusPropertyInfo *) _cc_fprintd_device_property_info_pointers[prop_id - 1]; |
2553 |
|
✗ |
variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name); |
2554 |
|
✗ |
if (info->use_gvariant) |
2555 |
|
|
{ |
2556 |
|
✗ |
g_value_set_variant (value, variant); |
2557 |
|
|
} |
2558 |
|
|
else |
2559 |
|
|
{ |
2560 |
|
✗ |
if (variant != NULL) |
2561 |
|
✗ |
g_dbus_gvariant_to_gvalue (variant, value); |
2562 |
|
|
} |
2563 |
|
✗ |
if (variant != NULL) |
2564 |
|
✗ |
g_variant_unref (variant); |
2565 |
|
✗ |
} |
2566 |
|
|
|
2567 |
|
|
static void |
2568 |
|
✗ |
cc_fprintd_device_proxy_set_property_cb (GDBusProxy *proxy, |
2569 |
|
|
GAsyncResult *res, |
2570 |
|
|
gpointer user_data) |
2571 |
|
|
{ |
2572 |
|
✗ |
const _ExtendedGDBusPropertyInfo *info = user_data; |
2573 |
|
|
GError *error; |
2574 |
|
|
GVariant *_ret; |
2575 |
|
✗ |
error = NULL; |
2576 |
|
✗ |
_ret = g_dbus_proxy_call_finish (proxy, res, &error); |
2577 |
|
✗ |
if (!_ret) |
2578 |
|
|
{ |
2579 |
|
✗ |
g_warning ("Error setting property '%s' on interface net.reactivated.Fprint.Device: %s (%s, %d)", |
2580 |
|
|
info->parent_struct.name, |
2581 |
|
|
error->message, g_quark_to_string (error->domain), error->code); |
2582 |
|
✗ |
g_error_free (error); |
2583 |
|
|
} |
2584 |
|
|
else |
2585 |
|
|
{ |
2586 |
|
✗ |
g_variant_unref (_ret); |
2587 |
|
|
} |
2588 |
|
✗ |
} |
2589 |
|
|
|
2590 |
|
|
static void |
2591 |
|
✗ |
cc_fprintd_device_proxy_set_property (GObject *object, |
2592 |
|
|
guint prop_id, |
2593 |
|
|
const GValue *value, |
2594 |
|
|
GParamSpec *pspec G_GNUC_UNUSED) |
2595 |
|
|
{ |
2596 |
|
|
const _ExtendedGDBusPropertyInfo *info; |
2597 |
|
|
GVariant *variant; |
2598 |
|
✗ |
g_assert (prop_id != 0 && prop_id - 1 < 3); |
2599 |
|
✗ |
info = (const _ExtendedGDBusPropertyInfo *) _cc_fprintd_device_property_info_pointers[prop_id - 1]; |
2600 |
|
✗ |
variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature)); |
2601 |
|
✗ |
g_dbus_proxy_call (G_DBUS_PROXY (object), |
2602 |
|
|
"org.freedesktop.DBus.Properties.Set", |
2603 |
|
✗ |
g_variant_new ("(ssv)", "net.reactivated.Fprint.Device", info->parent_struct.name, variant), |
2604 |
|
|
G_DBUS_CALL_FLAGS_NONE, |
2605 |
|
|
-1, |
2606 |
|
✗ |
NULL, (GAsyncReadyCallback) cc_fprintd_device_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct); |
2607 |
|
✗ |
g_variant_unref (variant); |
2608 |
|
✗ |
} |
2609 |
|
|
|
2610 |
|
|
static void |
2611 |
|
✗ |
cc_fprintd_device_proxy_g_signal (GDBusProxy *proxy, |
2612 |
|
|
const gchar *sender_name G_GNUC_UNUSED, |
2613 |
|
|
const gchar *signal_name, |
2614 |
|
|
GVariant *parameters) |
2615 |
|
|
{ |
2616 |
|
|
_ExtendedGDBusSignalInfo *info; |
2617 |
|
|
GVariantIter iter; |
2618 |
|
|
GVariant *child; |
2619 |
|
|
GValue *paramv; |
2620 |
|
|
gsize num_params; |
2621 |
|
|
gsize n; |
2622 |
|
|
guint signal_id; |
2623 |
|
✗ |
info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_cc_fprintd_device_interface_info.parent_struct, signal_name); |
2624 |
|
✗ |
if (info == NULL) |
2625 |
|
✗ |
return; |
2626 |
|
✗ |
num_params = g_variant_n_children (parameters); |
2627 |
|
✗ |
paramv = g_new0 (GValue, num_params + 1); |
2628 |
|
✗ |
g_value_init (¶mv[0], CC_FPRINTD_TYPE_DEVICE); |
2629 |
|
✗ |
g_value_set_object (¶mv[0], proxy); |
2630 |
|
✗ |
g_variant_iter_init (&iter, parameters); |
2631 |
|
✗ |
n = 1; |
2632 |
|
✗ |
while ((child = g_variant_iter_next_value (&iter)) != NULL) |
2633 |
|
|
{ |
2634 |
|
✗ |
_ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1]; |
2635 |
|
✗ |
if (arg_info->use_gvariant) |
2636 |
|
|
{ |
2637 |
|
✗ |
g_value_init (¶mv[n], G_TYPE_VARIANT); |
2638 |
|
✗ |
g_value_set_variant (¶mv[n], child); |
2639 |
|
✗ |
n++; |
2640 |
|
|
} |
2641 |
|
|
else |
2642 |
|
✗ |
g_dbus_gvariant_to_gvalue (child, ¶mv[n++]); |
2643 |
|
✗ |
g_variant_unref (child); |
2644 |
|
|
} |
2645 |
|
✗ |
signal_id = g_signal_lookup (info->signal_name, CC_FPRINTD_TYPE_DEVICE); |
2646 |
|
✗ |
g_signal_emitv (paramv, signal_id, 0, NULL); |
2647 |
|
✗ |
for (n = 0; n < num_params + 1; n++) |
2648 |
|
✗ |
g_value_unset (¶mv[n]); |
2649 |
|
✗ |
g_free (paramv); |
2650 |
|
|
} |
2651 |
|
|
|
2652 |
|
|
static void |
2653 |
|
✗ |
cc_fprintd_device_proxy_g_properties_changed (GDBusProxy *_proxy, |
2654 |
|
|
GVariant *changed_properties, |
2655 |
|
|
const gchar *const *invalidated_properties) |
2656 |
|
|
{ |
2657 |
|
✗ |
CcFprintdDeviceProxy *proxy = CC_FPRINTD_DEVICE_PROXY (_proxy); |
2658 |
|
|
guint n; |
2659 |
|
|
const gchar *key; |
2660 |
|
|
GVariantIter *iter; |
2661 |
|
|
_ExtendedGDBusPropertyInfo *info; |
2662 |
|
✗ |
g_variant_get (changed_properties, "a{sv}", &iter); |
2663 |
|
✗ |
while (g_variant_iter_next (iter, "{&sv}", &key, NULL)) |
2664 |
|
|
{ |
2665 |
|
✗ |
info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_cc_fprintd_device_interface_info.parent_struct, key); |
2666 |
|
✗ |
g_datalist_remove_data (&proxy->priv->qdata, key); |
2667 |
|
✗ |
if (info != NULL) |
2668 |
|
✗ |
g_object_notify (G_OBJECT (proxy), info->hyphen_name); |
2669 |
|
|
} |
2670 |
|
✗ |
g_variant_iter_free (iter); |
2671 |
|
✗ |
for (n = 0; invalidated_properties[n] != NULL; n++) |
2672 |
|
|
{ |
2673 |
|
✗ |
info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_cc_fprintd_device_interface_info.parent_struct, invalidated_properties[n]); |
2674 |
|
✗ |
g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]); |
2675 |
|
✗ |
if (info != NULL) |
2676 |
|
✗ |
g_object_notify (G_OBJECT (proxy), info->hyphen_name); |
2677 |
|
|
} |
2678 |
|
✗ |
} |
2679 |
|
|
|
2680 |
|
|
static const gchar * |
2681 |
|
✗ |
cc_fprintd_device_proxy_get_name (CcFprintdDevice *object) |
2682 |
|
|
{ |
2683 |
|
✗ |
CcFprintdDeviceProxy *proxy = CC_FPRINTD_DEVICE_PROXY (object); |
2684 |
|
|
GVariant *variant; |
2685 |
|
✗ |
const gchar *value = NULL; |
2686 |
|
✗ |
variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "name"); |
2687 |
|
✗ |
if (variant != NULL) |
2688 |
|
|
{ |
2689 |
|
✗ |
value = g_variant_get_string (variant, NULL); |
2690 |
|
✗ |
g_variant_unref (variant); |
2691 |
|
|
} |
2692 |
|
✗ |
return value; |
2693 |
|
|
} |
2694 |
|
|
|
2695 |
|
|
static gint |
2696 |
|
✗ |
cc_fprintd_device_proxy_get_num_enroll_stages (CcFprintdDevice *object) |
2697 |
|
|
{ |
2698 |
|
✗ |
CcFprintdDeviceProxy *proxy = CC_FPRINTD_DEVICE_PROXY (object); |
2699 |
|
|
GVariant *variant; |
2700 |
|
✗ |
gint value = 0; |
2701 |
|
✗ |
variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "num-enroll-stages"); |
2702 |
|
✗ |
if (variant != NULL) |
2703 |
|
|
{ |
2704 |
|
✗ |
value = g_variant_get_int32 (variant); |
2705 |
|
✗ |
g_variant_unref (variant); |
2706 |
|
|
} |
2707 |
|
✗ |
return value; |
2708 |
|
|
} |
2709 |
|
|
|
2710 |
|
|
static const gchar * |
2711 |
|
✗ |
cc_fprintd_device_proxy_get_scan_type (CcFprintdDevice *object) |
2712 |
|
|
{ |
2713 |
|
✗ |
CcFprintdDeviceProxy *proxy = CC_FPRINTD_DEVICE_PROXY (object); |
2714 |
|
|
GVariant *variant; |
2715 |
|
✗ |
const gchar *value = NULL; |
2716 |
|
✗ |
variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "scan-type"); |
2717 |
|
✗ |
if (variant != NULL) |
2718 |
|
|
{ |
2719 |
|
✗ |
value = g_variant_get_string (variant, NULL); |
2720 |
|
✗ |
g_variant_unref (variant); |
2721 |
|
|
} |
2722 |
|
✗ |
return value; |
2723 |
|
|
} |
2724 |
|
|
|
2725 |
|
|
static void |
2726 |
|
✗ |
cc_fprintd_device_proxy_init (CcFprintdDeviceProxy *proxy) |
2727 |
|
|
{ |
2728 |
|
|
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 |
2729 |
|
✗ |
proxy->priv = cc_fprintd_device_proxy_get_instance_private (proxy); |
2730 |
|
|
#else |
2731 |
|
|
proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, CC_FPRINTD_TYPE_DEVICE_PROXY, CcFprintdDeviceProxyPrivate); |
2732 |
|
|
#endif |
2733 |
|
|
|
2734 |
|
✗ |
g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), cc_fprintd_device_interface_info ()); |
2735 |
|
✗ |
} |
2736 |
|
|
|
2737 |
|
|
static void |
2738 |
|
✗ |
cc_fprintd_device_proxy_class_init (CcFprintdDeviceProxyClass *klass) |
2739 |
|
|
{ |
2740 |
|
|
GObjectClass *gobject_class; |
2741 |
|
|
GDBusProxyClass *proxy_class; |
2742 |
|
|
|
2743 |
|
✗ |
gobject_class = G_OBJECT_CLASS (klass); |
2744 |
|
✗ |
gobject_class->finalize = cc_fprintd_device_proxy_finalize; |
2745 |
|
✗ |
gobject_class->get_property = cc_fprintd_device_proxy_get_property; |
2746 |
|
✗ |
gobject_class->set_property = cc_fprintd_device_proxy_set_property; |
2747 |
|
|
|
2748 |
|
✗ |
proxy_class = G_DBUS_PROXY_CLASS (klass); |
2749 |
|
✗ |
proxy_class->g_signal = cc_fprintd_device_proxy_g_signal; |
2750 |
|
✗ |
proxy_class->g_properties_changed = cc_fprintd_device_proxy_g_properties_changed; |
2751 |
|
|
|
2752 |
|
✗ |
cc_fprintd_device_override_properties (gobject_class, 1); |
2753 |
|
|
|
2754 |
|
|
#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38 |
2755 |
|
|
g_type_class_add_private (klass, sizeof (CcFprintdDeviceProxyPrivate)); |
2756 |
|
|
#endif |
2757 |
|
✗ |
} |
2758 |
|
|
|
2759 |
|
|
static void |
2760 |
|
✗ |
cc_fprintd_device_proxy_iface_init (CcFprintdDeviceIface *iface) |
2761 |
|
|
{ |
2762 |
|
✗ |
iface->get_name = cc_fprintd_device_proxy_get_name; |
2763 |
|
✗ |
iface->get_num_enroll_stages = cc_fprintd_device_proxy_get_num_enroll_stages; |
2764 |
|
✗ |
iface->get_scan_type = cc_fprintd_device_proxy_get_scan_type; |
2765 |
|
✗ |
} |
2766 |
|
|
|
2767 |
|
|
/** |
2768 |
|
|
* cc_fprintd_device_proxy_new: |
2769 |
|
|
* @connection: A #GDBusConnection. |
2770 |
|
|
* @flags: Flags from the #GDBusProxyFlags enumeration. |
2771 |
|
|
* @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. |
2772 |
|
|
* @object_path: An object path. |
2773 |
|
|
* @cancellable: (nullable): A #GCancellable or %NULL. |
2774 |
|
|
* @callback: A #GAsyncReadyCallback to call when the request is satisfied. |
2775 |
|
|
* @user_data: User data to pass to @callback. |
2776 |
|
|
* |
2777 |
|
|
* Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-net-reactivated-Fprint-Device.top_of_page">net.reactivated.Fprint.Device</link>. See g_dbus_proxy_new() for more details. |
2778 |
|
|
* |
2779 |
|
|
* When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
2780 |
|
|
* You can then call cc_fprintd_device_proxy_new_finish() to get the result of the operation. |
2781 |
|
|
* |
2782 |
|
|
* See cc_fprintd_device_proxy_new_sync() for the synchronous, blocking version of this constructor. |
2783 |
|
|
*/ |
2784 |
|
|
void |
2785 |
|
✗ |
cc_fprintd_device_proxy_new ( |
2786 |
|
|
GDBusConnection *connection, |
2787 |
|
|
GDBusProxyFlags flags, |
2788 |
|
|
const gchar *name, |
2789 |
|
|
const gchar *object_path, |
2790 |
|
|
GCancellable *cancellable, |
2791 |
|
|
GAsyncReadyCallback callback, |
2792 |
|
|
gpointer user_data) |
2793 |
|
|
{ |
2794 |
|
✗ |
g_async_initable_new_async (CC_FPRINTD_TYPE_DEVICE_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "net.reactivated.Fprint.Device", NULL); |
2795 |
|
✗ |
} |
2796 |
|
|
|
2797 |
|
|
/** |
2798 |
|
|
* cc_fprintd_device_proxy_new_finish: |
2799 |
|
|
* @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to cc_fprintd_device_proxy_new(). |
2800 |
|
|
* @error: Return location for error or %NULL |
2801 |
|
|
* |
2802 |
|
|
* Finishes an operation started with cc_fprintd_device_proxy_new(). |
2803 |
|
|
* |
2804 |
|
|
* Returns: (transfer full) (type CcFprintdDeviceProxy): The constructed proxy object or %NULL if @error is set. |
2805 |
|
|
*/ |
2806 |
|
|
CcFprintdDevice * |
2807 |
|
✗ |
cc_fprintd_device_proxy_new_finish ( |
2808 |
|
|
GAsyncResult *res, |
2809 |
|
|
GError **error) |
2810 |
|
|
{ |
2811 |
|
|
GObject *ret; |
2812 |
|
|
GObject *source_object; |
2813 |
|
✗ |
source_object = g_async_result_get_source_object (res); |
2814 |
|
✗ |
ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error); |
2815 |
|
✗ |
g_object_unref (source_object); |
2816 |
|
✗ |
if (ret != NULL) |
2817 |
|
✗ |
return CC_FPRINTD_DEVICE (ret); |
2818 |
|
|
else |
2819 |
|
✗ |
return NULL; |
2820 |
|
|
} |
2821 |
|
|
|
2822 |
|
|
/** |
2823 |
|
|
* cc_fprintd_device_proxy_new_sync: |
2824 |
|
|
* @connection: A #GDBusConnection. |
2825 |
|
|
* @flags: Flags from the #GDBusProxyFlags enumeration. |
2826 |
|
|
* @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. |
2827 |
|
|
* @object_path: An object path. |
2828 |
|
|
* @cancellable: (nullable): A #GCancellable or %NULL. |
2829 |
|
|
* @error: Return location for error or %NULL |
2830 |
|
|
* |
2831 |
|
|
* Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-net-reactivated-Fprint-Device.top_of_page">net.reactivated.Fprint.Device</link>. See g_dbus_proxy_new_sync() for more details. |
2832 |
|
|
* |
2833 |
|
|
* The calling thread is blocked until a reply is received. |
2834 |
|
|
* |
2835 |
|
|
* See cc_fprintd_device_proxy_new() for the asynchronous version of this constructor. |
2836 |
|
|
* |
2837 |
|
|
* Returns: (transfer full) (type CcFprintdDeviceProxy): The constructed proxy object or %NULL if @error is set. |
2838 |
|
|
*/ |
2839 |
|
|
CcFprintdDevice * |
2840 |
|
✗ |
cc_fprintd_device_proxy_new_sync ( |
2841 |
|
|
GDBusConnection *connection, |
2842 |
|
|
GDBusProxyFlags flags, |
2843 |
|
|
const gchar *name, |
2844 |
|
|
const gchar *object_path, |
2845 |
|
|
GCancellable *cancellable, |
2846 |
|
|
GError **error) |
2847 |
|
|
{ |
2848 |
|
|
GInitable *ret; |
2849 |
|
✗ |
ret = g_initable_new (CC_FPRINTD_TYPE_DEVICE_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "net.reactivated.Fprint.Device", NULL); |
2850 |
|
✗ |
if (ret != NULL) |
2851 |
|
✗ |
return CC_FPRINTD_DEVICE (ret); |
2852 |
|
|
else |
2853 |
|
✗ |
return NULL; |
2854 |
|
|
} |
2855 |
|
|
|
2856 |
|
|
|
2857 |
|
|
/** |
2858 |
|
|
* cc_fprintd_device_proxy_new_for_bus: |
2859 |
|
|
* @bus_type: A #GBusType. |
2860 |
|
|
* @flags: Flags from the #GDBusProxyFlags enumeration. |
2861 |
|
|
* @name: A bus name (well-known or unique). |
2862 |
|
|
* @object_path: An object path. |
2863 |
|
|
* @cancellable: (nullable): A #GCancellable or %NULL. |
2864 |
|
|
* @callback: A #GAsyncReadyCallback to call when the request is satisfied. |
2865 |
|
|
* @user_data: User data to pass to @callback. |
2866 |
|
|
* |
2867 |
|
|
* Like cc_fprintd_device_proxy_new() but takes a #GBusType instead of a #GDBusConnection. |
2868 |
|
|
* |
2869 |
|
|
* When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
2870 |
|
|
* You can then call cc_fprintd_device_proxy_new_for_bus_finish() to get the result of the operation. |
2871 |
|
|
* |
2872 |
|
|
* See cc_fprintd_device_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor. |
2873 |
|
|
*/ |
2874 |
|
|
void |
2875 |
|
✗ |
cc_fprintd_device_proxy_new_for_bus ( |
2876 |
|
|
GBusType bus_type, |
2877 |
|
|
GDBusProxyFlags flags, |
2878 |
|
|
const gchar *name, |
2879 |
|
|
const gchar *object_path, |
2880 |
|
|
GCancellable *cancellable, |
2881 |
|
|
GAsyncReadyCallback callback, |
2882 |
|
|
gpointer user_data) |
2883 |
|
|
{ |
2884 |
|
✗ |
g_async_initable_new_async (CC_FPRINTD_TYPE_DEVICE_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "net.reactivated.Fprint.Device", NULL); |
2885 |
|
✗ |
} |
2886 |
|
|
|
2887 |
|
|
/** |
2888 |
|
|
* cc_fprintd_device_proxy_new_for_bus_finish: |
2889 |
|
|
* @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to cc_fprintd_device_proxy_new_for_bus(). |
2890 |
|
|
* @error: Return location for error or %NULL |
2891 |
|
|
* |
2892 |
|
|
* Finishes an operation started with cc_fprintd_device_proxy_new_for_bus(). |
2893 |
|
|
* |
2894 |
|
|
* Returns: (transfer full) (type CcFprintdDeviceProxy): The constructed proxy object or %NULL if @error is set. |
2895 |
|
|
*/ |
2896 |
|
|
CcFprintdDevice * |
2897 |
|
✗ |
cc_fprintd_device_proxy_new_for_bus_finish ( |
2898 |
|
|
GAsyncResult *res, |
2899 |
|
|
GError **error) |
2900 |
|
|
{ |
2901 |
|
|
GObject *ret; |
2902 |
|
|
GObject *source_object; |
2903 |
|
✗ |
source_object = g_async_result_get_source_object (res); |
2904 |
|
✗ |
ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error); |
2905 |
|
✗ |
g_object_unref (source_object); |
2906 |
|
✗ |
if (ret != NULL) |
2907 |
|
✗ |
return CC_FPRINTD_DEVICE (ret); |
2908 |
|
|
else |
2909 |
|
✗ |
return NULL; |
2910 |
|
|
} |
2911 |
|
|
|
2912 |
|
|
/** |
2913 |
|
|
* cc_fprintd_device_proxy_new_for_bus_sync: |
2914 |
|
|
* @bus_type: A #GBusType. |
2915 |
|
|
* @flags: Flags from the #GDBusProxyFlags enumeration. |
2916 |
|
|
* @name: A bus name (well-known or unique). |
2917 |
|
|
* @object_path: An object path. |
2918 |
|
|
* @cancellable: (nullable): A #GCancellable or %NULL. |
2919 |
|
|
* @error: Return location for error or %NULL |
2920 |
|
|
* |
2921 |
|
|
* Like cc_fprintd_device_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection. |
2922 |
|
|
* |
2923 |
|
|
* The calling thread is blocked until a reply is received. |
2924 |
|
|
* |
2925 |
|
|
* See cc_fprintd_device_proxy_new_for_bus() for the asynchronous version of this constructor. |
2926 |
|
|
* |
2927 |
|
|
* Returns: (transfer full) (type CcFprintdDeviceProxy): The constructed proxy object or %NULL if @error is set. |
2928 |
|
|
*/ |
2929 |
|
|
CcFprintdDevice * |
2930 |
|
✗ |
cc_fprintd_device_proxy_new_for_bus_sync ( |
2931 |
|
|
GBusType bus_type, |
2932 |
|
|
GDBusProxyFlags flags, |
2933 |
|
|
const gchar *name, |
2934 |
|
|
const gchar *object_path, |
2935 |
|
|
GCancellable *cancellable, |
2936 |
|
|
GError **error) |
2937 |
|
|
{ |
2938 |
|
|
GInitable *ret; |
2939 |
|
✗ |
ret = g_initable_new (CC_FPRINTD_TYPE_DEVICE_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "net.reactivated.Fprint.Device", NULL); |
2940 |
|
✗ |
if (ret != NULL) |
2941 |
|
✗ |
return CC_FPRINTD_DEVICE (ret); |
2942 |
|
|
else |
2943 |
|
✗ |
return NULL; |
2944 |
|
|
} |
2945 |
|
|
|
2946 |
|
|
|
2947 |
|
|
/* ------------------------------------------------------------------------ */ |
2948 |
|
|
|
2949 |
|
|
/** |
2950 |
|
|
* CcFprintdDeviceSkeleton: |
2951 |
|
|
* |
2952 |
|
|
* The #CcFprintdDeviceSkeleton structure contains only private data and should only be accessed using the provided API. |
2953 |
|
|
*/ |
2954 |
|
|
|
2955 |
|
|
/** |
2956 |
|
|
* CcFprintdDeviceSkeletonClass: |
2957 |
|
|
* @parent_class: The parent class. |
2958 |
|
|
* |
2959 |
|
|
* Class structure for #CcFprintdDeviceSkeleton. |
2960 |
|
|
*/ |
2961 |
|
|
|
2962 |
|
|
struct _CcFprintdDeviceSkeletonPrivate |
2963 |
|
|
{ |
2964 |
|
|
GValue *properties; |
2965 |
|
|
GList *changed_properties; |
2966 |
|
|
GSource *changed_properties_idle_source; |
2967 |
|
|
GMainContext *context; |
2968 |
|
|
GMutex lock; |
2969 |
|
|
}; |
2970 |
|
|
|
2971 |
|
|
static void |
2972 |
|
✗ |
_cc_fprintd_device_skeleton_handle_method_call ( |
2973 |
|
|
GDBusConnection *connection G_GNUC_UNUSED, |
2974 |
|
|
const gchar *sender G_GNUC_UNUSED, |
2975 |
|
|
const gchar *object_path G_GNUC_UNUSED, |
2976 |
|
|
const gchar *interface_name, |
2977 |
|
|
const gchar *method_name, |
2978 |
|
|
GVariant *parameters, |
2979 |
|
|
GDBusMethodInvocation *invocation, |
2980 |
|
|
gpointer user_data) |
2981 |
|
|
{ |
2982 |
|
✗ |
CcFprintdDeviceSkeleton *skeleton = CC_FPRINTD_DEVICE_SKELETON (user_data); |
2983 |
|
|
_ExtendedGDBusMethodInfo *info; |
2984 |
|
|
GVariantIter iter; |
2985 |
|
|
GVariant *child; |
2986 |
|
|
GValue *paramv; |
2987 |
|
|
gsize num_params; |
2988 |
|
|
guint num_extra; |
2989 |
|
|
gsize n; |
2990 |
|
|
guint signal_id; |
2991 |
|
✗ |
GValue return_value = G_VALUE_INIT; |
2992 |
|
✗ |
info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation); |
2993 |
|
✗ |
g_assert (info != NULL); |
2994 |
|
✗ |
num_params = g_variant_n_children (parameters); |
2995 |
|
✗ |
num_extra = info->pass_fdlist ? 3 : 2; paramv = g_new0 (GValue, num_params + num_extra); |
2996 |
|
✗ |
n = 0; |
2997 |
|
✗ |
g_value_init (¶mv[n], CC_FPRINTD_TYPE_DEVICE); |
2998 |
|
✗ |
g_value_set_object (¶mv[n++], skeleton); |
2999 |
|
✗ |
g_value_init (¶mv[n], G_TYPE_DBUS_METHOD_INVOCATION); |
3000 |
|
✗ |
g_value_set_object (¶mv[n++], invocation); |
3001 |
|
✗ |
if (info->pass_fdlist) |
3002 |
|
|
{ |
3003 |
|
|
#ifdef G_OS_UNIX |
3004 |
|
✗ |
g_value_init (¶mv[n], G_TYPE_UNIX_FD_LIST); |
3005 |
|
✗ |
g_value_set_object (¶mv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation))); |
3006 |
|
|
#else |
3007 |
|
|
g_assert_not_reached (); |
3008 |
|
|
#endif |
3009 |
|
|
} |
3010 |
|
✗ |
g_variant_iter_init (&iter, parameters); |
3011 |
|
✗ |
while ((child = g_variant_iter_next_value (&iter)) != NULL) |
3012 |
|
|
{ |
3013 |
|
✗ |
_ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra]; |
3014 |
|
✗ |
if (arg_info->use_gvariant) |
3015 |
|
|
{ |
3016 |
|
✗ |
g_value_init (¶mv[n], G_TYPE_VARIANT); |
3017 |
|
✗ |
g_value_set_variant (¶mv[n], child); |
3018 |
|
✗ |
n++; |
3019 |
|
|
} |
3020 |
|
|
else |
3021 |
|
✗ |
g_dbus_gvariant_to_gvalue (child, ¶mv[n++]); |
3022 |
|
✗ |
g_variant_unref (child); |
3023 |
|
|
} |
3024 |
|
✗ |
signal_id = g_signal_lookup (info->signal_name, CC_FPRINTD_TYPE_DEVICE); |
3025 |
|
✗ |
g_value_init (&return_value, G_TYPE_BOOLEAN); |
3026 |
|
✗ |
g_signal_emitv (paramv, signal_id, 0, &return_value); |
3027 |
|
✗ |
if (!g_value_get_boolean (&return_value)) |
3028 |
|
✗ |
g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name); |
3029 |
|
✗ |
g_value_unset (&return_value); |
3030 |
|
✗ |
for (n = 0; n < num_params + num_extra; n++) |
3031 |
|
✗ |
g_value_unset (¶mv[n]); |
3032 |
|
✗ |
g_free (paramv); |
3033 |
|
✗ |
} |
3034 |
|
|
|
3035 |
|
|
static GVariant * |
3036 |
|
✗ |
_cc_fprintd_device_skeleton_handle_get_property ( |
3037 |
|
|
GDBusConnection *connection G_GNUC_UNUSED, |
3038 |
|
|
const gchar *sender G_GNUC_UNUSED, |
3039 |
|
|
const gchar *object_path G_GNUC_UNUSED, |
3040 |
|
|
const gchar *interface_name G_GNUC_UNUSED, |
3041 |
|
|
const gchar *property_name, |
3042 |
|
|
GError **error, |
3043 |
|
|
gpointer user_data) |
3044 |
|
|
{ |
3045 |
|
✗ |
CcFprintdDeviceSkeleton *skeleton = CC_FPRINTD_DEVICE_SKELETON (user_data); |
3046 |
|
✗ |
GValue value = G_VALUE_INIT; |
3047 |
|
|
GParamSpec *pspec; |
3048 |
|
|
_ExtendedGDBusPropertyInfo *info; |
3049 |
|
|
GVariant *ret; |
3050 |
|
✗ |
ret = NULL; |
3051 |
|
✗ |
info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_cc_fprintd_device_interface_info.parent_struct, property_name); |
3052 |
|
✗ |
g_assert (info != NULL); |
3053 |
|
✗ |
pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name); |
3054 |
|
✗ |
if (pspec == NULL) |
3055 |
|
|
{ |
3056 |
|
✗ |
g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name); |
3057 |
|
|
} |
3058 |
|
|
else |
3059 |
|
|
{ |
3060 |
|
✗ |
g_value_init (&value, pspec->value_type); |
3061 |
|
✗ |
g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value); |
3062 |
|
✗ |
ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature)); |
3063 |
|
✗ |
g_value_unset (&value); |
3064 |
|
|
} |
3065 |
|
✗ |
return ret; |
3066 |
|
|
} |
3067 |
|
|
|
3068 |
|
|
static gboolean |
3069 |
|
✗ |
_cc_fprintd_device_skeleton_handle_set_property ( |
3070 |
|
|
GDBusConnection *connection G_GNUC_UNUSED, |
3071 |
|
|
const gchar *sender G_GNUC_UNUSED, |
3072 |
|
|
const gchar *object_path G_GNUC_UNUSED, |
3073 |
|
|
const gchar *interface_name G_GNUC_UNUSED, |
3074 |
|
|
const gchar *property_name, |
3075 |
|
|
GVariant *variant, |
3076 |
|
|
GError **error, |
3077 |
|
|
gpointer user_data) |
3078 |
|
|
{ |
3079 |
|
✗ |
CcFprintdDeviceSkeleton *skeleton = CC_FPRINTD_DEVICE_SKELETON (user_data); |
3080 |
|
✗ |
GValue value = G_VALUE_INIT; |
3081 |
|
|
GParamSpec *pspec; |
3082 |
|
|
_ExtendedGDBusPropertyInfo *info; |
3083 |
|
|
gboolean ret; |
3084 |
|
✗ |
ret = FALSE; |
3085 |
|
✗ |
info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_cc_fprintd_device_interface_info.parent_struct, property_name); |
3086 |
|
✗ |
g_assert (info != NULL); |
3087 |
|
✗ |
pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name); |
3088 |
|
✗ |
if (pspec == NULL) |
3089 |
|
|
{ |
3090 |
|
✗ |
g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name); |
3091 |
|
|
} |
3092 |
|
|
else |
3093 |
|
|
{ |
3094 |
|
✗ |
if (info->use_gvariant) |
3095 |
|
✗ |
g_value_set_variant (&value, variant); |
3096 |
|
|
else |
3097 |
|
✗ |
g_dbus_gvariant_to_gvalue (variant, &value); |
3098 |
|
✗ |
g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value); |
3099 |
|
✗ |
g_value_unset (&value); |
3100 |
|
✗ |
ret = TRUE; |
3101 |
|
|
} |
3102 |
|
✗ |
return ret; |
3103 |
|
|
} |
3104 |
|
|
|
3105 |
|
|
static const GDBusInterfaceVTable _cc_fprintd_device_skeleton_vtable = |
3106 |
|
|
{ |
3107 |
|
|
_cc_fprintd_device_skeleton_handle_method_call, |
3108 |
|
|
_cc_fprintd_device_skeleton_handle_get_property, |
3109 |
|
|
_cc_fprintd_device_skeleton_handle_set_property, |
3110 |
|
|
{NULL} |
3111 |
|
|
}; |
3112 |
|
|
|
3113 |
|
|
static GDBusInterfaceInfo * |
3114 |
|
✗ |
cc_fprintd_device_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED) |
3115 |
|
|
{ |
3116 |
|
✗ |
return cc_fprintd_device_interface_info (); |
3117 |
|
|
} |
3118 |
|
|
|
3119 |
|
|
static GDBusInterfaceVTable * |
3120 |
|
✗ |
cc_fprintd_device_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED) |
3121 |
|
|
{ |
3122 |
|
✗ |
return (GDBusInterfaceVTable *) &_cc_fprintd_device_skeleton_vtable; |
3123 |
|
|
} |
3124 |
|
|
|
3125 |
|
|
static GVariant * |
3126 |
|
✗ |
cc_fprintd_device_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton) |
3127 |
|
|
{ |
3128 |
|
✗ |
CcFprintdDeviceSkeleton *skeleton = CC_FPRINTD_DEVICE_SKELETON (_skeleton); |
3129 |
|
|
|
3130 |
|
|
GVariantBuilder builder; |
3131 |
|
|
guint n; |
3132 |
|
✗ |
g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}")); |
3133 |
|
✗ |
if (_cc_fprintd_device_interface_info.parent_struct.properties == NULL) |
3134 |
|
✗ |
goto out; |
3135 |
|
✗ |
for (n = 0; _cc_fprintd_device_interface_info.parent_struct.properties[n] != NULL; n++) |
3136 |
|
|
{ |
3137 |
|
✗ |
GDBusPropertyInfo *info = _cc_fprintd_device_interface_info.parent_struct.properties[n]; |
3138 |
|
✗ |
if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE) |
3139 |
|
|
{ |
3140 |
|
|
GVariant *value; |
3141 |
|
✗ |
value = _cc_fprintd_device_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "net.reactivated.Fprint.Device", info->name, NULL, skeleton); |
3142 |
|
✗ |
if (value != NULL) |
3143 |
|
|
{ |
3144 |
|
✗ |
g_variant_take_ref (value); |
3145 |
|
✗ |
g_variant_builder_add (&builder, "{sv}", info->name, value); |
3146 |
|
✗ |
g_variant_unref (value); |
3147 |
|
|
} |
3148 |
|
|
} |
3149 |
|
|
} |
3150 |
|
✗ |
out: |
3151 |
|
✗ |
return g_variant_builder_end (&builder); |
3152 |
|
|
} |
3153 |
|
|
|
3154 |
|
|
static gboolean _cc_fprintd_device_emit_changed (gpointer user_data); |
3155 |
|
|
|
3156 |
|
|
static void |
3157 |
|
✗ |
cc_fprintd_device_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton) |
3158 |
|
|
{ |
3159 |
|
✗ |
CcFprintdDeviceSkeleton *skeleton = CC_FPRINTD_DEVICE_SKELETON (_skeleton); |
3160 |
|
✗ |
gboolean emit_changed = FALSE; |
3161 |
|
|
|
3162 |
|
✗ |
g_mutex_lock (&skeleton->priv->lock); |
3163 |
|
✗ |
if (skeleton->priv->changed_properties_idle_source != NULL) |
3164 |
|
|
{ |
3165 |
|
✗ |
g_source_destroy (skeleton->priv->changed_properties_idle_source); |
3166 |
|
✗ |
skeleton->priv->changed_properties_idle_source = NULL; |
3167 |
|
✗ |
emit_changed = TRUE; |
3168 |
|
|
} |
3169 |
|
✗ |
g_mutex_unlock (&skeleton->priv->lock); |
3170 |
|
|
|
3171 |
|
✗ |
if (emit_changed) |
3172 |
|
✗ |
_cc_fprintd_device_emit_changed (skeleton); |
3173 |
|
✗ |
} |
3174 |
|
|
|
3175 |
|
|
static void |
3176 |
|
✗ |
_cc_fprintd_device_on_signal_verify_finger_selected ( |
3177 |
|
|
CcFprintdDevice *object, |
3178 |
|
|
const gchar *arg_finger_name) |
3179 |
|
|
{ |
3180 |
|
✗ |
CcFprintdDeviceSkeleton *skeleton = CC_FPRINTD_DEVICE_SKELETON (object); |
3181 |
|
|
|
3182 |
|
|
GList *connections, *l; |
3183 |
|
|
GVariant *signal_variant; |
3184 |
|
✗ |
connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); |
3185 |
|
|
|
3186 |
|
✗ |
signal_variant = g_variant_ref_sink (g_variant_new ("(s)", |
3187 |
|
|
arg_finger_name)); |
3188 |
|
✗ |
for (l = connections; l != NULL; l = l->next) |
3189 |
|
|
{ |
3190 |
|
✗ |
GDBusConnection *connection = l->data; |
3191 |
|
✗ |
g_dbus_connection_emit_signal (connection, |
3192 |
|
✗ |
NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "net.reactivated.Fprint.Device", "VerifyFingerSelected", |
3193 |
|
|
signal_variant, NULL); |
3194 |
|
|
} |
3195 |
|
✗ |
g_variant_unref (signal_variant); |
3196 |
|
✗ |
g_list_free_full (connections, g_object_unref); |
3197 |
|
✗ |
} |
3198 |
|
|
|
3199 |
|
|
static void |
3200 |
|
✗ |
_cc_fprintd_device_on_signal_verify_status ( |
3201 |
|
|
CcFprintdDevice *object, |
3202 |
|
|
const gchar *arg_result, |
3203 |
|
|
gboolean arg_done) |
3204 |
|
|
{ |
3205 |
|
✗ |
CcFprintdDeviceSkeleton *skeleton = CC_FPRINTD_DEVICE_SKELETON (object); |
3206 |
|
|
|
3207 |
|
|
GList *connections, *l; |
3208 |
|
|
GVariant *signal_variant; |
3209 |
|
✗ |
connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); |
3210 |
|
|
|
3211 |
|
✗ |
signal_variant = g_variant_ref_sink (g_variant_new ("(sb)", |
3212 |
|
|
arg_result, |
3213 |
|
|
arg_done)); |
3214 |
|
✗ |
for (l = connections; l != NULL; l = l->next) |
3215 |
|
|
{ |
3216 |
|
✗ |
GDBusConnection *connection = l->data; |
3217 |
|
✗ |
g_dbus_connection_emit_signal (connection, |
3218 |
|
✗ |
NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "net.reactivated.Fprint.Device", "VerifyStatus", |
3219 |
|
|
signal_variant, NULL); |
3220 |
|
|
} |
3221 |
|
✗ |
g_variant_unref (signal_variant); |
3222 |
|
✗ |
g_list_free_full (connections, g_object_unref); |
3223 |
|
✗ |
} |
3224 |
|
|
|
3225 |
|
|
static void |
3226 |
|
✗ |
_cc_fprintd_device_on_signal_enroll_status ( |
3227 |
|
|
CcFprintdDevice *object, |
3228 |
|
|
const gchar *arg_result, |
3229 |
|
|
gboolean arg_done) |
3230 |
|
|
{ |
3231 |
|
✗ |
CcFprintdDeviceSkeleton *skeleton = CC_FPRINTD_DEVICE_SKELETON (object); |
3232 |
|
|
|
3233 |
|
|
GList *connections, *l; |
3234 |
|
|
GVariant *signal_variant; |
3235 |
|
✗ |
connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); |
3236 |
|
|
|
3237 |
|
✗ |
signal_variant = g_variant_ref_sink (g_variant_new ("(sb)", |
3238 |
|
|
arg_result, |
3239 |
|
|
arg_done)); |
3240 |
|
✗ |
for (l = connections; l != NULL; l = l->next) |
3241 |
|
|
{ |
3242 |
|
✗ |
GDBusConnection *connection = l->data; |
3243 |
|
✗ |
g_dbus_connection_emit_signal (connection, |
3244 |
|
✗ |
NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "net.reactivated.Fprint.Device", "EnrollStatus", |
3245 |
|
|
signal_variant, NULL); |
3246 |
|
|
} |
3247 |
|
✗ |
g_variant_unref (signal_variant); |
3248 |
|
✗ |
g_list_free_full (connections, g_object_unref); |
3249 |
|
✗ |
} |
3250 |
|
|
|
3251 |
|
|
static void cc_fprintd_device_skeleton_iface_init (CcFprintdDeviceIface *iface); |
3252 |
|
|
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 |
3253 |
|
✗ |
G_DEFINE_TYPE_WITH_CODE (CcFprintdDeviceSkeleton, cc_fprintd_device_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON, |
3254 |
|
|
G_ADD_PRIVATE (CcFprintdDeviceSkeleton) |
3255 |
|
|
G_IMPLEMENT_INTERFACE (CC_FPRINTD_TYPE_DEVICE, cc_fprintd_device_skeleton_iface_init)) |
3256 |
|
|
|
3257 |
|
|
#else |
3258 |
|
|
G_DEFINE_TYPE_WITH_CODE (CcFprintdDeviceSkeleton, cc_fprintd_device_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON, |
3259 |
|
|
G_IMPLEMENT_INTERFACE (CC_FPRINTD_TYPE_DEVICE, cc_fprintd_device_skeleton_iface_init)) |
3260 |
|
|
|
3261 |
|
|
#endif |
3262 |
|
|
static void |
3263 |
|
✗ |
cc_fprintd_device_skeleton_finalize (GObject *object) |
3264 |
|
|
{ |
3265 |
|
✗ |
CcFprintdDeviceSkeleton *skeleton = CC_FPRINTD_DEVICE_SKELETON (object); |
3266 |
|
|
guint n; |
3267 |
|
✗ |
for (n = 0; n < 3; n++) |
3268 |
|
✗ |
g_value_unset (&skeleton->priv->properties[n]); |
3269 |
|
✗ |
g_free (skeleton->priv->properties); |
3270 |
|
✗ |
g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free); |
3271 |
|
✗ |
if (skeleton->priv->changed_properties_idle_source != NULL) |
3272 |
|
✗ |
g_source_destroy (skeleton->priv->changed_properties_idle_source); |
3273 |
|
✗ |
g_main_context_unref (skeleton->priv->context); |
3274 |
|
✗ |
g_mutex_clear (&skeleton->priv->lock); |
3275 |
|
✗ |
G_OBJECT_CLASS (cc_fprintd_device_skeleton_parent_class)->finalize (object); |
3276 |
|
✗ |
} |
3277 |
|
|
|
3278 |
|
|
static void |
3279 |
|
✗ |
cc_fprintd_device_skeleton_get_property (GObject *object, |
3280 |
|
|
guint prop_id, |
3281 |
|
|
GValue *value, |
3282 |
|
|
GParamSpec *pspec G_GNUC_UNUSED) |
3283 |
|
|
{ |
3284 |
|
✗ |
CcFprintdDeviceSkeleton *skeleton = CC_FPRINTD_DEVICE_SKELETON (object); |
3285 |
|
✗ |
g_assert (prop_id != 0 && prop_id - 1 < 3); |
3286 |
|
✗ |
g_mutex_lock (&skeleton->priv->lock); |
3287 |
|
✗ |
g_value_copy (&skeleton->priv->properties[prop_id - 1], value); |
3288 |
|
✗ |
g_mutex_unlock (&skeleton->priv->lock); |
3289 |
|
✗ |
} |
3290 |
|
|
|
3291 |
|
|
static gboolean |
3292 |
|
✗ |
_cc_fprintd_device_emit_changed (gpointer user_data) |
3293 |
|
|
{ |
3294 |
|
✗ |
CcFprintdDeviceSkeleton *skeleton = CC_FPRINTD_DEVICE_SKELETON (user_data); |
3295 |
|
|
GList *l; |
3296 |
|
|
GVariantBuilder builder; |
3297 |
|
|
GVariantBuilder invalidated_builder; |
3298 |
|
|
guint num_changes; |
3299 |
|
|
|
3300 |
|
✗ |
g_mutex_lock (&skeleton->priv->lock); |
3301 |
|
✗ |
g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}")); |
3302 |
|
✗ |
g_variant_builder_init (&invalidated_builder, G_VARIANT_TYPE ("as")); |
3303 |
|
✗ |
for (l = skeleton->priv->changed_properties, num_changes = 0; l != NULL; l = l->next) |
3304 |
|
|
{ |
3305 |
|
✗ |
ChangedProperty *cp = l->data; |
3306 |
|
|
GVariant *variant; |
3307 |
|
|
const GValue *cur_value; |
3308 |
|
|
|
3309 |
|
✗ |
cur_value = &skeleton->priv->properties[cp->prop_id - 1]; |
3310 |
|
✗ |
if (!_g_value_equal (cur_value, &cp->orig_value)) |
3311 |
|
|
{ |
3312 |
|
✗ |
variant = g_dbus_gvalue_to_gvariant (cur_value, G_VARIANT_TYPE (cp->info->parent_struct.signature)); |
3313 |
|
✗ |
g_variant_builder_add (&builder, "{sv}", cp->info->parent_struct.name, variant); |
3314 |
|
✗ |
g_variant_unref (variant); |
3315 |
|
✗ |
num_changes++; |
3316 |
|
|
} |
3317 |
|
|
} |
3318 |
|
✗ |
if (num_changes > 0) |
3319 |
|
|
{ |
3320 |
|
|
GList *connections, *ll; |
3321 |
|
|
GVariant *signal_variant; |
3322 |
|
✗ |
signal_variant = g_variant_ref_sink (g_variant_new ("(sa{sv}as)", "net.reactivated.Fprint.Device", |
3323 |
|
|
&builder, &invalidated_builder)); |
3324 |
|
✗ |
connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); |
3325 |
|
✗ |
for (ll = connections; ll != NULL; ll = ll->next) |
3326 |
|
|
{ |
3327 |
|
✗ |
GDBusConnection *connection = ll->data; |
3328 |
|
|
|
3329 |
|
✗ |
g_dbus_connection_emit_signal (connection, |
3330 |
|
✗ |
NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), |
3331 |
|
|
"org.freedesktop.DBus.Properties", |
3332 |
|
|
"PropertiesChanged", |
3333 |
|
|
signal_variant, |
3334 |
|
|
NULL); |
3335 |
|
|
} |
3336 |
|
✗ |
g_variant_unref (signal_variant); |
3337 |
|
✗ |
g_list_free_full (connections, g_object_unref); |
3338 |
|
|
} |
3339 |
|
|
else |
3340 |
|
|
{ |
3341 |
|
✗ |
g_variant_builder_clear (&builder); |
3342 |
|
✗ |
g_variant_builder_clear (&invalidated_builder); |
3343 |
|
|
} |
3344 |
|
✗ |
g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free); |
3345 |
|
✗ |
skeleton->priv->changed_properties = NULL; |
3346 |
|
✗ |
skeleton->priv->changed_properties_idle_source = NULL; |
3347 |
|
✗ |
g_mutex_unlock (&skeleton->priv->lock); |
3348 |
|
✗ |
return FALSE; |
3349 |
|
|
} |
3350 |
|
|
|
3351 |
|
|
static void |
3352 |
|
✗ |
_cc_fprintd_device_schedule_emit_changed (CcFprintdDeviceSkeleton *skeleton, const _ExtendedGDBusPropertyInfo *info, guint prop_id, const GValue *orig_value) |
3353 |
|
|
{ |
3354 |
|
|
ChangedProperty *cp; |
3355 |
|
|
GList *l; |
3356 |
|
✗ |
cp = NULL; |
3357 |
|
✗ |
for (l = skeleton->priv->changed_properties; l != NULL; l = l->next) |
3358 |
|
|
{ |
3359 |
|
✗ |
ChangedProperty *i_cp = l->data; |
3360 |
|
✗ |
if (i_cp->info == info) |
3361 |
|
|
{ |
3362 |
|
✗ |
cp = i_cp; |
3363 |
|
✗ |
break; |
3364 |
|
|
} |
3365 |
|
|
} |
3366 |
|
✗ |
if (cp == NULL) |
3367 |
|
|
{ |
3368 |
|
✗ |
cp = g_new0 (ChangedProperty, 1); |
3369 |
|
✗ |
cp->prop_id = prop_id; |
3370 |
|
✗ |
cp->info = info; |
3371 |
|
✗ |
skeleton->priv->changed_properties = g_list_prepend (skeleton->priv->changed_properties, cp); |
3372 |
|
✗ |
g_value_init (&cp->orig_value, G_VALUE_TYPE (orig_value)); |
3373 |
|
✗ |
g_value_copy (orig_value, &cp->orig_value); |
3374 |
|
|
} |
3375 |
|
✗ |
} |
3376 |
|
|
|
3377 |
|
|
static void |
3378 |
|
✗ |
cc_fprintd_device_skeleton_notify (GObject *object, |
3379 |
|
|
GParamSpec *pspec G_GNUC_UNUSED) |
3380 |
|
|
{ |
3381 |
|
✗ |
CcFprintdDeviceSkeleton *skeleton = CC_FPRINTD_DEVICE_SKELETON (object); |
3382 |
|
✗ |
g_mutex_lock (&skeleton->priv->lock); |
3383 |
|
✗ |
if (skeleton->priv->changed_properties != NULL && |
3384 |
|
✗ |
skeleton->priv->changed_properties_idle_source == NULL) |
3385 |
|
|
{ |
3386 |
|
✗ |
skeleton->priv->changed_properties_idle_source = g_idle_source_new (); |
3387 |
|
✗ |
g_source_set_priority (skeleton->priv->changed_properties_idle_source, G_PRIORITY_DEFAULT); |
3388 |
|
✗ |
g_source_set_callback (skeleton->priv->changed_properties_idle_source, _cc_fprintd_device_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref); |
3389 |
|
✗ |
g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _cc_fprintd_device_emit_changed"); |
3390 |
|
✗ |
g_source_attach (skeleton->priv->changed_properties_idle_source, skeleton->priv->context); |
3391 |
|
✗ |
g_source_unref (skeleton->priv->changed_properties_idle_source); |
3392 |
|
|
} |
3393 |
|
✗ |
g_mutex_unlock (&skeleton->priv->lock); |
3394 |
|
✗ |
} |
3395 |
|
|
|
3396 |
|
|
static void |
3397 |
|
✗ |
cc_fprintd_device_skeleton_set_property (GObject *object, |
3398 |
|
|
guint prop_id, |
3399 |
|
|
const GValue *value, |
3400 |
|
|
GParamSpec *pspec) |
3401 |
|
|
{ |
3402 |
|
|
const _ExtendedGDBusPropertyInfo *info; |
3403 |
|
✗ |
CcFprintdDeviceSkeleton *skeleton = CC_FPRINTD_DEVICE_SKELETON (object); |
3404 |
|
✗ |
g_assert (prop_id != 0 && prop_id - 1 < 3); |
3405 |
|
✗ |
info = (const _ExtendedGDBusPropertyInfo *) _cc_fprintd_device_property_info_pointers[prop_id - 1]; |
3406 |
|
✗ |
g_mutex_lock (&skeleton->priv->lock); |
3407 |
|
✗ |
g_object_freeze_notify (object); |
3408 |
|
✗ |
if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1])) |
3409 |
|
|
{ |
3410 |
|
✗ |
if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL && |
3411 |
|
|
info->emits_changed_signal) |
3412 |
|
✗ |
_cc_fprintd_device_schedule_emit_changed (skeleton, info, prop_id, &skeleton->priv->properties[prop_id - 1]); |
3413 |
|
✗ |
g_value_copy (value, &skeleton->priv->properties[prop_id - 1]); |
3414 |
|
✗ |
g_object_notify_by_pspec (object, pspec); |
3415 |
|
|
} |
3416 |
|
✗ |
g_mutex_unlock (&skeleton->priv->lock); |
3417 |
|
✗ |
g_object_thaw_notify (object); |
3418 |
|
✗ |
} |
3419 |
|
|
|
3420 |
|
|
static void |
3421 |
|
✗ |
cc_fprintd_device_skeleton_init (CcFprintdDeviceSkeleton *skeleton) |
3422 |
|
|
{ |
3423 |
|
|
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 |
3424 |
|
✗ |
skeleton->priv = cc_fprintd_device_skeleton_get_instance_private (skeleton); |
3425 |
|
|
#else |
3426 |
|
|
skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, CC_FPRINTD_TYPE_DEVICE_SKELETON, CcFprintdDeviceSkeletonPrivate); |
3427 |
|
|
#endif |
3428 |
|
|
|
3429 |
|
✗ |
g_mutex_init (&skeleton->priv->lock); |
3430 |
|
✗ |
skeleton->priv->context = g_main_context_ref_thread_default (); |
3431 |
|
✗ |
skeleton->priv->properties = g_new0 (GValue, 3); |
3432 |
|
✗ |
g_value_init (&skeleton->priv->properties[0], G_TYPE_STRING); |
3433 |
|
✗ |
g_value_init (&skeleton->priv->properties[1], G_TYPE_INT); |
3434 |
|
✗ |
g_value_init (&skeleton->priv->properties[2], G_TYPE_STRING); |
3435 |
|
✗ |
} |
3436 |
|
|
|
3437 |
|
|
static const gchar * |
3438 |
|
✗ |
cc_fprintd_device_skeleton_get_name (CcFprintdDevice *object) |
3439 |
|
|
{ |
3440 |
|
✗ |
CcFprintdDeviceSkeleton *skeleton = CC_FPRINTD_DEVICE_SKELETON (object); |
3441 |
|
|
const gchar *value; |
3442 |
|
✗ |
g_mutex_lock (&skeleton->priv->lock); |
3443 |
|
✗ |
value = g_marshal_value_peek_string (&(skeleton->priv->properties[0])); |
3444 |
|
✗ |
g_mutex_unlock (&skeleton->priv->lock); |
3445 |
|
✗ |
return value; |
3446 |
|
|
} |
3447 |
|
|
|
3448 |
|
|
static gint |
3449 |
|
✗ |
cc_fprintd_device_skeleton_get_num_enroll_stages (CcFprintdDevice *object) |
3450 |
|
|
{ |
3451 |
|
✗ |
CcFprintdDeviceSkeleton *skeleton = CC_FPRINTD_DEVICE_SKELETON (object); |
3452 |
|
|
gint value; |
3453 |
|
✗ |
g_mutex_lock (&skeleton->priv->lock); |
3454 |
|
✗ |
value = g_marshal_value_peek_int (&(skeleton->priv->properties[1])); |
3455 |
|
✗ |
g_mutex_unlock (&skeleton->priv->lock); |
3456 |
|
✗ |
return value; |
3457 |
|
|
} |
3458 |
|
|
|
3459 |
|
|
static const gchar * |
3460 |
|
✗ |
cc_fprintd_device_skeleton_get_scan_type (CcFprintdDevice *object) |
3461 |
|
|
{ |
3462 |
|
✗ |
CcFprintdDeviceSkeleton *skeleton = CC_FPRINTD_DEVICE_SKELETON (object); |
3463 |
|
|
const gchar *value; |
3464 |
|
✗ |
g_mutex_lock (&skeleton->priv->lock); |
3465 |
|
✗ |
value = g_marshal_value_peek_string (&(skeleton->priv->properties[2])); |
3466 |
|
✗ |
g_mutex_unlock (&skeleton->priv->lock); |
3467 |
|
✗ |
return value; |
3468 |
|
|
} |
3469 |
|
|
|
3470 |
|
|
static void |
3471 |
|
✗ |
cc_fprintd_device_skeleton_class_init (CcFprintdDeviceSkeletonClass *klass) |
3472 |
|
|
{ |
3473 |
|
|
GObjectClass *gobject_class; |
3474 |
|
|
GDBusInterfaceSkeletonClass *skeleton_class; |
3475 |
|
|
|
3476 |
|
✗ |
gobject_class = G_OBJECT_CLASS (klass); |
3477 |
|
✗ |
gobject_class->finalize = cc_fprintd_device_skeleton_finalize; |
3478 |
|
✗ |
gobject_class->get_property = cc_fprintd_device_skeleton_get_property; |
3479 |
|
✗ |
gobject_class->set_property = cc_fprintd_device_skeleton_set_property; |
3480 |
|
✗ |
gobject_class->notify = cc_fprintd_device_skeleton_notify; |
3481 |
|
|
|
3482 |
|
|
|
3483 |
|
✗ |
cc_fprintd_device_override_properties (gobject_class, 1); |
3484 |
|
|
|
3485 |
|
✗ |
skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass); |
3486 |
|
✗ |
skeleton_class->get_info = cc_fprintd_device_skeleton_dbus_interface_get_info; |
3487 |
|
✗ |
skeleton_class->get_properties = cc_fprintd_device_skeleton_dbus_interface_get_properties; |
3488 |
|
✗ |
skeleton_class->flush = cc_fprintd_device_skeleton_dbus_interface_flush; |
3489 |
|
✗ |
skeleton_class->get_vtable = cc_fprintd_device_skeleton_dbus_interface_get_vtable; |
3490 |
|
|
|
3491 |
|
|
#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38 |
3492 |
|
|
g_type_class_add_private (klass, sizeof (CcFprintdDeviceSkeletonPrivate)); |
3493 |
|
|
#endif |
3494 |
|
✗ |
} |
3495 |
|
|
|
3496 |
|
|
static void |
3497 |
|
✗ |
cc_fprintd_device_skeleton_iface_init (CcFprintdDeviceIface *iface) |
3498 |
|
|
{ |
3499 |
|
✗ |
iface->verify_finger_selected = _cc_fprintd_device_on_signal_verify_finger_selected; |
3500 |
|
✗ |
iface->verify_status = _cc_fprintd_device_on_signal_verify_status; |
3501 |
|
✗ |
iface->enroll_status = _cc_fprintd_device_on_signal_enroll_status; |
3502 |
|
✗ |
iface->get_name = cc_fprintd_device_skeleton_get_name; |
3503 |
|
✗ |
iface->get_num_enroll_stages = cc_fprintd_device_skeleton_get_num_enroll_stages; |
3504 |
|
✗ |
iface->get_scan_type = cc_fprintd_device_skeleton_get_scan_type; |
3505 |
|
✗ |
} |
3506 |
|
|
|
3507 |
|
|
/** |
3508 |
|
|
* cc_fprintd_device_skeleton_new: |
3509 |
|
|
* |
3510 |
|
|
* Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-net-reactivated-Fprint-Device.top_of_page">net.reactivated.Fprint.Device</link>. |
3511 |
|
|
* |
3512 |
|
|
* Returns: (transfer full) (type CcFprintdDeviceSkeleton): The skeleton object. |
3513 |
|
|
*/ |
3514 |
|
|
CcFprintdDevice * |
3515 |
|
✗ |
cc_fprintd_device_skeleton_new (void) |
3516 |
|
|
{ |
3517 |
|
✗ |
return CC_FPRINTD_DEVICE (g_object_new (CC_FPRINTD_TYPE_DEVICE_SKELETON, NULL)); |
3518 |
|
|
} |
3519 |
|
|
|
3520 |
|
|
/* ------------------------------------------------------------------------ |
3521 |
|
|
* Code for interface net.reactivated.Fprint.Manager |
3522 |
|
|
* ------------------------------------------------------------------------ |
3523 |
|
|
*/ |
3524 |
|
|
|
3525 |
|
|
/** |
3526 |
|
|
* SECTION:CcFprintdManager |
3527 |
|
|
* @title: CcFprintdManager |
3528 |
|
|
* @short_description: Generated C code for the net.reactivated.Fprint.Manager D-Bus interface |
3529 |
|
|
* |
3530 |
|
|
* This section contains code for working with the <link linkend="gdbus-interface-net-reactivated-Fprint-Manager.top_of_page">net.reactivated.Fprint.Manager</link> D-Bus interface in C. |
3531 |
|
|
*/ |
3532 |
|
|
|
3533 |
|
|
/* ---- Introspection data for net.reactivated.Fprint.Manager ---- */ |
3534 |
|
|
|
3535 |
|
|
static const _ExtendedGDBusArgInfo _cc_fprintd_manager_method_info_get_devices_OUT_ARG_devices = |
3536 |
|
|
{ |
3537 |
|
|
{ |
3538 |
|
|
-1, |
3539 |
|
|
(gchar *) "devices", |
3540 |
|
|
(gchar *) "ao", |
3541 |
|
|
NULL |
3542 |
|
|
}, |
3543 |
|
|
FALSE |
3544 |
|
|
}; |
3545 |
|
|
|
3546 |
|
|
static const GDBusArgInfo * const _cc_fprintd_manager_method_info_get_devices_OUT_ARG_pointers[] = |
3547 |
|
|
{ |
3548 |
|
|
&_cc_fprintd_manager_method_info_get_devices_OUT_ARG_devices.parent_struct, |
3549 |
|
|
NULL |
3550 |
|
|
}; |
3551 |
|
|
|
3552 |
|
|
static const _ExtendedGDBusMethodInfo _cc_fprintd_manager_method_info_get_devices = |
3553 |
|
|
{ |
3554 |
|
|
{ |
3555 |
|
|
-1, |
3556 |
|
|
(gchar *) "GetDevices", |
3557 |
|
|
NULL, |
3558 |
|
|
(GDBusArgInfo **) &_cc_fprintd_manager_method_info_get_devices_OUT_ARG_pointers, |
3559 |
|
|
NULL |
3560 |
|
|
}, |
3561 |
|
|
"handle-get-devices", |
3562 |
|
|
FALSE |
3563 |
|
|
}; |
3564 |
|
|
|
3565 |
|
|
static const _ExtendedGDBusArgInfo _cc_fprintd_manager_method_info_get_default_device_OUT_ARG_device = |
3566 |
|
|
{ |
3567 |
|
|
{ |
3568 |
|
|
-1, |
3569 |
|
|
(gchar *) "device", |
3570 |
|
|
(gchar *) "o", |
3571 |
|
|
NULL |
3572 |
|
|
}, |
3573 |
|
|
FALSE |
3574 |
|
|
}; |
3575 |
|
|
|
3576 |
|
|
static const GDBusArgInfo * const _cc_fprintd_manager_method_info_get_default_device_OUT_ARG_pointers[] = |
3577 |
|
|
{ |
3578 |
|
|
&_cc_fprintd_manager_method_info_get_default_device_OUT_ARG_device.parent_struct, |
3579 |
|
|
NULL |
3580 |
|
|
}; |
3581 |
|
|
|
3582 |
|
|
static const _ExtendedGDBusMethodInfo _cc_fprintd_manager_method_info_get_default_device = |
3583 |
|
|
{ |
3584 |
|
|
{ |
3585 |
|
|
-1, |
3586 |
|
|
(gchar *) "GetDefaultDevice", |
3587 |
|
|
NULL, |
3588 |
|
|
(GDBusArgInfo **) &_cc_fprintd_manager_method_info_get_default_device_OUT_ARG_pointers, |
3589 |
|
|
NULL |
3590 |
|
|
}, |
3591 |
|
|
"handle-get-default-device", |
3592 |
|
|
FALSE |
3593 |
|
|
}; |
3594 |
|
|
|
3595 |
|
|
static const GDBusMethodInfo * const _cc_fprintd_manager_method_info_pointers[] = |
3596 |
|
|
{ |
3597 |
|
|
&_cc_fprintd_manager_method_info_get_devices.parent_struct, |
3598 |
|
|
&_cc_fprintd_manager_method_info_get_default_device.parent_struct, |
3599 |
|
|
NULL |
3600 |
|
|
}; |
3601 |
|
|
|
3602 |
|
|
static const GDBusAnnotationInfo _cc_fprintd_manager_annotation_info_0 = |
3603 |
|
|
{ |
3604 |
|
|
-1, |
3605 |
|
|
(gchar *) "org.freedesktop.DBus.GLib.CSymbol", |
3606 |
|
|
(gchar *) "fprint_manager", |
3607 |
|
|
NULL |
3608 |
|
|
}; |
3609 |
|
|
|
3610 |
|
|
static const GDBusAnnotationInfo * const _cc_fprintd_manager_annotation_info_pointers[] = |
3611 |
|
|
{ |
3612 |
|
|
&_cc_fprintd_manager_annotation_info_0, |
3613 |
|
|
NULL |
3614 |
|
|
}; |
3615 |
|
|
|
3616 |
|
|
static const _ExtendedGDBusInterfaceInfo _cc_fprintd_manager_interface_info = |
3617 |
|
|
{ |
3618 |
|
|
{ |
3619 |
|
|
-1, |
3620 |
|
|
(gchar *) "net.reactivated.Fprint.Manager", |
3621 |
|
|
(GDBusMethodInfo **) &_cc_fprintd_manager_method_info_pointers, |
3622 |
|
|
NULL, |
3623 |
|
|
NULL, |
3624 |
|
|
(GDBusAnnotationInfo **) &_cc_fprintd_manager_annotation_info_pointers |
3625 |
|
|
}, |
3626 |
|
|
"manager", |
3627 |
|
|
}; |
3628 |
|
|
|
3629 |
|
|
|
3630 |
|
|
/** |
3631 |
|
|
* cc_fprintd_manager_interface_info: |
3632 |
|
|
* |
3633 |
|
|
* Gets a machine-readable description of the <link linkend="gdbus-interface-net-reactivated-Fprint-Manager.top_of_page">net.reactivated.Fprint.Manager</link> D-Bus interface. |
3634 |
|
|
* |
3635 |
|
|
* Returns: (transfer none): A #GDBusInterfaceInfo. Do not free. |
3636 |
|
|
*/ |
3637 |
|
|
GDBusInterfaceInfo * |
3638 |
|
✗ |
cc_fprintd_manager_interface_info (void) |
3639 |
|
|
{ |
3640 |
|
✗ |
return (GDBusInterfaceInfo *) &_cc_fprintd_manager_interface_info.parent_struct; |
3641 |
|
|
} |
3642 |
|
|
|
3643 |
|
|
/** |
3644 |
|
|
* cc_fprintd_manager_override_properties: |
3645 |
|
|
* @klass: The class structure for a #GObject derived class. |
3646 |
|
|
* @property_id_begin: The property id to assign to the first overridden property. |
3647 |
|
|
* |
3648 |
|
|
* Overrides all #GObject properties in the #CcFprintdManager interface for a concrete class. |
3649 |
|
|
* The properties are overridden in the order they are defined. |
3650 |
|
|
* |
3651 |
|
|
* Returns: The last property id. |
3652 |
|
|
*/ |
3653 |
|
|
guint |
3654 |
|
✗ |
cc_fprintd_manager_override_properties (GObjectClass *klass G_GNUC_UNUSED, guint property_id_begin) |
3655 |
|
|
{ |
3656 |
|
✗ |
return property_id_begin - 1; |
3657 |
|
|
} |
3658 |
|
|
|
3659 |
|
|
|
3660 |
|
|
inline static void |
3661 |
|
✗ |
cc_fprintd_manager_method_marshal_get_devices ( |
3662 |
|
|
GClosure *closure, |
3663 |
|
|
GValue *return_value, |
3664 |
|
|
unsigned int n_param_values, |
3665 |
|
|
const GValue *param_values, |
3666 |
|
|
void *invocation_hint, |
3667 |
|
|
void *marshal_data) |
3668 |
|
|
{ |
3669 |
|
✗ |
_g_dbus_codegen_marshal_BOOLEAN__OBJECT (closure, |
3670 |
|
|
return_value, n_param_values, param_values, invocation_hint, marshal_data); |
3671 |
|
✗ |
} |
3672 |
|
|
|
3673 |
|
|
inline static void |
3674 |
|
✗ |
cc_fprintd_manager_method_marshal_get_default_device ( |
3675 |
|
|
GClosure *closure, |
3676 |
|
|
GValue *return_value, |
3677 |
|
|
unsigned int n_param_values, |
3678 |
|
|
const GValue *param_values, |
3679 |
|
|
void *invocation_hint, |
3680 |
|
|
void *marshal_data) |
3681 |
|
|
{ |
3682 |
|
✗ |
_g_dbus_codegen_marshal_BOOLEAN__OBJECT (closure, |
3683 |
|
|
return_value, n_param_values, param_values, invocation_hint, marshal_data); |
3684 |
|
✗ |
} |
3685 |
|
|
|
3686 |
|
|
|
3687 |
|
|
/** |
3688 |
|
|
* CcFprintdManager: |
3689 |
|
|
* |
3690 |
|
|
* Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-net-reactivated-Fprint-Manager.top_of_page">net.reactivated.Fprint.Manager</link>. |
3691 |
|
|
*/ |
3692 |
|
|
|
3693 |
|
|
/** |
3694 |
|
|
* CcFprintdManagerIface: |
3695 |
|
|
* @parent_iface: The parent interface. |
3696 |
|
|
* @handle_get_default_device: Handler for the #CcFprintdManager::handle-get-default-device signal. |
3697 |
|
|
* @handle_get_devices: Handler for the #CcFprintdManager::handle-get-devices signal. |
3698 |
|
|
* |
3699 |
|
|
* Virtual table for the D-Bus interface <link linkend="gdbus-interface-net-reactivated-Fprint-Manager.top_of_page">net.reactivated.Fprint.Manager</link>. |
3700 |
|
|
*/ |
3701 |
|
|
|
3702 |
|
|
typedef CcFprintdManagerIface CcFprintdManagerInterface; |
3703 |
|
✗ |
G_DEFINE_INTERFACE (CcFprintdManager, cc_fprintd_manager, G_TYPE_OBJECT) |
3704 |
|
|
|
3705 |
|
|
static void |
3706 |
|
✗ |
cc_fprintd_manager_default_init (CcFprintdManagerIface *iface) |
3707 |
|
|
{ |
3708 |
|
|
/* GObject signals for incoming D-Bus method calls: */ |
3709 |
|
|
/** |
3710 |
|
|
* CcFprintdManager::handle-get-devices: |
3711 |
|
|
* @object: A #CcFprintdManager. |
3712 |
|
|
* @invocation: A #GDBusMethodInvocation. |
3713 |
|
|
* |
3714 |
|
|
* Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-net-reactivated-Fprint-Manager.GetDevices">GetDevices()</link> D-Bus method. |
3715 |
|
|
* |
3716 |
|
|
* If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call cc_fprintd_manager_complete_get_devices() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. |
3717 |
|
|
* |
3718 |
|
|
* Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run. |
3719 |
|
|
*/ |
3720 |
|
✗ |
g_signal_new ("handle-get-devices", |
3721 |
|
|
G_TYPE_FROM_INTERFACE (iface), |
3722 |
|
|
G_SIGNAL_RUN_LAST, |
3723 |
|
|
G_STRUCT_OFFSET (CcFprintdManagerIface, handle_get_devices), |
3724 |
|
|
g_signal_accumulator_true_handled, |
3725 |
|
|
NULL, |
3726 |
|
|
cc_fprintd_manager_method_marshal_get_devices, |
3727 |
|
|
G_TYPE_BOOLEAN, |
3728 |
|
|
1, |
3729 |
|
|
G_TYPE_DBUS_METHOD_INVOCATION); |
3730 |
|
|
|
3731 |
|
|
/** |
3732 |
|
|
* CcFprintdManager::handle-get-default-device: |
3733 |
|
|
* @object: A #CcFprintdManager. |
3734 |
|
|
* @invocation: A #GDBusMethodInvocation. |
3735 |
|
|
* |
3736 |
|
|
* Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-net-reactivated-Fprint-Manager.GetDefaultDevice">GetDefaultDevice()</link> D-Bus method. |
3737 |
|
|
* |
3738 |
|
|
* If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call cc_fprintd_manager_complete_get_default_device() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. |
3739 |
|
|
* |
3740 |
|
|
* Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run. |
3741 |
|
|
*/ |
3742 |
|
✗ |
g_signal_new ("handle-get-default-device", |
3743 |
|
|
G_TYPE_FROM_INTERFACE (iface), |
3744 |
|
|
G_SIGNAL_RUN_LAST, |
3745 |
|
|
G_STRUCT_OFFSET (CcFprintdManagerIface, handle_get_default_device), |
3746 |
|
|
g_signal_accumulator_true_handled, |
3747 |
|
|
NULL, |
3748 |
|
|
cc_fprintd_manager_method_marshal_get_default_device, |
3749 |
|
|
G_TYPE_BOOLEAN, |
3750 |
|
|
1, |
3751 |
|
|
G_TYPE_DBUS_METHOD_INVOCATION); |
3752 |
|
|
|
3753 |
|
✗ |
} |
3754 |
|
|
|
3755 |
|
|
/** |
3756 |
|
|
* cc_fprintd_manager_call_get_devices: |
3757 |
|
|
* @proxy: A #CcFprintdManagerProxy. |
3758 |
|
|
* @cancellable: (nullable): A #GCancellable or %NULL. |
3759 |
|
|
* @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. |
3760 |
|
|
* @user_data: User data to pass to @callback. |
3761 |
|
|
* |
3762 |
|
|
* Asynchronously invokes the <link linkend="gdbus-method-net-reactivated-Fprint-Manager.GetDevices">GetDevices()</link> D-Bus method on @proxy. |
3763 |
|
|
* When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
3764 |
|
|
* You can then call cc_fprintd_manager_call_get_devices_finish() to get the result of the operation. |
3765 |
|
|
* |
3766 |
|
|
* See cc_fprintd_manager_call_get_devices_sync() for the synchronous, blocking version of this method. |
3767 |
|
|
*/ |
3768 |
|
|
void |
3769 |
|
✗ |
cc_fprintd_manager_call_get_devices ( |
3770 |
|
|
CcFprintdManager *proxy, |
3771 |
|
|
GCancellable *cancellable, |
3772 |
|
|
GAsyncReadyCallback callback, |
3773 |
|
|
gpointer user_data) |
3774 |
|
|
{ |
3775 |
|
✗ |
g_dbus_proxy_call (G_DBUS_PROXY (proxy), |
3776 |
|
|
"GetDevices", |
3777 |
|
|
g_variant_new ("()"), |
3778 |
|
|
G_DBUS_CALL_FLAGS_NONE, |
3779 |
|
|
-1, |
3780 |
|
|
cancellable, |
3781 |
|
|
callback, |
3782 |
|
|
user_data); |
3783 |
|
✗ |
} |
3784 |
|
|
|
3785 |
|
|
/** |
3786 |
|
|
* cc_fprintd_manager_call_get_devices_finish: |
3787 |
|
|
* @proxy: A #CcFprintdManagerProxy. |
3788 |
|
|
* @out_devices: (out) (optional) (array zero-terminated=1): Return location for return parameter or %NULL to ignore. |
3789 |
|
|
* @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to cc_fprintd_manager_call_get_devices(). |
3790 |
|
|
* @error: Return location for error or %NULL. |
3791 |
|
|
* |
3792 |
|
|
* Finishes an operation started with cc_fprintd_manager_call_get_devices(). |
3793 |
|
|
* |
3794 |
|
|
* Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set. |
3795 |
|
|
*/ |
3796 |
|
|
gboolean |
3797 |
|
✗ |
cc_fprintd_manager_call_get_devices_finish ( |
3798 |
|
|
CcFprintdManager *proxy, |
3799 |
|
|
gchar ***out_devices, |
3800 |
|
|
GAsyncResult *res, |
3801 |
|
|
GError **error) |
3802 |
|
|
{ |
3803 |
|
|
GVariant *_ret; |
3804 |
|
✗ |
_ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); |
3805 |
|
✗ |
if (_ret == NULL) |
3806 |
|
✗ |
goto _out; |
3807 |
|
✗ |
g_variant_get (_ret, |
3808 |
|
|
"(^ao)", |
3809 |
|
|
out_devices); |
3810 |
|
✗ |
g_variant_unref (_ret); |
3811 |
|
✗ |
_out: |
3812 |
|
✗ |
return _ret != NULL; |
3813 |
|
|
} |
3814 |
|
|
|
3815 |
|
|
/** |
3816 |
|
|
* cc_fprintd_manager_call_get_devices_sync: |
3817 |
|
|
* @proxy: A #CcFprintdManagerProxy. |
3818 |
|
|
* @out_devices: (out) (optional) (array zero-terminated=1): Return location for return parameter or %NULL to ignore. |
3819 |
|
|
* @cancellable: (nullable): A #GCancellable or %NULL. |
3820 |
|
|
* @error: Return location for error or %NULL. |
3821 |
|
|
* |
3822 |
|
|
* Synchronously invokes the <link linkend="gdbus-method-net-reactivated-Fprint-Manager.GetDevices">GetDevices()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. |
3823 |
|
|
* |
3824 |
|
|
* See cc_fprintd_manager_call_get_devices() for the asynchronous version of this method. |
3825 |
|
|
* |
3826 |
|
|
* Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set. |
3827 |
|
|
*/ |
3828 |
|
|
gboolean |
3829 |
|
✗ |
cc_fprintd_manager_call_get_devices_sync ( |
3830 |
|
|
CcFprintdManager *proxy, |
3831 |
|
|
gchar ***out_devices, |
3832 |
|
|
GCancellable *cancellable, |
3833 |
|
|
GError **error) |
3834 |
|
|
{ |
3835 |
|
|
GVariant *_ret; |
3836 |
|
✗ |
_ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), |
3837 |
|
|
"GetDevices", |
3838 |
|
|
g_variant_new ("()"), |
3839 |
|
|
G_DBUS_CALL_FLAGS_NONE, |
3840 |
|
|
-1, |
3841 |
|
|
cancellable, |
3842 |
|
|
error); |
3843 |
|
✗ |
if (_ret == NULL) |
3844 |
|
✗ |
goto _out; |
3845 |
|
✗ |
g_variant_get (_ret, |
3846 |
|
|
"(^ao)", |
3847 |
|
|
out_devices); |
3848 |
|
✗ |
g_variant_unref (_ret); |
3849 |
|
✗ |
_out: |
3850 |
|
✗ |
return _ret != NULL; |
3851 |
|
|
} |
3852 |
|
|
|
3853 |
|
|
/** |
3854 |
|
|
* cc_fprintd_manager_call_get_default_device: |
3855 |
|
|
* @proxy: A #CcFprintdManagerProxy. |
3856 |
|
|
* @cancellable: (nullable): A #GCancellable or %NULL. |
3857 |
|
|
* @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. |
3858 |
|
|
* @user_data: User data to pass to @callback. |
3859 |
|
|
* |
3860 |
|
|
* Asynchronously invokes the <link linkend="gdbus-method-net-reactivated-Fprint-Manager.GetDefaultDevice">GetDefaultDevice()</link> D-Bus method on @proxy. |
3861 |
|
|
* When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
3862 |
|
|
* You can then call cc_fprintd_manager_call_get_default_device_finish() to get the result of the operation. |
3863 |
|
|
* |
3864 |
|
|
* See cc_fprintd_manager_call_get_default_device_sync() for the synchronous, blocking version of this method. |
3865 |
|
|
*/ |
3866 |
|
|
void |
3867 |
|
✗ |
cc_fprintd_manager_call_get_default_device ( |
3868 |
|
|
CcFprintdManager *proxy, |
3869 |
|
|
GCancellable *cancellable, |
3870 |
|
|
GAsyncReadyCallback callback, |
3871 |
|
|
gpointer user_data) |
3872 |
|
|
{ |
3873 |
|
✗ |
g_dbus_proxy_call (G_DBUS_PROXY (proxy), |
3874 |
|
|
"GetDefaultDevice", |
3875 |
|
|
g_variant_new ("()"), |
3876 |
|
|
G_DBUS_CALL_FLAGS_NONE, |
3877 |
|
|
-1, |
3878 |
|
|
cancellable, |
3879 |
|
|
callback, |
3880 |
|
|
user_data); |
3881 |
|
✗ |
} |
3882 |
|
|
|
3883 |
|
|
/** |
3884 |
|
|
* cc_fprintd_manager_call_get_default_device_finish: |
3885 |
|
|
* @proxy: A #CcFprintdManagerProxy. |
3886 |
|
|
* @out_device: (out) (optional): Return location for return parameter or %NULL to ignore. |
3887 |
|
|
* @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to cc_fprintd_manager_call_get_default_device(). |
3888 |
|
|
* @error: Return location for error or %NULL. |
3889 |
|
|
* |
3890 |
|
|
* Finishes an operation started with cc_fprintd_manager_call_get_default_device(). |
3891 |
|
|
* |
3892 |
|
|
* Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set. |
3893 |
|
|
*/ |
3894 |
|
|
gboolean |
3895 |
|
✗ |
cc_fprintd_manager_call_get_default_device_finish ( |
3896 |
|
|
CcFprintdManager *proxy, |
3897 |
|
|
gchar **out_device, |
3898 |
|
|
GAsyncResult *res, |
3899 |
|
|
GError **error) |
3900 |
|
|
{ |
3901 |
|
|
GVariant *_ret; |
3902 |
|
✗ |
_ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); |
3903 |
|
✗ |
if (_ret == NULL) |
3904 |
|
✗ |
goto _out; |
3905 |
|
✗ |
g_variant_get (_ret, |
3906 |
|
|
"(o)", |
3907 |
|
|
out_device); |
3908 |
|
✗ |
g_variant_unref (_ret); |
3909 |
|
✗ |
_out: |
3910 |
|
✗ |
return _ret != NULL; |
3911 |
|
|
} |
3912 |
|
|
|
3913 |
|
|
/** |
3914 |
|
|
* cc_fprintd_manager_call_get_default_device_sync: |
3915 |
|
|
* @proxy: A #CcFprintdManagerProxy. |
3916 |
|
|
* @out_device: (out) (optional): Return location for return parameter or %NULL to ignore. |
3917 |
|
|
* @cancellable: (nullable): A #GCancellable or %NULL. |
3918 |
|
|
* @error: Return location for error or %NULL. |
3919 |
|
|
* |
3920 |
|
|
* Synchronously invokes the <link linkend="gdbus-method-net-reactivated-Fprint-Manager.GetDefaultDevice">GetDefaultDevice()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. |
3921 |
|
|
* |
3922 |
|
|
* See cc_fprintd_manager_call_get_default_device() for the asynchronous version of this method. |
3923 |
|
|
* |
3924 |
|
|
* Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set. |
3925 |
|
|
*/ |
3926 |
|
|
gboolean |
3927 |
|
✗ |
cc_fprintd_manager_call_get_default_device_sync ( |
3928 |
|
|
CcFprintdManager *proxy, |
3929 |
|
|
gchar **out_device, |
3930 |
|
|
GCancellable *cancellable, |
3931 |
|
|
GError **error) |
3932 |
|
|
{ |
3933 |
|
|
GVariant *_ret; |
3934 |
|
✗ |
_ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), |
3935 |
|
|
"GetDefaultDevice", |
3936 |
|
|
g_variant_new ("()"), |
3937 |
|
|
G_DBUS_CALL_FLAGS_NONE, |
3938 |
|
|
-1, |
3939 |
|
|
cancellable, |
3940 |
|
|
error); |
3941 |
|
✗ |
if (_ret == NULL) |
3942 |
|
✗ |
goto _out; |
3943 |
|
✗ |
g_variant_get (_ret, |
3944 |
|
|
"(o)", |
3945 |
|
|
out_device); |
3946 |
|
✗ |
g_variant_unref (_ret); |
3947 |
|
✗ |
_out: |
3948 |
|
✗ |
return _ret != NULL; |
3949 |
|
|
} |
3950 |
|
|
|
3951 |
|
|
/** |
3952 |
|
|
* cc_fprintd_manager_complete_get_devices: |
3953 |
|
|
* @object: A #CcFprintdManager. |
3954 |
|
|
* @invocation: (transfer full): A #GDBusMethodInvocation. |
3955 |
|
|
* @devices: Parameter to return. |
3956 |
|
|
* |
3957 |
|
|
* Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-net-reactivated-Fprint-Manager.GetDevices">GetDevices()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. |
3958 |
|
|
* |
3959 |
|
|
* This method will free @invocation, you cannot use it afterwards. |
3960 |
|
|
*/ |
3961 |
|
|
void |
3962 |
|
✗ |
cc_fprintd_manager_complete_get_devices ( |
3963 |
|
|
CcFprintdManager *object G_GNUC_UNUSED, |
3964 |
|
|
GDBusMethodInvocation *invocation, |
3965 |
|
|
const gchar *const *devices) |
3966 |
|
|
{ |
3967 |
|
✗ |
g_dbus_method_invocation_return_value (invocation, |
3968 |
|
|
g_variant_new ("(^ao)", |
3969 |
|
|
devices)); |
3970 |
|
✗ |
} |
3971 |
|
|
|
3972 |
|
|
/** |
3973 |
|
|
* cc_fprintd_manager_complete_get_default_device: |
3974 |
|
|
* @object: A #CcFprintdManager. |
3975 |
|
|
* @invocation: (transfer full): A #GDBusMethodInvocation. |
3976 |
|
|
* @device: Parameter to return. |
3977 |
|
|
* |
3978 |
|
|
* Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-net-reactivated-Fprint-Manager.GetDefaultDevice">GetDefaultDevice()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. |
3979 |
|
|
* |
3980 |
|
|
* This method will free @invocation, you cannot use it afterwards. |
3981 |
|
|
*/ |
3982 |
|
|
void |
3983 |
|
✗ |
cc_fprintd_manager_complete_get_default_device ( |
3984 |
|
|
CcFprintdManager *object G_GNUC_UNUSED, |
3985 |
|
|
GDBusMethodInvocation *invocation, |
3986 |
|
|
const gchar *device) |
3987 |
|
|
{ |
3988 |
|
✗ |
g_dbus_method_invocation_return_value (invocation, |
3989 |
|
|
g_variant_new ("(o)", |
3990 |
|
|
device)); |
3991 |
|
✗ |
} |
3992 |
|
|
|
3993 |
|
|
/* ------------------------------------------------------------------------ */ |
3994 |
|
|
|
3995 |
|
|
/** |
3996 |
|
|
* CcFprintdManagerProxy: |
3997 |
|
|
* |
3998 |
|
|
* The #CcFprintdManagerProxy structure contains only private data and should only be accessed using the provided API. |
3999 |
|
|
*/ |
4000 |
|
|
|
4001 |
|
|
/** |
4002 |
|
|
* CcFprintdManagerProxyClass: |
4003 |
|
|
* @parent_class: The parent class. |
4004 |
|
|
* |
4005 |
|
|
* Class structure for #CcFprintdManagerProxy. |
4006 |
|
|
*/ |
4007 |
|
|
|
4008 |
|
|
struct _CcFprintdManagerProxyPrivate |
4009 |
|
|
{ |
4010 |
|
|
GData *qdata; |
4011 |
|
|
}; |
4012 |
|
|
|
4013 |
|
|
static void cc_fprintd_manager_proxy_iface_init (CcFprintdManagerIface *iface); |
4014 |
|
|
|
4015 |
|
|
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 |
4016 |
|
✗ |
G_DEFINE_TYPE_WITH_CODE (CcFprintdManagerProxy, cc_fprintd_manager_proxy, G_TYPE_DBUS_PROXY, |
4017 |
|
|
G_ADD_PRIVATE (CcFprintdManagerProxy) |
4018 |
|
|
G_IMPLEMENT_INTERFACE (CC_FPRINTD_TYPE_MANAGER, cc_fprintd_manager_proxy_iface_init)) |
4019 |
|
|
|
4020 |
|
|
#else |
4021 |
|
|
G_DEFINE_TYPE_WITH_CODE (CcFprintdManagerProxy, cc_fprintd_manager_proxy, G_TYPE_DBUS_PROXY, |
4022 |
|
|
G_IMPLEMENT_INTERFACE (CC_FPRINTD_TYPE_MANAGER, cc_fprintd_manager_proxy_iface_init)) |
4023 |
|
|
|
4024 |
|
|
#endif |
4025 |
|
|
static void |
4026 |
|
✗ |
cc_fprintd_manager_proxy_finalize (GObject *object) |
4027 |
|
|
{ |
4028 |
|
✗ |
CcFprintdManagerProxy *proxy = CC_FPRINTD_MANAGER_PROXY (object); |
4029 |
|
✗ |
g_datalist_clear (&proxy->priv->qdata); |
4030 |
|
✗ |
G_OBJECT_CLASS (cc_fprintd_manager_proxy_parent_class)->finalize (object); |
4031 |
|
✗ |
} |
4032 |
|
|
|
4033 |
|
|
static void |
4034 |
|
✗ |
cc_fprintd_manager_proxy_get_property (GObject *object G_GNUC_UNUSED, |
4035 |
|
|
guint prop_id G_GNUC_UNUSED, |
4036 |
|
|
GValue *value G_GNUC_UNUSED, |
4037 |
|
|
GParamSpec *pspec G_GNUC_UNUSED) |
4038 |
|
|
{ |
4039 |
|
✗ |
} |
4040 |
|
|
|
4041 |
|
|
static void |
4042 |
|
✗ |
cc_fprintd_manager_proxy_set_property (GObject *object G_GNUC_UNUSED, |
4043 |
|
|
guint prop_id G_GNUC_UNUSED, |
4044 |
|
|
const GValue *value G_GNUC_UNUSED, |
4045 |
|
|
GParamSpec *pspec G_GNUC_UNUSED) |
4046 |
|
|
{ |
4047 |
|
✗ |
} |
4048 |
|
|
|
4049 |
|
|
static void |
4050 |
|
✗ |
cc_fprintd_manager_proxy_g_signal (GDBusProxy *proxy, |
4051 |
|
|
const gchar *sender_name G_GNUC_UNUSED, |
4052 |
|
|
const gchar *signal_name, |
4053 |
|
|
GVariant *parameters) |
4054 |
|
|
{ |
4055 |
|
|
_ExtendedGDBusSignalInfo *info; |
4056 |
|
|
GVariantIter iter; |
4057 |
|
|
GVariant *child; |
4058 |
|
|
GValue *paramv; |
4059 |
|
|
gsize num_params; |
4060 |
|
|
gsize n; |
4061 |
|
|
guint signal_id; |
4062 |
|
✗ |
info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_cc_fprintd_manager_interface_info.parent_struct, signal_name); |
4063 |
|
✗ |
if (info == NULL) |
4064 |
|
✗ |
return; |
4065 |
|
✗ |
num_params = g_variant_n_children (parameters); |
4066 |
|
✗ |
paramv = g_new0 (GValue, num_params + 1); |
4067 |
|
✗ |
g_value_init (¶mv[0], CC_FPRINTD_TYPE_MANAGER); |
4068 |
|
✗ |
g_value_set_object (¶mv[0], proxy); |
4069 |
|
✗ |
g_variant_iter_init (&iter, parameters); |
4070 |
|
✗ |
n = 1; |
4071 |
|
✗ |
while ((child = g_variant_iter_next_value (&iter)) != NULL) |
4072 |
|
|
{ |
4073 |
|
✗ |
_ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1]; |
4074 |
|
✗ |
if (arg_info->use_gvariant) |
4075 |
|
|
{ |
4076 |
|
✗ |
g_value_init (¶mv[n], G_TYPE_VARIANT); |
4077 |
|
✗ |
g_value_set_variant (¶mv[n], child); |
4078 |
|
✗ |
n++; |
4079 |
|
|
} |
4080 |
|
|
else |
4081 |
|
✗ |
g_dbus_gvariant_to_gvalue (child, ¶mv[n++]); |
4082 |
|
✗ |
g_variant_unref (child); |
4083 |
|
|
} |
4084 |
|
✗ |
signal_id = g_signal_lookup (info->signal_name, CC_FPRINTD_TYPE_MANAGER); |
4085 |
|
✗ |
g_signal_emitv (paramv, signal_id, 0, NULL); |
4086 |
|
✗ |
for (n = 0; n < num_params + 1; n++) |
4087 |
|
✗ |
g_value_unset (¶mv[n]); |
4088 |
|
✗ |
g_free (paramv); |
4089 |
|
|
} |
4090 |
|
|
|
4091 |
|
|
static void |
4092 |
|
✗ |
cc_fprintd_manager_proxy_g_properties_changed (GDBusProxy *_proxy, |
4093 |
|
|
GVariant *changed_properties, |
4094 |
|
|
const gchar *const *invalidated_properties) |
4095 |
|
|
{ |
4096 |
|
✗ |
CcFprintdManagerProxy *proxy = CC_FPRINTD_MANAGER_PROXY (_proxy); |
4097 |
|
|
guint n; |
4098 |
|
|
const gchar *key; |
4099 |
|
|
GVariantIter *iter; |
4100 |
|
|
_ExtendedGDBusPropertyInfo *info; |
4101 |
|
✗ |
g_variant_get (changed_properties, "a{sv}", &iter); |
4102 |
|
✗ |
while (g_variant_iter_next (iter, "{&sv}", &key, NULL)) |
4103 |
|
|
{ |
4104 |
|
✗ |
info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_cc_fprintd_manager_interface_info.parent_struct, key); |
4105 |
|
✗ |
g_datalist_remove_data (&proxy->priv->qdata, key); |
4106 |
|
✗ |
if (info != NULL) |
4107 |
|
✗ |
g_object_notify (G_OBJECT (proxy), info->hyphen_name); |
4108 |
|
|
} |
4109 |
|
✗ |
g_variant_iter_free (iter); |
4110 |
|
✗ |
for (n = 0; invalidated_properties[n] != NULL; n++) |
4111 |
|
|
{ |
4112 |
|
✗ |
info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_cc_fprintd_manager_interface_info.parent_struct, invalidated_properties[n]); |
4113 |
|
✗ |
g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]); |
4114 |
|
✗ |
if (info != NULL) |
4115 |
|
✗ |
g_object_notify (G_OBJECT (proxy), info->hyphen_name); |
4116 |
|
|
} |
4117 |
|
✗ |
} |
4118 |
|
|
|
4119 |
|
|
static void |
4120 |
|
✗ |
cc_fprintd_manager_proxy_init (CcFprintdManagerProxy *proxy) |
4121 |
|
|
{ |
4122 |
|
|
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 |
4123 |
|
✗ |
proxy->priv = cc_fprintd_manager_proxy_get_instance_private (proxy); |
4124 |
|
|
#else |
4125 |
|
|
proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, CC_FPRINTD_TYPE_MANAGER_PROXY, CcFprintdManagerProxyPrivate); |
4126 |
|
|
#endif |
4127 |
|
|
|
4128 |
|
✗ |
g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), cc_fprintd_manager_interface_info ()); |
4129 |
|
✗ |
} |
4130 |
|
|
|
4131 |
|
|
static void |
4132 |
|
✗ |
cc_fprintd_manager_proxy_class_init (CcFprintdManagerProxyClass *klass) |
4133 |
|
|
{ |
4134 |
|
|
GObjectClass *gobject_class; |
4135 |
|
|
GDBusProxyClass *proxy_class; |
4136 |
|
|
|
4137 |
|
✗ |
gobject_class = G_OBJECT_CLASS (klass); |
4138 |
|
✗ |
gobject_class->finalize = cc_fprintd_manager_proxy_finalize; |
4139 |
|
✗ |
gobject_class->get_property = cc_fprintd_manager_proxy_get_property; |
4140 |
|
✗ |
gobject_class->set_property = cc_fprintd_manager_proxy_set_property; |
4141 |
|
|
|
4142 |
|
✗ |
proxy_class = G_DBUS_PROXY_CLASS (klass); |
4143 |
|
✗ |
proxy_class->g_signal = cc_fprintd_manager_proxy_g_signal; |
4144 |
|
✗ |
proxy_class->g_properties_changed = cc_fprintd_manager_proxy_g_properties_changed; |
4145 |
|
|
|
4146 |
|
|
#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38 |
4147 |
|
|
g_type_class_add_private (klass, sizeof (CcFprintdManagerProxyPrivate)); |
4148 |
|
|
#endif |
4149 |
|
✗ |
} |
4150 |
|
|
|
4151 |
|
|
static void |
4152 |
|
✗ |
cc_fprintd_manager_proxy_iface_init (CcFprintdManagerIface *iface G_GNUC_UNUSED) |
4153 |
|
|
{ |
4154 |
|
✗ |
} |
4155 |
|
|
|
4156 |
|
|
/** |
4157 |
|
|
* cc_fprintd_manager_proxy_new: |
4158 |
|
|
* @connection: A #GDBusConnection. |
4159 |
|
|
* @flags: Flags from the #GDBusProxyFlags enumeration. |
4160 |
|
|
* @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. |
4161 |
|
|
* @object_path: An object path. |
4162 |
|
|
* @cancellable: (nullable): A #GCancellable or %NULL. |
4163 |
|
|
* @callback: A #GAsyncReadyCallback to call when the request is satisfied. |
4164 |
|
|
* @user_data: User data to pass to @callback. |
4165 |
|
|
* |
4166 |
|
|
* Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-net-reactivated-Fprint-Manager.top_of_page">net.reactivated.Fprint.Manager</link>. See g_dbus_proxy_new() for more details. |
4167 |
|
|
* |
4168 |
|
|
* When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
4169 |
|
|
* You can then call cc_fprintd_manager_proxy_new_finish() to get the result of the operation. |
4170 |
|
|
* |
4171 |
|
|
* See cc_fprintd_manager_proxy_new_sync() for the synchronous, blocking version of this constructor. |
4172 |
|
|
*/ |
4173 |
|
|
void |
4174 |
|
✗ |
cc_fprintd_manager_proxy_new ( |
4175 |
|
|
GDBusConnection *connection, |
4176 |
|
|
GDBusProxyFlags flags, |
4177 |
|
|
const gchar *name, |
4178 |
|
|
const gchar *object_path, |
4179 |
|
|
GCancellable *cancellable, |
4180 |
|
|
GAsyncReadyCallback callback, |
4181 |
|
|
gpointer user_data) |
4182 |
|
|
{ |
4183 |
|
✗ |
g_async_initable_new_async (CC_FPRINTD_TYPE_MANAGER_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "net.reactivated.Fprint.Manager", NULL); |
4184 |
|
✗ |
} |
4185 |
|
|
|
4186 |
|
|
/** |
4187 |
|
|
* cc_fprintd_manager_proxy_new_finish: |
4188 |
|
|
* @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to cc_fprintd_manager_proxy_new(). |
4189 |
|
|
* @error: Return location for error or %NULL |
4190 |
|
|
* |
4191 |
|
|
* Finishes an operation started with cc_fprintd_manager_proxy_new(). |
4192 |
|
|
* |
4193 |
|
|
* Returns: (transfer full) (type CcFprintdManagerProxy): The constructed proxy object or %NULL if @error is set. |
4194 |
|
|
*/ |
4195 |
|
|
CcFprintdManager * |
4196 |
|
✗ |
cc_fprintd_manager_proxy_new_finish ( |
4197 |
|
|
GAsyncResult *res, |
4198 |
|
|
GError **error) |
4199 |
|
|
{ |
4200 |
|
|
GObject *ret; |
4201 |
|
|
GObject *source_object; |
4202 |
|
✗ |
source_object = g_async_result_get_source_object (res); |
4203 |
|
✗ |
ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error); |
4204 |
|
✗ |
g_object_unref (source_object); |
4205 |
|
✗ |
if (ret != NULL) |
4206 |
|
✗ |
return CC_FPRINTD_MANAGER (ret); |
4207 |
|
|
else |
4208 |
|
✗ |
return NULL; |
4209 |
|
|
} |
4210 |
|
|
|
4211 |
|
|
/** |
4212 |
|
|
* cc_fprintd_manager_proxy_new_sync: |
4213 |
|
|
* @connection: A #GDBusConnection. |
4214 |
|
|
* @flags: Flags from the #GDBusProxyFlags enumeration. |
4215 |
|
|
* @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. |
4216 |
|
|
* @object_path: An object path. |
4217 |
|
|
* @cancellable: (nullable): A #GCancellable or %NULL. |
4218 |
|
|
* @error: Return location for error or %NULL |
4219 |
|
|
* |
4220 |
|
|
* Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-net-reactivated-Fprint-Manager.top_of_page">net.reactivated.Fprint.Manager</link>. See g_dbus_proxy_new_sync() for more details. |
4221 |
|
|
* |
4222 |
|
|
* The calling thread is blocked until a reply is received. |
4223 |
|
|
* |
4224 |
|
|
* See cc_fprintd_manager_proxy_new() for the asynchronous version of this constructor. |
4225 |
|
|
* |
4226 |
|
|
* Returns: (transfer full) (type CcFprintdManagerProxy): The constructed proxy object or %NULL if @error is set. |
4227 |
|
|
*/ |
4228 |
|
|
CcFprintdManager * |
4229 |
|
✗ |
cc_fprintd_manager_proxy_new_sync ( |
4230 |
|
|
GDBusConnection *connection, |
4231 |
|
|
GDBusProxyFlags flags, |
4232 |
|
|
const gchar *name, |
4233 |
|
|
const gchar *object_path, |
4234 |
|
|
GCancellable *cancellable, |
4235 |
|
|
GError **error) |
4236 |
|
|
{ |
4237 |
|
|
GInitable *ret; |
4238 |
|
✗ |
ret = g_initable_new (CC_FPRINTD_TYPE_MANAGER_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "net.reactivated.Fprint.Manager", NULL); |
4239 |
|
✗ |
if (ret != NULL) |
4240 |
|
✗ |
return CC_FPRINTD_MANAGER (ret); |
4241 |
|
|
else |
4242 |
|
✗ |
return NULL; |
4243 |
|
|
} |
4244 |
|
|
|
4245 |
|
|
|
4246 |
|
|
/** |
4247 |
|
|
* cc_fprintd_manager_proxy_new_for_bus: |
4248 |
|
|
* @bus_type: A #GBusType. |
4249 |
|
|
* @flags: Flags from the #GDBusProxyFlags enumeration. |
4250 |
|
|
* @name: A bus name (well-known or unique). |
4251 |
|
|
* @object_path: An object path. |
4252 |
|
|
* @cancellable: (nullable): A #GCancellable or %NULL. |
4253 |
|
|
* @callback: A #GAsyncReadyCallback to call when the request is satisfied. |
4254 |
|
|
* @user_data: User data to pass to @callback. |
4255 |
|
|
* |
4256 |
|
|
* Like cc_fprintd_manager_proxy_new() but takes a #GBusType instead of a #GDBusConnection. |
4257 |
|
|
* |
4258 |
|
|
* When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
4259 |
|
|
* You can then call cc_fprintd_manager_proxy_new_for_bus_finish() to get the result of the operation. |
4260 |
|
|
* |
4261 |
|
|
* See cc_fprintd_manager_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor. |
4262 |
|
|
*/ |
4263 |
|
|
void |
4264 |
|
✗ |
cc_fprintd_manager_proxy_new_for_bus ( |
4265 |
|
|
GBusType bus_type, |
4266 |
|
|
GDBusProxyFlags flags, |
4267 |
|
|
const gchar *name, |
4268 |
|
|
const gchar *object_path, |
4269 |
|
|
GCancellable *cancellable, |
4270 |
|
|
GAsyncReadyCallback callback, |
4271 |
|
|
gpointer user_data) |
4272 |
|
|
{ |
4273 |
|
✗ |
g_async_initable_new_async (CC_FPRINTD_TYPE_MANAGER_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "net.reactivated.Fprint.Manager", NULL); |
4274 |
|
✗ |
} |
4275 |
|
|
|
4276 |
|
|
/** |
4277 |
|
|
* cc_fprintd_manager_proxy_new_for_bus_finish: |
4278 |
|
|
* @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to cc_fprintd_manager_proxy_new_for_bus(). |
4279 |
|
|
* @error: Return location for error or %NULL |
4280 |
|
|
* |
4281 |
|
|
* Finishes an operation started with cc_fprintd_manager_proxy_new_for_bus(). |
4282 |
|
|
* |
4283 |
|
|
* Returns: (transfer full) (type CcFprintdManagerProxy): The constructed proxy object or %NULL if @error is set. |
4284 |
|
|
*/ |
4285 |
|
|
CcFprintdManager * |
4286 |
|
✗ |
cc_fprintd_manager_proxy_new_for_bus_finish ( |
4287 |
|
|
GAsyncResult *res, |
4288 |
|
|
GError **error) |
4289 |
|
|
{ |
4290 |
|
|
GObject *ret; |
4291 |
|
|
GObject *source_object; |
4292 |
|
✗ |
source_object = g_async_result_get_source_object (res); |
4293 |
|
✗ |
ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error); |
4294 |
|
✗ |
g_object_unref (source_object); |
4295 |
|
✗ |
if (ret != NULL) |
4296 |
|
✗ |
return CC_FPRINTD_MANAGER (ret); |
4297 |
|
|
else |
4298 |
|
✗ |
return NULL; |
4299 |
|
|
} |
4300 |
|
|
|
4301 |
|
|
/** |
4302 |
|
|
* cc_fprintd_manager_proxy_new_for_bus_sync: |
4303 |
|
|
* @bus_type: A #GBusType. |
4304 |
|
|
* @flags: Flags from the #GDBusProxyFlags enumeration. |
4305 |
|
|
* @name: A bus name (well-known or unique). |
4306 |
|
|
* @object_path: An object path. |
4307 |
|
|
* @cancellable: (nullable): A #GCancellable or %NULL. |
4308 |
|
|
* @error: Return location for error or %NULL |
4309 |
|
|
* |
4310 |
|
|
* Like cc_fprintd_manager_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection. |
4311 |
|
|
* |
4312 |
|
|
* The calling thread is blocked until a reply is received. |
4313 |
|
|
* |
4314 |
|
|
* See cc_fprintd_manager_proxy_new_for_bus() for the asynchronous version of this constructor. |
4315 |
|
|
* |
4316 |
|
|
* Returns: (transfer full) (type CcFprintdManagerProxy): The constructed proxy object or %NULL if @error is set. |
4317 |
|
|
*/ |
4318 |
|
|
CcFprintdManager * |
4319 |
|
✗ |
cc_fprintd_manager_proxy_new_for_bus_sync ( |
4320 |
|
|
GBusType bus_type, |
4321 |
|
|
GDBusProxyFlags flags, |
4322 |
|
|
const gchar *name, |
4323 |
|
|
const gchar *object_path, |
4324 |
|
|
GCancellable *cancellable, |
4325 |
|
|
GError **error) |
4326 |
|
|
{ |
4327 |
|
|
GInitable *ret; |
4328 |
|
✗ |
ret = g_initable_new (CC_FPRINTD_TYPE_MANAGER_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "net.reactivated.Fprint.Manager", NULL); |
4329 |
|
✗ |
if (ret != NULL) |
4330 |
|
✗ |
return CC_FPRINTD_MANAGER (ret); |
4331 |
|
|
else |
4332 |
|
✗ |
return NULL; |
4333 |
|
|
} |
4334 |
|
|
|
4335 |
|
|
|
4336 |
|
|
/* ------------------------------------------------------------------------ */ |
4337 |
|
|
|
4338 |
|
|
/** |
4339 |
|
|
* CcFprintdManagerSkeleton: |
4340 |
|
|
* |
4341 |
|
|
* The #CcFprintdManagerSkeleton structure contains only private data and should only be accessed using the provided API. |
4342 |
|
|
*/ |
4343 |
|
|
|
4344 |
|
|
/** |
4345 |
|
|
* CcFprintdManagerSkeletonClass: |
4346 |
|
|
* @parent_class: The parent class. |
4347 |
|
|
* |
4348 |
|
|
* Class structure for #CcFprintdManagerSkeleton. |
4349 |
|
|
*/ |
4350 |
|
|
|
4351 |
|
|
struct _CcFprintdManagerSkeletonPrivate |
4352 |
|
|
{ |
4353 |
|
|
GValue *properties; |
4354 |
|
|
GList *changed_properties; |
4355 |
|
|
GSource *changed_properties_idle_source; |
4356 |
|
|
GMainContext *context; |
4357 |
|
|
GMutex lock; |
4358 |
|
|
}; |
4359 |
|
|
|
4360 |
|
|
static void |
4361 |
|
✗ |
_cc_fprintd_manager_skeleton_handle_method_call ( |
4362 |
|
|
GDBusConnection *connection G_GNUC_UNUSED, |
4363 |
|
|
const gchar *sender G_GNUC_UNUSED, |
4364 |
|
|
const gchar *object_path G_GNUC_UNUSED, |
4365 |
|
|
const gchar *interface_name, |
4366 |
|
|
const gchar *method_name, |
4367 |
|
|
GVariant *parameters, |
4368 |
|
|
GDBusMethodInvocation *invocation, |
4369 |
|
|
gpointer user_data) |
4370 |
|
|
{ |
4371 |
|
✗ |
CcFprintdManagerSkeleton *skeleton = CC_FPRINTD_MANAGER_SKELETON (user_data); |
4372 |
|
|
_ExtendedGDBusMethodInfo *info; |
4373 |
|
|
GVariantIter iter; |
4374 |
|
|
GVariant *child; |
4375 |
|
|
GValue *paramv; |
4376 |
|
|
gsize num_params; |
4377 |
|
|
guint num_extra; |
4378 |
|
|
gsize n; |
4379 |
|
|
guint signal_id; |
4380 |
|
✗ |
GValue return_value = G_VALUE_INIT; |
4381 |
|
✗ |
info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation); |
4382 |
|
✗ |
g_assert (info != NULL); |
4383 |
|
✗ |
num_params = g_variant_n_children (parameters); |
4384 |
|
✗ |
num_extra = info->pass_fdlist ? 3 : 2; paramv = g_new0 (GValue, num_params + num_extra); |
4385 |
|
✗ |
n = 0; |
4386 |
|
✗ |
g_value_init (¶mv[n], CC_FPRINTD_TYPE_MANAGER); |
4387 |
|
✗ |
g_value_set_object (¶mv[n++], skeleton); |
4388 |
|
✗ |
g_value_init (¶mv[n], G_TYPE_DBUS_METHOD_INVOCATION); |
4389 |
|
✗ |
g_value_set_object (¶mv[n++], invocation); |
4390 |
|
✗ |
if (info->pass_fdlist) |
4391 |
|
|
{ |
4392 |
|
|
#ifdef G_OS_UNIX |
4393 |
|
✗ |
g_value_init (¶mv[n], G_TYPE_UNIX_FD_LIST); |
4394 |
|
✗ |
g_value_set_object (¶mv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation))); |
4395 |
|
|
#else |
4396 |
|
|
g_assert_not_reached (); |
4397 |
|
|
#endif |
4398 |
|
|
} |
4399 |
|
✗ |
g_variant_iter_init (&iter, parameters); |
4400 |
|
✗ |
while ((child = g_variant_iter_next_value (&iter)) != NULL) |
4401 |
|
|
{ |
4402 |
|
✗ |
_ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra]; |
4403 |
|
✗ |
if (arg_info->use_gvariant) |
4404 |
|
|
{ |
4405 |
|
✗ |
g_value_init (¶mv[n], G_TYPE_VARIANT); |
4406 |
|
✗ |
g_value_set_variant (¶mv[n], child); |
4407 |
|
✗ |
n++; |
4408 |
|
|
} |
4409 |
|
|
else |
4410 |
|
✗ |
g_dbus_gvariant_to_gvalue (child, ¶mv[n++]); |
4411 |
|
✗ |
g_variant_unref (child); |
4412 |
|
|
} |
4413 |
|
✗ |
signal_id = g_signal_lookup (info->signal_name, CC_FPRINTD_TYPE_MANAGER); |
4414 |
|
✗ |
g_value_init (&return_value, G_TYPE_BOOLEAN); |
4415 |
|
✗ |
g_signal_emitv (paramv, signal_id, 0, &return_value); |
4416 |
|
✗ |
if (!g_value_get_boolean (&return_value)) |
4417 |
|
✗ |
g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name); |
4418 |
|
✗ |
g_value_unset (&return_value); |
4419 |
|
✗ |
for (n = 0; n < num_params + num_extra; n++) |
4420 |
|
✗ |
g_value_unset (¶mv[n]); |
4421 |
|
✗ |
g_free (paramv); |
4422 |
|
✗ |
} |
4423 |
|
|
|
4424 |
|
|
static GVariant * |
4425 |
|
✗ |
_cc_fprintd_manager_skeleton_handle_get_property ( |
4426 |
|
|
GDBusConnection *connection G_GNUC_UNUSED, |
4427 |
|
|
const gchar *sender G_GNUC_UNUSED, |
4428 |
|
|
const gchar *object_path G_GNUC_UNUSED, |
4429 |
|
|
const gchar *interface_name G_GNUC_UNUSED, |
4430 |
|
|
const gchar *property_name, |
4431 |
|
|
GError **error, |
4432 |
|
|
gpointer user_data) |
4433 |
|
|
{ |
4434 |
|
✗ |
CcFprintdManagerSkeleton *skeleton = CC_FPRINTD_MANAGER_SKELETON (user_data); |
4435 |
|
✗ |
GValue value = G_VALUE_INIT; |
4436 |
|
|
GParamSpec *pspec; |
4437 |
|
|
_ExtendedGDBusPropertyInfo *info; |
4438 |
|
|
GVariant *ret; |
4439 |
|
✗ |
ret = NULL; |
4440 |
|
✗ |
info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_cc_fprintd_manager_interface_info.parent_struct, property_name); |
4441 |
|
✗ |
g_assert (info != NULL); |
4442 |
|
✗ |
pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name); |
4443 |
|
✗ |
if (pspec == NULL) |
4444 |
|
|
{ |
4445 |
|
✗ |
g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name); |
4446 |
|
|
} |
4447 |
|
|
else |
4448 |
|
|
{ |
4449 |
|
✗ |
g_value_init (&value, pspec->value_type); |
4450 |
|
✗ |
g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value); |
4451 |
|
✗ |
ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature)); |
4452 |
|
✗ |
g_value_unset (&value); |
4453 |
|
|
} |
4454 |
|
✗ |
return ret; |
4455 |
|
|
} |
4456 |
|
|
|
4457 |
|
|
static gboolean |
4458 |
|
✗ |
_cc_fprintd_manager_skeleton_handle_set_property ( |
4459 |
|
|
GDBusConnection *connection G_GNUC_UNUSED, |
4460 |
|
|
const gchar *sender G_GNUC_UNUSED, |
4461 |
|
|
const gchar *object_path G_GNUC_UNUSED, |
4462 |
|
|
const gchar *interface_name G_GNUC_UNUSED, |
4463 |
|
|
const gchar *property_name, |
4464 |
|
|
GVariant *variant, |
4465 |
|
|
GError **error, |
4466 |
|
|
gpointer user_data) |
4467 |
|
|
{ |
4468 |
|
✗ |
CcFprintdManagerSkeleton *skeleton = CC_FPRINTD_MANAGER_SKELETON (user_data); |
4469 |
|
✗ |
GValue value = G_VALUE_INIT; |
4470 |
|
|
GParamSpec *pspec; |
4471 |
|
|
_ExtendedGDBusPropertyInfo *info; |
4472 |
|
|
gboolean ret; |
4473 |
|
✗ |
ret = FALSE; |
4474 |
|
✗ |
info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_cc_fprintd_manager_interface_info.parent_struct, property_name); |
4475 |
|
✗ |
g_assert (info != NULL); |
4476 |
|
✗ |
pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name); |
4477 |
|
✗ |
if (pspec == NULL) |
4478 |
|
|
{ |
4479 |
|
✗ |
g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name); |
4480 |
|
|
} |
4481 |
|
|
else |
4482 |
|
|
{ |
4483 |
|
✗ |
if (info->use_gvariant) |
4484 |
|
✗ |
g_value_set_variant (&value, variant); |
4485 |
|
|
else |
4486 |
|
✗ |
g_dbus_gvariant_to_gvalue (variant, &value); |
4487 |
|
✗ |
g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value); |
4488 |
|
✗ |
g_value_unset (&value); |
4489 |
|
✗ |
ret = TRUE; |
4490 |
|
|
} |
4491 |
|
✗ |
return ret; |
4492 |
|
|
} |
4493 |
|
|
|
4494 |
|
|
static const GDBusInterfaceVTable _cc_fprintd_manager_skeleton_vtable = |
4495 |
|
|
{ |
4496 |
|
|
_cc_fprintd_manager_skeleton_handle_method_call, |
4497 |
|
|
_cc_fprintd_manager_skeleton_handle_get_property, |
4498 |
|
|
_cc_fprintd_manager_skeleton_handle_set_property, |
4499 |
|
|
{NULL} |
4500 |
|
|
}; |
4501 |
|
|
|
4502 |
|
|
static GDBusInterfaceInfo * |
4503 |
|
✗ |
cc_fprintd_manager_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED) |
4504 |
|
|
{ |
4505 |
|
✗ |
return cc_fprintd_manager_interface_info (); |
4506 |
|
|
} |
4507 |
|
|
|
4508 |
|
|
static GDBusInterfaceVTable * |
4509 |
|
✗ |
cc_fprintd_manager_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED) |
4510 |
|
|
{ |
4511 |
|
✗ |
return (GDBusInterfaceVTable *) &_cc_fprintd_manager_skeleton_vtable; |
4512 |
|
|
} |
4513 |
|
|
|
4514 |
|
|
static GVariant * |
4515 |
|
✗ |
cc_fprintd_manager_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton) |
4516 |
|
|
{ |
4517 |
|
✗ |
CcFprintdManagerSkeleton *skeleton = CC_FPRINTD_MANAGER_SKELETON (_skeleton); |
4518 |
|
|
|
4519 |
|
|
GVariantBuilder builder; |
4520 |
|
|
guint n; |
4521 |
|
✗ |
g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}")); |
4522 |
|
✗ |
if (_cc_fprintd_manager_interface_info.parent_struct.properties == NULL) |
4523 |
|
✗ |
goto out; |
4524 |
|
✗ |
for (n = 0; _cc_fprintd_manager_interface_info.parent_struct.properties[n] != NULL; n++) |
4525 |
|
|
{ |
4526 |
|
✗ |
GDBusPropertyInfo *info = _cc_fprintd_manager_interface_info.parent_struct.properties[n]; |
4527 |
|
✗ |
if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE) |
4528 |
|
|
{ |
4529 |
|
|
GVariant *value; |
4530 |
|
✗ |
value = _cc_fprintd_manager_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "net.reactivated.Fprint.Manager", info->name, NULL, skeleton); |
4531 |
|
✗ |
if (value != NULL) |
4532 |
|
|
{ |
4533 |
|
✗ |
g_variant_take_ref (value); |
4534 |
|
✗ |
g_variant_builder_add (&builder, "{sv}", info->name, value); |
4535 |
|
✗ |
g_variant_unref (value); |
4536 |
|
|
} |
4537 |
|
|
} |
4538 |
|
|
} |
4539 |
|
✗ |
out: |
4540 |
|
✗ |
return g_variant_builder_end (&builder); |
4541 |
|
|
} |
4542 |
|
|
|
4543 |
|
|
static void |
4544 |
|
✗ |
cc_fprintd_manager_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton G_GNUC_UNUSED) |
4545 |
|
|
{ |
4546 |
|
✗ |
} |
4547 |
|
|
|
4548 |
|
|
static void cc_fprintd_manager_skeleton_iface_init (CcFprintdManagerIface *iface); |
4549 |
|
|
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 |
4550 |
|
✗ |
G_DEFINE_TYPE_WITH_CODE (CcFprintdManagerSkeleton, cc_fprintd_manager_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON, |
4551 |
|
|
G_ADD_PRIVATE (CcFprintdManagerSkeleton) |
4552 |
|
|
G_IMPLEMENT_INTERFACE (CC_FPRINTD_TYPE_MANAGER, cc_fprintd_manager_skeleton_iface_init)) |
4553 |
|
|
|
4554 |
|
|
#else |
4555 |
|
|
G_DEFINE_TYPE_WITH_CODE (CcFprintdManagerSkeleton, cc_fprintd_manager_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON, |
4556 |
|
|
G_IMPLEMENT_INTERFACE (CC_FPRINTD_TYPE_MANAGER, cc_fprintd_manager_skeleton_iface_init)) |
4557 |
|
|
|
4558 |
|
|
#endif |
4559 |
|
|
static void |
4560 |
|
✗ |
cc_fprintd_manager_skeleton_finalize (GObject *object) |
4561 |
|
|
{ |
4562 |
|
✗ |
CcFprintdManagerSkeleton *skeleton = CC_FPRINTD_MANAGER_SKELETON (object); |
4563 |
|
✗ |
g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free); |
4564 |
|
✗ |
if (skeleton->priv->changed_properties_idle_source != NULL) |
4565 |
|
✗ |
g_source_destroy (skeleton->priv->changed_properties_idle_source); |
4566 |
|
✗ |
g_main_context_unref (skeleton->priv->context); |
4567 |
|
✗ |
g_mutex_clear (&skeleton->priv->lock); |
4568 |
|
✗ |
G_OBJECT_CLASS (cc_fprintd_manager_skeleton_parent_class)->finalize (object); |
4569 |
|
✗ |
} |
4570 |
|
|
|
4571 |
|
|
static void |
4572 |
|
✗ |
cc_fprintd_manager_skeleton_init (CcFprintdManagerSkeleton *skeleton) |
4573 |
|
|
{ |
4574 |
|
|
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 |
4575 |
|
✗ |
skeleton->priv = cc_fprintd_manager_skeleton_get_instance_private (skeleton); |
4576 |
|
|
#else |
4577 |
|
|
skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, CC_FPRINTD_TYPE_MANAGER_SKELETON, CcFprintdManagerSkeletonPrivate); |
4578 |
|
|
#endif |
4579 |
|
|
|
4580 |
|
✗ |
g_mutex_init (&skeleton->priv->lock); |
4581 |
|
✗ |
skeleton->priv->context = g_main_context_ref_thread_default (); |
4582 |
|
✗ |
} |
4583 |
|
|
|
4584 |
|
|
static void |
4585 |
|
✗ |
cc_fprintd_manager_skeleton_class_init (CcFprintdManagerSkeletonClass *klass) |
4586 |
|
|
{ |
4587 |
|
|
GObjectClass *gobject_class; |
4588 |
|
|
GDBusInterfaceSkeletonClass *skeleton_class; |
4589 |
|
|
|
4590 |
|
✗ |
gobject_class = G_OBJECT_CLASS (klass); |
4591 |
|
✗ |
gobject_class->finalize = cc_fprintd_manager_skeleton_finalize; |
4592 |
|
|
|
4593 |
|
✗ |
skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass); |
4594 |
|
✗ |
skeleton_class->get_info = cc_fprintd_manager_skeleton_dbus_interface_get_info; |
4595 |
|
✗ |
skeleton_class->get_properties = cc_fprintd_manager_skeleton_dbus_interface_get_properties; |
4596 |
|
✗ |
skeleton_class->flush = cc_fprintd_manager_skeleton_dbus_interface_flush; |
4597 |
|
✗ |
skeleton_class->get_vtable = cc_fprintd_manager_skeleton_dbus_interface_get_vtable; |
4598 |
|
|
|
4599 |
|
|
#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38 |
4600 |
|
|
g_type_class_add_private (klass, sizeof (CcFprintdManagerSkeletonPrivate)); |
4601 |
|
|
#endif |
4602 |
|
✗ |
} |
4603 |
|
|
|
4604 |
|
|
static void |
4605 |
|
✗ |
cc_fprintd_manager_skeleton_iface_init (CcFprintdManagerIface *iface G_GNUC_UNUSED) |
4606 |
|
|
{ |
4607 |
|
✗ |
} |
4608 |
|
|
|
4609 |
|
|
/** |
4610 |
|
|
* cc_fprintd_manager_skeleton_new: |
4611 |
|
|
* |
4612 |
|
|
* Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-net-reactivated-Fprint-Manager.top_of_page">net.reactivated.Fprint.Manager</link>. |
4613 |
|
|
* |
4614 |
|
|
* Returns: (transfer full) (type CcFprintdManagerSkeleton): The skeleton object. |
4615 |
|
|
*/ |
4616 |
|
|
CcFprintdManager * |
4617 |
|
✗ |
cc_fprintd_manager_skeleton_new (void) |
4618 |
|
|
{ |
4619 |
|
✗ |
return CC_FPRINTD_MANAGER (g_object_new (CC_FPRINTD_TYPE_MANAGER_SKELETON, NULL)); |
4620 |
|
|
} |
4621 |
|
|
|
4622 |
|
|
|