File: | shell/ev-daemon-gdbus-generated.c |
Warning: | line 1526, column 21 Value stored to 'skeleton' during its initialization is never read |
Press '?' to see keyboard shortcuts
Keyboard shortcuts:
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_H1 |
10 | # include "config.h" |
11 | #endif |
12 | |
13 | #include "ev-daemon-gdbus-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)(v)->data[0].v_int g_value_get_boolean (v) |
22 | #define g_marshal_value_peek_char(v)(v)->data[0].v_int g_value_get_schar (v) |
23 | #define g_marshal_value_peek_uchar(v)(v)->data[0].v_uint g_value_get_uchar (v) |
24 | #define g_marshal_value_peek_int(v)(v)->data[0].v_int g_value_get_int (v) |
25 | #define g_marshal_value_peek_uint(v)(v)->data[0].v_uint g_value_get_uint (v) |
26 | #define g_marshal_value_peek_long(v)(v)->data[0].v_long g_value_get_long (v) |
27 | #define g_marshal_value_peek_ulong(v)(v)->data[0].v_ulong g_value_get_ulong (v) |
28 | #define g_marshal_value_peek_int64(v)(v)->data[0].v_int64 g_value_get_int64 (v) |
29 | #define g_marshal_value_peek_uint64(v)(v)->data[0].v_uint64 g_value_get_uint64 (v) |
30 | #define g_marshal_value_peek_enum(v)(v)->data[0].v_long g_value_get_enum (v) |
31 | #define g_marshal_value_peek_flags(v)(v)->data[0].v_ulong g_value_get_flags (v) |
32 | #define g_marshal_value_peek_float(v)(v)->data[0].v_float g_value_get_float (v) |
33 | #define g_marshal_value_peek_double(v)(v)->data[0].v_double g_value_get_double (v) |
34 | #define g_marshal_value_peek_string(v)(v)->data[0].v_pointer (char*) g_value_get_string (v) |
35 | #define g_marshal_value_peek_param(v)(v)->data[0].v_pointer g_value_get_param (v) |
36 | #define g_marshal_value_peek_boxed(v)(v)->data[0].v_pointer g_value_get_boxed (v) |
37 | #define g_marshal_value_peek_pointer(v)(v)->data[0].v_pointer g_value_get_pointer (v) |
38 | #define g_marshal_value_peek_object(v)(v)->data[0].v_pointer g_value_get_object (v) |
39 | #define g_marshal_value_peek_variant(v)(v)->data[0].v_pointer 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 (v)->data[0].v_int |
46 | #define g_marshal_value_peek_char(v)(v)->data[0].v_int (v)->data[0].v_int |
47 | #define g_marshal_value_peek_uchar(v)(v)->data[0].v_uint (v)->data[0].v_uint |
48 | #define g_marshal_value_peek_int(v)(v)->data[0].v_int (v)->data[0].v_int |
49 | #define g_marshal_value_peek_uint(v)(v)->data[0].v_uint (v)->data[0].v_uint |
50 | #define g_marshal_value_peek_long(v)(v)->data[0].v_long (v)->data[0].v_long |
51 | #define g_marshal_value_peek_ulong(v)(v)->data[0].v_ulong (v)->data[0].v_ulong |
52 | #define g_marshal_value_peek_int64(v)(v)->data[0].v_int64 (v)->data[0].v_int64 |
53 | #define g_marshal_value_peek_uint64(v)(v)->data[0].v_uint64 (v)->data[0].v_uint64 |
54 | #define g_marshal_value_peek_enum(v)(v)->data[0].v_long (v)->data[0].v_long |
55 | #define g_marshal_value_peek_flags(v)(v)->data[0].v_ulong (v)->data[0].v_ulong |
56 | #define g_marshal_value_peek_float(v)(v)->data[0].v_float (v)->data[0].v_float |
57 | #define g_marshal_value_peek_double(v)(v)->data[0].v_double (v)->data[0].v_double |
58 | #define g_marshal_value_peek_string(v)(v)->data[0].v_pointer (v)->data[0].v_pointer |
59 | #define g_marshal_value_peek_param(v)(v)->data[0].v_pointer (v)->data[0].v_pointer |
60 | #define g_marshal_value_peek_boxed(v)(v)->data[0].v_pointer (v)->data[0].v_pointer |
61 | #define g_marshal_value_peek_pointer(v)(v)->data[0].v_pointer (v)->data[0].v_pointer |
62 | #define g_marshal_value_peek_object(v)(v)->data[0].v_pointer (v)->data[0].v_pointer |
63 | #define g_marshal_value_peek_variant(v)(v)->data[0].v_pointer (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(0); |
117 | guint n; |
118 | if (a == NULL((void*)0) && b == NULL((void*)0)) |
119 | { |
120 | ret = TRUE(!(0)); |
121 | goto out; |
122 | } |
123 | if (a == NULL((void*)0) || b == NULL((void*)0)) |
124 | goto out; |
125 | if (g_strv_length (a) != g_strv_length (b)) |
126 | goto out; |
127 | for (n = 0; a[n] != NULL((void*)0); n++) |
128 | if (g_strcmp0 (a[n], b[n]) != 0) |
129 | goto out; |
130 | ret = TRUE(!(0)); |
131 | out: |
132 | return ret; |
133 | } |
134 | |
135 | static gboolean |
136 | _g_variant_equal0 (GVariant *a, GVariant *b) |
137 | { |
138 | gboolean ret = FALSE(0); |
139 | if (a == NULL((void*)0) && b == NULL((void*)0)) |
140 | { |
141 | ret = TRUE(!(0)); |
142 | goto out; |
143 | } |
144 | if (a == NULL((void*)0) || b == NULL((void*)0)) |
145 | goto out; |
146 | ret = g_variant_equal (a, b); |
147 | out: |
148 | return ret; |
149 | } |
150 | |
151 | G_GNUC_UNUSED__attribute__ ((__unused__)) static gboolean |
152 | _g_value_equal (const GValue *a, const GValue *b) |
153 | { |
154 | gboolean ret = FALSE(0); |
155 | g_assert (G_VALUE_TYPE (a) == G_VALUE_TYPE (b))do { if ((((GValue*) (a))->g_type) == (((GValue*) (b))-> g_type)) ; else g_assertion_message_expr (((gchar*) 0), "ev-daemon-gdbus-generated.c" , 155, ((const char*) (__func__)), "G_VALUE_TYPE (a) == G_VALUE_TYPE (b)" ); } while (0); |
156 | switch (G_VALUE_TYPE (a)(((GValue*) (a))->g_type)) |
157 | { |
158 | case G_TYPE_BOOLEAN((GType) ((5) << (2))): |
159 | ret = (g_value_get_boolean (a) == g_value_get_boolean (b)); |
160 | break; |
161 | case G_TYPE_UCHAR((GType) ((4) << (2))): |
162 | ret = (g_value_get_uchar (a) == g_value_get_uchar (b)); |
163 | break; |
164 | case G_TYPE_INT((GType) ((6) << (2))): |
165 | ret = (g_value_get_int (a) == g_value_get_int (b)); |
166 | break; |
167 | case G_TYPE_UINT((GType) ((7) << (2))): |
168 | ret = (g_value_get_uint (a) == g_value_get_uint (b)); |
169 | break; |
170 | case G_TYPE_INT64((GType) ((10) << (2))): |
171 | ret = (g_value_get_int64 (a) == g_value_get_int64 (b)); |
172 | break; |
173 | case G_TYPE_UINT64((GType) ((11) << (2))): |
174 | ret = (g_value_get_uint64 (a) == g_value_get_uint64 (b)); |
175 | break; |
176 | case G_TYPE_DOUBLE((GType) ((15) << (2))): |
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((GType) ((16) << (2))): |
185 | ret = (g_strcmp0 (g_value_get_string (a), g_value_get_string (b)) == 0); |
186 | break; |
187 | case G_TYPE_VARIANT((GType) ((21) << (2))): |
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)(((GValue*) (a))->g_type) == G_TYPE_STRV(g_strv_get_type ())) |
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)(((GValue*) (a))->g_type))); |
195 | break; |
196 | } |
197 | return ret; |
198 | } |
199 | |
200 | static void |
201 | _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING ( |
202 | GClosure *closure, |
203 | GValue *return_value, |
204 | unsigned int n_param_values, |
205 | const GValue *param_values, |
206 | void *invocation_hint G_GNUC_UNUSED__attribute__ ((__unused__)), |
207 | void *marshal_data) |
208 | { |
209 | typedef gboolean (*_GDbusCodegenMarshalBoolean_ObjectStringFunc) |
210 | (void *data1, |
211 | GDBusMethodInvocation *arg_method_invocation, |
212 | const gchar *arg_uri, |
213 | void *data2); |
214 | _GDbusCodegenMarshalBoolean_ObjectStringFunc callback; |
215 | GCClosure *cc = (GCClosure*) closure; |
216 | void *data1, *data2; |
217 | gboolean v_return; |
218 | |
219 | g_return_if_fail (return_value != NULL)do { if ((return_value != ((void*)0))) { } else { g_return_if_fail_warning (((gchar*) 0), ((const char*) (__func__)), "return_value != NULL" ); return; } } while (0); |
220 | g_return_if_fail (n_param_values == 3)do { if ((n_param_values == 3)) { } else { g_return_if_fail_warning (((gchar*) 0), ((const char*) (__func__)), "n_param_values == 3" ); return; } } while (0); |
221 | |
222 | if (G_CCLOSURE_SWAP_DATA (closure)(((GClosure*) (closure))->derivative_flag)) |
223 | { |
224 | data1 = closure->data; |
225 | data2 = g_value_peek_pointer (param_values + 0); |
226 | } |
227 | else |
228 | { |
229 | data1 = g_value_peek_pointer (param_values + 0); |
230 | data2 = closure->data; |
231 | } |
232 | |
233 | callback = (_GDbusCodegenMarshalBoolean_ObjectStringFunc) |
234 | (marshal_data ? marshal_data : cc->callback); |
235 | |
236 | v_return = |
237 | callback (data1, |
238 | g_marshal_value_peek_object (param_values + 1)(param_values + 1)->data[0].v_pointer, |
239 | g_marshal_value_peek_string (param_values + 2)(param_values + 2)->data[0].v_pointer, |
240 | data2); |
241 | |
242 | g_value_set_boolean (return_value, v_return); |
243 | } |
244 | |
245 | static void |
246 | _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_BOOLEAN ( |
247 | GClosure *closure, |
248 | GValue *return_value, |
249 | unsigned int n_param_values, |
250 | const GValue *param_values, |
251 | void *invocation_hint G_GNUC_UNUSED__attribute__ ((__unused__)), |
252 | void *marshal_data) |
253 | { |
254 | typedef gboolean (*_GDbusCodegenMarshalBoolean_ObjectStringBooleanFunc) |
255 | (void *data1, |
256 | GDBusMethodInvocation *arg_method_invocation, |
257 | const gchar *arg_uri, |
258 | gboolean arg_spawn, |
259 | void *data2); |
260 | _GDbusCodegenMarshalBoolean_ObjectStringBooleanFunc callback; |
261 | GCClosure *cc = (GCClosure*) closure; |
262 | void *data1, *data2; |
263 | gboolean v_return; |
264 | |
265 | g_return_if_fail (return_value != NULL)do { if ((return_value != ((void*)0))) { } else { g_return_if_fail_warning (((gchar*) 0), ((const char*) (__func__)), "return_value != NULL" ); return; } } while (0); |
266 | g_return_if_fail (n_param_values == 4)do { if ((n_param_values == 4)) { } else { g_return_if_fail_warning (((gchar*) 0), ((const char*) (__func__)), "n_param_values == 4" ); return; } } while (0); |
267 | |
268 | if (G_CCLOSURE_SWAP_DATA (closure)(((GClosure*) (closure))->derivative_flag)) |
269 | { |
270 | data1 = closure->data; |
271 | data2 = g_value_peek_pointer (param_values + 0); |
272 | } |
273 | else |
274 | { |
275 | data1 = g_value_peek_pointer (param_values + 0); |
276 | data2 = closure->data; |
277 | } |
278 | |
279 | callback = (_GDbusCodegenMarshalBoolean_ObjectStringBooleanFunc) |
280 | (marshal_data ? marshal_data : cc->callback); |
281 | |
282 | v_return = |
283 | callback (data1, |
284 | g_marshal_value_peek_object (param_values + 1)(param_values + 1)->data[0].v_pointer, |
285 | g_marshal_value_peek_string (param_values + 2)(param_values + 2)->data[0].v_pointer, |
286 | g_marshal_value_peek_boolean (param_values + 3)(param_values + 3)->data[0].v_int, |
287 | data2); |
288 | |
289 | g_value_set_boolean (return_value, v_return); |
290 | } |
291 | |
292 | /* ------------------------------------------------------------------------ |
293 | * Code for interface org.cafe.lector.Daemon |
294 | * ------------------------------------------------------------------------ |
295 | */ |
296 | |
297 | /** |
298 | * SECTION:EvDaemon |
299 | * @title: EvDaemon |
300 | * @short_description: Generated C code for the org.cafe.lector.Daemon D-Bus interface |
301 | * |
302 | * This section contains code for working with the <link linkend="gdbus-interface-org-cafe-lector-Daemon.top_of_page">org.cafe.lector.Daemon</link> D-Bus interface in C. |
303 | */ |
304 | |
305 | /* ---- Introspection data for org.cafe.lector.Daemon ---- */ |
306 | |
307 | static const _ExtendedGDBusArgInfo _ev_daemon_method_info_register_document_IN_ARG_uri = |
308 | { |
309 | { |
310 | -1, |
311 | (gchar *) "uri", |
312 | (gchar *) "s", |
313 | NULL((void*)0) |
314 | }, |
315 | FALSE(0) |
316 | }; |
317 | |
318 | static const GDBusArgInfo * const _ev_daemon_method_info_register_document_IN_ARG_pointers[] = |
319 | { |
320 | &_ev_daemon_method_info_register_document_IN_ARG_uri.parent_struct, |
321 | NULL((void*)0) |
322 | }; |
323 | |
324 | static const _ExtendedGDBusArgInfo _ev_daemon_method_info_register_document_OUT_ARG_owner = |
325 | { |
326 | { |
327 | -1, |
328 | (gchar *) "owner", |
329 | (gchar *) "s", |
330 | NULL((void*)0) |
331 | }, |
332 | FALSE(0) |
333 | }; |
334 | |
335 | static const GDBusArgInfo * const _ev_daemon_method_info_register_document_OUT_ARG_pointers[] = |
336 | { |
337 | &_ev_daemon_method_info_register_document_OUT_ARG_owner.parent_struct, |
338 | NULL((void*)0) |
339 | }; |
340 | |
341 | static const _ExtendedGDBusMethodInfo _ev_daemon_method_info_register_document = |
342 | { |
343 | { |
344 | -1, |
345 | (gchar *) "RegisterDocument", |
346 | (GDBusArgInfo **) &_ev_daemon_method_info_register_document_IN_ARG_pointers, |
347 | (GDBusArgInfo **) &_ev_daemon_method_info_register_document_OUT_ARG_pointers, |
348 | NULL((void*)0) |
349 | }, |
350 | "handle-register-document", |
351 | FALSE(0) |
352 | }; |
353 | |
354 | static const _ExtendedGDBusArgInfo _ev_daemon_method_info_unregister_document_IN_ARG_uri = |
355 | { |
356 | { |
357 | -1, |
358 | (gchar *) "uri", |
359 | (gchar *) "s", |
360 | NULL((void*)0) |
361 | }, |
362 | FALSE(0) |
363 | }; |
364 | |
365 | static const GDBusArgInfo * const _ev_daemon_method_info_unregister_document_IN_ARG_pointers[] = |
366 | { |
367 | &_ev_daemon_method_info_unregister_document_IN_ARG_uri.parent_struct, |
368 | NULL((void*)0) |
369 | }; |
370 | |
371 | static const _ExtendedGDBusMethodInfo _ev_daemon_method_info_unregister_document = |
372 | { |
373 | { |
374 | -1, |
375 | (gchar *) "UnregisterDocument", |
376 | (GDBusArgInfo **) &_ev_daemon_method_info_unregister_document_IN_ARG_pointers, |
377 | NULL((void*)0), |
378 | NULL((void*)0) |
379 | }, |
380 | "handle-unregister-document", |
381 | FALSE(0) |
382 | }; |
383 | |
384 | static const _ExtendedGDBusArgInfo _ev_daemon_method_info_find_document_IN_ARG_uri = |
385 | { |
386 | { |
387 | -1, |
388 | (gchar *) "uri", |
389 | (gchar *) "s", |
390 | NULL((void*)0) |
391 | }, |
392 | FALSE(0) |
393 | }; |
394 | |
395 | static const _ExtendedGDBusArgInfo _ev_daemon_method_info_find_document_IN_ARG_spawn = |
396 | { |
397 | { |
398 | -1, |
399 | (gchar *) "spawn", |
400 | (gchar *) "b", |
401 | NULL((void*)0) |
402 | }, |
403 | FALSE(0) |
404 | }; |
405 | |
406 | static const GDBusArgInfo * const _ev_daemon_method_info_find_document_IN_ARG_pointers[] = |
407 | { |
408 | &_ev_daemon_method_info_find_document_IN_ARG_uri.parent_struct, |
409 | &_ev_daemon_method_info_find_document_IN_ARG_spawn.parent_struct, |
410 | NULL((void*)0) |
411 | }; |
412 | |
413 | static const _ExtendedGDBusArgInfo _ev_daemon_method_info_find_document_OUT_ARG_owner = |
414 | { |
415 | { |
416 | -1, |
417 | (gchar *) "owner", |
418 | (gchar *) "s", |
419 | NULL((void*)0) |
420 | }, |
421 | FALSE(0) |
422 | }; |
423 | |
424 | static const GDBusArgInfo * const _ev_daemon_method_info_find_document_OUT_ARG_pointers[] = |
425 | { |
426 | &_ev_daemon_method_info_find_document_OUT_ARG_owner.parent_struct, |
427 | NULL((void*)0) |
428 | }; |
429 | |
430 | static const _ExtendedGDBusMethodInfo _ev_daemon_method_info_find_document = |
431 | { |
432 | { |
433 | -1, |
434 | (gchar *) "FindDocument", |
435 | (GDBusArgInfo **) &_ev_daemon_method_info_find_document_IN_ARG_pointers, |
436 | (GDBusArgInfo **) &_ev_daemon_method_info_find_document_OUT_ARG_pointers, |
437 | NULL((void*)0) |
438 | }, |
439 | "handle-find-document", |
440 | FALSE(0) |
441 | }; |
442 | |
443 | static const GDBusMethodInfo * const _ev_daemon_method_info_pointers[] = |
444 | { |
445 | &_ev_daemon_method_info_register_document.parent_struct, |
446 | &_ev_daemon_method_info_unregister_document.parent_struct, |
447 | &_ev_daemon_method_info_find_document.parent_struct, |
448 | NULL((void*)0) |
449 | }; |
450 | |
451 | static const _ExtendedGDBusInterfaceInfo _ev_daemon_interface_info = |
452 | { |
453 | { |
454 | -1, |
455 | (gchar *) "org.cafe.lector.Daemon", |
456 | (GDBusMethodInfo **) &_ev_daemon_method_info_pointers, |
457 | NULL((void*)0), |
458 | NULL((void*)0), |
459 | NULL((void*)0) |
460 | }, |
461 | "daemon", |
462 | }; |
463 | |
464 | |
465 | /** |
466 | * ev_daemon_interface_info: |
467 | * |
468 | * Gets a machine-readable description of the <link linkend="gdbus-interface-org-cafe-lector-Daemon.top_of_page">org.cafe.lector.Daemon</link> D-Bus interface. |
469 | * |
470 | * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free. |
471 | */ |
472 | GDBusInterfaceInfo * |
473 | ev_daemon_interface_info (void) |
474 | { |
475 | return (GDBusInterfaceInfo *) &_ev_daemon_interface_info.parent_struct; |
476 | } |
477 | |
478 | /** |
479 | * ev_daemon_override_properties: |
480 | * @klass: The class structure for a #GObject derived class. |
481 | * @property_id_begin: The property id to assign to the first overridden property. |
482 | * |
483 | * Overrides all #GObject properties in the #EvDaemon interface for a concrete class. |
484 | * The properties are overridden in the order they are defined. |
485 | * |
486 | * Returns: The last property id. |
487 | */ |
488 | guint |
489 | ev_daemon_override_properties (GObjectClass *klass G_GNUC_UNUSED__attribute__ ((__unused__)), guint property_id_begin) |
490 | { |
491 | return property_id_begin - 1; |
492 | } |
493 | |
494 | |
495 | inline static void |
496 | ev_daemon_method_marshal_register_document ( |
497 | GClosure *closure, |
498 | GValue *return_value, |
499 | unsigned int n_param_values, |
500 | const GValue *param_values, |
501 | void *invocation_hint, |
502 | void *marshal_data) |
503 | { |
504 | _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING (closure, |
505 | return_value, n_param_values, param_values, invocation_hint, marshal_data); |
506 | } |
507 | |
508 | inline static void |
509 | ev_daemon_method_marshal_unregister_document ( |
510 | GClosure *closure, |
511 | GValue *return_value, |
512 | unsigned int n_param_values, |
513 | const GValue *param_values, |
514 | void *invocation_hint, |
515 | void *marshal_data) |
516 | { |
517 | _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING (closure, |
518 | return_value, n_param_values, param_values, invocation_hint, marshal_data); |
519 | } |
520 | |
521 | inline static void |
522 | ev_daemon_method_marshal_find_document ( |
523 | GClosure *closure, |
524 | GValue *return_value, |
525 | unsigned int n_param_values, |
526 | const GValue *param_values, |
527 | void *invocation_hint, |
528 | void *marshal_data) |
529 | { |
530 | _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_BOOLEAN (closure, |
531 | return_value, n_param_values, param_values, invocation_hint, marshal_data); |
532 | } |
533 | |
534 | |
535 | /** |
536 | * EvDaemon: |
537 | * |
538 | * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-cafe-lector-Daemon.top_of_page">org.cafe.lector.Daemon</link>. |
539 | */ |
540 | |
541 | /** |
542 | * EvDaemonIface: |
543 | * @parent_iface: The parent interface. |
544 | * @handle_find_document: Handler for the #EvDaemon::handle-find-document signal. |
545 | * @handle_register_document: Handler for the #EvDaemon::handle-register-document signal. |
546 | * @handle_unregister_document: Handler for the #EvDaemon::handle-unregister-document signal. |
547 | * |
548 | * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-cafe-lector-Daemon.top_of_page">org.cafe.lector.Daemon</link>. |
549 | */ |
550 | |
551 | typedef EvDaemonIface EvDaemonInterface; |
552 | G_DEFINE_INTERFACE (EvDaemon, ev_daemon, G_TYPE_OBJECT)static void ev_daemon_default_init (EvDaemonInterface *klass) ; GType ev_daemon_get_type (void) { static GType static_g_define_type_id = 0; if ((__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id ) == sizeof (gpointer), "Expression evaluates to false"); (void ) (0 ? (gpointer) * (&static_g_define_type_id) : ((void*) 0)); (!(__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id ) == sizeof (gpointer), "Expression evaluates to false"); __typeof__ (*(&static_g_define_type_id)) gapg_temp_newval; __typeof__ ((&static_g_define_type_id)) gapg_temp_atomic = (&static_g_define_type_id ); __atomic_load (gapg_temp_atomic, &gapg_temp_newval, 5) ; gapg_temp_newval; })) && g_once_init_enter_pointer ( &static_g_define_type_id)); })) ) { GType g_define_type_id = g_type_register_static_simple (((GType) ((2) << (2)) ), g_intern_static_string ("EvDaemon"), sizeof (EvDaemonInterface ), (GClassInitFunc)(void (*)(void)) ev_daemon_default_init, 0 , (GInstanceInitFunc)((void*)0), (GTypeFlags) 0); if (((GType ) ((20) << (2))) != ((GType) ((0) << (2)))) g_type_interface_add_prerequisite (g_define_type_id, ((GType) ((20) << (2)))); { {;;} } ( __extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id ) == sizeof (gpointer), "Expression evaluates to false"); 0 ? (void) (*(&static_g_define_type_id) = (g_define_type_id) ) : (void) 0; g_once_init_leave_pointer ((&static_g_define_type_id ), (gpointer) (guintptr) (g_define_type_id)); })) ; } return static_g_define_type_id ; } |
553 | |
554 | static void |
555 | ev_daemon_default_init (EvDaemonIface *iface) |
556 | { |
557 | /* GObject signals for incoming D-Bus method calls: */ |
558 | /** |
559 | * EvDaemon::handle-register-document: |
560 | * @object: A #EvDaemon. |
561 | * @invocation: A #GDBusMethodInvocation. |
562 | * @arg_uri: Argument passed by remote caller. |
563 | * |
564 | * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-cafe-lector-Daemon.RegisterDocument">RegisterDocument()</link> D-Bus method. |
565 | * |
566 | * 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 ev_daemon_complete_register_document() 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. |
567 | * |
568 | * 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. |
569 | */ |
570 | g_signal_new ("handle-register-document", |
571 | G_TYPE_FROM_INTERFACE (iface)(((GTypeInterface*) (iface))->g_type), |
572 | G_SIGNAL_RUN_LAST, |
573 | G_STRUCT_OFFSET (EvDaemonIface, handle_register_document)((glong) __builtin_offsetof(EvDaemonIface, handle_register_document )), |
574 | g_signal_accumulator_true_handled, |
575 | NULL((void*)0), |
576 | ev_daemon_method_marshal_register_document, |
577 | G_TYPE_BOOLEAN((GType) ((5) << (2))), |
578 | 2, |
579 | G_TYPE_DBUS_METHOD_INVOCATION(g_dbus_method_invocation_get_type ()), G_TYPE_STRING((GType) ((16) << (2)))); |
580 | |
581 | /** |
582 | * EvDaemon::handle-unregister-document: |
583 | * @object: A #EvDaemon. |
584 | * @invocation: A #GDBusMethodInvocation. |
585 | * @arg_uri: Argument passed by remote caller. |
586 | * |
587 | * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-cafe-lector-Daemon.UnregisterDocument">UnregisterDocument()</link> D-Bus method. |
588 | * |
589 | * 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 ev_daemon_complete_unregister_document() 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. |
590 | * |
591 | * 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. |
592 | */ |
593 | g_signal_new ("handle-unregister-document", |
594 | G_TYPE_FROM_INTERFACE (iface)(((GTypeInterface*) (iface))->g_type), |
595 | G_SIGNAL_RUN_LAST, |
596 | G_STRUCT_OFFSET (EvDaemonIface, handle_unregister_document)((glong) __builtin_offsetof(EvDaemonIface, handle_unregister_document )), |
597 | g_signal_accumulator_true_handled, |
598 | NULL((void*)0), |
599 | ev_daemon_method_marshal_unregister_document, |
600 | G_TYPE_BOOLEAN((GType) ((5) << (2))), |
601 | 2, |
602 | G_TYPE_DBUS_METHOD_INVOCATION(g_dbus_method_invocation_get_type ()), G_TYPE_STRING((GType) ((16) << (2)))); |
603 | |
604 | /** |
605 | * EvDaemon::handle-find-document: |
606 | * @object: A #EvDaemon. |
607 | * @invocation: A #GDBusMethodInvocation. |
608 | * @arg_uri: Argument passed by remote caller. |
609 | * @arg_spawn: Argument passed by remote caller. |
610 | * |
611 | * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-cafe-lector-Daemon.FindDocument">FindDocument()</link> D-Bus method. |
612 | * |
613 | * 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 ev_daemon_complete_find_document() 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. |
614 | * |
615 | * 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. |
616 | */ |
617 | g_signal_new ("handle-find-document", |
618 | G_TYPE_FROM_INTERFACE (iface)(((GTypeInterface*) (iface))->g_type), |
619 | G_SIGNAL_RUN_LAST, |
620 | G_STRUCT_OFFSET (EvDaemonIface, handle_find_document)((glong) __builtin_offsetof(EvDaemonIface, handle_find_document )), |
621 | g_signal_accumulator_true_handled, |
622 | NULL((void*)0), |
623 | ev_daemon_method_marshal_find_document, |
624 | G_TYPE_BOOLEAN((GType) ((5) << (2))), |
625 | 3, |
626 | G_TYPE_DBUS_METHOD_INVOCATION(g_dbus_method_invocation_get_type ()), G_TYPE_STRING((GType) ((16) << (2))), G_TYPE_BOOLEAN((GType) ((5) << (2)))); |
627 | |
628 | } |
629 | |
630 | /** |
631 | * ev_daemon_call_register_document: |
632 | * @proxy: A #EvDaemonProxy. |
633 | * @arg_uri: Argument to pass with the method invocation. |
634 | * @cancellable: (nullable): A #GCancellable or %NULL. |
635 | * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. |
636 | * @user_data: User data to pass to @callback. |
637 | * |
638 | * Asynchronously invokes the <link linkend="gdbus-method-org-cafe-lector-Daemon.RegisterDocument">RegisterDocument()</link> D-Bus method on @proxy. |
639 | * 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()). |
640 | * You can then call ev_daemon_call_register_document_finish() to get the result of the operation. |
641 | * |
642 | * See ev_daemon_call_register_document_sync() for the synchronous, blocking version of this method. |
643 | */ |
644 | void |
645 | ev_daemon_call_register_document ( |
646 | EvDaemon *proxy, |
647 | const gchar *arg_uri, |
648 | GCancellable *cancellable, |
649 | GAsyncReadyCallback callback, |
650 | gpointer user_data) |
651 | { |
652 | g_dbus_proxy_call (G_DBUS_PROXY (proxy)((((GDBusProxy*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((proxy)), ((g_dbus_proxy_get_type ())))))), |
653 | "RegisterDocument", |
654 | g_variant_new ("(s)", |
655 | arg_uri), |
656 | G_DBUS_CALL_FLAGS_NONE, |
657 | -1, |
658 | cancellable, |
659 | callback, |
660 | user_data); |
661 | } |
662 | |
663 | /** |
664 | * ev_daemon_call_register_document_finish: |
665 | * @proxy: A #EvDaemonProxy. |
666 | * @out_owner: (out) (optional): Return location for return parameter or %NULL to ignore. |
667 | * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to ev_daemon_call_register_document(). |
668 | * @error: Return location for error or %NULL. |
669 | * |
670 | * Finishes an operation started with ev_daemon_call_register_document(). |
671 | * |
672 | * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set. |
673 | */ |
674 | gboolean |
675 | ev_daemon_call_register_document_finish ( |
676 | EvDaemon *proxy, |
677 | gchar **out_owner, |
678 | GAsyncResult *res, |
679 | GError **error) |
680 | { |
681 | GVariant *_ret; |
682 | _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy)((((GDBusProxy*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((proxy)), ((g_dbus_proxy_get_type ())))))), res, error); |
683 | if (_ret == NULL((void*)0)) |
684 | goto _out; |
685 | g_variant_get (_ret, |
686 | "(s)", |
687 | out_owner); |
688 | g_variant_unref (_ret); |
689 | _out: |
690 | return _ret != NULL((void*)0); |
691 | } |
692 | |
693 | /** |
694 | * ev_daemon_call_register_document_sync: |
695 | * @proxy: A #EvDaemonProxy. |
696 | * @arg_uri: Argument to pass with the method invocation. |
697 | * @out_owner: (out) (optional): Return location for return parameter or %NULL to ignore. |
698 | * @cancellable: (nullable): A #GCancellable or %NULL. |
699 | * @error: Return location for error or %NULL. |
700 | * |
701 | * Synchronously invokes the <link linkend="gdbus-method-org-cafe-lector-Daemon.RegisterDocument">RegisterDocument()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. |
702 | * |
703 | * See ev_daemon_call_register_document() for the asynchronous version of this method. |
704 | * |
705 | * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set. |
706 | */ |
707 | gboolean |
708 | ev_daemon_call_register_document_sync ( |
709 | EvDaemon *proxy, |
710 | const gchar *arg_uri, |
711 | gchar **out_owner, |
712 | GCancellable *cancellable, |
713 | GError **error) |
714 | { |
715 | GVariant *_ret; |
716 | _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy)((((GDBusProxy*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((proxy)), ((g_dbus_proxy_get_type ())))))), |
717 | "RegisterDocument", |
718 | g_variant_new ("(s)", |
719 | arg_uri), |
720 | G_DBUS_CALL_FLAGS_NONE, |
721 | -1, |
722 | cancellable, |
723 | error); |
724 | if (_ret == NULL((void*)0)) |
725 | goto _out; |
726 | g_variant_get (_ret, |
727 | "(s)", |
728 | out_owner); |
729 | g_variant_unref (_ret); |
730 | _out: |
731 | return _ret != NULL((void*)0); |
732 | } |
733 | |
734 | /** |
735 | * ev_daemon_call_unregister_document: |
736 | * @proxy: A #EvDaemonProxy. |
737 | * @arg_uri: Argument to pass with the method invocation. |
738 | * @cancellable: (nullable): A #GCancellable or %NULL. |
739 | * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. |
740 | * @user_data: User data to pass to @callback. |
741 | * |
742 | * Asynchronously invokes the <link linkend="gdbus-method-org-cafe-lector-Daemon.UnregisterDocument">UnregisterDocument()</link> D-Bus method on @proxy. |
743 | * 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()). |
744 | * You can then call ev_daemon_call_unregister_document_finish() to get the result of the operation. |
745 | * |
746 | * See ev_daemon_call_unregister_document_sync() for the synchronous, blocking version of this method. |
747 | */ |
748 | void |
749 | ev_daemon_call_unregister_document ( |
750 | EvDaemon *proxy, |
751 | const gchar *arg_uri, |
752 | GCancellable *cancellable, |
753 | GAsyncReadyCallback callback, |
754 | gpointer user_data) |
755 | { |
756 | g_dbus_proxy_call (G_DBUS_PROXY (proxy)((((GDBusProxy*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((proxy)), ((g_dbus_proxy_get_type ())))))), |
757 | "UnregisterDocument", |
758 | g_variant_new ("(s)", |
759 | arg_uri), |
760 | G_DBUS_CALL_FLAGS_NONE, |
761 | -1, |
762 | cancellable, |
763 | callback, |
764 | user_data); |
765 | } |
766 | |
767 | /** |
768 | * ev_daemon_call_unregister_document_finish: |
769 | * @proxy: A #EvDaemonProxy. |
770 | * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to ev_daemon_call_unregister_document(). |
771 | * @error: Return location for error or %NULL. |
772 | * |
773 | * Finishes an operation started with ev_daemon_call_unregister_document(). |
774 | * |
775 | * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set. |
776 | */ |
777 | gboolean |
778 | ev_daemon_call_unregister_document_finish ( |
779 | EvDaemon *proxy, |
780 | GAsyncResult *res, |
781 | GError **error) |
782 | { |
783 | GVariant *_ret; |
784 | _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy)((((GDBusProxy*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((proxy)), ((g_dbus_proxy_get_type ())))))), res, error); |
785 | if (_ret == NULL((void*)0)) |
786 | goto _out; |
787 | g_variant_get (_ret, |
788 | "()"); |
789 | g_variant_unref (_ret); |
790 | _out: |
791 | return _ret != NULL((void*)0); |
792 | } |
793 | |
794 | /** |
795 | * ev_daemon_call_unregister_document_sync: |
796 | * @proxy: A #EvDaemonProxy. |
797 | * @arg_uri: Argument to pass with the method invocation. |
798 | * @cancellable: (nullable): A #GCancellable or %NULL. |
799 | * @error: Return location for error or %NULL. |
800 | * |
801 | * Synchronously invokes the <link linkend="gdbus-method-org-cafe-lector-Daemon.UnregisterDocument">UnregisterDocument()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. |
802 | * |
803 | * See ev_daemon_call_unregister_document() for the asynchronous version of this method. |
804 | * |
805 | * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set. |
806 | */ |
807 | gboolean |
808 | ev_daemon_call_unregister_document_sync ( |
809 | EvDaemon *proxy, |
810 | const gchar *arg_uri, |
811 | GCancellable *cancellable, |
812 | GError **error) |
813 | { |
814 | GVariant *_ret; |
815 | _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy)((((GDBusProxy*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((proxy)), ((g_dbus_proxy_get_type ())))))), |
816 | "UnregisterDocument", |
817 | g_variant_new ("(s)", |
818 | arg_uri), |
819 | G_DBUS_CALL_FLAGS_NONE, |
820 | -1, |
821 | cancellable, |
822 | error); |
823 | if (_ret == NULL((void*)0)) |
824 | goto _out; |
825 | g_variant_get (_ret, |
826 | "()"); |
827 | g_variant_unref (_ret); |
828 | _out: |
829 | return _ret != NULL((void*)0); |
830 | } |
831 | |
832 | /** |
833 | * ev_daemon_call_find_document: |
834 | * @proxy: A #EvDaemonProxy. |
835 | * @arg_uri: Argument to pass with the method invocation. |
836 | * @arg_spawn: Argument to pass with the method invocation. |
837 | * @cancellable: (nullable): A #GCancellable or %NULL. |
838 | * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. |
839 | * @user_data: User data to pass to @callback. |
840 | * |
841 | * Asynchronously invokes the <link linkend="gdbus-method-org-cafe-lector-Daemon.FindDocument">FindDocument()</link> D-Bus method on @proxy. |
842 | * 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()). |
843 | * You can then call ev_daemon_call_find_document_finish() to get the result of the operation. |
844 | * |
845 | * See ev_daemon_call_find_document_sync() for the synchronous, blocking version of this method. |
846 | */ |
847 | void |
848 | ev_daemon_call_find_document ( |
849 | EvDaemon *proxy, |
850 | const gchar *arg_uri, |
851 | gboolean arg_spawn, |
852 | GCancellable *cancellable, |
853 | GAsyncReadyCallback callback, |
854 | gpointer user_data) |
855 | { |
856 | g_dbus_proxy_call (G_DBUS_PROXY (proxy)((((GDBusProxy*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((proxy)), ((g_dbus_proxy_get_type ())))))), |
857 | "FindDocument", |
858 | g_variant_new ("(sb)", |
859 | arg_uri, |
860 | arg_spawn), |
861 | G_DBUS_CALL_FLAGS_NONE, |
862 | -1, |
863 | cancellable, |
864 | callback, |
865 | user_data); |
866 | } |
867 | |
868 | /** |
869 | * ev_daemon_call_find_document_finish: |
870 | * @proxy: A #EvDaemonProxy. |
871 | * @out_owner: (out) (optional): Return location for return parameter or %NULL to ignore. |
872 | * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to ev_daemon_call_find_document(). |
873 | * @error: Return location for error or %NULL. |
874 | * |
875 | * Finishes an operation started with ev_daemon_call_find_document(). |
876 | * |
877 | * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set. |
878 | */ |
879 | gboolean |
880 | ev_daemon_call_find_document_finish ( |
881 | EvDaemon *proxy, |
882 | gchar **out_owner, |
883 | GAsyncResult *res, |
884 | GError **error) |
885 | { |
886 | GVariant *_ret; |
887 | _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy)((((GDBusProxy*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((proxy)), ((g_dbus_proxy_get_type ())))))), res, error); |
888 | if (_ret == NULL((void*)0)) |
889 | goto _out; |
890 | g_variant_get (_ret, |
891 | "(s)", |
892 | out_owner); |
893 | g_variant_unref (_ret); |
894 | _out: |
895 | return _ret != NULL((void*)0); |
896 | } |
897 | |
898 | /** |
899 | * ev_daemon_call_find_document_sync: |
900 | * @proxy: A #EvDaemonProxy. |
901 | * @arg_uri: Argument to pass with the method invocation. |
902 | * @arg_spawn: Argument to pass with the method invocation. |
903 | * @out_owner: (out) (optional): Return location for return parameter or %NULL to ignore. |
904 | * @cancellable: (nullable): A #GCancellable or %NULL. |
905 | * @error: Return location for error or %NULL. |
906 | * |
907 | * Synchronously invokes the <link linkend="gdbus-method-org-cafe-lector-Daemon.FindDocument">FindDocument()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. |
908 | * |
909 | * See ev_daemon_call_find_document() for the asynchronous version of this method. |
910 | * |
911 | * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set. |
912 | */ |
913 | gboolean |
914 | ev_daemon_call_find_document_sync ( |
915 | EvDaemon *proxy, |
916 | const gchar *arg_uri, |
917 | gboolean arg_spawn, |
918 | gchar **out_owner, |
919 | GCancellable *cancellable, |
920 | GError **error) |
921 | { |
922 | GVariant *_ret; |
923 | _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy)((((GDBusProxy*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((proxy)), ((g_dbus_proxy_get_type ())))))), |
924 | "FindDocument", |
925 | g_variant_new ("(sb)", |
926 | arg_uri, |
927 | arg_spawn), |
928 | G_DBUS_CALL_FLAGS_NONE, |
929 | -1, |
930 | cancellable, |
931 | error); |
932 | if (_ret == NULL((void*)0)) |
933 | goto _out; |
934 | g_variant_get (_ret, |
935 | "(s)", |
936 | out_owner); |
937 | g_variant_unref (_ret); |
938 | _out: |
939 | return _ret != NULL((void*)0); |
940 | } |
941 | |
942 | /** |
943 | * ev_daemon_complete_register_document: |
944 | * @object: A #EvDaemon. |
945 | * @invocation: (transfer full): A #GDBusMethodInvocation. |
946 | * @owner: Parameter to return. |
947 | * |
948 | * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-cafe-lector-Daemon.RegisterDocument">RegisterDocument()</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. |
949 | * |
950 | * This method will free @invocation, you cannot use it afterwards. |
951 | */ |
952 | void |
953 | ev_daemon_complete_register_document ( |
954 | EvDaemon *object G_GNUC_UNUSED__attribute__ ((__unused__)), |
955 | GDBusMethodInvocation *invocation, |
956 | const gchar *owner) |
957 | { |
958 | g_dbus_method_invocation_return_value (invocation, |
959 | g_variant_new ("(s)", |
960 | owner)); |
961 | } |
962 | |
963 | /** |
964 | * ev_daemon_complete_unregister_document: |
965 | * @object: A #EvDaemon. |
966 | * @invocation: (transfer full): A #GDBusMethodInvocation. |
967 | * |
968 | * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-cafe-lector-Daemon.UnregisterDocument">UnregisterDocument()</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. |
969 | * |
970 | * This method will free @invocation, you cannot use it afterwards. |
971 | */ |
972 | void |
973 | ev_daemon_complete_unregister_document ( |
974 | EvDaemon *object G_GNUC_UNUSED__attribute__ ((__unused__)), |
975 | GDBusMethodInvocation *invocation) |
976 | { |
977 | g_dbus_method_invocation_return_value (invocation, |
978 | g_variant_new ("()")); |
979 | } |
980 | |
981 | /** |
982 | * ev_daemon_complete_find_document: |
983 | * @object: A #EvDaemon. |
984 | * @invocation: (transfer full): A #GDBusMethodInvocation. |
985 | * @owner: Parameter to return. |
986 | * |
987 | * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-cafe-lector-Daemon.FindDocument">FindDocument()</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. |
988 | * |
989 | * This method will free @invocation, you cannot use it afterwards. |
990 | */ |
991 | void |
992 | ev_daemon_complete_find_document ( |
993 | EvDaemon *object G_GNUC_UNUSED__attribute__ ((__unused__)), |
994 | GDBusMethodInvocation *invocation, |
995 | const gchar *owner) |
996 | { |
997 | g_dbus_method_invocation_return_value (invocation, |
998 | g_variant_new ("(s)", |
999 | owner)); |
1000 | } |
1001 | |
1002 | /* ------------------------------------------------------------------------ */ |
1003 | |
1004 | /** |
1005 | * EvDaemonProxy: |
1006 | * |
1007 | * The #EvDaemonProxy structure contains only private data and should only be accessed using the provided API. |
1008 | */ |
1009 | |
1010 | /** |
1011 | * EvDaemonProxyClass: |
1012 | * @parent_class: The parent class. |
1013 | * |
1014 | * Class structure for #EvDaemonProxy. |
1015 | */ |
1016 | |
1017 | struct _EvDaemonProxyPrivate |
1018 | { |
1019 | GData *qdata; |
1020 | }; |
1021 | |
1022 | static void ev_daemon_proxy_iface_init (EvDaemonIface *iface); |
1023 | |
1024 | #if GLIB_VERSION_MAX_ALLOWED((((2) << 16 | (84) << 8))) >= GLIB_VERSION_2_38(((2) << 16 | (38) << 8)) |
1025 | G_DEFINE_TYPE_WITH_CODE (EvDaemonProxy, ev_daemon_proxy, G_TYPE_DBUS_PROXY,static void ev_daemon_proxy_init (EvDaemonProxy *self); static void ev_daemon_proxy_class_init (EvDaemonProxyClass *klass); static GType ev_daemon_proxy_get_type_once (void); static gpointer ev_daemon_proxy_parent_class = ((void*)0); static gint EvDaemonProxy_private_offset ; static void ev_daemon_proxy_class_intern_init (gpointer klass ) { ev_daemon_proxy_parent_class = g_type_class_peek_parent ( klass); if (EvDaemonProxy_private_offset != 0) g_type_class_adjust_private_offset (klass, &EvDaemonProxy_private_offset); ev_daemon_proxy_class_init ((EvDaemonProxyClass*) klass); } __attribute__ ((__unused__) ) static inline gpointer ev_daemon_proxy_get_instance_private (EvDaemonProxy *self) { return (((gpointer) ((guint8*) (self ) + (glong) (EvDaemonProxy_private_offset)))); } GType ev_daemon_proxy_get_type (void) { static GType static_g_define_type_id = 0; if ((__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id) == sizeof (gpointer), "Expression evaluates to false"); (void) ( 0 ? (gpointer) * (&static_g_define_type_id) : ((void*)0)) ; (!(__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id ) == sizeof (gpointer), "Expression evaluates to false"); __typeof__ (*(&static_g_define_type_id)) gapg_temp_newval; __typeof__ ((&static_g_define_type_id)) gapg_temp_atomic = (&static_g_define_type_id ); __atomic_load (gapg_temp_atomic, &gapg_temp_newval, 5) ; gapg_temp_newval; })) && g_once_init_enter_pointer ( &static_g_define_type_id)); })) ) { GType g_define_type_id = ev_daemon_proxy_get_type_once (); (__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id) == sizeof (gpointer) , "Expression evaluates to false"); 0 ? (void) (*(&static_g_define_type_id ) = (g_define_type_id)) : (void) 0; g_once_init_leave_pointer ((&static_g_define_type_id), (gpointer) (guintptr) (g_define_type_id )); })) ; } return static_g_define_type_id; } __attribute__ ( (__noinline__)) static GType ev_daemon_proxy_get_type_once (void ) { GType g_define_type_id = g_type_register_static_simple (( g_dbus_proxy_get_type ()), g_intern_static_string ("EvDaemonProxy" ), sizeof (EvDaemonProxyClass), (GClassInitFunc)(void (*)(void )) ev_daemon_proxy_class_intern_init, sizeof (EvDaemonProxy), (GInstanceInitFunc)(void (*)(void)) ev_daemon_proxy_init, (GTypeFlags ) 0); { {{ EvDaemonProxy_private_offset = g_type_add_instance_private (g_define_type_id, sizeof (EvDaemonProxyPrivate)); } { const GInterfaceInfo g_implement_interface_info = { (GInterfaceInitFunc )(void (*)(void)) ev_daemon_proxy_iface_init, ((void*)0), ((void *)0) }; g_type_add_interface_static (g_define_type_id, (ev_daemon_get_type ()), &g_implement_interface_info); };} } return g_define_type_id ; } |
1026 | G_ADD_PRIVATE (EvDaemonProxy)static void ev_daemon_proxy_init (EvDaemonProxy *self); static void ev_daemon_proxy_class_init (EvDaemonProxyClass *klass); static GType ev_daemon_proxy_get_type_once (void); static gpointer ev_daemon_proxy_parent_class = ((void*)0); static gint EvDaemonProxy_private_offset ; static void ev_daemon_proxy_class_intern_init (gpointer klass ) { ev_daemon_proxy_parent_class = g_type_class_peek_parent ( klass); if (EvDaemonProxy_private_offset != 0) g_type_class_adjust_private_offset (klass, &EvDaemonProxy_private_offset); ev_daemon_proxy_class_init ((EvDaemonProxyClass*) klass); } __attribute__ ((__unused__) ) static inline gpointer ev_daemon_proxy_get_instance_private (EvDaemonProxy *self) { return (((gpointer) ((guint8*) (self ) + (glong) (EvDaemonProxy_private_offset)))); } GType ev_daemon_proxy_get_type (void) { static GType static_g_define_type_id = 0; if ((__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id) == sizeof (gpointer), "Expression evaluates to false"); (void) ( 0 ? (gpointer) * (&static_g_define_type_id) : ((void*)0)) ; (!(__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id ) == sizeof (gpointer), "Expression evaluates to false"); __typeof__ (*(&static_g_define_type_id)) gapg_temp_newval; __typeof__ ((&static_g_define_type_id)) gapg_temp_atomic = (&static_g_define_type_id ); __atomic_load (gapg_temp_atomic, &gapg_temp_newval, 5) ; gapg_temp_newval; })) && g_once_init_enter_pointer ( &static_g_define_type_id)); })) ) { GType g_define_type_id = ev_daemon_proxy_get_type_once (); (__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id) == sizeof (gpointer) , "Expression evaluates to false"); 0 ? (void) (*(&static_g_define_type_id ) = (g_define_type_id)) : (void) 0; g_once_init_leave_pointer ((&static_g_define_type_id), (gpointer) (guintptr) (g_define_type_id )); })) ; } return static_g_define_type_id; } __attribute__ ( (__noinline__)) static GType ev_daemon_proxy_get_type_once (void ) { GType g_define_type_id = g_type_register_static_simple (( g_dbus_proxy_get_type ()), g_intern_static_string ("EvDaemonProxy" ), sizeof (EvDaemonProxyClass), (GClassInitFunc)(void (*)(void )) ev_daemon_proxy_class_intern_init, sizeof (EvDaemonProxy), (GInstanceInitFunc)(void (*)(void)) ev_daemon_proxy_init, (GTypeFlags ) 0); { {{ EvDaemonProxy_private_offset = g_type_add_instance_private (g_define_type_id, sizeof (EvDaemonProxyPrivate)); } { const GInterfaceInfo g_implement_interface_info = { (GInterfaceInitFunc )(void (*)(void)) ev_daemon_proxy_iface_init, ((void*)0), ((void *)0) }; g_type_add_interface_static (g_define_type_id, (ev_daemon_get_type ()), &g_implement_interface_info); };} } return g_define_type_id ; } |
1027 | G_IMPLEMENT_INTERFACE (EV_TYPE_DAEMON, ev_daemon_proxy_iface_init))static void ev_daemon_proxy_init (EvDaemonProxy *self); static void ev_daemon_proxy_class_init (EvDaemonProxyClass *klass); static GType ev_daemon_proxy_get_type_once (void); static gpointer ev_daemon_proxy_parent_class = ((void*)0); static gint EvDaemonProxy_private_offset ; static void ev_daemon_proxy_class_intern_init (gpointer klass ) { ev_daemon_proxy_parent_class = g_type_class_peek_parent ( klass); if (EvDaemonProxy_private_offset != 0) g_type_class_adjust_private_offset (klass, &EvDaemonProxy_private_offset); ev_daemon_proxy_class_init ((EvDaemonProxyClass*) klass); } __attribute__ ((__unused__) ) static inline gpointer ev_daemon_proxy_get_instance_private (EvDaemonProxy *self) { return (((gpointer) ((guint8*) (self ) + (glong) (EvDaemonProxy_private_offset)))); } GType ev_daemon_proxy_get_type (void) { static GType static_g_define_type_id = 0; if ((__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id) == sizeof (gpointer), "Expression evaluates to false"); (void) ( 0 ? (gpointer) * (&static_g_define_type_id) : ((void*)0)) ; (!(__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id ) == sizeof (gpointer), "Expression evaluates to false"); __typeof__ (*(&static_g_define_type_id)) gapg_temp_newval; __typeof__ ((&static_g_define_type_id)) gapg_temp_atomic = (&static_g_define_type_id ); __atomic_load (gapg_temp_atomic, &gapg_temp_newval, 5) ; gapg_temp_newval; })) && g_once_init_enter_pointer ( &static_g_define_type_id)); })) ) { GType g_define_type_id = ev_daemon_proxy_get_type_once (); (__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id) == sizeof (gpointer) , "Expression evaluates to false"); 0 ? (void) (*(&static_g_define_type_id ) = (g_define_type_id)) : (void) 0; g_once_init_leave_pointer ((&static_g_define_type_id), (gpointer) (guintptr) (g_define_type_id )); })) ; } return static_g_define_type_id; } __attribute__ ( (__noinline__)) static GType ev_daemon_proxy_get_type_once (void ) { GType g_define_type_id = g_type_register_static_simple (( g_dbus_proxy_get_type ()), g_intern_static_string ("EvDaemonProxy" ), sizeof (EvDaemonProxyClass), (GClassInitFunc)(void (*)(void )) ev_daemon_proxy_class_intern_init, sizeof (EvDaemonProxy), (GInstanceInitFunc)(void (*)(void)) ev_daemon_proxy_init, (GTypeFlags ) 0); { {{ EvDaemonProxy_private_offset = g_type_add_instance_private (g_define_type_id, sizeof (EvDaemonProxyPrivate)); } { const GInterfaceInfo g_implement_interface_info = { (GInterfaceInitFunc )(void (*)(void)) ev_daemon_proxy_iface_init, ((void*)0), ((void *)0) }; g_type_add_interface_static (g_define_type_id, (ev_daemon_get_type ()), &g_implement_interface_info); };} } return g_define_type_id ; } |
1028 | |
1029 | #else |
1030 | G_DEFINE_TYPE_WITH_CODE (EvDaemonProxy, ev_daemon_proxy, G_TYPE_DBUS_PROXY,static void ev_daemon_proxy_init (EvDaemonProxy *self); static void ev_daemon_proxy_class_init (EvDaemonProxyClass *klass); static GType ev_daemon_proxy_get_type_once (void); static gpointer ev_daemon_proxy_parent_class = ((void*)0); static gint EvDaemonProxy_private_offset ; static void ev_daemon_proxy_class_intern_init (gpointer klass ) { ev_daemon_proxy_parent_class = g_type_class_peek_parent ( klass); if (EvDaemonProxy_private_offset != 0) g_type_class_adjust_private_offset (klass, &EvDaemonProxy_private_offset); ev_daemon_proxy_class_init ((EvDaemonProxyClass*) klass); } __attribute__ ((__unused__) ) static inline gpointer ev_daemon_proxy_get_instance_private (EvDaemonProxy *self) { return (((gpointer) ((guint8*) (self ) + (glong) (EvDaemonProxy_private_offset)))); } GType ev_daemon_proxy_get_type (void) { static GType static_g_define_type_id = 0; if ((__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id) == sizeof (gpointer), "Expression evaluates to false"); (void) ( 0 ? (gpointer) * (&static_g_define_type_id) : ((void*)0)) ; (!(__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id ) == sizeof (gpointer), "Expression evaluates to false"); __typeof__ (*(&static_g_define_type_id)) gapg_temp_newval; __typeof__ ((&static_g_define_type_id)) gapg_temp_atomic = (&static_g_define_type_id ); __atomic_load (gapg_temp_atomic, &gapg_temp_newval, 5) ; gapg_temp_newval; })) && g_once_init_enter_pointer ( &static_g_define_type_id)); })) ) { GType g_define_type_id = ev_daemon_proxy_get_type_once (); (__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id) == sizeof (gpointer) , "Expression evaluates to false"); 0 ? (void) (*(&static_g_define_type_id ) = (g_define_type_id)) : (void) 0; g_once_init_leave_pointer ((&static_g_define_type_id), (gpointer) (guintptr) (g_define_type_id )); })) ; } return static_g_define_type_id; } __attribute__ ( (__noinline__)) static GType ev_daemon_proxy_get_type_once (void ) { GType g_define_type_id = g_type_register_static_simple (( g_dbus_proxy_get_type ()), g_intern_static_string ("EvDaemonProxy" ), sizeof (EvDaemonProxyClass), (GClassInitFunc)(void (*)(void )) ev_daemon_proxy_class_intern_init, sizeof (EvDaemonProxy), (GInstanceInitFunc)(void (*)(void)) ev_daemon_proxy_init, (GTypeFlags ) 0); { {{ const GInterfaceInfo g_implement_interface_info = { (GInterfaceInitFunc)(void (*)(void)) ev_daemon_proxy_iface_init , ((void*)0), ((void*)0) }; g_type_add_interface_static (g_define_type_id , (ev_daemon_get_type ()), &g_implement_interface_info); } ;} } return g_define_type_id; } |
1031 | G_IMPLEMENT_INTERFACE (EV_TYPE_DAEMON, ev_daemon_proxy_iface_init))static void ev_daemon_proxy_init (EvDaemonProxy *self); static void ev_daemon_proxy_class_init (EvDaemonProxyClass *klass); static GType ev_daemon_proxy_get_type_once (void); static gpointer ev_daemon_proxy_parent_class = ((void*)0); static gint EvDaemonProxy_private_offset ; static void ev_daemon_proxy_class_intern_init (gpointer klass ) { ev_daemon_proxy_parent_class = g_type_class_peek_parent ( klass); if (EvDaemonProxy_private_offset != 0) g_type_class_adjust_private_offset (klass, &EvDaemonProxy_private_offset); ev_daemon_proxy_class_init ((EvDaemonProxyClass*) klass); } __attribute__ ((__unused__) ) static inline gpointer ev_daemon_proxy_get_instance_private (EvDaemonProxy *self) { return (((gpointer) ((guint8*) (self ) + (glong) (EvDaemonProxy_private_offset)))); } GType ev_daemon_proxy_get_type (void) { static GType static_g_define_type_id = 0; if ((__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id) == sizeof (gpointer), "Expression evaluates to false"); (void) ( 0 ? (gpointer) * (&static_g_define_type_id) : ((void*)0)) ; (!(__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id ) == sizeof (gpointer), "Expression evaluates to false"); __typeof__ (*(&static_g_define_type_id)) gapg_temp_newval; __typeof__ ((&static_g_define_type_id)) gapg_temp_atomic = (&static_g_define_type_id ); __atomic_load (gapg_temp_atomic, &gapg_temp_newval, 5) ; gapg_temp_newval; })) && g_once_init_enter_pointer ( &static_g_define_type_id)); })) ) { GType g_define_type_id = ev_daemon_proxy_get_type_once (); (__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id) == sizeof (gpointer) , "Expression evaluates to false"); 0 ? (void) (*(&static_g_define_type_id ) = (g_define_type_id)) : (void) 0; g_once_init_leave_pointer ((&static_g_define_type_id), (gpointer) (guintptr) (g_define_type_id )); })) ; } return static_g_define_type_id; } __attribute__ ( (__noinline__)) static GType ev_daemon_proxy_get_type_once (void ) { GType g_define_type_id = g_type_register_static_simple (( g_dbus_proxy_get_type ()), g_intern_static_string ("EvDaemonProxy" ), sizeof (EvDaemonProxyClass), (GClassInitFunc)(void (*)(void )) ev_daemon_proxy_class_intern_init, sizeof (EvDaemonProxy), (GInstanceInitFunc)(void (*)(void)) ev_daemon_proxy_init, (GTypeFlags ) 0); { {{ const GInterfaceInfo g_implement_interface_info = { (GInterfaceInitFunc)(void (*)(void)) ev_daemon_proxy_iface_init , ((void*)0), ((void*)0) }; g_type_add_interface_static (g_define_type_id , (ev_daemon_get_type ()), &g_implement_interface_info); } ;} } return g_define_type_id; } |
1032 | |
1033 | #endif |
1034 | static void |
1035 | ev_daemon_proxy_finalize (GObject *object) |
1036 | { |
1037 | EvDaemonProxy *proxy = EV_DAEMON_PROXY (object)((((EvDaemonProxy*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((object)), ((ev_daemon_proxy_get_type ())))))); |
1038 | g_datalist_clear (&proxy->priv->qdata); |
1039 | G_OBJECT_CLASS (ev_daemon_proxy_parent_class)((((GObjectClass*) (void *) g_type_check_class_cast ((GTypeClass *) ((ev_daemon_proxy_parent_class)), (((GType) ((20) << (2))))))))->finalize (object); |
1040 | } |
1041 | |
1042 | static void |
1043 | ev_daemon_proxy_get_property (GObject *object G_GNUC_UNUSED__attribute__ ((__unused__)), |
1044 | guint prop_id G_GNUC_UNUSED__attribute__ ((__unused__)), |
1045 | GValue *value G_GNUC_UNUSED__attribute__ ((__unused__)), |
1046 | GParamSpec *pspec G_GNUC_UNUSED__attribute__ ((__unused__))) |
1047 | { |
1048 | } |
1049 | |
1050 | static void |
1051 | ev_daemon_proxy_set_property (GObject *object G_GNUC_UNUSED__attribute__ ((__unused__)), |
1052 | guint prop_id G_GNUC_UNUSED__attribute__ ((__unused__)), |
1053 | const GValue *value G_GNUC_UNUSED__attribute__ ((__unused__)), |
1054 | GParamSpec *pspec G_GNUC_UNUSED__attribute__ ((__unused__))) |
1055 | { |
1056 | } |
1057 | |
1058 | static void |
1059 | ev_daemon_proxy_g_signal (GDBusProxy *proxy, |
1060 | const gchar *sender_name G_GNUC_UNUSED__attribute__ ((__unused__)), |
1061 | const gchar *signal_name, |
1062 | GVariant *parameters) |
1063 | { |
1064 | _ExtendedGDBusSignalInfo *info; |
1065 | GVariantIter iter; |
1066 | GVariant *child; |
1067 | GValue *paramv; |
1068 | gsize num_params; |
1069 | gsize n; |
1070 | guint signal_id; |
1071 | info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_ev_daemon_interface_info.parent_struct, signal_name); |
1072 | if (info == NULL((void*)0)) |
1073 | return; |
1074 | num_params = g_variant_n_children (parameters); |
1075 | paramv = g_new0 (GValue, num_params + 1)((GValue *) g_malloc0_n ((num_params + 1), sizeof (GValue))); |
1076 | g_value_init (¶mv[0], EV_TYPE_DAEMON(ev_daemon_get_type ())); |
1077 | g_value_set_object (¶mv[0], proxy); |
1078 | g_variant_iter_init (&iter, parameters); |
1079 | n = 1; |
1080 | while ((child = g_variant_iter_next_value (&iter)) != NULL((void*)0)) |
1081 | { |
1082 | _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1]; |
1083 | if (arg_info->use_gvariant) |
1084 | { |
1085 | g_value_init (¶mv[n], G_TYPE_VARIANT((GType) ((21) << (2)))); |
1086 | g_value_set_variant (¶mv[n], child); |
1087 | n++; |
1088 | } |
1089 | else |
1090 | g_dbus_gvariant_to_gvalue (child, ¶mv[n++]); |
1091 | g_variant_unref (child); |
1092 | } |
1093 | signal_id = g_signal_lookup (info->signal_name, EV_TYPE_DAEMON(ev_daemon_get_type ())); |
1094 | g_signal_emitv (paramv, signal_id, 0, NULL((void*)0)); |
1095 | for (n = 0; n < num_params + 1; n++) |
1096 | g_value_unset (¶mv[n]); |
1097 | g_free (paramv); |
1098 | } |
1099 | |
1100 | static void |
1101 | ev_daemon_proxy_g_properties_changed (GDBusProxy *_proxy, |
1102 | GVariant *changed_properties, |
1103 | const gchar *const *invalidated_properties) |
1104 | { |
1105 | EvDaemonProxy *proxy = EV_DAEMON_PROXY (_proxy)((((EvDaemonProxy*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((_proxy)), ((ev_daemon_proxy_get_type ())))))); |
1106 | guint n; |
1107 | const gchar *key; |
1108 | GVariantIter *iter; |
1109 | _ExtendedGDBusPropertyInfo *info; |
1110 | g_variant_get (changed_properties, "a{sv}", &iter); |
1111 | while (g_variant_iter_next (iter, "{&sv}", &key, NULL((void*)0))) |
1112 | { |
1113 | info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_ev_daemon_interface_info.parent_struct, key); |
1114 | g_datalist_remove_data (&proxy->priv->qdata, key)g_datalist_id_set_data_full (((&proxy->priv->qdata) ), (g_quark_try_string (key)), (((void*)0)), ((void*)0)); |
1115 | if (info != NULL((void*)0)) |
1116 | g_object_notify (G_OBJECT (proxy)((((GObject*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((proxy)), (((GType) ((20) << (2)))))))), info->hyphen_name); |
1117 | } |
1118 | g_variant_iter_free (iter); |
1119 | for (n = 0; invalidated_properties[n] != NULL((void*)0); n++) |
1120 | { |
1121 | info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_ev_daemon_interface_info.parent_struct, invalidated_properties[n]); |
1122 | g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n])g_datalist_id_set_data_full (((&proxy->priv->qdata) ), (g_quark_try_string (invalidated_properties[n])), (((void* )0)), ((void*)0)); |
1123 | if (info != NULL((void*)0)) |
1124 | g_object_notify (G_OBJECT (proxy)((((GObject*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((proxy)), (((GType) ((20) << (2)))))))), info->hyphen_name); |
1125 | } |
1126 | } |
1127 | |
1128 | static void |
1129 | ev_daemon_proxy_init (EvDaemonProxy *proxy) |
1130 | { |
1131 | #if GLIB_VERSION_MAX_ALLOWED((((2) << 16 | (84) << 8))) >= GLIB_VERSION_2_38(((2) << 16 | (38) << 8)) |
1132 | proxy->priv = ev_daemon_proxy_get_instance_private (proxy); |
1133 | #else |
1134 | proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, EV_TYPE_DAEMON_PROXY, EvDaemonProxyPrivate)((EvDaemonProxyPrivate*) g_type_instance_get_private ((GTypeInstance *) (proxy), ((ev_daemon_proxy_get_type ())))) GCC warning "Deprecated pre-processor symbol: replace with \"G_ADD_PRIVATE\"" ; |
1135 | #endif |
1136 | |
1137 | g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy)((((GDBusProxy*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((proxy)), ((g_dbus_proxy_get_type ())))))), ev_daemon_interface_info ()); |
1138 | } |
1139 | |
1140 | static void |
1141 | ev_daemon_proxy_class_init (EvDaemonProxyClass *klass) |
1142 | { |
1143 | GObjectClass *gobject_class; |
1144 | GDBusProxyClass *proxy_class; |
1145 | |
1146 | gobject_class = G_OBJECT_CLASS (klass)((((GObjectClass*) (void *) g_type_check_class_cast ((GTypeClass *) ((klass)), (((GType) ((20) << (2)))))))); |
1147 | gobject_class->finalize = ev_daemon_proxy_finalize; |
1148 | gobject_class->get_property = ev_daemon_proxy_get_property; |
1149 | gobject_class->set_property = ev_daemon_proxy_set_property; |
1150 | |
1151 | proxy_class = G_DBUS_PROXY_CLASS (klass)((((GDBusProxyClass*) (void *) g_type_check_class_cast ((GTypeClass *) ((klass)), ((g_dbus_proxy_get_type ())))))); |
1152 | proxy_class->g_signal = ev_daemon_proxy_g_signal; |
1153 | proxy_class->g_properties_changed = ev_daemon_proxy_g_properties_changed; |
1154 | |
1155 | #if GLIB_VERSION_MAX_ALLOWED((((2) << 16 | (84) << 8))) < GLIB_VERSION_2_38(((2) << 16 | (38) << 8)) |
1156 | g_type_class_add_private (klass, sizeof (EvDaemonProxyPrivate)); |
1157 | #endif |
1158 | } |
1159 | |
1160 | static void |
1161 | ev_daemon_proxy_iface_init (EvDaemonIface *iface G_GNUC_UNUSED__attribute__ ((__unused__))) |
1162 | { |
1163 | } |
1164 | |
1165 | /** |
1166 | * ev_daemon_proxy_new: |
1167 | * @connection: A #GDBusConnection. |
1168 | * @flags: Flags from the #GDBusProxyFlags enumeration. |
1169 | * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. |
1170 | * @object_path: An object path. |
1171 | * @cancellable: (nullable): A #GCancellable or %NULL. |
1172 | * @callback: A #GAsyncReadyCallback to call when the request is satisfied. |
1173 | * @user_data: User data to pass to @callback. |
1174 | * |
1175 | * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-cafe-lector-Daemon.top_of_page">org.cafe.lector.Daemon</link>. See g_dbus_proxy_new() for more details. |
1176 | * |
1177 | * 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()). |
1178 | * You can then call ev_daemon_proxy_new_finish() to get the result of the operation. |
1179 | * |
1180 | * See ev_daemon_proxy_new_sync() for the synchronous, blocking version of this constructor. |
1181 | */ |
1182 | void |
1183 | ev_daemon_proxy_new ( |
1184 | GDBusConnection *connection, |
1185 | GDBusProxyFlags flags, |
1186 | const gchar *name, |
1187 | const gchar *object_path, |
1188 | GCancellable *cancellable, |
1189 | GAsyncReadyCallback callback, |
1190 | gpointer user_data) |
1191 | { |
1192 | g_async_initable_new_async (EV_TYPE_DAEMON_PROXY(ev_daemon_proxy_get_type ()), G_PRIORITY_DEFAULT0, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.cafe.lector.Daemon", NULL((void*)0)); |
1193 | } |
1194 | |
1195 | /** |
1196 | * ev_daemon_proxy_new_finish: |
1197 | * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to ev_daemon_proxy_new(). |
1198 | * @error: Return location for error or %NULL |
1199 | * |
1200 | * Finishes an operation started with ev_daemon_proxy_new(). |
1201 | * |
1202 | * Returns: (transfer full) (type EvDaemonProxy): The constructed proxy object or %NULL if @error is set. |
1203 | */ |
1204 | EvDaemon * |
1205 | ev_daemon_proxy_new_finish ( |
1206 | GAsyncResult *res, |
1207 | GError **error) |
1208 | { |
1209 | GObject *ret; |
1210 | GObject *source_object; |
1211 | source_object = g_async_result_get_source_object (res); |
1212 | ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object)((((GAsyncInitable*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((source_object)), ((g_async_initable_get_type ())))))), res, error); |
1213 | g_object_unref (source_object); |
1214 | if (ret != NULL((void*)0)) |
1215 | return EV_DAEMON (ret)((((EvDaemon*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((ret)), ((ev_daemon_get_type ())))))); |
1216 | else |
1217 | return NULL((void*)0); |
1218 | } |
1219 | |
1220 | /** |
1221 | * ev_daemon_proxy_new_sync: |
1222 | * @connection: A #GDBusConnection. |
1223 | * @flags: Flags from the #GDBusProxyFlags enumeration. |
1224 | * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. |
1225 | * @object_path: An object path. |
1226 | * @cancellable: (nullable): A #GCancellable or %NULL. |
1227 | * @error: Return location for error or %NULL |
1228 | * |
1229 | * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-cafe-lector-Daemon.top_of_page">org.cafe.lector.Daemon</link>. See g_dbus_proxy_new_sync() for more details. |
1230 | * |
1231 | * The calling thread is blocked until a reply is received. |
1232 | * |
1233 | * See ev_daemon_proxy_new() for the asynchronous version of this constructor. |
1234 | * |
1235 | * Returns: (transfer full) (type EvDaemonProxy): The constructed proxy object or %NULL if @error is set. |
1236 | */ |
1237 | EvDaemon * |
1238 | ev_daemon_proxy_new_sync ( |
1239 | GDBusConnection *connection, |
1240 | GDBusProxyFlags flags, |
1241 | const gchar *name, |
1242 | const gchar *object_path, |
1243 | GCancellable *cancellable, |
1244 | GError **error) |
1245 | { |
1246 | GInitable *ret; |
1247 | ret = g_initable_new (EV_TYPE_DAEMON_PROXY(ev_daemon_proxy_get_type ()), cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.cafe.lector.Daemon", NULL((void*)0)); |
1248 | if (ret != NULL((void*)0)) |
1249 | return EV_DAEMON (ret)((((EvDaemon*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((ret)), ((ev_daemon_get_type ())))))); |
1250 | else |
1251 | return NULL((void*)0); |
1252 | } |
1253 | |
1254 | |
1255 | /** |
1256 | * ev_daemon_proxy_new_for_bus: |
1257 | * @bus_type: A #GBusType. |
1258 | * @flags: Flags from the #GDBusProxyFlags enumeration. |
1259 | * @name: A bus name (well-known or unique). |
1260 | * @object_path: An object path. |
1261 | * @cancellable: (nullable): A #GCancellable or %NULL. |
1262 | * @callback: A #GAsyncReadyCallback to call when the request is satisfied. |
1263 | * @user_data: User data to pass to @callback. |
1264 | * |
1265 | * Like ev_daemon_proxy_new() but takes a #GBusType instead of a #GDBusConnection. |
1266 | * |
1267 | * 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()). |
1268 | * You can then call ev_daemon_proxy_new_for_bus_finish() to get the result of the operation. |
1269 | * |
1270 | * See ev_daemon_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor. |
1271 | */ |
1272 | void |
1273 | ev_daemon_proxy_new_for_bus ( |
1274 | GBusType bus_type, |
1275 | GDBusProxyFlags flags, |
1276 | const gchar *name, |
1277 | const gchar *object_path, |
1278 | GCancellable *cancellable, |
1279 | GAsyncReadyCallback callback, |
1280 | gpointer user_data) |
1281 | { |
1282 | g_async_initable_new_async (EV_TYPE_DAEMON_PROXY(ev_daemon_proxy_get_type ()), G_PRIORITY_DEFAULT0, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.cafe.lector.Daemon", NULL((void*)0)); |
1283 | } |
1284 | |
1285 | /** |
1286 | * ev_daemon_proxy_new_for_bus_finish: |
1287 | * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to ev_daemon_proxy_new_for_bus(). |
1288 | * @error: Return location for error or %NULL |
1289 | * |
1290 | * Finishes an operation started with ev_daemon_proxy_new_for_bus(). |
1291 | * |
1292 | * Returns: (transfer full) (type EvDaemonProxy): The constructed proxy object or %NULL if @error is set. |
1293 | */ |
1294 | EvDaemon * |
1295 | ev_daemon_proxy_new_for_bus_finish ( |
1296 | GAsyncResult *res, |
1297 | GError **error) |
1298 | { |
1299 | GObject *ret; |
1300 | GObject *source_object; |
1301 | source_object = g_async_result_get_source_object (res); |
1302 | ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object)((((GAsyncInitable*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((source_object)), ((g_async_initable_get_type ())))))), res, error); |
1303 | g_object_unref (source_object); |
1304 | if (ret != NULL((void*)0)) |
1305 | return EV_DAEMON (ret)((((EvDaemon*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((ret)), ((ev_daemon_get_type ())))))); |
1306 | else |
1307 | return NULL((void*)0); |
1308 | } |
1309 | |
1310 | /** |
1311 | * ev_daemon_proxy_new_for_bus_sync: |
1312 | * @bus_type: A #GBusType. |
1313 | * @flags: Flags from the #GDBusProxyFlags enumeration. |
1314 | * @name: A bus name (well-known or unique). |
1315 | * @object_path: An object path. |
1316 | * @cancellable: (nullable): A #GCancellable or %NULL. |
1317 | * @error: Return location for error or %NULL |
1318 | * |
1319 | * Like ev_daemon_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection. |
1320 | * |
1321 | * The calling thread is blocked until a reply is received. |
1322 | * |
1323 | * See ev_daemon_proxy_new_for_bus() for the asynchronous version of this constructor. |
1324 | * |
1325 | * Returns: (transfer full) (type EvDaemonProxy): The constructed proxy object or %NULL if @error is set. |
1326 | */ |
1327 | EvDaemon * |
1328 | ev_daemon_proxy_new_for_bus_sync ( |
1329 | GBusType bus_type, |
1330 | GDBusProxyFlags flags, |
1331 | const gchar *name, |
1332 | const gchar *object_path, |
1333 | GCancellable *cancellable, |
1334 | GError **error) |
1335 | { |
1336 | GInitable *ret; |
1337 | ret = g_initable_new (EV_TYPE_DAEMON_PROXY(ev_daemon_proxy_get_type ()), cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.cafe.lector.Daemon", NULL((void*)0)); |
1338 | if (ret != NULL((void*)0)) |
1339 | return EV_DAEMON (ret)((((EvDaemon*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((ret)), ((ev_daemon_get_type ())))))); |
1340 | else |
1341 | return NULL((void*)0); |
1342 | } |
1343 | |
1344 | |
1345 | /* ------------------------------------------------------------------------ */ |
1346 | |
1347 | /** |
1348 | * EvDaemonSkeleton: |
1349 | * |
1350 | * The #EvDaemonSkeleton structure contains only private data and should only be accessed using the provided API. |
1351 | */ |
1352 | |
1353 | /** |
1354 | * EvDaemonSkeletonClass: |
1355 | * @parent_class: The parent class. |
1356 | * |
1357 | * Class structure for #EvDaemonSkeleton. |
1358 | */ |
1359 | |
1360 | struct _EvDaemonSkeletonPrivate |
1361 | { |
1362 | GValue *properties; |
1363 | GList *changed_properties; |
1364 | GSource *changed_properties_idle_source; |
1365 | GMainContext *context; |
1366 | GMutex lock; |
1367 | }; |
1368 | |
1369 | static void |
1370 | _ev_daemon_skeleton_handle_method_call ( |
1371 | GDBusConnection *connection G_GNUC_UNUSED__attribute__ ((__unused__)), |
1372 | const gchar *sender G_GNUC_UNUSED__attribute__ ((__unused__)), |
1373 | const gchar *object_path G_GNUC_UNUSED__attribute__ ((__unused__)), |
1374 | const gchar *interface_name, |
1375 | const gchar *method_name, |
1376 | GVariant *parameters, |
1377 | GDBusMethodInvocation *invocation, |
1378 | gpointer user_data) |
1379 | { |
1380 | EvDaemonSkeleton *skeleton = EV_DAEMON_SKELETON (user_data)((((EvDaemonSkeleton*) (void *) g_type_check_instance_cast (( GTypeInstance*) ((user_data)), ((ev_daemon_skeleton_get_type ( ))))))); |
1381 | _ExtendedGDBusMethodInfo *info; |
1382 | GVariantIter iter; |
1383 | GVariant *child; |
1384 | GValue *paramv; |
1385 | gsize num_params; |
1386 | guint num_extra; |
1387 | gsize n; |
1388 | guint signal_id; |
1389 | GValue return_value = G_VALUE_INIT{ 0, { { 0 } } }; |
1390 | info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation); |
1391 | g_assert (info != NULL)do { if (info != ((void*)0)) ; else g_assertion_message_expr ( ((gchar*) 0), "ev-daemon-gdbus-generated.c", 1391, ((const char *) (__func__)), "info != NULL"); } while (0); |
1392 | num_params = g_variant_n_children (parameters); |
1393 | num_extra = info->pass_fdlist ? 3 : 2; paramv = g_new0 (GValue, num_params + num_extra)((GValue *) g_malloc0_n ((num_params + num_extra), sizeof (GValue ))); |
1394 | n = 0; |
1395 | g_value_init (¶mv[n], EV_TYPE_DAEMON(ev_daemon_get_type ())); |
1396 | g_value_set_object (¶mv[n++], skeleton); |
1397 | g_value_init (¶mv[n], G_TYPE_DBUS_METHOD_INVOCATION(g_dbus_method_invocation_get_type ())); |
1398 | g_value_set_object (¶mv[n++], invocation); |
1399 | if (info->pass_fdlist) |
1400 | { |
1401 | #ifdef G_OS_UNIX |
1402 | g_value_init (¶mv[n], G_TYPE_UNIX_FD_LIST(g_unix_fd_list_get_type ())); |
1403 | g_value_set_object (¶mv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation))); |
1404 | #else |
1405 | g_assert_not_reached ()do { g_assertion_message_expr (((gchar*) 0), "ev-daemon-gdbus-generated.c" , 1405, ((const char*) (__func__)), ((void*)0)); } while (0); |
1406 | #endif |
1407 | } |
1408 | g_variant_iter_init (&iter, parameters); |
1409 | while ((child = g_variant_iter_next_value (&iter)) != NULL((void*)0)) |
1410 | { |
1411 | _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra]; |
1412 | if (arg_info->use_gvariant) |
1413 | { |
1414 | g_value_init (¶mv[n], G_TYPE_VARIANT((GType) ((21) << (2)))); |
1415 | g_value_set_variant (¶mv[n], child); |
1416 | n++; |
1417 | } |
1418 | else |
1419 | g_dbus_gvariant_to_gvalue (child, ¶mv[n++]); |
1420 | g_variant_unref (child); |
1421 | } |
1422 | signal_id = g_signal_lookup (info->signal_name, EV_TYPE_DAEMON(ev_daemon_get_type ())); |
1423 | g_value_init (&return_value, G_TYPE_BOOLEAN((GType) ((5) << (2)))); |
1424 | g_signal_emitv (paramv, signal_id, 0, &return_value); |
1425 | if (!g_value_get_boolean (&return_value)) |
1426 | g_dbus_method_invocation_return_error (invocation, G_DBUS_ERRORg_dbus_error_quark(), G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name); |
1427 | g_value_unset (&return_value); |
1428 | for (n = 0; n < num_params + num_extra; n++) |
1429 | g_value_unset (¶mv[n]); |
1430 | g_free (paramv); |
1431 | } |
1432 | |
1433 | static GVariant * |
1434 | _ev_daemon_skeleton_handle_get_property ( |
1435 | GDBusConnection *connection G_GNUC_UNUSED__attribute__ ((__unused__)), |
1436 | const gchar *sender G_GNUC_UNUSED__attribute__ ((__unused__)), |
1437 | const gchar *object_path G_GNUC_UNUSED__attribute__ ((__unused__)), |
1438 | const gchar *interface_name G_GNUC_UNUSED__attribute__ ((__unused__)), |
1439 | const gchar *property_name, |
1440 | GError **error, |
1441 | gpointer user_data) |
1442 | { |
1443 | EvDaemonSkeleton *skeleton = EV_DAEMON_SKELETON (user_data)((((EvDaemonSkeleton*) (void *) g_type_check_instance_cast (( GTypeInstance*) ((user_data)), ((ev_daemon_skeleton_get_type ( ))))))); |
1444 | GValue value = G_VALUE_INIT{ 0, { { 0 } } }; |
1445 | GParamSpec *pspec; |
1446 | _ExtendedGDBusPropertyInfo *info; |
1447 | GVariant *ret; |
1448 | ret = NULL((void*)0); |
1449 | info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_ev_daemon_interface_info.parent_struct, property_name); |
1450 | g_assert (info != NULL)do { if (info != ((void*)0)) ; else g_assertion_message_expr ( ((gchar*) 0), "ev-daemon-gdbus-generated.c", 1450, ((const char *) (__func__)), "info != NULL"); } while (0); |
1451 | pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton)((((GObjectClass*) (((GTypeInstance*) ((skeleton)))->g_class )))), info->hyphen_name); |
1452 | if (pspec == NULL((void*)0)) |
1453 | { |
1454 | g_set_error (error, G_DBUS_ERRORg_dbus_error_quark(), G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name); |
1455 | } |
1456 | else |
1457 | { |
1458 | g_value_init (&value, pspec->value_type); |
1459 | g_object_get_property (G_OBJECT (skeleton)((((GObject*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((skeleton)), (((GType) ((20) << (2)))))))), info->hyphen_name, &value); |
1460 | ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature)(g_variant_type_checked_ ((info->parent_struct.signature)) )); |
1461 | g_value_unset (&value); |
1462 | } |
1463 | return ret; |
1464 | } |
1465 | |
1466 | static gboolean |
1467 | _ev_daemon_skeleton_handle_set_property ( |
1468 | GDBusConnection *connection G_GNUC_UNUSED__attribute__ ((__unused__)), |
1469 | const gchar *sender G_GNUC_UNUSED__attribute__ ((__unused__)), |
1470 | const gchar *object_path G_GNUC_UNUSED__attribute__ ((__unused__)), |
1471 | const gchar *interface_name G_GNUC_UNUSED__attribute__ ((__unused__)), |
1472 | const gchar *property_name, |
1473 | GVariant *variant, |
1474 | GError **error, |
1475 | gpointer user_data) |
1476 | { |
1477 | EvDaemonSkeleton *skeleton = EV_DAEMON_SKELETON (user_data)((((EvDaemonSkeleton*) (void *) g_type_check_instance_cast (( GTypeInstance*) ((user_data)), ((ev_daemon_skeleton_get_type ( ))))))); |
1478 | GValue value = G_VALUE_INIT{ 0, { { 0 } } }; |
1479 | GParamSpec *pspec; |
1480 | _ExtendedGDBusPropertyInfo *info; |
1481 | gboolean ret; |
1482 | ret = FALSE(0); |
1483 | info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_ev_daemon_interface_info.parent_struct, property_name); |
1484 | g_assert (info != NULL)do { if (info != ((void*)0)) ; else g_assertion_message_expr ( ((gchar*) 0), "ev-daemon-gdbus-generated.c", 1484, ((const char *) (__func__)), "info != NULL"); } while (0); |
1485 | pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton)((((GObjectClass*) (((GTypeInstance*) ((skeleton)))->g_class )))), info->hyphen_name); |
1486 | if (pspec == NULL((void*)0)) |
1487 | { |
1488 | g_set_error (error, G_DBUS_ERRORg_dbus_error_quark(), G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name); |
1489 | } |
1490 | else |
1491 | { |
1492 | if (info->use_gvariant) |
1493 | g_value_set_variant (&value, variant); |
1494 | else |
1495 | g_dbus_gvariant_to_gvalue (variant, &value); |
1496 | g_object_set_property (G_OBJECT (skeleton)((((GObject*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((skeleton)), (((GType) ((20) << (2)))))))), info->hyphen_name, &value); |
1497 | g_value_unset (&value); |
1498 | ret = TRUE(!(0)); |
1499 | } |
1500 | return ret; |
1501 | } |
1502 | |
1503 | static const GDBusInterfaceVTable _ev_daemon_skeleton_vtable = |
1504 | { |
1505 | _ev_daemon_skeleton_handle_method_call, |
1506 | _ev_daemon_skeleton_handle_get_property, |
1507 | _ev_daemon_skeleton_handle_set_property, |
1508 | {NULL((void*)0)} |
1509 | }; |
1510 | |
1511 | static GDBusInterfaceInfo * |
1512 | ev_daemon_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED__attribute__ ((__unused__))) |
1513 | { |
1514 | return ev_daemon_interface_info (); |
1515 | } |
1516 | |
1517 | static GDBusInterfaceVTable * |
1518 | ev_daemon_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED__attribute__ ((__unused__))) |
1519 | { |
1520 | return (GDBusInterfaceVTable *) &_ev_daemon_skeleton_vtable; |
1521 | } |
1522 | |
1523 | static GVariant * |
1524 | ev_daemon_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton) |
1525 | { |
1526 | EvDaemonSkeleton *skeleton = EV_DAEMON_SKELETON (_skeleton)((((EvDaemonSkeleton*) (void *) g_type_check_instance_cast (( GTypeInstance*) ((_skeleton)), ((ev_daemon_skeleton_get_type ( ))))))); |
Value stored to 'skeleton' during its initialization is never read | |
1527 | |
1528 | GVariantBuilder builder; |
1529 | guint n; |
1530 | #if GLIB_VERSION_MAX_ALLOWED((((2) << 16 | (84) << 8))) >= GLIB_VERSION_2_84(((2) << 16 | (84) << 8)) |
1531 | g_variant_builder_init_static (&builder, G_VARIANT_TYPE ("a{sv}")(g_variant_type_checked_ (("a{sv}")))); |
1532 | #else |
1533 | g_variant_builder_init(&builder, G_VARIANT_TYPE ("a{sv}")(g_variant_type_checked_ (("a{sv}")))); |
1534 | #endif |
1535 | if (_ev_daemon_interface_info.parent_struct.properties == NULL((void*)0)) |
1536 | goto out; |
1537 | for (n = 0; _ev_daemon_interface_info.parent_struct.properties[n] != NULL((void*)0); n++) |
1538 | { |
1539 | GDBusPropertyInfo *info = _ev_daemon_interface_info.parent_struct.properties[n]; |
1540 | if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE) |
1541 | { |
1542 | GVariant *value; |
1543 | value = _ev_daemon_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)((((GDBusInterfaceSkeleton*) (void *) g_type_check_instance_cast ((GTypeInstance*) ((skeleton)), ((g_dbus_interface_skeleton_get_type ()))))))), NULL((void*)0), g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)((((GDBusInterfaceSkeleton*) (void *) g_type_check_instance_cast ((GTypeInstance*) ((skeleton)), ((g_dbus_interface_skeleton_get_type ()))))))), "org.cafe.lector.Daemon", info->name, NULL((void*)0), skeleton); |
1544 | if (value != NULL((void*)0)) |
1545 | { |
1546 | g_variant_take_ref (value); |
1547 | g_variant_builder_add (&builder, "{sv}", info->name, value); |
1548 | g_variant_unref (value); |
1549 | } |
1550 | } |
1551 | } |
1552 | out: |
1553 | return g_variant_builder_end (&builder); |
1554 | } |
1555 | |
1556 | static void |
1557 | ev_daemon_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton G_GNUC_UNUSED__attribute__ ((__unused__))) |
1558 | { |
1559 | } |
1560 | |
1561 | static void ev_daemon_skeleton_iface_init (EvDaemonIface *iface); |
1562 | #if GLIB_VERSION_MAX_ALLOWED((((2) << 16 | (84) << 8))) >= GLIB_VERSION_2_38(((2) << 16 | (38) << 8)) |
1563 | G_DEFINE_TYPE_WITH_CODE (EvDaemonSkeleton, ev_daemon_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,static void ev_daemon_skeleton_init (EvDaemonSkeleton *self); static void ev_daemon_skeleton_class_init (EvDaemonSkeletonClass *klass); static GType ev_daemon_skeleton_get_type_once (void ); static gpointer ev_daemon_skeleton_parent_class = ((void*) 0); static gint EvDaemonSkeleton_private_offset; static void ev_daemon_skeleton_class_intern_init (gpointer klass) { ev_daemon_skeleton_parent_class = g_type_class_peek_parent (klass); if (EvDaemonSkeleton_private_offset != 0) g_type_class_adjust_private_offset (klass, &EvDaemonSkeleton_private_offset); ev_daemon_skeleton_class_init ((EvDaemonSkeletonClass*) klass); } __attribute__ ((__unused__ )) static inline gpointer ev_daemon_skeleton_get_instance_private (EvDaemonSkeleton *self) { return (((gpointer) ((guint8*) (self ) + (glong) (EvDaemonSkeleton_private_offset)))); } GType ev_daemon_skeleton_get_type (void) { static GType static_g_define_type_id = 0; if ((__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id) == sizeof (gpointer), "Expression evaluates to false"); (void) ( 0 ? (gpointer) * (&static_g_define_type_id) : ((void*)0)) ; (!(__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id ) == sizeof (gpointer), "Expression evaluates to false"); __typeof__ (*(&static_g_define_type_id)) gapg_temp_newval; __typeof__ ((&static_g_define_type_id)) gapg_temp_atomic = (&static_g_define_type_id ); __atomic_load (gapg_temp_atomic, &gapg_temp_newval, 5) ; gapg_temp_newval; })) && g_once_init_enter_pointer ( &static_g_define_type_id)); })) ) { GType g_define_type_id = ev_daemon_skeleton_get_type_once (); (__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id) == sizeof (gpointer) , "Expression evaluates to false"); 0 ? (void) (*(&static_g_define_type_id ) = (g_define_type_id)) : (void) 0; g_once_init_leave_pointer ((&static_g_define_type_id), (gpointer) (guintptr) (g_define_type_id )); })) ; } return static_g_define_type_id; } __attribute__ ( (__noinline__)) static GType ev_daemon_skeleton_get_type_once (void) { GType g_define_type_id = g_type_register_static_simple ((g_dbus_interface_skeleton_get_type ()), g_intern_static_string ("EvDaemonSkeleton"), sizeof (EvDaemonSkeletonClass), (GClassInitFunc )(void (*)(void)) ev_daemon_skeleton_class_intern_init, sizeof (EvDaemonSkeleton), (GInstanceInitFunc)(void (*)(void)) ev_daemon_skeleton_init , (GTypeFlags) 0); { {{ EvDaemonSkeleton_private_offset = g_type_add_instance_private (g_define_type_id, sizeof (EvDaemonSkeletonPrivate)); } { const GInterfaceInfo g_implement_interface_info = { (GInterfaceInitFunc )(void (*)(void)) ev_daemon_skeleton_iface_init, ((void*)0), ( (void*)0) }; g_type_add_interface_static (g_define_type_id, ( ev_daemon_get_type ()), &g_implement_interface_info); };} } return g_define_type_id; } |
1564 | G_ADD_PRIVATE (EvDaemonSkeleton)static void ev_daemon_skeleton_init (EvDaemonSkeleton *self); static void ev_daemon_skeleton_class_init (EvDaemonSkeletonClass *klass); static GType ev_daemon_skeleton_get_type_once (void ); static gpointer ev_daemon_skeleton_parent_class = ((void*) 0); static gint EvDaemonSkeleton_private_offset; static void ev_daemon_skeleton_class_intern_init (gpointer klass) { ev_daemon_skeleton_parent_class = g_type_class_peek_parent (klass); if (EvDaemonSkeleton_private_offset != 0) g_type_class_adjust_private_offset (klass, &EvDaemonSkeleton_private_offset); ev_daemon_skeleton_class_init ((EvDaemonSkeletonClass*) klass); } __attribute__ ((__unused__ )) static inline gpointer ev_daemon_skeleton_get_instance_private (EvDaemonSkeleton *self) { return (((gpointer) ((guint8*) (self ) + (glong) (EvDaemonSkeleton_private_offset)))); } GType ev_daemon_skeleton_get_type (void) { static GType static_g_define_type_id = 0; if ((__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id) == sizeof (gpointer), "Expression evaluates to false"); (void) ( 0 ? (gpointer) * (&static_g_define_type_id) : ((void*)0)) ; (!(__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id ) == sizeof (gpointer), "Expression evaluates to false"); __typeof__ (*(&static_g_define_type_id)) gapg_temp_newval; __typeof__ ((&static_g_define_type_id)) gapg_temp_atomic = (&static_g_define_type_id ); __atomic_load (gapg_temp_atomic, &gapg_temp_newval, 5) ; gapg_temp_newval; })) && g_once_init_enter_pointer ( &static_g_define_type_id)); })) ) { GType g_define_type_id = ev_daemon_skeleton_get_type_once (); (__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id) == sizeof (gpointer) , "Expression evaluates to false"); 0 ? (void) (*(&static_g_define_type_id ) = (g_define_type_id)) : (void) 0; g_once_init_leave_pointer ((&static_g_define_type_id), (gpointer) (guintptr) (g_define_type_id )); })) ; } return static_g_define_type_id; } __attribute__ ( (__noinline__)) static GType ev_daemon_skeleton_get_type_once (void) { GType g_define_type_id = g_type_register_static_simple ((g_dbus_interface_skeleton_get_type ()), g_intern_static_string ("EvDaemonSkeleton"), sizeof (EvDaemonSkeletonClass), (GClassInitFunc )(void (*)(void)) ev_daemon_skeleton_class_intern_init, sizeof (EvDaemonSkeleton), (GInstanceInitFunc)(void (*)(void)) ev_daemon_skeleton_init , (GTypeFlags) 0); { {{ EvDaemonSkeleton_private_offset = g_type_add_instance_private (g_define_type_id, sizeof (EvDaemonSkeletonPrivate)); } { const GInterfaceInfo g_implement_interface_info = { (GInterfaceInitFunc )(void (*)(void)) ev_daemon_skeleton_iface_init, ((void*)0), ( (void*)0) }; g_type_add_interface_static (g_define_type_id, ( ev_daemon_get_type ()), &g_implement_interface_info); };} } return g_define_type_id; } |
1565 | G_IMPLEMENT_INTERFACE (EV_TYPE_DAEMON, ev_daemon_skeleton_iface_init))static void ev_daemon_skeleton_init (EvDaemonSkeleton *self); static void ev_daemon_skeleton_class_init (EvDaemonSkeletonClass *klass); static GType ev_daemon_skeleton_get_type_once (void ); static gpointer ev_daemon_skeleton_parent_class = ((void*) 0); static gint EvDaemonSkeleton_private_offset; static void ev_daemon_skeleton_class_intern_init (gpointer klass) { ev_daemon_skeleton_parent_class = g_type_class_peek_parent (klass); if (EvDaemonSkeleton_private_offset != 0) g_type_class_adjust_private_offset (klass, &EvDaemonSkeleton_private_offset); ev_daemon_skeleton_class_init ((EvDaemonSkeletonClass*) klass); } __attribute__ ((__unused__ )) static inline gpointer ev_daemon_skeleton_get_instance_private (EvDaemonSkeleton *self) { return (((gpointer) ((guint8*) (self ) + (glong) (EvDaemonSkeleton_private_offset)))); } GType ev_daemon_skeleton_get_type (void) { static GType static_g_define_type_id = 0; if ((__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id) == sizeof (gpointer), "Expression evaluates to false"); (void) ( 0 ? (gpointer) * (&static_g_define_type_id) : ((void*)0)) ; (!(__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id ) == sizeof (gpointer), "Expression evaluates to false"); __typeof__ (*(&static_g_define_type_id)) gapg_temp_newval; __typeof__ ((&static_g_define_type_id)) gapg_temp_atomic = (&static_g_define_type_id ); __atomic_load (gapg_temp_atomic, &gapg_temp_newval, 5) ; gapg_temp_newval; })) && g_once_init_enter_pointer ( &static_g_define_type_id)); })) ) { GType g_define_type_id = ev_daemon_skeleton_get_type_once (); (__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id) == sizeof (gpointer) , "Expression evaluates to false"); 0 ? (void) (*(&static_g_define_type_id ) = (g_define_type_id)) : (void) 0; g_once_init_leave_pointer ((&static_g_define_type_id), (gpointer) (guintptr) (g_define_type_id )); })) ; } return static_g_define_type_id; } __attribute__ ( (__noinline__)) static GType ev_daemon_skeleton_get_type_once (void) { GType g_define_type_id = g_type_register_static_simple ((g_dbus_interface_skeleton_get_type ()), g_intern_static_string ("EvDaemonSkeleton"), sizeof (EvDaemonSkeletonClass), (GClassInitFunc )(void (*)(void)) ev_daemon_skeleton_class_intern_init, sizeof (EvDaemonSkeleton), (GInstanceInitFunc)(void (*)(void)) ev_daemon_skeleton_init , (GTypeFlags) 0); { {{ EvDaemonSkeleton_private_offset = g_type_add_instance_private (g_define_type_id, sizeof (EvDaemonSkeletonPrivate)); } { const GInterfaceInfo g_implement_interface_info = { (GInterfaceInitFunc )(void (*)(void)) ev_daemon_skeleton_iface_init, ((void*)0), ( (void*)0) }; g_type_add_interface_static (g_define_type_id, ( ev_daemon_get_type ()), &g_implement_interface_info); };} } return g_define_type_id; } |
1566 | |
1567 | #else |
1568 | G_DEFINE_TYPE_WITH_CODE (EvDaemonSkeleton, ev_daemon_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,static void ev_daemon_skeleton_init (EvDaemonSkeleton *self); static void ev_daemon_skeleton_class_init (EvDaemonSkeletonClass *klass); static GType ev_daemon_skeleton_get_type_once (void ); static gpointer ev_daemon_skeleton_parent_class = ((void*) 0); static gint EvDaemonSkeleton_private_offset; static void ev_daemon_skeleton_class_intern_init (gpointer klass) { ev_daemon_skeleton_parent_class = g_type_class_peek_parent (klass); if (EvDaemonSkeleton_private_offset != 0) g_type_class_adjust_private_offset (klass, &EvDaemonSkeleton_private_offset); ev_daemon_skeleton_class_init ((EvDaemonSkeletonClass*) klass); } __attribute__ ((__unused__ )) static inline gpointer ev_daemon_skeleton_get_instance_private (EvDaemonSkeleton *self) { return (((gpointer) ((guint8*) (self ) + (glong) (EvDaemonSkeleton_private_offset)))); } GType ev_daemon_skeleton_get_type (void) { static GType static_g_define_type_id = 0; if ((__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id) == sizeof (gpointer), "Expression evaluates to false"); (void) ( 0 ? (gpointer) * (&static_g_define_type_id) : ((void*)0)) ; (!(__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id ) == sizeof (gpointer), "Expression evaluates to false"); __typeof__ (*(&static_g_define_type_id)) gapg_temp_newval; __typeof__ ((&static_g_define_type_id)) gapg_temp_atomic = (&static_g_define_type_id ); __atomic_load (gapg_temp_atomic, &gapg_temp_newval, 5) ; gapg_temp_newval; })) && g_once_init_enter_pointer ( &static_g_define_type_id)); })) ) { GType g_define_type_id = ev_daemon_skeleton_get_type_once (); (__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id) == sizeof (gpointer) , "Expression evaluates to false"); 0 ? (void) (*(&static_g_define_type_id ) = (g_define_type_id)) : (void) 0; g_once_init_leave_pointer ((&static_g_define_type_id), (gpointer) (guintptr) (g_define_type_id )); })) ; } return static_g_define_type_id; } __attribute__ ( (__noinline__)) static GType ev_daemon_skeleton_get_type_once (void) { GType g_define_type_id = g_type_register_static_simple ((g_dbus_interface_skeleton_get_type ()), g_intern_static_string ("EvDaemonSkeleton"), sizeof (EvDaemonSkeletonClass), (GClassInitFunc )(void (*)(void)) ev_daemon_skeleton_class_intern_init, sizeof (EvDaemonSkeleton), (GInstanceInitFunc)(void (*)(void)) ev_daemon_skeleton_init , (GTypeFlags) 0); { {{ const GInterfaceInfo g_implement_interface_info = { (GInterfaceInitFunc)(void (*)(void)) ev_daemon_skeleton_iface_init , ((void*)0), ((void*)0) }; g_type_add_interface_static (g_define_type_id , (ev_daemon_get_type ()), &g_implement_interface_info); } ;} } return g_define_type_id; } |
1569 | G_IMPLEMENT_INTERFACE (EV_TYPE_DAEMON, ev_daemon_skeleton_iface_init))static void ev_daemon_skeleton_init (EvDaemonSkeleton *self); static void ev_daemon_skeleton_class_init (EvDaemonSkeletonClass *klass); static GType ev_daemon_skeleton_get_type_once (void ); static gpointer ev_daemon_skeleton_parent_class = ((void*) 0); static gint EvDaemonSkeleton_private_offset; static void ev_daemon_skeleton_class_intern_init (gpointer klass) { ev_daemon_skeleton_parent_class = g_type_class_peek_parent (klass); if (EvDaemonSkeleton_private_offset != 0) g_type_class_adjust_private_offset (klass, &EvDaemonSkeleton_private_offset); ev_daemon_skeleton_class_init ((EvDaemonSkeletonClass*) klass); } __attribute__ ((__unused__ )) static inline gpointer ev_daemon_skeleton_get_instance_private (EvDaemonSkeleton *self) { return (((gpointer) ((guint8*) (self ) + (glong) (EvDaemonSkeleton_private_offset)))); } GType ev_daemon_skeleton_get_type (void) { static GType static_g_define_type_id = 0; if ((__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id) == sizeof (gpointer), "Expression evaluates to false"); (void) ( 0 ? (gpointer) * (&static_g_define_type_id) : ((void*)0)) ; (!(__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id ) == sizeof (gpointer), "Expression evaluates to false"); __typeof__ (*(&static_g_define_type_id)) gapg_temp_newval; __typeof__ ((&static_g_define_type_id)) gapg_temp_atomic = (&static_g_define_type_id ); __atomic_load (gapg_temp_atomic, &gapg_temp_newval, 5) ; gapg_temp_newval; })) && g_once_init_enter_pointer ( &static_g_define_type_id)); })) ) { GType g_define_type_id = ev_daemon_skeleton_get_type_once (); (__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id) == sizeof (gpointer) , "Expression evaluates to false"); 0 ? (void) (*(&static_g_define_type_id ) = (g_define_type_id)) : (void) 0; g_once_init_leave_pointer ((&static_g_define_type_id), (gpointer) (guintptr) (g_define_type_id )); })) ; } return static_g_define_type_id; } __attribute__ ( (__noinline__)) static GType ev_daemon_skeleton_get_type_once (void) { GType g_define_type_id = g_type_register_static_simple ((g_dbus_interface_skeleton_get_type ()), g_intern_static_string ("EvDaemonSkeleton"), sizeof (EvDaemonSkeletonClass), (GClassInitFunc )(void (*)(void)) ev_daemon_skeleton_class_intern_init, sizeof (EvDaemonSkeleton), (GInstanceInitFunc)(void (*)(void)) ev_daemon_skeleton_init , (GTypeFlags) 0); { {{ const GInterfaceInfo g_implement_interface_info = { (GInterfaceInitFunc)(void (*)(void)) ev_daemon_skeleton_iface_init , ((void*)0), ((void*)0) }; g_type_add_interface_static (g_define_type_id , (ev_daemon_get_type ()), &g_implement_interface_info); } ;} } return g_define_type_id; } |
1570 | |
1571 | #endif |
1572 | static void |
1573 | ev_daemon_skeleton_finalize (GObject *object) |
1574 | { |
1575 | EvDaemonSkeleton *skeleton = EV_DAEMON_SKELETON (object)((((EvDaemonSkeleton*) (void *) g_type_check_instance_cast (( GTypeInstance*) ((object)), ((ev_daemon_skeleton_get_type ()) ))))); |
1576 | g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free); |
1577 | if (skeleton->priv->changed_properties_idle_source != NULL((void*)0)) |
1578 | g_source_destroy (skeleton->priv->changed_properties_idle_source); |
1579 | g_main_context_unref (skeleton->priv->context); |
1580 | g_mutex_clear (&skeleton->priv->lock); |
1581 | G_OBJECT_CLASS (ev_daemon_skeleton_parent_class)((((GObjectClass*) (void *) g_type_check_class_cast ((GTypeClass *) ((ev_daemon_skeleton_parent_class)), (((GType) ((20) << (2))))))))->finalize (object); |
1582 | } |
1583 | |
1584 | static void |
1585 | ev_daemon_skeleton_init (EvDaemonSkeleton *skeleton) |
1586 | { |
1587 | #if GLIB_VERSION_MAX_ALLOWED((((2) << 16 | (84) << 8))) >= GLIB_VERSION_2_38(((2) << 16 | (38) << 8)) |
1588 | skeleton->priv = ev_daemon_skeleton_get_instance_private (skeleton); |
1589 | #else |
1590 | skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, EV_TYPE_DAEMON_SKELETON, EvDaemonSkeletonPrivate)((EvDaemonSkeletonPrivate*) g_type_instance_get_private ((GTypeInstance *) (skeleton), ((ev_daemon_skeleton_get_type ())))) GCC warning "Deprecated pre-processor symbol: replace with \"G_ADD_PRIVATE\"" ; |
1591 | #endif |
1592 | |
1593 | g_mutex_init (&skeleton->priv->lock); |
1594 | skeleton->priv->context = g_main_context_ref_thread_default (); |
1595 | } |
1596 | |
1597 | static void |
1598 | ev_daemon_skeleton_class_init (EvDaemonSkeletonClass *klass) |
1599 | { |
1600 | GObjectClass *gobject_class; |
1601 | GDBusInterfaceSkeletonClass *skeleton_class; |
1602 | |
1603 | gobject_class = G_OBJECT_CLASS (klass)((((GObjectClass*) (void *) g_type_check_class_cast ((GTypeClass *) ((klass)), (((GType) ((20) << (2)))))))); |
1604 | gobject_class->finalize = ev_daemon_skeleton_finalize; |
1605 | |
1606 | skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass)((((GDBusInterfaceSkeletonClass*) (void *) g_type_check_class_cast ((GTypeClass*) ((klass)), ((g_dbus_interface_skeleton_get_type ())))))); |
1607 | skeleton_class->get_info = ev_daemon_skeleton_dbus_interface_get_info; |
1608 | skeleton_class->get_properties = ev_daemon_skeleton_dbus_interface_get_properties; |
1609 | skeleton_class->flush = ev_daemon_skeleton_dbus_interface_flush; |
1610 | skeleton_class->get_vtable = ev_daemon_skeleton_dbus_interface_get_vtable; |
1611 | |
1612 | #if GLIB_VERSION_MAX_ALLOWED((((2) << 16 | (84) << 8))) < GLIB_VERSION_2_38(((2) << 16 | (38) << 8)) |
1613 | g_type_class_add_private (klass, sizeof (EvDaemonSkeletonPrivate)); |
1614 | #endif |
1615 | } |
1616 | |
1617 | static void |
1618 | ev_daemon_skeleton_iface_init (EvDaemonIface *iface G_GNUC_UNUSED__attribute__ ((__unused__))) |
1619 | { |
1620 | } |
1621 | |
1622 | /** |
1623 | * ev_daemon_skeleton_new: |
1624 | * |
1625 | * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-cafe-lector-Daemon.top_of_page">org.cafe.lector.Daemon</link>. |
1626 | * |
1627 | * Returns: (transfer full) (type EvDaemonSkeleton): The skeleton object. |
1628 | */ |
1629 | EvDaemon * |
1630 | ev_daemon_skeleton_new (void) |
1631 | { |
1632 | return EV_DAEMON (g_object_new (EV_TYPE_DAEMON_SKELETON, NULL))((((EvDaemon*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((g_object_new ((ev_daemon_skeleton_get_type ()), ((void*) 0)))), ((ev_daemon_get_type ())))))); |
1633 | } |
1634 | |
1635 | /* ------------------------------------------------------------------------ |
1636 | * Code for Object, ObjectProxy and ObjectSkeleton |
1637 | * ------------------------------------------------------------------------ |
1638 | */ |
1639 | |
1640 | /** |
1641 | * SECTION:EvObject |
1642 | * @title: EvObject |
1643 | * @short_description: Specialized GDBusObject types |
1644 | * |
1645 | * This section contains the #EvObject, #EvObjectProxy, and #EvObjectSkeleton types which make it easier to work with objects implementing generated types for D-Bus interfaces. |
1646 | */ |
1647 | |
1648 | /** |
1649 | * EvObject: |
1650 | * |
1651 | * The #EvObject type is a specialized container of interfaces. |
1652 | */ |
1653 | |
1654 | /** |
1655 | * EvObjectIface: |
1656 | * @parent_iface: The parent interface. |
1657 | * |
1658 | * Virtual table for the #EvObject interface. |
1659 | */ |
1660 | |
1661 | typedef EvObjectIface EvObjectInterface; |
1662 | G_DEFINE_INTERFACE_WITH_CODE (EvObject, ev_object, G_TYPE_OBJECT, g_type_interface_add_prerequisite (g_define_type_id, G_TYPE_DBUS_OBJECT);)static void ev_object_default_init (EvObjectInterface *klass) ; GType ev_object_get_type (void) { static GType static_g_define_type_id = 0; if ((__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id ) == sizeof (gpointer), "Expression evaluates to false"); (void ) (0 ? (gpointer) * (&static_g_define_type_id) : ((void*) 0)); (!(__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id ) == sizeof (gpointer), "Expression evaluates to false"); __typeof__ (*(&static_g_define_type_id)) gapg_temp_newval; __typeof__ ((&static_g_define_type_id)) gapg_temp_atomic = (&static_g_define_type_id ); __atomic_load (gapg_temp_atomic, &gapg_temp_newval, 5) ; gapg_temp_newval; })) && g_once_init_enter_pointer ( &static_g_define_type_id)); })) ) { GType g_define_type_id = g_type_register_static_simple (((GType) ((2) << (2)) ), g_intern_static_string ("EvObject"), sizeof (EvObjectInterface ), (GClassInitFunc)(void (*)(void)) ev_object_default_init, 0 , (GInstanceInitFunc)((void*)0), (GTypeFlags) 0); if (((GType ) ((20) << (2))) != ((GType) ((0) << (2)))) g_type_interface_add_prerequisite (g_define_type_id, ((GType) ((20) << (2)))); { {g_type_interface_add_prerequisite (g_define_type_id, (g_dbus_object_get_type()));;} } (__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id) == sizeof (gpointer), "Expression evaluates to false"); 0 ? (void ) (*(&static_g_define_type_id) = (g_define_type_id)) : (void ) 0; g_once_init_leave_pointer ((&static_g_define_type_id ), (gpointer) (guintptr) (g_define_type_id)); })) ; } return static_g_define_type_id ; } |
1663 | |
1664 | static void |
1665 | ev_object_default_init (EvObjectIface *iface) |
1666 | { |
1667 | /** |
1668 | * EvObject:daemon: |
1669 | * |
1670 | * The #EvDaemon instance corresponding to the D-Bus interface <link linkend="gdbus-interface-org-cafe-lector-Daemon.top_of_page">org.cafe.lector.Daemon</link>, if any. |
1671 | * |
1672 | * Connect to the #GObject::notify signal to get informed of property changes. |
1673 | */ |
1674 | g_object_interface_install_property (iface, g_param_spec_object ("daemon", "daemon", "daemon", EV_TYPE_DAEMON(ev_daemon_get_type ()), G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS(G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB ))); |
1675 | |
1676 | } |
1677 | |
1678 | /** |
1679 | * ev_object_get_daemon: |
1680 | * @object: A #EvObject. |
1681 | * |
1682 | * Gets the #EvDaemon instance for the D-Bus interface <link linkend="gdbus-interface-org-cafe-lector-Daemon.top_of_page">org.cafe.lector.Daemon</link> on @object, if any. |
1683 | * |
1684 | * Returns: (transfer full) (nullable): A #EvDaemon that must be freed with g_object_unref() or %NULL if @object does not implement the interface. |
1685 | */ |
1686 | EvDaemon *ev_object_get_daemon (EvObject *object) |
1687 | { |
1688 | GDBusInterface *ret; |
1689 | ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object)((((GDBusObject*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((object)), ((g_dbus_object_get_type())))))), "org.cafe.lector.Daemon"); |
1690 | if (ret == NULL((void*)0)) |
1691 | return NULL((void*)0); |
1692 | return EV_DAEMON (ret)((((EvDaemon*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((ret)), ((ev_daemon_get_type ())))))); |
1693 | } |
1694 | |
1695 | |
1696 | /** |
1697 | * ev_object_peek_daemon: (skip) |
1698 | * @object: A #EvObject. |
1699 | * |
1700 | * Like ev_object_get_daemon() but doesn't increase the reference count on the returned object. |
1701 | * |
1702 | * It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running. |
1703 | * |
1704 | * Returns: (transfer none) (nullable): A #EvDaemon or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object. |
1705 | */ |
1706 | EvDaemon *ev_object_peek_daemon (EvObject *object) |
1707 | { |
1708 | GDBusInterface *ret; |
1709 | ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object)((((GDBusObject*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((object)), ((g_dbus_object_get_type())))))), "org.cafe.lector.Daemon"); |
1710 | if (ret == NULL((void*)0)) |
1711 | return NULL((void*)0); |
1712 | g_object_unref (ret); |
1713 | return EV_DAEMON (ret)((((EvDaemon*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((ret)), ((ev_daemon_get_type ())))))); |
1714 | } |
1715 | |
1716 | |
1717 | static void |
1718 | ev_object_notify (GDBusObject *object, GDBusInterface *interface) |
1719 | { |
1720 | _ExtendedGDBusInterfaceInfo *info = (_ExtendedGDBusInterfaceInfo *) g_dbus_interface_get_info (interface); |
1721 | /* info can be NULL if the other end is using a D-Bus interface we don't know |
1722 | * anything about, for example old generated code in this process talking to |
1723 | * newer generated code in the other process. */ |
1724 | if (info != NULL((void*)0)) |
1725 | g_object_notify (G_OBJECT (object)((((GObject*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((object)), (((GType) ((20) << (2)))))))), info->hyphen_name); |
1726 | } |
1727 | |
1728 | /** |
1729 | * EvObjectProxy: |
1730 | * |
1731 | * The #EvObjectProxy structure contains only private data and should only be accessed using the provided API. |
1732 | */ |
1733 | |
1734 | /** |
1735 | * EvObjectProxyClass: |
1736 | * @parent_class: The parent class. |
1737 | * |
1738 | * Class structure for #EvObjectProxy. |
1739 | */ |
1740 | |
1741 | static void |
1742 | ev_object_proxy__ev_object_iface_init (EvObjectIface *iface G_GNUC_UNUSED__attribute__ ((__unused__))) |
1743 | { |
1744 | } |
1745 | |
1746 | static void |
1747 | ev_object_proxy__g_dbus_object_iface_init (GDBusObjectIface *iface) |
1748 | { |
1749 | iface->interface_added = ev_object_notify; |
1750 | iface->interface_removed = ev_object_notify; |
1751 | } |
1752 | |
1753 | |
1754 | G_DEFINE_TYPE_WITH_CODE (EvObjectProxy, ev_object_proxy, G_TYPE_DBUS_OBJECT_PROXY,static void ev_object_proxy_init (EvObjectProxy *self); static void ev_object_proxy_class_init (EvObjectProxyClass *klass); static GType ev_object_proxy_get_type_once (void); static gpointer ev_object_proxy_parent_class = ((void*)0); static gint EvObjectProxy_private_offset ; static void ev_object_proxy_class_intern_init (gpointer klass ) { ev_object_proxy_parent_class = g_type_class_peek_parent ( klass); if (EvObjectProxy_private_offset != 0) g_type_class_adjust_private_offset (klass, &EvObjectProxy_private_offset); ev_object_proxy_class_init ((EvObjectProxyClass*) klass); } __attribute__ ((__unused__) ) static inline gpointer ev_object_proxy_get_instance_private (EvObjectProxy *self) { return (((gpointer) ((guint8*) (self ) + (glong) (EvObjectProxy_private_offset)))); } GType ev_object_proxy_get_type (void) { static GType static_g_define_type_id = 0; if ((__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id) == sizeof (gpointer), "Expression evaluates to false"); (void) ( 0 ? (gpointer) * (&static_g_define_type_id) : ((void*)0)) ; (!(__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id ) == sizeof (gpointer), "Expression evaluates to false"); __typeof__ (*(&static_g_define_type_id)) gapg_temp_newval; __typeof__ ((&static_g_define_type_id)) gapg_temp_atomic = (&static_g_define_type_id ); __atomic_load (gapg_temp_atomic, &gapg_temp_newval, 5) ; gapg_temp_newval; })) && g_once_init_enter_pointer ( &static_g_define_type_id)); })) ) { GType g_define_type_id = ev_object_proxy_get_type_once (); (__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id) == sizeof (gpointer) , "Expression evaluates to false"); 0 ? (void) (*(&static_g_define_type_id ) = (g_define_type_id)) : (void) 0; g_once_init_leave_pointer ((&static_g_define_type_id), (gpointer) (guintptr) (g_define_type_id )); })) ; } return static_g_define_type_id; } __attribute__ ( (__noinline__)) static GType ev_object_proxy_get_type_once (void ) { GType g_define_type_id = g_type_register_static_simple (( g_dbus_object_proxy_get_type ()), g_intern_static_string ("EvObjectProxy" ), sizeof (EvObjectProxyClass), (GClassInitFunc)(void (*)(void )) ev_object_proxy_class_intern_init, sizeof (EvObjectProxy), (GInstanceInitFunc)(void (*)(void)) ev_object_proxy_init, (GTypeFlags ) 0); { {{ const GInterfaceInfo g_implement_interface_info = { (GInterfaceInitFunc)(void (*)(void)) ev_object_proxy__ev_object_iface_init , ((void*)0), ((void*)0) }; g_type_add_interface_static (g_define_type_id , (ev_object_get_type ()), &g_implement_interface_info); } { const GInterfaceInfo g_implement_interface_info = { (GInterfaceInitFunc )(void (*)(void)) ev_object_proxy__g_dbus_object_iface_init, ( (void*)0), ((void*)0) }; g_type_add_interface_static (g_define_type_id , (g_dbus_object_get_type()), &g_implement_interface_info ); };} } return g_define_type_id; } |
1755 | G_IMPLEMENT_INTERFACE (EV_TYPE_OBJECT, ev_object_proxy__ev_object_iface_init)static void ev_object_proxy_init (EvObjectProxy *self); static void ev_object_proxy_class_init (EvObjectProxyClass *klass); static GType ev_object_proxy_get_type_once (void); static gpointer ev_object_proxy_parent_class = ((void*)0); static gint EvObjectProxy_private_offset ; static void ev_object_proxy_class_intern_init (gpointer klass ) { ev_object_proxy_parent_class = g_type_class_peek_parent ( klass); if (EvObjectProxy_private_offset != 0) g_type_class_adjust_private_offset (klass, &EvObjectProxy_private_offset); ev_object_proxy_class_init ((EvObjectProxyClass*) klass); } __attribute__ ((__unused__) ) static inline gpointer ev_object_proxy_get_instance_private (EvObjectProxy *self) { return (((gpointer) ((guint8*) (self ) + (glong) (EvObjectProxy_private_offset)))); } GType ev_object_proxy_get_type (void) { static GType static_g_define_type_id = 0; if ((__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id) == sizeof (gpointer), "Expression evaluates to false"); (void) ( 0 ? (gpointer) * (&static_g_define_type_id) : ((void*)0)) ; (!(__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id ) == sizeof (gpointer), "Expression evaluates to false"); __typeof__ (*(&static_g_define_type_id)) gapg_temp_newval; __typeof__ ((&static_g_define_type_id)) gapg_temp_atomic = (&static_g_define_type_id ); __atomic_load (gapg_temp_atomic, &gapg_temp_newval, 5) ; gapg_temp_newval; })) && g_once_init_enter_pointer ( &static_g_define_type_id)); })) ) { GType g_define_type_id = ev_object_proxy_get_type_once (); (__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id) == sizeof (gpointer) , "Expression evaluates to false"); 0 ? (void) (*(&static_g_define_type_id ) = (g_define_type_id)) : (void) 0; g_once_init_leave_pointer ((&static_g_define_type_id), (gpointer) (guintptr) (g_define_type_id )); })) ; } return static_g_define_type_id; } __attribute__ ( (__noinline__)) static GType ev_object_proxy_get_type_once (void ) { GType g_define_type_id = g_type_register_static_simple (( g_dbus_object_proxy_get_type ()), g_intern_static_string ("EvObjectProxy" ), sizeof (EvObjectProxyClass), (GClassInitFunc)(void (*)(void )) ev_object_proxy_class_intern_init, sizeof (EvObjectProxy), (GInstanceInitFunc)(void (*)(void)) ev_object_proxy_init, (GTypeFlags ) 0); { {{ const GInterfaceInfo g_implement_interface_info = { (GInterfaceInitFunc)(void (*)(void)) ev_object_proxy__ev_object_iface_init , ((void*)0), ((void*)0) }; g_type_add_interface_static (g_define_type_id , (ev_object_get_type ()), &g_implement_interface_info); } { const GInterfaceInfo g_implement_interface_info = { (GInterfaceInitFunc )(void (*)(void)) ev_object_proxy__g_dbus_object_iface_init, ( (void*)0), ((void*)0) }; g_type_add_interface_static (g_define_type_id , (g_dbus_object_get_type()), &g_implement_interface_info ); };} } return g_define_type_id; } |
1756 | G_IMPLEMENT_INTERFACE (G_TYPE_DBUS_OBJECT, ev_object_proxy__g_dbus_object_iface_init))static void ev_object_proxy_init (EvObjectProxy *self); static void ev_object_proxy_class_init (EvObjectProxyClass *klass); static GType ev_object_proxy_get_type_once (void); static gpointer ev_object_proxy_parent_class = ((void*)0); static gint EvObjectProxy_private_offset ; static void ev_object_proxy_class_intern_init (gpointer klass ) { ev_object_proxy_parent_class = g_type_class_peek_parent ( klass); if (EvObjectProxy_private_offset != 0) g_type_class_adjust_private_offset (klass, &EvObjectProxy_private_offset); ev_object_proxy_class_init ((EvObjectProxyClass*) klass); } __attribute__ ((__unused__) ) static inline gpointer ev_object_proxy_get_instance_private (EvObjectProxy *self) { return (((gpointer) ((guint8*) (self ) + (glong) (EvObjectProxy_private_offset)))); } GType ev_object_proxy_get_type (void) { static GType static_g_define_type_id = 0; if ((__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id) == sizeof (gpointer), "Expression evaluates to false"); (void) ( 0 ? (gpointer) * (&static_g_define_type_id) : ((void*)0)) ; (!(__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id ) == sizeof (gpointer), "Expression evaluates to false"); __typeof__ (*(&static_g_define_type_id)) gapg_temp_newval; __typeof__ ((&static_g_define_type_id)) gapg_temp_atomic = (&static_g_define_type_id ); __atomic_load (gapg_temp_atomic, &gapg_temp_newval, 5) ; gapg_temp_newval; })) && g_once_init_enter_pointer ( &static_g_define_type_id)); })) ) { GType g_define_type_id = ev_object_proxy_get_type_once (); (__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id) == sizeof (gpointer) , "Expression evaluates to false"); 0 ? (void) (*(&static_g_define_type_id ) = (g_define_type_id)) : (void) 0; g_once_init_leave_pointer ((&static_g_define_type_id), (gpointer) (guintptr) (g_define_type_id )); })) ; } return static_g_define_type_id; } __attribute__ ( (__noinline__)) static GType ev_object_proxy_get_type_once (void ) { GType g_define_type_id = g_type_register_static_simple (( g_dbus_object_proxy_get_type ()), g_intern_static_string ("EvObjectProxy" ), sizeof (EvObjectProxyClass), (GClassInitFunc)(void (*)(void )) ev_object_proxy_class_intern_init, sizeof (EvObjectProxy), (GInstanceInitFunc)(void (*)(void)) ev_object_proxy_init, (GTypeFlags ) 0); { {{ const GInterfaceInfo g_implement_interface_info = { (GInterfaceInitFunc)(void (*)(void)) ev_object_proxy__ev_object_iface_init , ((void*)0), ((void*)0) }; g_type_add_interface_static (g_define_type_id , (ev_object_get_type ()), &g_implement_interface_info); } { const GInterfaceInfo g_implement_interface_info = { (GInterfaceInitFunc )(void (*)(void)) ev_object_proxy__g_dbus_object_iface_init, ( (void*)0), ((void*)0) }; g_type_add_interface_static (g_define_type_id , (g_dbus_object_get_type()), &g_implement_interface_info ); };} } return g_define_type_id; } |
1757 | |
1758 | static void |
1759 | ev_object_proxy_init (EvObjectProxy *object G_GNUC_UNUSED__attribute__ ((__unused__))) |
1760 | { |
1761 | } |
1762 | |
1763 | static void |
1764 | ev_object_proxy_set_property (GObject *gobject, |
1765 | guint prop_id, |
1766 | const GValue *value G_GNUC_UNUSED__attribute__ ((__unused__)), |
1767 | GParamSpec *pspec) |
1768 | { |
1769 | G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec)do { GObject *_glib__object = (GObject*) ((gobject)); GParamSpec *_glib__pspec = (GParamSpec*) ((pspec)); guint _glib__property_id = ((prop_id)); g_warning ("%s:%d: invalid %s id %u for \"%s\" of type '%s' in '%s'" , "ev-daemon-gdbus-generated.c", 1769, ("property"), _glib__property_id , _glib__pspec->name, g_type_name ((((((GTypeClass*) (((GTypeInstance *) (_glib__pspec))->g_class))->g_type)))), (g_type_name ((((((GTypeClass*) (((GTypeInstance*) (_glib__object))->g_class ))->g_type)))))); } while (0); |
1770 | } |
1771 | |
1772 | static void |
1773 | ev_object_proxy_get_property (GObject *gobject, |
1774 | guint prop_id, |
1775 | GValue *value, |
1776 | GParamSpec *pspec) |
1777 | { |
1778 | EvObjectProxy *object = EV_OBJECT_PROXY (gobject)((((EvObjectProxy*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((gobject)), ((ev_object_proxy_get_type ())))))); |
1779 | GDBusInterface *interface; |
1780 | |
1781 | switch (prop_id) |
1782 | { |
1783 | case 1: |
1784 | interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object)((((GDBusObject*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((object)), ((g_dbus_object_get_type())))))), "org.cafe.lector.Daemon"); |
1785 | g_value_take_object (value, interface); |
1786 | break; |
1787 | |
1788 | default: |
1789 | G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec)do { GObject *_glib__object = (GObject*) ((gobject)); GParamSpec *_glib__pspec = (GParamSpec*) ((pspec)); guint _glib__property_id = ((prop_id)); g_warning ("%s:%d: invalid %s id %u for \"%s\" of type '%s' in '%s'" , "ev-daemon-gdbus-generated.c", 1789, ("property"), _glib__property_id , _glib__pspec->name, g_type_name ((((((GTypeClass*) (((GTypeInstance *) (_glib__pspec))->g_class))->g_type)))), (g_type_name ((((((GTypeClass*) (((GTypeInstance*) (_glib__object))->g_class ))->g_type)))))); } while (0); |
1790 | break; |
1791 | } |
1792 | } |
1793 | |
1794 | static void |
1795 | ev_object_proxy_class_init (EvObjectProxyClass *klass) |
1796 | { |
1797 | GObjectClass *gobject_class = G_OBJECT_CLASS (klass)((((GObjectClass*) (void *) g_type_check_class_cast ((GTypeClass *) ((klass)), (((GType) ((20) << (2)))))))); |
1798 | |
1799 | gobject_class->set_property = ev_object_proxy_set_property; |
1800 | gobject_class->get_property = ev_object_proxy_get_property; |
1801 | |
1802 | g_object_class_override_property (gobject_class, 1, "daemon"); |
1803 | } |
1804 | |
1805 | /** |
1806 | * ev_object_proxy_new: |
1807 | * @connection: A #GDBusConnection. |
1808 | * @object_path: An object path. |
1809 | * |
1810 | * Creates a new proxy object. |
1811 | * |
1812 | * Returns: (transfer full): The proxy object. |
1813 | */ |
1814 | EvObjectProxy * |
1815 | ev_object_proxy_new (GDBusConnection *connection, |
1816 | const gchar *object_path) |
1817 | { |
1818 | g_return_val_if_fail (G_IS_DBUS_CONNECTION (connection), NULL)do { if (((((__extension__ ({ GTypeInstance *__inst = (GTypeInstance *) ((connection)); GType __t = ((g_dbus_connection_get_type ( ))); gboolean __r; if (!__inst) __r = (0); else if (__inst-> g_class && __inst->g_class->g_type == __t) __r = (!(0)); else __r = g_type_check_instance_is_a (__inst, __t); __r; })))))) { } else { g_return_if_fail_warning (((gchar*) 0 ), ((const char*) (__func__)), "G_IS_DBUS_CONNECTION (connection)" ); return (((void*)0)); } } while (0); |
1819 | g_return_val_if_fail (g_variant_is_object_path (object_path), NULL)do { if ((g_variant_is_object_path (object_path))) { } else { g_return_if_fail_warning (((gchar*) 0), ((const char*) (__func__ )), "g_variant_is_object_path (object_path)"); return (((void *)0)); } } while (0); |
1820 | return EV_OBJECT_PROXY (g_object_new (EV_TYPE_OBJECT_PROXY, "g-connection", connection, "g-object-path", object_path, NULL))((((EvObjectProxy*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((g_object_new ((ev_object_proxy_get_type ()), "g-connection" , connection, "g-object-path", object_path, ((void*)0)))), (( ev_object_proxy_get_type ())))))); |
1821 | } |
1822 | |
1823 | /** |
1824 | * EvObjectSkeleton: |
1825 | * |
1826 | * The #EvObjectSkeleton structure contains only private data and should only be accessed using the provided API. |
1827 | */ |
1828 | |
1829 | /** |
1830 | * EvObjectSkeletonClass: |
1831 | * @parent_class: The parent class. |
1832 | * |
1833 | * Class structure for #EvObjectSkeleton. |
1834 | */ |
1835 | |
1836 | static void |
1837 | ev_object_skeleton__ev_object_iface_init (EvObjectIface *iface G_GNUC_UNUSED__attribute__ ((__unused__))) |
1838 | { |
1839 | } |
1840 | |
1841 | |
1842 | static void |
1843 | ev_object_skeleton__g_dbus_object_iface_init (GDBusObjectIface *iface) |
1844 | { |
1845 | iface->interface_added = ev_object_notify; |
1846 | iface->interface_removed = ev_object_notify; |
1847 | } |
1848 | |
1849 | G_DEFINE_TYPE_WITH_CODE (EvObjectSkeleton, ev_object_skeleton, G_TYPE_DBUS_OBJECT_SKELETON,static void ev_object_skeleton_init (EvObjectSkeleton *self); static void ev_object_skeleton_class_init (EvObjectSkeletonClass *klass); static GType ev_object_skeleton_get_type_once (void ); static gpointer ev_object_skeleton_parent_class = ((void*) 0); static gint EvObjectSkeleton_private_offset; static void ev_object_skeleton_class_intern_init (gpointer klass) { ev_object_skeleton_parent_class = g_type_class_peek_parent (klass); if (EvObjectSkeleton_private_offset != 0) g_type_class_adjust_private_offset (klass, &EvObjectSkeleton_private_offset); ev_object_skeleton_class_init ((EvObjectSkeletonClass*) klass); } __attribute__ ((__unused__ )) static inline gpointer ev_object_skeleton_get_instance_private (EvObjectSkeleton *self) { return (((gpointer) ((guint8*) (self ) + (glong) (EvObjectSkeleton_private_offset)))); } GType ev_object_skeleton_get_type (void) { static GType static_g_define_type_id = 0; if ((__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id) == sizeof (gpointer), "Expression evaluates to false"); (void) ( 0 ? (gpointer) * (&static_g_define_type_id) : ((void*)0)) ; (!(__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id ) == sizeof (gpointer), "Expression evaluates to false"); __typeof__ (*(&static_g_define_type_id)) gapg_temp_newval; __typeof__ ((&static_g_define_type_id)) gapg_temp_atomic = (&static_g_define_type_id ); __atomic_load (gapg_temp_atomic, &gapg_temp_newval, 5) ; gapg_temp_newval; })) && g_once_init_enter_pointer ( &static_g_define_type_id)); })) ) { GType g_define_type_id = ev_object_skeleton_get_type_once (); (__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id) == sizeof (gpointer) , "Expression evaluates to false"); 0 ? (void) (*(&static_g_define_type_id ) = (g_define_type_id)) : (void) 0; g_once_init_leave_pointer ((&static_g_define_type_id), (gpointer) (guintptr) (g_define_type_id )); })) ; } return static_g_define_type_id; } __attribute__ ( (__noinline__)) static GType ev_object_skeleton_get_type_once (void) { GType g_define_type_id = g_type_register_static_simple ((g_dbus_object_skeleton_get_type ()), g_intern_static_string ("EvObjectSkeleton"), sizeof (EvObjectSkeletonClass), (GClassInitFunc )(void (*)(void)) ev_object_skeleton_class_intern_init, sizeof (EvObjectSkeleton), (GInstanceInitFunc)(void (*)(void)) ev_object_skeleton_init , (GTypeFlags) 0); { {{ const GInterfaceInfo g_implement_interface_info = { (GInterfaceInitFunc)(void (*)(void)) ev_object_skeleton__ev_object_iface_init , ((void*)0), ((void*)0) }; g_type_add_interface_static (g_define_type_id , (ev_object_get_type ()), &g_implement_interface_info); } { const GInterfaceInfo g_implement_interface_info = { (GInterfaceInitFunc )(void (*)(void)) ev_object_skeleton__g_dbus_object_iface_init , ((void*)0), ((void*)0) }; g_type_add_interface_static (g_define_type_id , (g_dbus_object_get_type()), &g_implement_interface_info ); };} } return g_define_type_id; } |
1850 | G_IMPLEMENT_INTERFACE (EV_TYPE_OBJECT, ev_object_skeleton__ev_object_iface_init)static void ev_object_skeleton_init (EvObjectSkeleton *self); static void ev_object_skeleton_class_init (EvObjectSkeletonClass *klass); static GType ev_object_skeleton_get_type_once (void ); static gpointer ev_object_skeleton_parent_class = ((void*) 0); static gint EvObjectSkeleton_private_offset; static void ev_object_skeleton_class_intern_init (gpointer klass) { ev_object_skeleton_parent_class = g_type_class_peek_parent (klass); if (EvObjectSkeleton_private_offset != 0) g_type_class_adjust_private_offset (klass, &EvObjectSkeleton_private_offset); ev_object_skeleton_class_init ((EvObjectSkeletonClass*) klass); } __attribute__ ((__unused__ )) static inline gpointer ev_object_skeleton_get_instance_private (EvObjectSkeleton *self) { return (((gpointer) ((guint8*) (self ) + (glong) (EvObjectSkeleton_private_offset)))); } GType ev_object_skeleton_get_type (void) { static GType static_g_define_type_id = 0; if ((__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id) == sizeof (gpointer), "Expression evaluates to false"); (void) ( 0 ? (gpointer) * (&static_g_define_type_id) : ((void*)0)) ; (!(__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id ) == sizeof (gpointer), "Expression evaluates to false"); __typeof__ (*(&static_g_define_type_id)) gapg_temp_newval; __typeof__ ((&static_g_define_type_id)) gapg_temp_atomic = (&static_g_define_type_id ); __atomic_load (gapg_temp_atomic, &gapg_temp_newval, 5) ; gapg_temp_newval; })) && g_once_init_enter_pointer ( &static_g_define_type_id)); })) ) { GType g_define_type_id = ev_object_skeleton_get_type_once (); (__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id) == sizeof (gpointer) , "Expression evaluates to false"); 0 ? (void) (*(&static_g_define_type_id ) = (g_define_type_id)) : (void) 0; g_once_init_leave_pointer ((&static_g_define_type_id), (gpointer) (guintptr) (g_define_type_id )); })) ; } return static_g_define_type_id; } __attribute__ ( (__noinline__)) static GType ev_object_skeleton_get_type_once (void) { GType g_define_type_id = g_type_register_static_simple ((g_dbus_object_skeleton_get_type ()), g_intern_static_string ("EvObjectSkeleton"), sizeof (EvObjectSkeletonClass), (GClassInitFunc )(void (*)(void)) ev_object_skeleton_class_intern_init, sizeof (EvObjectSkeleton), (GInstanceInitFunc)(void (*)(void)) ev_object_skeleton_init , (GTypeFlags) 0); { {{ const GInterfaceInfo g_implement_interface_info = { (GInterfaceInitFunc)(void (*)(void)) ev_object_skeleton__ev_object_iface_init , ((void*)0), ((void*)0) }; g_type_add_interface_static (g_define_type_id , (ev_object_get_type ()), &g_implement_interface_info); } { const GInterfaceInfo g_implement_interface_info = { (GInterfaceInitFunc )(void (*)(void)) ev_object_skeleton__g_dbus_object_iface_init , ((void*)0), ((void*)0) }; g_type_add_interface_static (g_define_type_id , (g_dbus_object_get_type()), &g_implement_interface_info ); };} } return g_define_type_id; } |
1851 | G_IMPLEMENT_INTERFACE (G_TYPE_DBUS_OBJECT, ev_object_skeleton__g_dbus_object_iface_init))static void ev_object_skeleton_init (EvObjectSkeleton *self); static void ev_object_skeleton_class_init (EvObjectSkeletonClass *klass); static GType ev_object_skeleton_get_type_once (void ); static gpointer ev_object_skeleton_parent_class = ((void*) 0); static gint EvObjectSkeleton_private_offset; static void ev_object_skeleton_class_intern_init (gpointer klass) { ev_object_skeleton_parent_class = g_type_class_peek_parent (klass); if (EvObjectSkeleton_private_offset != 0) g_type_class_adjust_private_offset (klass, &EvObjectSkeleton_private_offset); ev_object_skeleton_class_init ((EvObjectSkeletonClass*) klass); } __attribute__ ((__unused__ )) static inline gpointer ev_object_skeleton_get_instance_private (EvObjectSkeleton *self) { return (((gpointer) ((guint8*) (self ) + (glong) (EvObjectSkeleton_private_offset)))); } GType ev_object_skeleton_get_type (void) { static GType static_g_define_type_id = 0; if ((__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id) == sizeof (gpointer), "Expression evaluates to false"); (void) ( 0 ? (gpointer) * (&static_g_define_type_id) : ((void*)0)) ; (!(__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id ) == sizeof (gpointer), "Expression evaluates to false"); __typeof__ (*(&static_g_define_type_id)) gapg_temp_newval; __typeof__ ((&static_g_define_type_id)) gapg_temp_atomic = (&static_g_define_type_id ); __atomic_load (gapg_temp_atomic, &gapg_temp_newval, 5) ; gapg_temp_newval; })) && g_once_init_enter_pointer ( &static_g_define_type_id)); })) ) { GType g_define_type_id = ev_object_skeleton_get_type_once (); (__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id) == sizeof (gpointer) , "Expression evaluates to false"); 0 ? (void) (*(&static_g_define_type_id ) = (g_define_type_id)) : (void) 0; g_once_init_leave_pointer ((&static_g_define_type_id), (gpointer) (guintptr) (g_define_type_id )); })) ; } return static_g_define_type_id; } __attribute__ ( (__noinline__)) static GType ev_object_skeleton_get_type_once (void) { GType g_define_type_id = g_type_register_static_simple ((g_dbus_object_skeleton_get_type ()), g_intern_static_string ("EvObjectSkeleton"), sizeof (EvObjectSkeletonClass), (GClassInitFunc )(void (*)(void)) ev_object_skeleton_class_intern_init, sizeof (EvObjectSkeleton), (GInstanceInitFunc)(void (*)(void)) ev_object_skeleton_init , (GTypeFlags) 0); { {{ const GInterfaceInfo g_implement_interface_info = { (GInterfaceInitFunc)(void (*)(void)) ev_object_skeleton__ev_object_iface_init , ((void*)0), ((void*)0) }; g_type_add_interface_static (g_define_type_id , (ev_object_get_type ()), &g_implement_interface_info); } { const GInterfaceInfo g_implement_interface_info = { (GInterfaceInitFunc )(void (*)(void)) ev_object_skeleton__g_dbus_object_iface_init , ((void*)0), ((void*)0) }; g_type_add_interface_static (g_define_type_id , (g_dbus_object_get_type()), &g_implement_interface_info ); };} } return g_define_type_id; } |
1852 | |
1853 | static void |
1854 | ev_object_skeleton_init (EvObjectSkeleton *object G_GNUC_UNUSED__attribute__ ((__unused__))) |
1855 | { |
1856 | } |
1857 | |
1858 | static void |
1859 | ev_object_skeleton_set_property (GObject *gobject, |
1860 | guint prop_id, |
1861 | const GValue *value, |
1862 | GParamSpec *pspec) |
1863 | { |
1864 | EvObjectSkeleton *object = EV_OBJECT_SKELETON (gobject)((((EvObjectSkeleton*) (void *) g_type_check_instance_cast (( GTypeInstance*) ((gobject)), ((ev_object_skeleton_get_type () )))))); |
1865 | GDBusInterfaceSkeleton *interface; |
1866 | |
1867 | switch (prop_id) |
1868 | { |
1869 | case 1: |
1870 | interface = g_value_get_object (value); |
1871 | if (interface != NULL((void*)0)) |
1872 | { |
1873 | g_warn_if_fail (EV_IS_DAEMON (interface))do { if ((((__extension__ ({ GTypeInstance *__inst = (GTypeInstance *) ((interface)); GType __t = ((ev_daemon_get_type ())); gboolean __r; if (!__inst) __r = (0); else if (__inst->g_class && __inst->g_class->g_type == __t) __r = (!(0)); else __r = g_type_check_instance_is_a (__inst, __t); __r; }))))) ; else g_warn_message (((gchar*) 0), "ev-daemon-gdbus-generated.c", 1873, ((const char*) (__func__)), "EV_IS_DAEMON (interface)" ); } while (0); |
1874 | g_dbus_object_skeleton_add_interface (G_DBUS_OBJECT_SKELETON (object)((((GDBusObjectSkeleton*) (void *) g_type_check_instance_cast ((GTypeInstance*) ((object)), ((g_dbus_object_skeleton_get_type ())))))), interface); |
1875 | } |
1876 | else |
1877 | { |
1878 | g_dbus_object_skeleton_remove_interface_by_name (G_DBUS_OBJECT_SKELETON (object)((((GDBusObjectSkeleton*) (void *) g_type_check_instance_cast ((GTypeInstance*) ((object)), ((g_dbus_object_skeleton_get_type ())))))), "org.cafe.lector.Daemon"); |
1879 | } |
1880 | break; |
1881 | |
1882 | default: |
1883 | G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec)do { GObject *_glib__object = (GObject*) ((gobject)); GParamSpec *_glib__pspec = (GParamSpec*) ((pspec)); guint _glib__property_id = ((prop_id)); g_warning ("%s:%d: invalid %s id %u for \"%s\" of type '%s' in '%s'" , "ev-daemon-gdbus-generated.c", 1883, ("property"), _glib__property_id , _glib__pspec->name, g_type_name ((((((GTypeClass*) (((GTypeInstance *) (_glib__pspec))->g_class))->g_type)))), (g_type_name ((((((GTypeClass*) (((GTypeInstance*) (_glib__object))->g_class ))->g_type)))))); } while (0); |
1884 | break; |
1885 | } |
1886 | } |
1887 | |
1888 | static void |
1889 | ev_object_skeleton_get_property (GObject *gobject, |
1890 | guint prop_id, |
1891 | GValue *value, |
1892 | GParamSpec *pspec) |
1893 | { |
1894 | EvObjectSkeleton *object = EV_OBJECT_SKELETON (gobject)((((EvObjectSkeleton*) (void *) g_type_check_instance_cast (( GTypeInstance*) ((gobject)), ((ev_object_skeleton_get_type () )))))); |
1895 | GDBusInterface *interface; |
1896 | |
1897 | switch (prop_id) |
1898 | { |
1899 | case 1: |
1900 | interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object)((((GDBusObject*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((object)), ((g_dbus_object_get_type())))))), "org.cafe.lector.Daemon"); |
1901 | g_value_take_object (value, interface); |
1902 | break; |
1903 | |
1904 | default: |
1905 | G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec)do { GObject *_glib__object = (GObject*) ((gobject)); GParamSpec *_glib__pspec = (GParamSpec*) ((pspec)); guint _glib__property_id = ((prop_id)); g_warning ("%s:%d: invalid %s id %u for \"%s\" of type '%s' in '%s'" , "ev-daemon-gdbus-generated.c", 1905, ("property"), _glib__property_id , _glib__pspec->name, g_type_name ((((((GTypeClass*) (((GTypeInstance *) (_glib__pspec))->g_class))->g_type)))), (g_type_name ((((((GTypeClass*) (((GTypeInstance*) (_glib__object))->g_class ))->g_type)))))); } while (0); |
1906 | break; |
1907 | } |
1908 | } |
1909 | |
1910 | static void |
1911 | ev_object_skeleton_class_init (EvObjectSkeletonClass *klass) |
1912 | { |
1913 | GObjectClass *gobject_class = G_OBJECT_CLASS (klass)((((GObjectClass*) (void *) g_type_check_class_cast ((GTypeClass *) ((klass)), (((GType) ((20) << (2)))))))); |
1914 | |
1915 | gobject_class->set_property = ev_object_skeleton_set_property; |
1916 | gobject_class->get_property = ev_object_skeleton_get_property; |
1917 | |
1918 | g_object_class_override_property (gobject_class, 1, "daemon"); |
1919 | } |
1920 | |
1921 | /** |
1922 | * ev_object_skeleton_new: |
1923 | * @object_path: An object path. |
1924 | * |
1925 | * Creates a new skeleton object. |
1926 | * |
1927 | * Returns: (transfer full): The skeleton object. |
1928 | */ |
1929 | EvObjectSkeleton * |
1930 | ev_object_skeleton_new (const gchar *object_path) |
1931 | { |
1932 | g_return_val_if_fail (g_variant_is_object_path (object_path), NULL)do { if ((g_variant_is_object_path (object_path))) { } else { g_return_if_fail_warning (((gchar*) 0), ((const char*) (__func__ )), "g_variant_is_object_path (object_path)"); return (((void *)0)); } } while (0); |
1933 | return EV_OBJECT_SKELETON (g_object_new (EV_TYPE_OBJECT_SKELETON, "g-object-path", object_path, NULL))((((EvObjectSkeleton*) (void *) g_type_check_instance_cast (( GTypeInstance*) ((g_object_new ((ev_object_skeleton_get_type ( )), "g-object-path", object_path, ((void*)0)))), ((ev_object_skeleton_get_type ())))))); |
1934 | } |
1935 | |
1936 | /** |
1937 | * ev_object_skeleton_set_daemon: |
1938 | * @object: A #EvObjectSkeleton. |
1939 | * @interface_: (nullable): A #EvDaemon or %NULL to clear the interface. |
1940 | * |
1941 | * Sets the #EvDaemon instance for the D-Bus interface <link linkend="gdbus-interface-org-cafe-lector-Daemon.top_of_page">org.cafe.lector.Daemon</link> on @object. |
1942 | */ |
1943 | void ev_object_skeleton_set_daemon (EvObjectSkeleton *object, EvDaemon *interface_) |
1944 | { |
1945 | g_object_set (G_OBJECT (object)((((GObject*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((object)), (((GType) ((20) << (2)))))))), "daemon", interface_, NULL((void*)0)); |
1946 | } |
1947 | |
1948 | |
1949 | /* ------------------------------------------------------------------------ |
1950 | * Code for ObjectManager client |
1951 | * ------------------------------------------------------------------------ |
1952 | */ |
1953 | |
1954 | /** |
1955 | * SECTION:EvObjectManagerClient |
1956 | * @title: EvObjectManagerClient |
1957 | * @short_description: Generated GDBusObjectManagerClient type |
1958 | * |
1959 | * This section contains a #GDBusObjectManagerClient that uses ev_object_manager_client_get_proxy_type() as the #GDBusProxyTypeFunc. |
1960 | */ |
1961 | |
1962 | /** |
1963 | * EvObjectManagerClient: |
1964 | * |
1965 | * The #EvObjectManagerClient structure contains only private data and should only be accessed using the provided API. |
1966 | */ |
1967 | |
1968 | /** |
1969 | * EvObjectManagerClientClass: |
1970 | * @parent_class: The parent class. |
1971 | * |
1972 | * Class structure for #EvObjectManagerClient. |
1973 | */ |
1974 | |
1975 | G_DEFINE_TYPE (EvObjectManagerClient, ev_object_manager_client, G_TYPE_DBUS_OBJECT_MANAGER_CLIENT)static void ev_object_manager_client_init (EvObjectManagerClient *self); static void ev_object_manager_client_class_init (EvObjectManagerClientClass *klass); static GType ev_object_manager_client_get_type_once (void); static gpointer ev_object_manager_client_parent_class = ((void*)0); static gint EvObjectManagerClient_private_offset ; static void ev_object_manager_client_class_intern_init (gpointer klass) { ev_object_manager_client_parent_class = g_type_class_peek_parent (klass); if (EvObjectManagerClient_private_offset != 0) g_type_class_adjust_private_offset (klass, &EvObjectManagerClient_private_offset); ev_object_manager_client_class_init ((EvObjectManagerClientClass*) klass); } __attribute__ ((__unused__ )) static inline gpointer ev_object_manager_client_get_instance_private (EvObjectManagerClient *self) { return (((gpointer) ((guint8 *) (self) + (glong) (EvObjectManagerClient_private_offset)))) ; } GType ev_object_manager_client_get_type (void) { static GType static_g_define_type_id = 0; if ((__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id) == sizeof (gpointer) , "Expression evaluates to false"); (void) (0 ? (gpointer) * ( &static_g_define_type_id) : ((void*)0)); (!(__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id) == sizeof (gpointer), "Expression evaluates to false"); __typeof__ (*(&static_g_define_type_id)) gapg_temp_newval; __typeof__ ((&static_g_define_type_id)) gapg_temp_atomic = (&static_g_define_type_id ); __atomic_load (gapg_temp_atomic, &gapg_temp_newval, 5) ; gapg_temp_newval; })) && g_once_init_enter_pointer ( &static_g_define_type_id)); })) ) { GType g_define_type_id = ev_object_manager_client_get_type_once (); (__extension__ ( { _Static_assert (sizeof *(&static_g_define_type_id) == sizeof (gpointer), "Expression evaluates to false"); 0 ? (void) (*( &static_g_define_type_id) = (g_define_type_id)) : (void) 0 ; g_once_init_leave_pointer ((&static_g_define_type_id), ( gpointer) (guintptr) (g_define_type_id)); })) ; } return static_g_define_type_id ; } __attribute__ ((__noinline__)) static GType ev_object_manager_client_get_type_once (void) { GType g_define_type_id = g_type_register_static_simple ((g_dbus_object_manager_client_get_type ()), g_intern_static_string ("EvObjectManagerClient"), sizeof (EvObjectManagerClientClass ), (GClassInitFunc)(void (*)(void)) ev_object_manager_client_class_intern_init , sizeof (EvObjectManagerClient), (GInstanceInitFunc)(void (* )(void)) ev_object_manager_client_init, (GTypeFlags) 0); { {{ };} } return g_define_type_id; } |
1976 | |
1977 | static void |
1978 | ev_object_manager_client_init (EvObjectManagerClient *manager G_GNUC_UNUSED__attribute__ ((__unused__))) |
1979 | { |
1980 | } |
1981 | |
1982 | static void |
1983 | ev_object_manager_client_class_init (EvObjectManagerClientClass *klass G_GNUC_UNUSED__attribute__ ((__unused__))) |
1984 | { |
1985 | } |
1986 | |
1987 | /** |
1988 | * ev_object_manager_client_get_proxy_type: |
1989 | * @manager: A #GDBusObjectManagerClient. |
1990 | * @object_path: The object path of the remote object (unused). |
1991 | * @interface_name: (nullable): Interface name of the remote object or %NULL to get the object proxy #GType. |
1992 | * @user_data: User data (unused). |
1993 | * |
1994 | * A #GDBusProxyTypeFunc that maps @interface_name to the generated #GDBusObjectProxy derived and #GDBusProxy derived types. |
1995 | * |
1996 | * Returns: A #GDBusProxy derived #GType if @interface_name is not %NULL, otherwise the #GType for #EvObjectProxy. |
1997 | */ |
1998 | GType |
1999 | ev_object_manager_client_get_proxy_type (GDBusObjectManagerClient *manager G_GNUC_UNUSED__attribute__ ((__unused__)), const gchar *object_path G_GNUC_UNUSED__attribute__ ((__unused__)), const gchar *interface_name, gpointer user_data G_GNUC_UNUSED__attribute__ ((__unused__))) |
2000 | { |
2001 | static gsize once_init_value = 0; |
2002 | static GHashTable *lookup_hash; |
2003 | GType ret; |
2004 | |
2005 | if (interface_name == NULL((void*)0)) |
2006 | return EV_TYPE_OBJECT_PROXY(ev_object_proxy_get_type ()); |
2007 | if (g_once_init_enter (&once_init_value)(__extension__ ({ _Static_assert (sizeof *(&once_init_value ) == sizeof (gpointer), "Expression evaluates to false"); (void ) (0 ? (gpointer) *(&once_init_value) : ((void*)0)); (!(__extension__ ({ _Static_assert (sizeof *(&once_init_value) == sizeof ( gpointer), "Expression evaluates to false"); __typeof__ (*(& once_init_value)) gapg_temp_newval; __typeof__ ((&once_init_value )) gapg_temp_atomic = (&once_init_value); __atomic_load ( gapg_temp_atomic, &gapg_temp_newval, 5); gapg_temp_newval ; })) && g_once_init_enter (&once_init_value)); } ))) |
2008 | { |
2009 | lookup_hash = g_hash_table_new (g_str_hash, g_str_equal); |
2010 | g_hash_table_insert (lookup_hash, (gpointer) "org.cafe.lector.Daemon", (gpointer) (guintptr) (EV_TYPE_DAEMON_PROXY(ev_daemon_proxy_get_type ()))); |
2011 | g_once_init_leave (&once_init_value, 1)(__extension__ ({ _Static_assert (sizeof *(&once_init_value ) == sizeof (gpointer), "Expression evaluates to false"); 0 ? (void) (*(&once_init_value) = (1)) : (void) 0; g_once_init_leave ((&once_init_value), (gsize) (1)); })); |
2012 | } |
2013 | ret = (GType) (guintptr) (g_hash_table_lookup (lookup_hash, interface_name)); |
2014 | if (ret == (GType) 0) |
2015 | ret = G_TYPE_DBUS_PROXY(g_dbus_proxy_get_type ()); |
2016 | return ret; |
2017 | } |
2018 | |
2019 | /** |
2020 | * ev_object_manager_client_new: |
2021 | * @connection: A #GDBusConnection. |
2022 | * @flags: Flags from the #GDBusObjectManagerClientFlags enumeration. |
2023 | * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. |
2024 | * @object_path: An object path. |
2025 | * @cancellable: (nullable): A #GCancellable or %NULL. |
2026 | * @callback: A #GAsyncReadyCallback to call when the request is satisfied. |
2027 | * @user_data: User data to pass to @callback. |
2028 | * |
2029 | * Asynchronously creates #GDBusObjectManagerClient using ev_object_manager_client_get_proxy_type() as the #GDBusProxyTypeFunc. See g_dbus_object_manager_client_new() for more details. |
2030 | * |
2031 | * 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()). |
2032 | * You can then call ev_object_manager_client_new_finish() to get the result of the operation. |
2033 | * |
2034 | * See ev_object_manager_client_new_sync() for the synchronous, blocking version of this constructor. |
2035 | */ |
2036 | void |
2037 | ev_object_manager_client_new ( |
2038 | GDBusConnection *connection, |
2039 | GDBusObjectManagerClientFlags flags, |
2040 | const gchar *name, |
2041 | const gchar *object_path, |
2042 | GCancellable *cancellable, |
2043 | GAsyncReadyCallback callback, |
2044 | gpointer user_data) |
2045 | { |
2046 | g_async_initable_new_async (EV_TYPE_OBJECT_MANAGER_CLIENT(ev_object_manager_client_get_type ()), G_PRIORITY_DEFAULT0, cancellable, callback, user_data, "flags", flags, "name", name, "connection", connection, "object-path", object_path, "get-proxy-type-func", ev_object_manager_client_get_proxy_type, NULL((void*)0)); |
2047 | } |
2048 | |
2049 | /** |
2050 | * ev_object_manager_client_new_finish: |
2051 | * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to ev_object_manager_client_new(). |
2052 | * @error: Return location for error or %NULL |
2053 | * |
2054 | * Finishes an operation started with ev_object_manager_client_new(). |
2055 | * |
2056 | * Returns: (transfer full) (type EvObjectManagerClient): The constructed object manager client or %NULL if @error is set. |
2057 | */ |
2058 | GDBusObjectManager * |
2059 | ev_object_manager_client_new_finish ( |
2060 | GAsyncResult *res, |
2061 | GError **error) |
2062 | { |
2063 | GObject *ret; |
2064 | GObject *source_object; |
2065 | source_object = g_async_result_get_source_object (res); |
2066 | ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object)((((GAsyncInitable*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((source_object)), ((g_async_initable_get_type ())))))), res, error); |
2067 | g_object_unref (source_object); |
2068 | if (ret != NULL((void*)0)) |
2069 | return G_DBUS_OBJECT_MANAGER (ret)((((GDBusObjectManager*) (void *) g_type_check_instance_cast ( (GTypeInstance*) ((ret)), ((g_dbus_object_manager_get_type()) ))))); |
2070 | else |
2071 | return NULL((void*)0); |
2072 | } |
2073 | |
2074 | /** |
2075 | * ev_object_manager_client_new_sync: |
2076 | * @connection: A #GDBusConnection. |
2077 | * @flags: Flags from the #GDBusObjectManagerClientFlags enumeration. |
2078 | * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. |
2079 | * @object_path: An object path. |
2080 | * @cancellable: (nullable): A #GCancellable or %NULL. |
2081 | * @error: Return location for error or %NULL |
2082 | * |
2083 | * Synchronously creates #GDBusObjectManagerClient using ev_object_manager_client_get_proxy_type() as the #GDBusProxyTypeFunc. See g_dbus_object_manager_client_new_sync() for more details. |
2084 | * |
2085 | * The calling thread is blocked until a reply is received. |
2086 | * |
2087 | * See ev_object_manager_client_new() for the asynchronous version of this constructor. |
2088 | * |
2089 | * Returns: (transfer full) (type EvObjectManagerClient): The constructed object manager client or %NULL if @error is set. |
2090 | */ |
2091 | GDBusObjectManager * |
2092 | ev_object_manager_client_new_sync ( |
2093 | GDBusConnection *connection, |
2094 | GDBusObjectManagerClientFlags flags, |
2095 | const gchar *name, |
2096 | const gchar *object_path, |
2097 | GCancellable *cancellable, |
2098 | GError **error) |
2099 | { |
2100 | GInitable *ret; |
2101 | ret = g_initable_new (EV_TYPE_OBJECT_MANAGER_CLIENT(ev_object_manager_client_get_type ()), cancellable, error, "flags", flags, "name", name, "connection", connection, "object-path", object_path, "get-proxy-type-func", ev_object_manager_client_get_proxy_type, NULL((void*)0)); |
2102 | if (ret != NULL((void*)0)) |
2103 | return G_DBUS_OBJECT_MANAGER (ret)((((GDBusObjectManager*) (void *) g_type_check_instance_cast ( (GTypeInstance*) ((ret)), ((g_dbus_object_manager_get_type()) ))))); |
2104 | else |
2105 | return NULL((void*)0); |
2106 | } |
2107 | |
2108 | |
2109 | /** |
2110 | * ev_object_manager_client_new_for_bus: |
2111 | * @bus_type: A #GBusType. |
2112 | * @flags: Flags from the #GDBusObjectManagerClientFlags enumeration. |
2113 | * @name: A bus name (well-known or unique). |
2114 | * @object_path: An object path. |
2115 | * @cancellable: (nullable): A #GCancellable or %NULL. |
2116 | * @callback: A #GAsyncReadyCallback to call when the request is satisfied. |
2117 | * @user_data: User data to pass to @callback. |
2118 | * |
2119 | * Like ev_object_manager_client_new() but takes a #GBusType instead of a #GDBusConnection. |
2120 | * |
2121 | * 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()). |
2122 | * You can then call ev_object_manager_client_new_for_bus_finish() to get the result of the operation. |
2123 | * |
2124 | * See ev_object_manager_client_new_for_bus_sync() for the synchronous, blocking version of this constructor. |
2125 | */ |
2126 | void |
2127 | ev_object_manager_client_new_for_bus ( |
2128 | GBusType bus_type, |
2129 | GDBusObjectManagerClientFlags flags, |
2130 | const gchar *name, |
2131 | const gchar *object_path, |
2132 | GCancellable *cancellable, |
2133 | GAsyncReadyCallback callback, |
2134 | gpointer user_data) |
2135 | { |
2136 | g_async_initable_new_async (EV_TYPE_OBJECT_MANAGER_CLIENT(ev_object_manager_client_get_type ()), G_PRIORITY_DEFAULT0, cancellable, callback, user_data, "flags", flags, "name", name, "bus-type", bus_type, "object-path", object_path, "get-proxy-type-func", ev_object_manager_client_get_proxy_type, NULL((void*)0)); |
2137 | } |
2138 | |
2139 | /** |
2140 | * ev_object_manager_client_new_for_bus_finish: |
2141 | * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to ev_object_manager_client_new_for_bus(). |
2142 | * @error: Return location for error or %NULL |
2143 | * |
2144 | * Finishes an operation started with ev_object_manager_client_new_for_bus(). |
2145 | * |
2146 | * Returns: (transfer full) (type EvObjectManagerClient): The constructed object manager client or %NULL if @error is set. |
2147 | */ |
2148 | GDBusObjectManager * |
2149 | ev_object_manager_client_new_for_bus_finish ( |
2150 | GAsyncResult *res, |
2151 | GError **error) |
2152 | { |
2153 | GObject *ret; |
2154 | GObject *source_object; |
2155 | source_object = g_async_result_get_source_object (res); |
2156 | ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object)((((GAsyncInitable*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((source_object)), ((g_async_initable_get_type ())))))), res, error); |
2157 | g_object_unref (source_object); |
2158 | if (ret != NULL((void*)0)) |
2159 | return G_DBUS_OBJECT_MANAGER (ret)((((GDBusObjectManager*) (void *) g_type_check_instance_cast ( (GTypeInstance*) ((ret)), ((g_dbus_object_manager_get_type()) ))))); |
2160 | else |
2161 | return NULL((void*)0); |
2162 | } |
2163 | |
2164 | /** |
2165 | * ev_object_manager_client_new_for_bus_sync: |
2166 | * @bus_type: A #GBusType. |
2167 | * @flags: Flags from the #GDBusObjectManagerClientFlags enumeration. |
2168 | * @name: A bus name (well-known or unique). |
2169 | * @object_path: An object path. |
2170 | * @cancellable: (nullable): A #GCancellable or %NULL. |
2171 | * @error: Return location for error or %NULL |
2172 | * |
2173 | * Like ev_object_manager_client_new_sync() but takes a #GBusType instead of a #GDBusConnection. |
2174 | * |
2175 | * The calling thread is blocked until a reply is received. |
2176 | * |
2177 | * See ev_object_manager_client_new_for_bus() for the asynchronous version of this constructor. |
2178 | * |
2179 | * Returns: (transfer full) (type EvObjectManagerClient): The constructed object manager client or %NULL if @error is set. |
2180 | */ |
2181 | GDBusObjectManager * |
2182 | ev_object_manager_client_new_for_bus_sync ( |
2183 | GBusType bus_type, |
2184 | GDBusObjectManagerClientFlags flags, |
2185 | const gchar *name, |
2186 | const gchar *object_path, |
2187 | GCancellable *cancellable, |
2188 | GError **error) |
2189 | { |
2190 | GInitable *ret; |
2191 | ret = g_initable_new (EV_TYPE_OBJECT_MANAGER_CLIENT(ev_object_manager_client_get_type ()), cancellable, error, "flags", flags, "name", name, "bus-type", bus_type, "object-path", object_path, "get-proxy-type-func", ev_object_manager_client_get_proxy_type, NULL((void*)0)); |
2192 | if (ret != NULL((void*)0)) |
2193 | return G_DBUS_OBJECT_MANAGER (ret)((((GDBusObjectManager*) (void *) g_type_check_instance_cast ( (GTypeInstance*) ((ret)), ((g_dbus_object_manager_get_type()) ))))); |
2194 | else |
2195 | return NULL((void*)0); |
2196 | } |
2197 | |
2198 |