Line data Source code
1 : /*
2 : * This file is generated by gdbus-codegen, do not modify it.
3 : *
4 : * The license of this code is the same as for the D-Bus interface description
5 : * it was derived from. Note that it links to GLib, so must comply with the
6 : * LGPL linking clauses.
7 : */
8 :
9 : #ifdef HAVE_CONFIG_H
10 : # include "config.h"
11 : #endif
12 :
13 : #include "../daemon/dbus/gkd-internal-generated.h"
14 :
15 : #include <string.h>
16 : #ifdef G_OS_UNIX
17 : # include <gio/gunixfdlist.h>
18 : #endif
19 :
20 : #ifdef G_ENABLE_DEBUG
21 : #define g_marshal_value_peek_boolean(v) g_value_get_boolean (v)
22 : #define g_marshal_value_peek_char(v) g_value_get_schar (v)
23 : #define g_marshal_value_peek_uchar(v) g_value_get_uchar (v)
24 : #define g_marshal_value_peek_int(v) g_value_get_int (v)
25 : #define g_marshal_value_peek_uint(v) g_value_get_uint (v)
26 : #define g_marshal_value_peek_long(v) g_value_get_long (v)
27 : #define g_marshal_value_peek_ulong(v) g_value_get_ulong (v)
28 : #define g_marshal_value_peek_int64(v) g_value_get_int64 (v)
29 : #define g_marshal_value_peek_uint64(v) g_value_get_uint64 (v)
30 : #define g_marshal_value_peek_enum(v) g_value_get_enum (v)
31 : #define g_marshal_value_peek_flags(v) g_value_get_flags (v)
32 : #define g_marshal_value_peek_float(v) g_value_get_float (v)
33 : #define g_marshal_value_peek_double(v) g_value_get_double (v)
34 : #define g_marshal_value_peek_string(v) (char*) g_value_get_string (v)
35 : #define g_marshal_value_peek_param(v) g_value_get_param (v)
36 : #define g_marshal_value_peek_boxed(v) g_value_get_boxed (v)
37 : #define g_marshal_value_peek_pointer(v) g_value_get_pointer (v)
38 : #define g_marshal_value_peek_object(v) g_value_get_object (v)
39 : #define g_marshal_value_peek_variant(v) g_value_get_variant (v)
40 : #else /* !G_ENABLE_DEBUG */
41 : /* WARNING: This code accesses GValues directly, which is UNSUPPORTED API.
42 : * Do not access GValues directly in your code. Instead, use the
43 : * g_value_get_*() functions
44 : */
45 : #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int
46 : #define g_marshal_value_peek_char(v) (v)->data[0].v_int
47 : #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint
48 : #define g_marshal_value_peek_int(v) (v)->data[0].v_int
49 : #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint
50 : #define g_marshal_value_peek_long(v) (v)->data[0].v_long
51 : #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong
52 : #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64
53 : #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64
54 : #define g_marshal_value_peek_enum(v) (v)->data[0].v_long
55 : #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong
56 : #define g_marshal_value_peek_float(v) (v)->data[0].v_float
57 : #define g_marshal_value_peek_double(v) (v)->data[0].v_double
58 : #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer
59 : #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer
60 : #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer
61 : #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer
62 : #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer
63 : #define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer
64 : #endif /* !G_ENABLE_DEBUG */
65 :
66 : typedef struct
67 : {
68 : GDBusArgInfo parent_struct;
69 : gboolean use_gvariant;
70 : } _ExtendedGDBusArgInfo;
71 :
72 : typedef struct
73 : {
74 : GDBusMethodInfo parent_struct;
75 : const gchar *signal_name;
76 : gboolean pass_fdlist;
77 : } _ExtendedGDBusMethodInfo;
78 :
79 : typedef struct
80 : {
81 : GDBusSignalInfo parent_struct;
82 : const gchar *signal_name;
83 : } _ExtendedGDBusSignalInfo;
84 :
85 : typedef struct
86 : {
87 : GDBusPropertyInfo parent_struct;
88 : const gchar *hyphen_name;
89 : guint use_gvariant : 1;
90 : guint emits_changed_signal : 1;
91 : } _ExtendedGDBusPropertyInfo;
92 :
93 : typedef struct
94 : {
95 : GDBusInterfaceInfo parent_struct;
96 : const gchar *hyphen_name;
97 : } _ExtendedGDBusInterfaceInfo;
98 :
99 : typedef struct
100 : {
101 : const _ExtendedGDBusPropertyInfo *info;
102 : guint prop_id;
103 : GValue orig_value; /* the value before the change */
104 : } ChangedProperty;
105 :
106 : static void
107 0 : _changed_property_free (ChangedProperty *data)
108 : {
109 0 : g_value_unset (&data->orig_value);
110 0 : g_free (data);
111 0 : }
112 :
113 : static gboolean
114 0 : _g_strv_equal0 (gchar **a, gchar **b)
115 : {
116 0 : gboolean ret = FALSE;
117 : guint n;
118 0 : if (a == NULL && b == NULL)
119 : {
120 0 : ret = TRUE;
121 0 : goto out;
122 : }
123 0 : if (a == NULL || b == NULL)
124 0 : goto out;
125 0 : if (g_strv_length (a) != g_strv_length (b))
126 0 : goto out;
127 0 : for (n = 0; a[n] != NULL; n++)
128 0 : if (g_strcmp0 (a[n], b[n]) != 0)
129 0 : goto out;
130 0 : ret = TRUE;
131 0 : out:
132 0 : return ret;
133 : }
134 :
135 : static gboolean
136 0 : _g_variant_equal0 (GVariant *a, GVariant *b)
137 : {
138 0 : gboolean ret = FALSE;
139 0 : if (a == NULL && b == NULL)
140 : {
141 0 : ret = TRUE;
142 0 : goto out;
143 : }
144 0 : if (a == NULL || b == NULL)
145 0 : goto out;
146 0 : ret = g_variant_equal (a, b);
147 0 : out:
148 0 : return ret;
149 : }
150 :
151 : G_GNUC_UNUSED static gboolean
152 0 : _g_value_equal (const GValue *a, const GValue *b)
153 : {
154 0 : gboolean ret = FALSE;
155 0 : g_assert (G_VALUE_TYPE (a) == G_VALUE_TYPE (b));
156 0 : switch (G_VALUE_TYPE (a))
157 : {
158 0 : case G_TYPE_BOOLEAN:
159 0 : ret = (g_value_get_boolean (a) == g_value_get_boolean (b));
160 0 : break;
161 0 : case G_TYPE_UCHAR:
162 0 : ret = (g_value_get_uchar (a) == g_value_get_uchar (b));
163 0 : break;
164 0 : case G_TYPE_INT:
165 0 : ret = (g_value_get_int (a) == g_value_get_int (b));
166 0 : break;
167 0 : case G_TYPE_UINT:
168 0 : ret = (g_value_get_uint (a) == g_value_get_uint (b));
169 0 : break;
170 0 : case G_TYPE_INT64:
171 0 : ret = (g_value_get_int64 (a) == g_value_get_int64 (b));
172 0 : break;
173 0 : case G_TYPE_UINT64:
174 0 : ret = (g_value_get_uint64 (a) == g_value_get_uint64 (b));
175 0 : break;
176 0 : case G_TYPE_DOUBLE:
177 : {
178 : /* Avoid -Wfloat-equal warnings by doing a direct bit compare */
179 0 : gdouble da = g_value_get_double (a);
180 0 : gdouble db = g_value_get_double (b);
181 0 : ret = memcmp (&da, &db, sizeof (gdouble)) == 0;
182 : }
183 0 : break;
184 0 : case G_TYPE_STRING:
185 0 : ret = (g_strcmp0 (g_value_get_string (a), g_value_get_string (b)) == 0);
186 0 : break;
187 0 : case G_TYPE_VARIANT:
188 0 : ret = _g_variant_equal0 (g_value_get_variant (a), g_value_get_variant (b));
189 0 : break;
190 0 : default:
191 0 : if (G_VALUE_TYPE (a) == G_TYPE_STRV)
192 0 : ret = _g_strv_equal0 (g_value_get_boxed (a), g_value_get_boxed (b));
193 : else
194 0 : g_critical ("_g_value_equal() does not handle type %s", g_type_name (G_VALUE_TYPE (a)));
195 0 : break;
196 : }
197 0 : return ret;
198 : }
199 :
200 : static void
201 0 : _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_VARIANT_VARIANT (
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,
207 : void *marshal_data)
208 : {
209 : typedef gboolean (*_GDbusCodegenMarshalBoolean_ObjectStringVariantVariantFunc)
210 : (void *data1,
211 : GDBusMethodInvocation *arg_method_invocation,
212 : const gchar *arg_collection,
213 : GVariant *arg_original,
214 : GVariant *arg_master,
215 : void *data2);
216 : _GDbusCodegenMarshalBoolean_ObjectStringVariantVariantFunc callback;
217 0 : GCClosure *cc = (GCClosure*) closure;
218 : void *data1, *data2;
219 : gboolean v_return;
220 :
221 0 : g_return_if_fail (return_value != NULL);
222 0 : g_return_if_fail (n_param_values == 5);
223 :
224 0 : if (G_CCLOSURE_SWAP_DATA (closure))
225 : {
226 0 : data1 = closure->data;
227 0 : data2 = g_value_peek_pointer (param_values + 0);
228 : }
229 : else
230 : {
231 0 : data1 = g_value_peek_pointer (param_values + 0);
232 0 : data2 = closure->data;
233 : }
234 :
235 0 : callback = (_GDbusCodegenMarshalBoolean_ObjectStringVariantVariantFunc)
236 0 : (marshal_data ? marshal_data : cc->callback);
237 :
238 : v_return =
239 0 : callback (data1,
240 0 : g_marshal_value_peek_object (param_values + 1),
241 0 : g_marshal_value_peek_string (param_values + 2),
242 0 : g_marshal_value_peek_variant (param_values + 3),
243 0 : g_marshal_value_peek_variant (param_values + 4),
244 : data2);
245 :
246 0 : g_value_set_boolean (return_value, v_return);
247 : }
248 :
249 : static void
250 0 : _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING (
251 : GClosure *closure,
252 : GValue *return_value,
253 : unsigned int n_param_values,
254 : const GValue *param_values,
255 : void *invocation_hint G_GNUC_UNUSED,
256 : void *marshal_data)
257 : {
258 : typedef gboolean (*_GDbusCodegenMarshalBoolean_ObjectStringFunc)
259 : (void *data1,
260 : GDBusMethodInvocation *arg_method_invocation,
261 : const gchar *arg_collection,
262 : void *data2);
263 : _GDbusCodegenMarshalBoolean_ObjectStringFunc callback;
264 0 : GCClosure *cc = (GCClosure*) closure;
265 : void *data1, *data2;
266 : gboolean v_return;
267 :
268 0 : g_return_if_fail (return_value != NULL);
269 0 : g_return_if_fail (n_param_values == 3);
270 :
271 0 : if (G_CCLOSURE_SWAP_DATA (closure))
272 : {
273 0 : data1 = closure->data;
274 0 : data2 = g_value_peek_pointer (param_values + 0);
275 : }
276 : else
277 : {
278 0 : data1 = g_value_peek_pointer (param_values + 0);
279 0 : data2 = closure->data;
280 : }
281 :
282 0 : callback = (_GDbusCodegenMarshalBoolean_ObjectStringFunc)
283 0 : (marshal_data ? marshal_data : cc->callback);
284 :
285 : v_return =
286 0 : callback (data1,
287 0 : g_marshal_value_peek_object (param_values + 1),
288 0 : g_marshal_value_peek_string (param_values + 2),
289 : data2);
290 :
291 0 : g_value_set_boolean (return_value, v_return);
292 : }
293 :
294 : static void
295 1 : _g_dbus_codegen_marshal_BOOLEAN__OBJECT_VARIANT_VARIANT (
296 : GClosure *closure,
297 : GValue *return_value,
298 : unsigned int n_param_values,
299 : const GValue *param_values,
300 : void *invocation_hint G_GNUC_UNUSED,
301 : void *marshal_data)
302 : {
303 : typedef gboolean (*_GDbusCodegenMarshalBoolean_ObjectVariantVariantFunc)
304 : (void *data1,
305 : GDBusMethodInvocation *arg_method_invocation,
306 : GVariant *arg_attributes,
307 : GVariant *arg_master,
308 : void *data2);
309 : _GDbusCodegenMarshalBoolean_ObjectVariantVariantFunc callback;
310 1 : GCClosure *cc = (GCClosure*) closure;
311 : void *data1, *data2;
312 : gboolean v_return;
313 :
314 1 : g_return_if_fail (return_value != NULL);
315 1 : g_return_if_fail (n_param_values == 4);
316 :
317 1 : if (G_CCLOSURE_SWAP_DATA (closure))
318 : {
319 0 : data1 = closure->data;
320 0 : data2 = g_value_peek_pointer (param_values + 0);
321 : }
322 : else
323 : {
324 1 : data1 = g_value_peek_pointer (param_values + 0);
325 1 : data2 = closure->data;
326 : }
327 :
328 1 : callback = (_GDbusCodegenMarshalBoolean_ObjectVariantVariantFunc)
329 1 : (marshal_data ? marshal_data : cc->callback);
330 :
331 : v_return =
332 1 : callback (data1,
333 1 : g_marshal_value_peek_object (param_values + 1),
334 1 : g_marshal_value_peek_variant (param_values + 2),
335 1 : g_marshal_value_peek_variant (param_values + 3),
336 : data2);
337 :
338 1 : g_value_set_boolean (return_value, v_return);
339 : }
340 :
341 : static void
342 15 : _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_VARIANT (
343 : GClosure *closure,
344 : GValue *return_value,
345 : unsigned int n_param_values,
346 : const GValue *param_values,
347 : void *invocation_hint G_GNUC_UNUSED,
348 : void *marshal_data)
349 : {
350 : typedef gboolean (*_GDbusCodegenMarshalBoolean_ObjectStringVariantFunc)
351 : (void *data1,
352 : GDBusMethodInvocation *arg_method_invocation,
353 : const gchar *arg_collection,
354 : GVariant *arg_master,
355 : void *data2);
356 : _GDbusCodegenMarshalBoolean_ObjectStringVariantFunc callback;
357 15 : GCClosure *cc = (GCClosure*) closure;
358 : void *data1, *data2;
359 : gboolean v_return;
360 :
361 15 : g_return_if_fail (return_value != NULL);
362 15 : g_return_if_fail (n_param_values == 4);
363 :
364 15 : if (G_CCLOSURE_SWAP_DATA (closure))
365 : {
366 0 : data1 = closure->data;
367 0 : data2 = g_value_peek_pointer (param_values + 0);
368 : }
369 : else
370 : {
371 15 : data1 = g_value_peek_pointer (param_values + 0);
372 15 : data2 = closure->data;
373 : }
374 :
375 15 : callback = (_GDbusCodegenMarshalBoolean_ObjectStringVariantFunc)
376 15 : (marshal_data ? marshal_data : cc->callback);
377 :
378 : v_return =
379 15 : callback (data1,
380 15 : g_marshal_value_peek_object (param_values + 1),
381 15 : g_marshal_value_peek_string (param_values + 2),
382 15 : g_marshal_value_peek_variant (param_values + 3),
383 : data2);
384 :
385 15 : g_value_set_boolean (return_value, v_return);
386 : }
387 :
388 : /* ------------------------------------------------------------------------
389 : * Code for interface org.gnome.keyring.InternalUnsupportedGuiltRiddenInterface
390 : * ------------------------------------------------------------------------
391 : */
392 :
393 : /**
394 : * SECTION:GkdExportedInternal
395 : * @title: GkdExportedInternal
396 : * @short_description: Generated C code for the org.gnome.keyring.InternalUnsupportedGuiltRiddenInterface D-Bus interface
397 : *
398 : * This section contains code for working with the <link linkend="gdbus-interface-org-gnome-keyring-InternalUnsupportedGuiltRiddenInterface.top_of_page">org.gnome.keyring.InternalUnsupportedGuiltRiddenInterface</link> D-Bus interface in C.
399 : */
400 :
401 : /* ---- Introspection data for org.gnome.keyring.InternalUnsupportedGuiltRiddenInterface ---- */
402 :
403 : static const _ExtendedGDBusArgInfo _gkd_exported_internal_method_info_change_with_master_password_IN_ARG_collection =
404 : {
405 : {
406 : -1,
407 : (gchar *) "collection",
408 : (gchar *) "o",
409 : NULL
410 : },
411 : FALSE
412 : };
413 :
414 : static const _ExtendedGDBusArgInfo _gkd_exported_internal_method_info_change_with_master_password_IN_ARG_original =
415 : {
416 : {
417 : -1,
418 : (gchar *) "original",
419 : (gchar *) "(oayays)",
420 : NULL
421 : },
422 : FALSE
423 : };
424 :
425 : static const _ExtendedGDBusArgInfo _gkd_exported_internal_method_info_change_with_master_password_IN_ARG_master =
426 : {
427 : {
428 : -1,
429 : (gchar *) "master",
430 : (gchar *) "(oayays)",
431 : NULL
432 : },
433 : FALSE
434 : };
435 :
436 : static const GDBusArgInfo * const _gkd_exported_internal_method_info_change_with_master_password_IN_ARG_pointers[] =
437 : {
438 : &_gkd_exported_internal_method_info_change_with_master_password_IN_ARG_collection.parent_struct,
439 : &_gkd_exported_internal_method_info_change_with_master_password_IN_ARG_original.parent_struct,
440 : &_gkd_exported_internal_method_info_change_with_master_password_IN_ARG_master.parent_struct,
441 : NULL
442 : };
443 :
444 : static const _ExtendedGDBusMethodInfo _gkd_exported_internal_method_info_change_with_master_password =
445 : {
446 : {
447 : -1,
448 : (gchar *) "ChangeWithMasterPassword",
449 : (GDBusArgInfo **) &_gkd_exported_internal_method_info_change_with_master_password_IN_ARG_pointers,
450 : NULL,
451 : NULL
452 : },
453 : "handle-change-with-master-password",
454 : FALSE
455 : };
456 :
457 : static const _ExtendedGDBusArgInfo _gkd_exported_internal_method_info_change_with_prompt_IN_ARG_collection =
458 : {
459 : {
460 : -1,
461 : (gchar *) "collection",
462 : (gchar *) "o",
463 : NULL
464 : },
465 : FALSE
466 : };
467 :
468 : static const GDBusArgInfo * const _gkd_exported_internal_method_info_change_with_prompt_IN_ARG_pointers[] =
469 : {
470 : &_gkd_exported_internal_method_info_change_with_prompt_IN_ARG_collection.parent_struct,
471 : NULL
472 : };
473 :
474 : static const _ExtendedGDBusArgInfo _gkd_exported_internal_method_info_change_with_prompt_OUT_ARG_prompt =
475 : {
476 : {
477 : -1,
478 : (gchar *) "prompt",
479 : (gchar *) "o",
480 : NULL
481 : },
482 : FALSE
483 : };
484 :
485 : static const GDBusArgInfo * const _gkd_exported_internal_method_info_change_with_prompt_OUT_ARG_pointers[] =
486 : {
487 : &_gkd_exported_internal_method_info_change_with_prompt_OUT_ARG_prompt.parent_struct,
488 : NULL
489 : };
490 :
491 : static const _ExtendedGDBusMethodInfo _gkd_exported_internal_method_info_change_with_prompt =
492 : {
493 : {
494 : -1,
495 : (gchar *) "ChangeWithPrompt",
496 : (GDBusArgInfo **) &_gkd_exported_internal_method_info_change_with_prompt_IN_ARG_pointers,
497 : (GDBusArgInfo **) &_gkd_exported_internal_method_info_change_with_prompt_OUT_ARG_pointers,
498 : NULL
499 : },
500 : "handle-change-with-prompt",
501 : FALSE
502 : };
503 :
504 : static const _ExtendedGDBusArgInfo _gkd_exported_internal_method_info_create_with_master_password_IN_ARG_attributes =
505 : {
506 : {
507 : -1,
508 : (gchar *) "attributes",
509 : (gchar *) "a{sv}",
510 : NULL
511 : },
512 : FALSE
513 : };
514 :
515 : static const _ExtendedGDBusArgInfo _gkd_exported_internal_method_info_create_with_master_password_IN_ARG_master =
516 : {
517 : {
518 : -1,
519 : (gchar *) "master",
520 : (gchar *) "(oayays)",
521 : NULL
522 : },
523 : FALSE
524 : };
525 :
526 : static const GDBusArgInfo * const _gkd_exported_internal_method_info_create_with_master_password_IN_ARG_pointers[] =
527 : {
528 : &_gkd_exported_internal_method_info_create_with_master_password_IN_ARG_attributes.parent_struct,
529 : &_gkd_exported_internal_method_info_create_with_master_password_IN_ARG_master.parent_struct,
530 : NULL
531 : };
532 :
533 : static const _ExtendedGDBusArgInfo _gkd_exported_internal_method_info_create_with_master_password_OUT_ARG_collection =
534 : {
535 : {
536 : -1,
537 : (gchar *) "collection",
538 : (gchar *) "o",
539 : NULL
540 : },
541 : FALSE
542 : };
543 :
544 : static const GDBusArgInfo * const _gkd_exported_internal_method_info_create_with_master_password_OUT_ARG_pointers[] =
545 : {
546 : &_gkd_exported_internal_method_info_create_with_master_password_OUT_ARG_collection.parent_struct,
547 : NULL
548 : };
549 :
550 : static const _ExtendedGDBusMethodInfo _gkd_exported_internal_method_info_create_with_master_password =
551 : {
552 : {
553 : -1,
554 : (gchar *) "CreateWithMasterPassword",
555 : (GDBusArgInfo **) &_gkd_exported_internal_method_info_create_with_master_password_IN_ARG_pointers,
556 : (GDBusArgInfo **) &_gkd_exported_internal_method_info_create_with_master_password_OUT_ARG_pointers,
557 : NULL
558 : },
559 : "handle-create-with-master-password",
560 : FALSE
561 : };
562 :
563 : static const _ExtendedGDBusArgInfo _gkd_exported_internal_method_info_unlock_with_master_password_IN_ARG_collection =
564 : {
565 : {
566 : -1,
567 : (gchar *) "collection",
568 : (gchar *) "o",
569 : NULL
570 : },
571 : FALSE
572 : };
573 :
574 : static const _ExtendedGDBusArgInfo _gkd_exported_internal_method_info_unlock_with_master_password_IN_ARG_master =
575 : {
576 : {
577 : -1,
578 : (gchar *) "master",
579 : (gchar *) "(oayays)",
580 : NULL
581 : },
582 : FALSE
583 : };
584 :
585 : static const GDBusArgInfo * const _gkd_exported_internal_method_info_unlock_with_master_password_IN_ARG_pointers[] =
586 : {
587 : &_gkd_exported_internal_method_info_unlock_with_master_password_IN_ARG_collection.parent_struct,
588 : &_gkd_exported_internal_method_info_unlock_with_master_password_IN_ARG_master.parent_struct,
589 : NULL
590 : };
591 :
592 : static const _ExtendedGDBusMethodInfo _gkd_exported_internal_method_info_unlock_with_master_password =
593 : {
594 : {
595 : -1,
596 : (gchar *) "UnlockWithMasterPassword",
597 : (GDBusArgInfo **) &_gkd_exported_internal_method_info_unlock_with_master_password_IN_ARG_pointers,
598 : NULL,
599 : NULL
600 : },
601 : "handle-unlock-with-master-password",
602 : FALSE
603 : };
604 :
605 : static const GDBusMethodInfo * const _gkd_exported_internal_method_info_pointers[] =
606 : {
607 : &_gkd_exported_internal_method_info_change_with_master_password.parent_struct,
608 : &_gkd_exported_internal_method_info_change_with_prompt.parent_struct,
609 : &_gkd_exported_internal_method_info_create_with_master_password.parent_struct,
610 : &_gkd_exported_internal_method_info_unlock_with_master_password.parent_struct,
611 : NULL
612 : };
613 :
614 : static const _ExtendedGDBusInterfaceInfo _gkd_exported_internal_interface_info =
615 : {
616 : {
617 : -1,
618 : (gchar *) "org.gnome.keyring.InternalUnsupportedGuiltRiddenInterface",
619 : (GDBusMethodInfo **) &_gkd_exported_internal_method_info_pointers,
620 : NULL,
621 : NULL,
622 : NULL
623 : },
624 : "exported-internal",
625 : };
626 :
627 :
628 : /**
629 : * gkd_exported_internal_interface_info:
630 : *
631 : * Gets a machine-readable description of the <link linkend="gdbus-interface-org-gnome-keyring-InternalUnsupportedGuiltRiddenInterface.top_of_page">org.gnome.keyring.InternalUnsupportedGuiltRiddenInterface</link> D-Bus interface.
632 : *
633 : * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
634 : */
635 : GDBusInterfaceInfo *
636 25 : gkd_exported_internal_interface_info (void)
637 : {
638 25 : return (GDBusInterfaceInfo *) &_gkd_exported_internal_interface_info.parent_struct;
639 : }
640 :
641 : /**
642 : * gkd_exported_internal_override_properties:
643 : * @klass: The class structure for a #GObject derived class.
644 : * @property_id_begin: The property id to assign to the first overridden property.
645 : *
646 : * Overrides all #GObject properties in the #GkdExportedInternal interface for a concrete class.
647 : * The properties are overridden in the order they are defined.
648 : *
649 : * Returns: The last property id.
650 : */
651 : guint
652 0 : gkd_exported_internal_override_properties (GObjectClass *klass G_GNUC_UNUSED, guint property_id_begin)
653 : {
654 0 : return property_id_begin - 1;
655 : }
656 :
657 :
658 : inline static void
659 0 : gkd_exported_internal_method_marshal_change_with_master_password (
660 : GClosure *closure,
661 : GValue *return_value,
662 : unsigned int n_param_values,
663 : const GValue *param_values,
664 : void *invocation_hint,
665 : void *marshal_data)
666 : {
667 0 : _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_VARIANT_VARIANT (closure,
668 : return_value, n_param_values, param_values, invocation_hint, marshal_data);
669 0 : }
670 :
671 : inline static void
672 0 : gkd_exported_internal_method_marshal_change_with_prompt (
673 : GClosure *closure,
674 : GValue *return_value,
675 : unsigned int n_param_values,
676 : const GValue *param_values,
677 : void *invocation_hint,
678 : void *marshal_data)
679 : {
680 0 : _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING (closure,
681 : return_value, n_param_values, param_values, invocation_hint, marshal_data);
682 0 : }
683 :
684 : inline static void
685 1 : gkd_exported_internal_method_marshal_create_with_master_password (
686 : GClosure *closure,
687 : GValue *return_value,
688 : unsigned int n_param_values,
689 : const GValue *param_values,
690 : void *invocation_hint,
691 : void *marshal_data)
692 : {
693 1 : _g_dbus_codegen_marshal_BOOLEAN__OBJECT_VARIANT_VARIANT (closure,
694 : return_value, n_param_values, param_values, invocation_hint, marshal_data);
695 1 : }
696 :
697 : inline static void
698 15 : gkd_exported_internal_method_marshal_unlock_with_master_password (
699 : GClosure *closure,
700 : GValue *return_value,
701 : unsigned int n_param_values,
702 : const GValue *param_values,
703 : void *invocation_hint,
704 : void *marshal_data)
705 : {
706 15 : _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_VARIANT (closure,
707 : return_value, n_param_values, param_values, invocation_hint, marshal_data);
708 15 : }
709 :
710 :
711 : /**
712 : * GkdExportedInternal:
713 : *
714 : * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-gnome-keyring-InternalUnsupportedGuiltRiddenInterface.top_of_page">org.gnome.keyring.InternalUnsupportedGuiltRiddenInterface</link>.
715 : */
716 :
717 : /**
718 : * GkdExportedInternalIface:
719 : * @parent_iface: The parent interface.
720 : * @handle_change_with_master_password: Handler for the #GkdExportedInternal::handle-change-with-master-password signal.
721 : * @handle_change_with_prompt: Handler for the #GkdExportedInternal::handle-change-with-prompt signal.
722 : * @handle_create_with_master_password: Handler for the #GkdExportedInternal::handle-create-with-master-password signal.
723 : * @handle_unlock_with_master_password: Handler for the #GkdExportedInternal::handle-unlock-with-master-password signal.
724 : *
725 : * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-gnome-keyring-InternalUnsupportedGuiltRiddenInterface.top_of_page">org.gnome.keyring.InternalUnsupportedGuiltRiddenInterface</link>.
726 : */
727 :
728 : typedef GkdExportedInternalIface GkdExportedInternalInterface;
729 82 : G_DEFINE_INTERFACE (GkdExportedInternal, gkd_exported_internal, G_TYPE_OBJECT)
730 :
731 : static void
732 25 : gkd_exported_internal_default_init (GkdExportedInternalIface *iface)
733 : {
734 : /* GObject signals for incoming D-Bus method calls: */
735 : /**
736 : * GkdExportedInternal::handle-change-with-master-password:
737 : * @object: A #GkdExportedInternal.
738 : * @invocation: A #GDBusMethodInvocation.
739 : * @arg_collection: Argument passed by remote caller.
740 : * @arg_original: Argument passed by remote caller.
741 : * @arg_master: Argument passed by remote caller.
742 : *
743 : * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-gnome-keyring-InternalUnsupportedGuiltRiddenInterface.ChangeWithMasterPassword">ChangeWithMasterPassword()</link> D-Bus method.
744 : *
745 : * 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 gkd_exported_internal_complete_change_with_master_password() 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.
746 : *
747 : * 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.
748 : */
749 25 : g_signal_new ("handle-change-with-master-password",
750 : G_TYPE_FROM_INTERFACE (iface),
751 : G_SIGNAL_RUN_LAST,
752 : G_STRUCT_OFFSET (GkdExportedInternalIface, handle_change_with_master_password),
753 : g_signal_accumulator_true_handled,
754 : NULL,
755 : gkd_exported_internal_method_marshal_change_with_master_password,
756 : G_TYPE_BOOLEAN,
757 : 4,
758 : G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_VARIANT, G_TYPE_VARIANT);
759 :
760 : /**
761 : * GkdExportedInternal::handle-change-with-prompt:
762 : * @object: A #GkdExportedInternal.
763 : * @invocation: A #GDBusMethodInvocation.
764 : * @arg_collection: Argument passed by remote caller.
765 : *
766 : * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-gnome-keyring-InternalUnsupportedGuiltRiddenInterface.ChangeWithPrompt">ChangeWithPrompt()</link> D-Bus method.
767 : *
768 : * 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 gkd_exported_internal_complete_change_with_prompt() 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.
769 : *
770 : * 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.
771 : */
772 25 : g_signal_new ("handle-change-with-prompt",
773 : G_TYPE_FROM_INTERFACE (iface),
774 : G_SIGNAL_RUN_LAST,
775 : G_STRUCT_OFFSET (GkdExportedInternalIface, handle_change_with_prompt),
776 : g_signal_accumulator_true_handled,
777 : NULL,
778 : gkd_exported_internal_method_marshal_change_with_prompt,
779 : G_TYPE_BOOLEAN,
780 : 2,
781 : G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING);
782 :
783 : /**
784 : * GkdExportedInternal::handle-create-with-master-password:
785 : * @object: A #GkdExportedInternal.
786 : * @invocation: A #GDBusMethodInvocation.
787 : * @arg_attributes: Argument passed by remote caller.
788 : * @arg_master: Argument passed by remote caller.
789 : *
790 : * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-gnome-keyring-InternalUnsupportedGuiltRiddenInterface.CreateWithMasterPassword">CreateWithMasterPassword()</link> D-Bus method.
791 : *
792 : * 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 gkd_exported_internal_complete_create_with_master_password() 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.
793 : *
794 : * 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.
795 : */
796 25 : g_signal_new ("handle-create-with-master-password",
797 : G_TYPE_FROM_INTERFACE (iface),
798 : G_SIGNAL_RUN_LAST,
799 : G_STRUCT_OFFSET (GkdExportedInternalIface, handle_create_with_master_password),
800 : g_signal_accumulator_true_handled,
801 : NULL,
802 : gkd_exported_internal_method_marshal_create_with_master_password,
803 : G_TYPE_BOOLEAN,
804 : 3,
805 : G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT, G_TYPE_VARIANT);
806 :
807 : /**
808 : * GkdExportedInternal::handle-unlock-with-master-password:
809 : * @object: A #GkdExportedInternal.
810 : * @invocation: A #GDBusMethodInvocation.
811 : * @arg_collection: Argument passed by remote caller.
812 : * @arg_master: Argument passed by remote caller.
813 : *
814 : * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-gnome-keyring-InternalUnsupportedGuiltRiddenInterface.UnlockWithMasterPassword">UnlockWithMasterPassword()</link> D-Bus method.
815 : *
816 : * 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 gkd_exported_internal_complete_unlock_with_master_password() 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.
817 : *
818 : * 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.
819 : */
820 25 : g_signal_new ("handle-unlock-with-master-password",
821 : G_TYPE_FROM_INTERFACE (iface),
822 : G_SIGNAL_RUN_LAST,
823 : G_STRUCT_OFFSET (GkdExportedInternalIface, handle_unlock_with_master_password),
824 : g_signal_accumulator_true_handled,
825 : NULL,
826 : gkd_exported_internal_method_marshal_unlock_with_master_password,
827 : G_TYPE_BOOLEAN,
828 : 3,
829 : G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_VARIANT);
830 :
831 25 : }
832 :
833 : /**
834 : * gkd_exported_internal_call_change_with_master_password:
835 : * @proxy: A #GkdExportedInternalProxy.
836 : * @arg_collection: Argument to pass with the method invocation.
837 : * @arg_original: Argument to pass with the method invocation.
838 : * @arg_master: Argument to pass with the method invocation.
839 : * @cancellable: (nullable): A #GCancellable or %NULL.
840 : * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
841 : * @user_data: User data to pass to @callback.
842 : *
843 : * Asynchronously invokes the <link linkend="gdbus-method-org-gnome-keyring-InternalUnsupportedGuiltRiddenInterface.ChangeWithMasterPassword">ChangeWithMasterPassword()</link> D-Bus method on @proxy.
844 : * 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()).
845 : * You can then call gkd_exported_internal_call_change_with_master_password_finish() to get the result of the operation.
846 : *
847 : * See gkd_exported_internal_call_change_with_master_password_sync() for the synchronous, blocking version of this method.
848 : */
849 : void
850 0 : gkd_exported_internal_call_change_with_master_password (
851 : GkdExportedInternal *proxy,
852 : const gchar *arg_collection,
853 : GVariant *arg_original,
854 : GVariant *arg_master,
855 : GCancellable *cancellable,
856 : GAsyncReadyCallback callback,
857 : gpointer user_data)
858 : {
859 0 : g_dbus_proxy_call (G_DBUS_PROXY (proxy),
860 : "ChangeWithMasterPassword",
861 : g_variant_new ("(o@(oayays)@(oayays))",
862 : arg_collection,
863 : arg_original,
864 : arg_master),
865 : G_DBUS_CALL_FLAGS_NONE,
866 : -1,
867 : cancellable,
868 : callback,
869 : user_data);
870 0 : }
871 :
872 : /**
873 : * gkd_exported_internal_call_change_with_master_password_finish:
874 : * @proxy: A #GkdExportedInternalProxy.
875 : * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gkd_exported_internal_call_change_with_master_password().
876 : * @error: Return location for error or %NULL.
877 : *
878 : * Finishes an operation started with gkd_exported_internal_call_change_with_master_password().
879 : *
880 : * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
881 : */
882 : gboolean
883 0 : gkd_exported_internal_call_change_with_master_password_finish (
884 : GkdExportedInternal *proxy,
885 : GAsyncResult *res,
886 : GError **error)
887 : {
888 : GVariant *_ret;
889 0 : _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
890 0 : if (_ret == NULL)
891 0 : goto _out;
892 0 : g_variant_get (_ret,
893 : "()");
894 0 : g_variant_unref (_ret);
895 0 : _out:
896 0 : return _ret != NULL;
897 : }
898 :
899 : /**
900 : * gkd_exported_internal_call_change_with_master_password_sync:
901 : * @proxy: A #GkdExportedInternalProxy.
902 : * @arg_collection: Argument to pass with the method invocation.
903 : * @arg_original: Argument to pass with the method invocation.
904 : * @arg_master: Argument to pass with the method invocation.
905 : * @cancellable: (nullable): A #GCancellable or %NULL.
906 : * @error: Return location for error or %NULL.
907 : *
908 : * Synchronously invokes the <link linkend="gdbus-method-org-gnome-keyring-InternalUnsupportedGuiltRiddenInterface.ChangeWithMasterPassword">ChangeWithMasterPassword()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
909 : *
910 : * See gkd_exported_internal_call_change_with_master_password() for the asynchronous version of this method.
911 : *
912 : * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
913 : */
914 : gboolean
915 0 : gkd_exported_internal_call_change_with_master_password_sync (
916 : GkdExportedInternal *proxy,
917 : const gchar *arg_collection,
918 : GVariant *arg_original,
919 : GVariant *arg_master,
920 : GCancellable *cancellable,
921 : GError **error)
922 : {
923 : GVariant *_ret;
924 0 : _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
925 : "ChangeWithMasterPassword",
926 : g_variant_new ("(o@(oayays)@(oayays))",
927 : arg_collection,
928 : arg_original,
929 : arg_master),
930 : G_DBUS_CALL_FLAGS_NONE,
931 : -1,
932 : cancellable,
933 : error);
934 0 : if (_ret == NULL)
935 0 : goto _out;
936 0 : g_variant_get (_ret,
937 : "()");
938 0 : g_variant_unref (_ret);
939 0 : _out:
940 0 : return _ret != NULL;
941 : }
942 :
943 : /**
944 : * gkd_exported_internal_call_change_with_prompt:
945 : * @proxy: A #GkdExportedInternalProxy.
946 : * @arg_collection: Argument to pass with the method invocation.
947 : * @cancellable: (nullable): A #GCancellable or %NULL.
948 : * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
949 : * @user_data: User data to pass to @callback.
950 : *
951 : * Asynchronously invokes the <link linkend="gdbus-method-org-gnome-keyring-InternalUnsupportedGuiltRiddenInterface.ChangeWithPrompt">ChangeWithPrompt()</link> D-Bus method on @proxy.
952 : * 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()).
953 : * You can then call gkd_exported_internal_call_change_with_prompt_finish() to get the result of the operation.
954 : *
955 : * See gkd_exported_internal_call_change_with_prompt_sync() for the synchronous, blocking version of this method.
956 : */
957 : void
958 0 : gkd_exported_internal_call_change_with_prompt (
959 : GkdExportedInternal *proxy,
960 : const gchar *arg_collection,
961 : GCancellable *cancellable,
962 : GAsyncReadyCallback callback,
963 : gpointer user_data)
964 : {
965 0 : g_dbus_proxy_call (G_DBUS_PROXY (proxy),
966 : "ChangeWithPrompt",
967 : g_variant_new ("(o)",
968 : arg_collection),
969 : G_DBUS_CALL_FLAGS_NONE,
970 : -1,
971 : cancellable,
972 : callback,
973 : user_data);
974 0 : }
975 :
976 : /**
977 : * gkd_exported_internal_call_change_with_prompt_finish:
978 : * @proxy: A #GkdExportedInternalProxy.
979 : * @out_prompt: (out) (optional): Return location for return parameter or %NULL to ignore.
980 : * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gkd_exported_internal_call_change_with_prompt().
981 : * @error: Return location for error or %NULL.
982 : *
983 : * Finishes an operation started with gkd_exported_internal_call_change_with_prompt().
984 : *
985 : * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
986 : */
987 : gboolean
988 0 : gkd_exported_internal_call_change_with_prompt_finish (
989 : GkdExportedInternal *proxy,
990 : gchar **out_prompt,
991 : GAsyncResult *res,
992 : GError **error)
993 : {
994 : GVariant *_ret;
995 0 : _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
996 0 : if (_ret == NULL)
997 0 : goto _out;
998 0 : g_variant_get (_ret,
999 : "(o)",
1000 : out_prompt);
1001 0 : g_variant_unref (_ret);
1002 0 : _out:
1003 0 : return _ret != NULL;
1004 : }
1005 :
1006 : /**
1007 : * gkd_exported_internal_call_change_with_prompt_sync:
1008 : * @proxy: A #GkdExportedInternalProxy.
1009 : * @arg_collection: Argument to pass with the method invocation.
1010 : * @out_prompt: (out) (optional): Return location for return parameter or %NULL to ignore.
1011 : * @cancellable: (nullable): A #GCancellable or %NULL.
1012 : * @error: Return location for error or %NULL.
1013 : *
1014 : * Synchronously invokes the <link linkend="gdbus-method-org-gnome-keyring-InternalUnsupportedGuiltRiddenInterface.ChangeWithPrompt">ChangeWithPrompt()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
1015 : *
1016 : * See gkd_exported_internal_call_change_with_prompt() for the asynchronous version of this method.
1017 : *
1018 : * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
1019 : */
1020 : gboolean
1021 0 : gkd_exported_internal_call_change_with_prompt_sync (
1022 : GkdExportedInternal *proxy,
1023 : const gchar *arg_collection,
1024 : gchar **out_prompt,
1025 : GCancellable *cancellable,
1026 : GError **error)
1027 : {
1028 : GVariant *_ret;
1029 0 : _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
1030 : "ChangeWithPrompt",
1031 : g_variant_new ("(o)",
1032 : arg_collection),
1033 : G_DBUS_CALL_FLAGS_NONE,
1034 : -1,
1035 : cancellable,
1036 : error);
1037 0 : if (_ret == NULL)
1038 0 : goto _out;
1039 0 : g_variant_get (_ret,
1040 : "(o)",
1041 : out_prompt);
1042 0 : g_variant_unref (_ret);
1043 0 : _out:
1044 0 : return _ret != NULL;
1045 : }
1046 :
1047 : /**
1048 : * gkd_exported_internal_call_create_with_master_password:
1049 : * @proxy: A #GkdExportedInternalProxy.
1050 : * @arg_attributes: Argument to pass with the method invocation.
1051 : * @arg_master: Argument to pass with the method invocation.
1052 : * @cancellable: (nullable): A #GCancellable or %NULL.
1053 : * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
1054 : * @user_data: User data to pass to @callback.
1055 : *
1056 : * Asynchronously invokes the <link linkend="gdbus-method-org-gnome-keyring-InternalUnsupportedGuiltRiddenInterface.CreateWithMasterPassword">CreateWithMasterPassword()</link> D-Bus method on @proxy.
1057 : * 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()).
1058 : * You can then call gkd_exported_internal_call_create_with_master_password_finish() to get the result of the operation.
1059 : *
1060 : * See gkd_exported_internal_call_create_with_master_password_sync() for the synchronous, blocking version of this method.
1061 : */
1062 : void
1063 0 : gkd_exported_internal_call_create_with_master_password (
1064 : GkdExportedInternal *proxy,
1065 : GVariant *arg_attributes,
1066 : GVariant *arg_master,
1067 : GCancellable *cancellable,
1068 : GAsyncReadyCallback callback,
1069 : gpointer user_data)
1070 : {
1071 0 : g_dbus_proxy_call (G_DBUS_PROXY (proxy),
1072 : "CreateWithMasterPassword",
1073 : g_variant_new ("(@a{sv}@(oayays))",
1074 : arg_attributes,
1075 : arg_master),
1076 : G_DBUS_CALL_FLAGS_NONE,
1077 : -1,
1078 : cancellable,
1079 : callback,
1080 : user_data);
1081 0 : }
1082 :
1083 : /**
1084 : * gkd_exported_internal_call_create_with_master_password_finish:
1085 : * @proxy: A #GkdExportedInternalProxy.
1086 : * @out_collection: (out) (optional): Return location for return parameter or %NULL to ignore.
1087 : * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gkd_exported_internal_call_create_with_master_password().
1088 : * @error: Return location for error or %NULL.
1089 : *
1090 : * Finishes an operation started with gkd_exported_internal_call_create_with_master_password().
1091 : *
1092 : * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
1093 : */
1094 : gboolean
1095 0 : gkd_exported_internal_call_create_with_master_password_finish (
1096 : GkdExportedInternal *proxy,
1097 : gchar **out_collection,
1098 : GAsyncResult *res,
1099 : GError **error)
1100 : {
1101 : GVariant *_ret;
1102 0 : _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
1103 0 : if (_ret == NULL)
1104 0 : goto _out;
1105 0 : g_variant_get (_ret,
1106 : "(o)",
1107 : out_collection);
1108 0 : g_variant_unref (_ret);
1109 0 : _out:
1110 0 : return _ret != NULL;
1111 : }
1112 :
1113 : /**
1114 : * gkd_exported_internal_call_create_with_master_password_sync:
1115 : * @proxy: A #GkdExportedInternalProxy.
1116 : * @arg_attributes: Argument to pass with the method invocation.
1117 : * @arg_master: Argument to pass with the method invocation.
1118 : * @out_collection: (out) (optional): Return location for return parameter or %NULL to ignore.
1119 : * @cancellable: (nullable): A #GCancellable or %NULL.
1120 : * @error: Return location for error or %NULL.
1121 : *
1122 : * Synchronously invokes the <link linkend="gdbus-method-org-gnome-keyring-InternalUnsupportedGuiltRiddenInterface.CreateWithMasterPassword">CreateWithMasterPassword()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
1123 : *
1124 : * See gkd_exported_internal_call_create_with_master_password() for the asynchronous version of this method.
1125 : *
1126 : * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
1127 : */
1128 : gboolean
1129 0 : gkd_exported_internal_call_create_with_master_password_sync (
1130 : GkdExportedInternal *proxy,
1131 : GVariant *arg_attributes,
1132 : GVariant *arg_master,
1133 : gchar **out_collection,
1134 : GCancellable *cancellable,
1135 : GError **error)
1136 : {
1137 : GVariant *_ret;
1138 0 : _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
1139 : "CreateWithMasterPassword",
1140 : g_variant_new ("(@a{sv}@(oayays))",
1141 : arg_attributes,
1142 : arg_master),
1143 : G_DBUS_CALL_FLAGS_NONE,
1144 : -1,
1145 : cancellable,
1146 : error);
1147 0 : if (_ret == NULL)
1148 0 : goto _out;
1149 0 : g_variant_get (_ret,
1150 : "(o)",
1151 : out_collection);
1152 0 : g_variant_unref (_ret);
1153 0 : _out:
1154 0 : return _ret != NULL;
1155 : }
1156 :
1157 : /**
1158 : * gkd_exported_internal_call_unlock_with_master_password:
1159 : * @proxy: A #GkdExportedInternalProxy.
1160 : * @arg_collection: Argument to pass with the method invocation.
1161 : * @arg_master: Argument to pass with the method invocation.
1162 : * @cancellable: (nullable): A #GCancellable or %NULL.
1163 : * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
1164 : * @user_data: User data to pass to @callback.
1165 : *
1166 : * Asynchronously invokes the <link linkend="gdbus-method-org-gnome-keyring-InternalUnsupportedGuiltRiddenInterface.UnlockWithMasterPassword">UnlockWithMasterPassword()</link> D-Bus method on @proxy.
1167 : * 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()).
1168 : * You can then call gkd_exported_internal_call_unlock_with_master_password_finish() to get the result of the operation.
1169 : *
1170 : * See gkd_exported_internal_call_unlock_with_master_password_sync() for the synchronous, blocking version of this method.
1171 : */
1172 : void
1173 0 : gkd_exported_internal_call_unlock_with_master_password (
1174 : GkdExportedInternal *proxy,
1175 : const gchar *arg_collection,
1176 : GVariant *arg_master,
1177 : GCancellable *cancellable,
1178 : GAsyncReadyCallback callback,
1179 : gpointer user_data)
1180 : {
1181 0 : g_dbus_proxy_call (G_DBUS_PROXY (proxy),
1182 : "UnlockWithMasterPassword",
1183 : g_variant_new ("(o@(oayays))",
1184 : arg_collection,
1185 : arg_master),
1186 : G_DBUS_CALL_FLAGS_NONE,
1187 : -1,
1188 : cancellable,
1189 : callback,
1190 : user_data);
1191 0 : }
1192 :
1193 : /**
1194 : * gkd_exported_internal_call_unlock_with_master_password_finish:
1195 : * @proxy: A #GkdExportedInternalProxy.
1196 : * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gkd_exported_internal_call_unlock_with_master_password().
1197 : * @error: Return location for error or %NULL.
1198 : *
1199 : * Finishes an operation started with gkd_exported_internal_call_unlock_with_master_password().
1200 : *
1201 : * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
1202 : */
1203 : gboolean
1204 0 : gkd_exported_internal_call_unlock_with_master_password_finish (
1205 : GkdExportedInternal *proxy,
1206 : GAsyncResult *res,
1207 : GError **error)
1208 : {
1209 : GVariant *_ret;
1210 0 : _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
1211 0 : if (_ret == NULL)
1212 0 : goto _out;
1213 0 : g_variant_get (_ret,
1214 : "()");
1215 0 : g_variant_unref (_ret);
1216 0 : _out:
1217 0 : return _ret != NULL;
1218 : }
1219 :
1220 : /**
1221 : * gkd_exported_internal_call_unlock_with_master_password_sync:
1222 : * @proxy: A #GkdExportedInternalProxy.
1223 : * @arg_collection: Argument to pass with the method invocation.
1224 : * @arg_master: Argument to pass with the method invocation.
1225 : * @cancellable: (nullable): A #GCancellable or %NULL.
1226 : * @error: Return location for error or %NULL.
1227 : *
1228 : * Synchronously invokes the <link linkend="gdbus-method-org-gnome-keyring-InternalUnsupportedGuiltRiddenInterface.UnlockWithMasterPassword">UnlockWithMasterPassword()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
1229 : *
1230 : * See gkd_exported_internal_call_unlock_with_master_password() for the asynchronous version of this method.
1231 : *
1232 : * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
1233 : */
1234 : gboolean
1235 0 : gkd_exported_internal_call_unlock_with_master_password_sync (
1236 : GkdExportedInternal *proxy,
1237 : const gchar *arg_collection,
1238 : GVariant *arg_master,
1239 : GCancellable *cancellable,
1240 : GError **error)
1241 : {
1242 : GVariant *_ret;
1243 0 : _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
1244 : "UnlockWithMasterPassword",
1245 : g_variant_new ("(o@(oayays))",
1246 : arg_collection,
1247 : arg_master),
1248 : G_DBUS_CALL_FLAGS_NONE,
1249 : -1,
1250 : cancellable,
1251 : error);
1252 0 : if (_ret == NULL)
1253 0 : goto _out;
1254 0 : g_variant_get (_ret,
1255 : "()");
1256 0 : g_variant_unref (_ret);
1257 0 : _out:
1258 0 : return _ret != NULL;
1259 : }
1260 :
1261 : /**
1262 : * gkd_exported_internal_complete_change_with_master_password:
1263 : * @object: A #GkdExportedInternal.
1264 : * @invocation: (transfer full): A #GDBusMethodInvocation.
1265 : *
1266 : * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-gnome-keyring-InternalUnsupportedGuiltRiddenInterface.ChangeWithMasterPassword">ChangeWithMasterPassword()</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.
1267 : *
1268 : * This method will free @invocation, you cannot use it afterwards.
1269 : */
1270 : void
1271 0 : gkd_exported_internal_complete_change_with_master_password (
1272 : GkdExportedInternal *object G_GNUC_UNUSED,
1273 : GDBusMethodInvocation *invocation)
1274 : {
1275 0 : g_dbus_method_invocation_return_value (invocation,
1276 : g_variant_new ("()"));
1277 0 : }
1278 :
1279 : /**
1280 : * gkd_exported_internal_complete_change_with_prompt:
1281 : * @object: A #GkdExportedInternal.
1282 : * @invocation: (transfer full): A #GDBusMethodInvocation.
1283 : * @prompt: Parameter to return.
1284 : *
1285 : * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-gnome-keyring-InternalUnsupportedGuiltRiddenInterface.ChangeWithPrompt">ChangeWithPrompt()</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.
1286 : *
1287 : * This method will free @invocation, you cannot use it afterwards.
1288 : */
1289 : void
1290 0 : gkd_exported_internal_complete_change_with_prompt (
1291 : GkdExportedInternal *object G_GNUC_UNUSED,
1292 : GDBusMethodInvocation *invocation,
1293 : const gchar *prompt)
1294 : {
1295 0 : g_dbus_method_invocation_return_value (invocation,
1296 : g_variant_new ("(o)",
1297 : prompt));
1298 0 : }
1299 :
1300 : /**
1301 : * gkd_exported_internal_complete_create_with_master_password:
1302 : * @object: A #GkdExportedInternal.
1303 : * @invocation: (transfer full): A #GDBusMethodInvocation.
1304 : * @collection: Parameter to return.
1305 : *
1306 : * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-gnome-keyring-InternalUnsupportedGuiltRiddenInterface.CreateWithMasterPassword">CreateWithMasterPassword()</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.
1307 : *
1308 : * This method will free @invocation, you cannot use it afterwards.
1309 : */
1310 : void
1311 1 : gkd_exported_internal_complete_create_with_master_password (
1312 : GkdExportedInternal *object G_GNUC_UNUSED,
1313 : GDBusMethodInvocation *invocation,
1314 : const gchar *collection)
1315 : {
1316 1 : g_dbus_method_invocation_return_value (invocation,
1317 : g_variant_new ("(o)",
1318 : collection));
1319 1 : }
1320 :
1321 : /**
1322 : * gkd_exported_internal_complete_unlock_with_master_password:
1323 : * @object: A #GkdExportedInternal.
1324 : * @invocation: (transfer full): A #GDBusMethodInvocation.
1325 : *
1326 : * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-gnome-keyring-InternalUnsupportedGuiltRiddenInterface.UnlockWithMasterPassword">UnlockWithMasterPassword()</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.
1327 : *
1328 : * This method will free @invocation, you cannot use it afterwards.
1329 : */
1330 : void
1331 15 : gkd_exported_internal_complete_unlock_with_master_password (
1332 : GkdExportedInternal *object G_GNUC_UNUSED,
1333 : GDBusMethodInvocation *invocation)
1334 : {
1335 15 : g_dbus_method_invocation_return_value (invocation,
1336 : g_variant_new ("()"));
1337 15 : }
1338 :
1339 : /* ------------------------------------------------------------------------ */
1340 :
1341 : /**
1342 : * GkdExportedInternalProxy:
1343 : *
1344 : * The #GkdExportedInternalProxy structure contains only private data and should only be accessed using the provided API.
1345 : */
1346 :
1347 : /**
1348 : * GkdExportedInternalProxyClass:
1349 : * @parent_class: The parent class.
1350 : *
1351 : * Class structure for #GkdExportedInternalProxy.
1352 : */
1353 :
1354 : struct _GkdExportedInternalProxyPrivate
1355 : {
1356 : GData *qdata;
1357 : };
1358 :
1359 : static void gkd_exported_internal_proxy_iface_init (GkdExportedInternalIface *iface);
1360 :
1361 : #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
1362 0 : G_DEFINE_TYPE_WITH_CODE (GkdExportedInternalProxy, gkd_exported_internal_proxy, G_TYPE_DBUS_PROXY,
1363 : G_ADD_PRIVATE (GkdExportedInternalProxy)
1364 : G_IMPLEMENT_INTERFACE (GKD_TYPE_EXPORTED_INTERNAL, gkd_exported_internal_proxy_iface_init))
1365 :
1366 : #else
1367 : G_DEFINE_TYPE_WITH_CODE (GkdExportedInternalProxy, gkd_exported_internal_proxy, G_TYPE_DBUS_PROXY,
1368 : G_IMPLEMENT_INTERFACE (GKD_TYPE_EXPORTED_INTERNAL, gkd_exported_internal_proxy_iface_init))
1369 :
1370 : #endif
1371 : static void
1372 0 : gkd_exported_internal_proxy_finalize (GObject *object)
1373 : {
1374 0 : GkdExportedInternalProxy *proxy = GKD_EXPORTED_INTERNAL_PROXY (object);
1375 0 : g_datalist_clear (&proxy->priv->qdata);
1376 0 : G_OBJECT_CLASS (gkd_exported_internal_proxy_parent_class)->finalize (object);
1377 0 : }
1378 :
1379 : static void
1380 0 : gkd_exported_internal_proxy_get_property (GObject *object G_GNUC_UNUSED,
1381 : guint prop_id G_GNUC_UNUSED,
1382 : GValue *value G_GNUC_UNUSED,
1383 : GParamSpec *pspec G_GNUC_UNUSED)
1384 : {
1385 0 : }
1386 :
1387 : static void
1388 0 : gkd_exported_internal_proxy_set_property (GObject *object G_GNUC_UNUSED,
1389 : guint prop_id G_GNUC_UNUSED,
1390 : const GValue *value G_GNUC_UNUSED,
1391 : GParamSpec *pspec G_GNUC_UNUSED)
1392 : {
1393 0 : }
1394 :
1395 : static void
1396 0 : gkd_exported_internal_proxy_g_signal (GDBusProxy *proxy,
1397 : const gchar *sender_name G_GNUC_UNUSED,
1398 : const gchar *signal_name,
1399 : GVariant *parameters)
1400 : {
1401 : _ExtendedGDBusSignalInfo *info;
1402 : GVariantIter iter;
1403 : GVariant *child;
1404 : GValue *paramv;
1405 : gsize num_params;
1406 : gsize n;
1407 : guint signal_id;
1408 0 : info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_gkd_exported_internal_interface_info.parent_struct, signal_name);
1409 0 : if (info == NULL)
1410 0 : return;
1411 0 : num_params = g_variant_n_children (parameters);
1412 0 : paramv = g_new0 (GValue, num_params + 1);
1413 0 : g_value_init (¶mv[0], GKD_TYPE_EXPORTED_INTERNAL);
1414 0 : g_value_set_object (¶mv[0], proxy);
1415 0 : g_variant_iter_init (&iter, parameters);
1416 0 : n = 1;
1417 0 : while ((child = g_variant_iter_next_value (&iter)) != NULL)
1418 : {
1419 0 : _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
1420 0 : if (arg_info->use_gvariant)
1421 : {
1422 0 : g_value_init (¶mv[n], G_TYPE_VARIANT);
1423 0 : g_value_set_variant (¶mv[n], child);
1424 0 : n++;
1425 : }
1426 : else
1427 0 : g_dbus_gvariant_to_gvalue (child, ¶mv[n++]);
1428 0 : g_variant_unref (child);
1429 : }
1430 0 : signal_id = g_signal_lookup (info->signal_name, GKD_TYPE_EXPORTED_INTERNAL);
1431 0 : g_signal_emitv (paramv, signal_id, 0, NULL);
1432 0 : for (n = 0; n < num_params + 1; n++)
1433 0 : g_value_unset (¶mv[n]);
1434 0 : g_free (paramv);
1435 : }
1436 :
1437 : static void
1438 0 : gkd_exported_internal_proxy_g_properties_changed (GDBusProxy *_proxy,
1439 : GVariant *changed_properties,
1440 : const gchar *const *invalidated_properties)
1441 : {
1442 0 : GkdExportedInternalProxy *proxy = GKD_EXPORTED_INTERNAL_PROXY (_proxy);
1443 : guint n;
1444 : const gchar *key;
1445 : GVariantIter *iter;
1446 : _ExtendedGDBusPropertyInfo *info;
1447 0 : g_variant_get (changed_properties, "a{sv}", &iter);
1448 0 : while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
1449 : {
1450 0 : info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gkd_exported_internal_interface_info.parent_struct, key);
1451 0 : g_datalist_remove_data (&proxy->priv->qdata, key);
1452 0 : if (info != NULL)
1453 0 : g_object_notify (G_OBJECT (proxy), info->hyphen_name);
1454 : }
1455 0 : g_variant_iter_free (iter);
1456 0 : for (n = 0; invalidated_properties[n] != NULL; n++)
1457 : {
1458 0 : info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gkd_exported_internal_interface_info.parent_struct, invalidated_properties[n]);
1459 0 : g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
1460 0 : if (info != NULL)
1461 0 : g_object_notify (G_OBJECT (proxy), info->hyphen_name);
1462 : }
1463 0 : }
1464 :
1465 : static void
1466 0 : gkd_exported_internal_proxy_init (GkdExportedInternalProxy *proxy)
1467 : {
1468 : #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
1469 0 : proxy->priv = gkd_exported_internal_proxy_get_instance_private (proxy);
1470 : #else
1471 : proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, GKD_TYPE_EXPORTED_INTERNAL_PROXY, GkdExportedInternalProxyPrivate);
1472 : #endif
1473 :
1474 0 : g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), gkd_exported_internal_interface_info ());
1475 0 : }
1476 :
1477 : static void
1478 0 : gkd_exported_internal_proxy_class_init (GkdExportedInternalProxyClass *klass)
1479 : {
1480 : GObjectClass *gobject_class;
1481 : GDBusProxyClass *proxy_class;
1482 :
1483 0 : gobject_class = G_OBJECT_CLASS (klass);
1484 0 : gobject_class->finalize = gkd_exported_internal_proxy_finalize;
1485 0 : gobject_class->get_property = gkd_exported_internal_proxy_get_property;
1486 0 : gobject_class->set_property = gkd_exported_internal_proxy_set_property;
1487 :
1488 0 : proxy_class = G_DBUS_PROXY_CLASS (klass);
1489 0 : proxy_class->g_signal = gkd_exported_internal_proxy_g_signal;
1490 0 : proxy_class->g_properties_changed = gkd_exported_internal_proxy_g_properties_changed;
1491 :
1492 : #if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
1493 : g_type_class_add_private (klass, sizeof (GkdExportedInternalProxyPrivate));
1494 : #endif
1495 0 : }
1496 :
1497 : static void
1498 0 : gkd_exported_internal_proxy_iface_init (GkdExportedInternalIface *iface G_GNUC_UNUSED)
1499 : {
1500 0 : }
1501 :
1502 : /**
1503 : * gkd_exported_internal_proxy_new:
1504 : * @connection: A #GDBusConnection.
1505 : * @flags: Flags from the #GDBusProxyFlags enumeration.
1506 : * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
1507 : * @object_path: An object path.
1508 : * @cancellable: (nullable): A #GCancellable or %NULL.
1509 : * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
1510 : * @user_data: User data to pass to @callback.
1511 : *
1512 : * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-gnome-keyring-InternalUnsupportedGuiltRiddenInterface.top_of_page">org.gnome.keyring.InternalUnsupportedGuiltRiddenInterface</link>. See g_dbus_proxy_new() for more details.
1513 : *
1514 : * 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()).
1515 : * You can then call gkd_exported_internal_proxy_new_finish() to get the result of the operation.
1516 : *
1517 : * See gkd_exported_internal_proxy_new_sync() for the synchronous, blocking version of this constructor.
1518 : */
1519 : void
1520 0 : gkd_exported_internal_proxy_new (
1521 : GDBusConnection *connection,
1522 : GDBusProxyFlags flags,
1523 : const gchar *name,
1524 : const gchar *object_path,
1525 : GCancellable *cancellable,
1526 : GAsyncReadyCallback callback,
1527 : gpointer user_data)
1528 : {
1529 0 : g_async_initable_new_async (GKD_TYPE_EXPORTED_INTERNAL_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.gnome.keyring.InternalUnsupportedGuiltRiddenInterface", NULL);
1530 0 : }
1531 :
1532 : /**
1533 : * gkd_exported_internal_proxy_new_finish:
1534 : * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gkd_exported_internal_proxy_new().
1535 : * @error: Return location for error or %NULL
1536 : *
1537 : * Finishes an operation started with gkd_exported_internal_proxy_new().
1538 : *
1539 : * Returns: (transfer full) (type GkdExportedInternalProxy): The constructed proxy object or %NULL if @error is set.
1540 : */
1541 : GkdExportedInternal *
1542 0 : gkd_exported_internal_proxy_new_finish (
1543 : GAsyncResult *res,
1544 : GError **error)
1545 : {
1546 : GObject *ret;
1547 : GObject *source_object;
1548 0 : source_object = g_async_result_get_source_object (res);
1549 0 : ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
1550 0 : g_object_unref (source_object);
1551 0 : if (ret != NULL)
1552 0 : return GKD_EXPORTED_INTERNAL (ret);
1553 : else
1554 0 : return NULL;
1555 : }
1556 :
1557 : /**
1558 : * gkd_exported_internal_proxy_new_sync:
1559 : * @connection: A #GDBusConnection.
1560 : * @flags: Flags from the #GDBusProxyFlags enumeration.
1561 : * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
1562 : * @object_path: An object path.
1563 : * @cancellable: (nullable): A #GCancellable or %NULL.
1564 : * @error: Return location for error or %NULL
1565 : *
1566 : * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-gnome-keyring-InternalUnsupportedGuiltRiddenInterface.top_of_page">org.gnome.keyring.InternalUnsupportedGuiltRiddenInterface</link>. See g_dbus_proxy_new_sync() for more details.
1567 : *
1568 : * The calling thread is blocked until a reply is received.
1569 : *
1570 : * See gkd_exported_internal_proxy_new() for the asynchronous version of this constructor.
1571 : *
1572 : * Returns: (transfer full) (type GkdExportedInternalProxy): The constructed proxy object or %NULL if @error is set.
1573 : */
1574 : GkdExportedInternal *
1575 0 : gkd_exported_internal_proxy_new_sync (
1576 : GDBusConnection *connection,
1577 : GDBusProxyFlags flags,
1578 : const gchar *name,
1579 : const gchar *object_path,
1580 : GCancellable *cancellable,
1581 : GError **error)
1582 : {
1583 : GInitable *ret;
1584 0 : ret = g_initable_new (GKD_TYPE_EXPORTED_INTERNAL_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.gnome.keyring.InternalUnsupportedGuiltRiddenInterface", NULL);
1585 0 : if (ret != NULL)
1586 0 : return GKD_EXPORTED_INTERNAL (ret);
1587 : else
1588 0 : return NULL;
1589 : }
1590 :
1591 :
1592 : /**
1593 : * gkd_exported_internal_proxy_new_for_bus:
1594 : * @bus_type: A #GBusType.
1595 : * @flags: Flags from the #GDBusProxyFlags enumeration.
1596 : * @name: A bus name (well-known or unique).
1597 : * @object_path: An object path.
1598 : * @cancellable: (nullable): A #GCancellable or %NULL.
1599 : * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
1600 : * @user_data: User data to pass to @callback.
1601 : *
1602 : * Like gkd_exported_internal_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
1603 : *
1604 : * 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()).
1605 : * You can then call gkd_exported_internal_proxy_new_for_bus_finish() to get the result of the operation.
1606 : *
1607 : * See gkd_exported_internal_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
1608 : */
1609 : void
1610 0 : gkd_exported_internal_proxy_new_for_bus (
1611 : GBusType bus_type,
1612 : GDBusProxyFlags flags,
1613 : const gchar *name,
1614 : const gchar *object_path,
1615 : GCancellable *cancellable,
1616 : GAsyncReadyCallback callback,
1617 : gpointer user_data)
1618 : {
1619 0 : g_async_initable_new_async (GKD_TYPE_EXPORTED_INTERNAL_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.gnome.keyring.InternalUnsupportedGuiltRiddenInterface", NULL);
1620 0 : }
1621 :
1622 : /**
1623 : * gkd_exported_internal_proxy_new_for_bus_finish:
1624 : * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gkd_exported_internal_proxy_new_for_bus().
1625 : * @error: Return location for error or %NULL
1626 : *
1627 : * Finishes an operation started with gkd_exported_internal_proxy_new_for_bus().
1628 : *
1629 : * Returns: (transfer full) (type GkdExportedInternalProxy): The constructed proxy object or %NULL if @error is set.
1630 : */
1631 : GkdExportedInternal *
1632 0 : gkd_exported_internal_proxy_new_for_bus_finish (
1633 : GAsyncResult *res,
1634 : GError **error)
1635 : {
1636 : GObject *ret;
1637 : GObject *source_object;
1638 0 : source_object = g_async_result_get_source_object (res);
1639 0 : ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
1640 0 : g_object_unref (source_object);
1641 0 : if (ret != NULL)
1642 0 : return GKD_EXPORTED_INTERNAL (ret);
1643 : else
1644 0 : return NULL;
1645 : }
1646 :
1647 : /**
1648 : * gkd_exported_internal_proxy_new_for_bus_sync:
1649 : * @bus_type: A #GBusType.
1650 : * @flags: Flags from the #GDBusProxyFlags enumeration.
1651 : * @name: A bus name (well-known or unique).
1652 : * @object_path: An object path.
1653 : * @cancellable: (nullable): A #GCancellable or %NULL.
1654 : * @error: Return location for error or %NULL
1655 : *
1656 : * Like gkd_exported_internal_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
1657 : *
1658 : * The calling thread is blocked until a reply is received.
1659 : *
1660 : * See gkd_exported_internal_proxy_new_for_bus() for the asynchronous version of this constructor.
1661 : *
1662 : * Returns: (transfer full) (type GkdExportedInternalProxy): The constructed proxy object or %NULL if @error is set.
1663 : */
1664 : GkdExportedInternal *
1665 0 : gkd_exported_internal_proxy_new_for_bus_sync (
1666 : GBusType bus_type,
1667 : GDBusProxyFlags flags,
1668 : const gchar *name,
1669 : const gchar *object_path,
1670 : GCancellable *cancellable,
1671 : GError **error)
1672 : {
1673 : GInitable *ret;
1674 0 : ret = g_initable_new (GKD_TYPE_EXPORTED_INTERNAL_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.gnome.keyring.InternalUnsupportedGuiltRiddenInterface", NULL);
1675 0 : if (ret != NULL)
1676 0 : return GKD_EXPORTED_INTERNAL (ret);
1677 : else
1678 0 : return NULL;
1679 : }
1680 :
1681 :
1682 : /* ------------------------------------------------------------------------ */
1683 :
1684 : /**
1685 : * GkdExportedInternalSkeleton:
1686 : *
1687 : * The #GkdExportedInternalSkeleton structure contains only private data and should only be accessed using the provided API.
1688 : */
1689 :
1690 : /**
1691 : * GkdExportedInternalSkeletonClass:
1692 : * @parent_class: The parent class.
1693 : *
1694 : * Class structure for #GkdExportedInternalSkeleton.
1695 : */
1696 :
1697 : struct _GkdExportedInternalSkeletonPrivate
1698 : {
1699 : GValue *properties;
1700 : GList *changed_properties;
1701 : GSource *changed_properties_idle_source;
1702 : GMainContext *context;
1703 : GMutex lock;
1704 : };
1705 :
1706 : static void
1707 16 : _gkd_exported_internal_skeleton_handle_method_call (
1708 : GDBusConnection *connection G_GNUC_UNUSED,
1709 : const gchar *sender G_GNUC_UNUSED,
1710 : const gchar *object_path G_GNUC_UNUSED,
1711 : const gchar *interface_name,
1712 : const gchar *method_name,
1713 : GVariant *parameters,
1714 : GDBusMethodInvocation *invocation,
1715 : gpointer user_data)
1716 : {
1717 16 : GkdExportedInternalSkeleton *skeleton = GKD_EXPORTED_INTERNAL_SKELETON (user_data);
1718 : _ExtendedGDBusMethodInfo *info;
1719 : GVariantIter iter;
1720 : GVariant *child;
1721 : GValue *paramv;
1722 : gsize num_params;
1723 : guint num_extra;
1724 : gsize n;
1725 : guint signal_id;
1726 16 : GValue return_value = G_VALUE_INIT;
1727 16 : info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
1728 16 : g_assert (info != NULL);
1729 16 : num_params = g_variant_n_children (parameters);
1730 16 : num_extra = info->pass_fdlist ? 3 : 2; paramv = g_new0 (GValue, num_params + num_extra);
1731 16 : n = 0;
1732 16 : g_value_init (¶mv[n], GKD_TYPE_EXPORTED_INTERNAL);
1733 16 : g_value_set_object (¶mv[n++], skeleton);
1734 16 : g_value_init (¶mv[n], G_TYPE_DBUS_METHOD_INVOCATION);
1735 16 : g_value_set_object (¶mv[n++], invocation);
1736 16 : if (info->pass_fdlist)
1737 : {
1738 : #ifdef G_OS_UNIX
1739 0 : g_value_init (¶mv[n], G_TYPE_UNIX_FD_LIST);
1740 0 : g_value_set_object (¶mv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
1741 : #else
1742 : g_assert_not_reached ();
1743 : #endif
1744 : }
1745 16 : g_variant_iter_init (&iter, parameters);
1746 48 : while ((child = g_variant_iter_next_value (&iter)) != NULL)
1747 : {
1748 32 : _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
1749 32 : if (arg_info->use_gvariant)
1750 : {
1751 0 : g_value_init (¶mv[n], G_TYPE_VARIANT);
1752 0 : g_value_set_variant (¶mv[n], child);
1753 0 : n++;
1754 : }
1755 : else
1756 32 : g_dbus_gvariant_to_gvalue (child, ¶mv[n++]);
1757 32 : g_variant_unref (child);
1758 : }
1759 16 : signal_id = g_signal_lookup (info->signal_name, GKD_TYPE_EXPORTED_INTERNAL);
1760 16 : g_value_init (&return_value, G_TYPE_BOOLEAN);
1761 16 : g_signal_emitv (paramv, signal_id, 0, &return_value);
1762 16 : if (!g_value_get_boolean (&return_value))
1763 0 : g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name);
1764 16 : g_value_unset (&return_value);
1765 80 : for (n = 0; n < num_params + num_extra; n++)
1766 64 : g_value_unset (¶mv[n]);
1767 16 : g_free (paramv);
1768 16 : }
1769 :
1770 : static GVariant *
1771 0 : _gkd_exported_internal_skeleton_handle_get_property (
1772 : GDBusConnection *connection G_GNUC_UNUSED,
1773 : const gchar *sender G_GNUC_UNUSED,
1774 : const gchar *object_path G_GNUC_UNUSED,
1775 : const gchar *interface_name G_GNUC_UNUSED,
1776 : const gchar *property_name,
1777 : GError **error,
1778 : gpointer user_data)
1779 : {
1780 0 : GkdExportedInternalSkeleton *skeleton = GKD_EXPORTED_INTERNAL_SKELETON (user_data);
1781 0 : GValue value = G_VALUE_INIT;
1782 : GParamSpec *pspec;
1783 : _ExtendedGDBusPropertyInfo *info;
1784 : GVariant *ret;
1785 0 : ret = NULL;
1786 0 : info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gkd_exported_internal_interface_info.parent_struct, property_name);
1787 0 : g_assert (info != NULL);
1788 0 : pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
1789 0 : if (pspec == NULL)
1790 : {
1791 0 : g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
1792 : }
1793 : else
1794 : {
1795 0 : g_value_init (&value, pspec->value_type);
1796 0 : g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
1797 0 : ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
1798 0 : g_value_unset (&value);
1799 : }
1800 0 : return ret;
1801 : }
1802 :
1803 : static gboolean
1804 0 : _gkd_exported_internal_skeleton_handle_set_property (
1805 : GDBusConnection *connection G_GNUC_UNUSED,
1806 : const gchar *sender G_GNUC_UNUSED,
1807 : const gchar *object_path G_GNUC_UNUSED,
1808 : const gchar *interface_name G_GNUC_UNUSED,
1809 : const gchar *property_name,
1810 : GVariant *variant,
1811 : GError **error,
1812 : gpointer user_data)
1813 : {
1814 0 : GkdExportedInternalSkeleton *skeleton = GKD_EXPORTED_INTERNAL_SKELETON (user_data);
1815 0 : GValue value = G_VALUE_INIT;
1816 : GParamSpec *pspec;
1817 : _ExtendedGDBusPropertyInfo *info;
1818 : gboolean ret;
1819 0 : ret = FALSE;
1820 0 : info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gkd_exported_internal_interface_info.parent_struct, property_name);
1821 0 : g_assert (info != NULL);
1822 0 : pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
1823 0 : if (pspec == NULL)
1824 : {
1825 0 : g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
1826 : }
1827 : else
1828 : {
1829 0 : if (info->use_gvariant)
1830 0 : g_value_set_variant (&value, variant);
1831 : else
1832 0 : g_dbus_gvariant_to_gvalue (variant, &value);
1833 0 : g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
1834 0 : g_value_unset (&value);
1835 0 : ret = TRUE;
1836 : }
1837 0 : return ret;
1838 : }
1839 :
1840 : static const GDBusInterfaceVTable _gkd_exported_internal_skeleton_vtable =
1841 : {
1842 : _gkd_exported_internal_skeleton_handle_method_call,
1843 : _gkd_exported_internal_skeleton_handle_get_property,
1844 : _gkd_exported_internal_skeleton_handle_set_property,
1845 : {NULL}
1846 : };
1847 :
1848 : static GDBusInterfaceInfo *
1849 25 : gkd_exported_internal_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
1850 : {
1851 25 : return gkd_exported_internal_interface_info ();
1852 : }
1853 :
1854 : static GDBusInterfaceVTable *
1855 41 : gkd_exported_internal_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
1856 : {
1857 41 : return (GDBusInterfaceVTable *) &_gkd_exported_internal_skeleton_vtable;
1858 : }
1859 :
1860 : static GVariant *
1861 0 : gkd_exported_internal_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
1862 : {
1863 0 : GkdExportedInternalSkeleton *skeleton = GKD_EXPORTED_INTERNAL_SKELETON (_skeleton);
1864 :
1865 : GVariantBuilder builder;
1866 : guint n;
1867 0 : g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
1868 0 : if (_gkd_exported_internal_interface_info.parent_struct.properties == NULL)
1869 0 : goto out;
1870 0 : for (n = 0; _gkd_exported_internal_interface_info.parent_struct.properties[n] != NULL; n++)
1871 : {
1872 0 : GDBusPropertyInfo *info = _gkd_exported_internal_interface_info.parent_struct.properties[n];
1873 0 : if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
1874 : {
1875 : GVariant *value;
1876 0 : value = _gkd_exported_internal_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.gnome.keyring.InternalUnsupportedGuiltRiddenInterface", info->name, NULL, skeleton);
1877 0 : if (value != NULL)
1878 : {
1879 0 : g_variant_take_ref (value);
1880 0 : g_variant_builder_add (&builder, "{sv}", info->name, value);
1881 0 : g_variant_unref (value);
1882 : }
1883 : }
1884 : }
1885 0 : out:
1886 0 : return g_variant_builder_end (&builder);
1887 : }
1888 :
1889 : static void
1890 0 : gkd_exported_internal_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton G_GNUC_UNUSED)
1891 : {
1892 0 : }
1893 :
1894 : static void gkd_exported_internal_skeleton_iface_init (GkdExportedInternalIface *iface);
1895 : #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
1896 116 : G_DEFINE_TYPE_WITH_CODE (GkdExportedInternalSkeleton, gkd_exported_internal_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
1897 : G_ADD_PRIVATE (GkdExportedInternalSkeleton)
1898 : G_IMPLEMENT_INTERFACE (GKD_TYPE_EXPORTED_INTERNAL, gkd_exported_internal_skeleton_iface_init))
1899 :
1900 : #else
1901 : G_DEFINE_TYPE_WITH_CODE (GkdExportedInternalSkeleton, gkd_exported_internal_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
1902 : G_IMPLEMENT_INTERFACE (GKD_TYPE_EXPORTED_INTERNAL, gkd_exported_internal_skeleton_iface_init))
1903 :
1904 : #endif
1905 : static void
1906 0 : gkd_exported_internal_skeleton_finalize (GObject *object)
1907 : {
1908 0 : GkdExportedInternalSkeleton *skeleton = GKD_EXPORTED_INTERNAL_SKELETON (object);
1909 0 : g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
1910 0 : if (skeleton->priv->changed_properties_idle_source != NULL)
1911 0 : g_source_destroy (skeleton->priv->changed_properties_idle_source);
1912 0 : g_main_context_unref (skeleton->priv->context);
1913 0 : g_mutex_clear (&skeleton->priv->lock);
1914 0 : G_OBJECT_CLASS (gkd_exported_internal_skeleton_parent_class)->finalize (object);
1915 0 : }
1916 :
1917 : static void
1918 25 : gkd_exported_internal_skeleton_init (GkdExportedInternalSkeleton *skeleton)
1919 : {
1920 : #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
1921 25 : skeleton->priv = gkd_exported_internal_skeleton_get_instance_private (skeleton);
1922 : #else
1923 : skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, GKD_TYPE_EXPORTED_INTERNAL_SKELETON, GkdExportedInternalSkeletonPrivate);
1924 : #endif
1925 :
1926 25 : g_mutex_init (&skeleton->priv->lock);
1927 25 : skeleton->priv->context = g_main_context_ref_thread_default ();
1928 25 : }
1929 :
1930 : static void
1931 25 : gkd_exported_internal_skeleton_class_init (GkdExportedInternalSkeletonClass *klass)
1932 : {
1933 : GObjectClass *gobject_class;
1934 : GDBusInterfaceSkeletonClass *skeleton_class;
1935 :
1936 25 : gobject_class = G_OBJECT_CLASS (klass);
1937 25 : gobject_class->finalize = gkd_exported_internal_skeleton_finalize;
1938 :
1939 25 : skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
1940 25 : skeleton_class->get_info = gkd_exported_internal_skeleton_dbus_interface_get_info;
1941 25 : skeleton_class->get_properties = gkd_exported_internal_skeleton_dbus_interface_get_properties;
1942 25 : skeleton_class->flush = gkd_exported_internal_skeleton_dbus_interface_flush;
1943 25 : skeleton_class->get_vtable = gkd_exported_internal_skeleton_dbus_interface_get_vtable;
1944 :
1945 : #if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
1946 : g_type_class_add_private (klass, sizeof (GkdExportedInternalSkeletonPrivate));
1947 : #endif
1948 25 : }
1949 :
1950 : static void
1951 25 : gkd_exported_internal_skeleton_iface_init (GkdExportedInternalIface *iface G_GNUC_UNUSED)
1952 : {
1953 25 : }
1954 :
1955 : /**
1956 : * gkd_exported_internal_skeleton_new:
1957 : *
1958 : * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-gnome-keyring-InternalUnsupportedGuiltRiddenInterface.top_of_page">org.gnome.keyring.InternalUnsupportedGuiltRiddenInterface</link>.
1959 : *
1960 : * Returns: (transfer full) (type GkdExportedInternalSkeleton): The skeleton object.
1961 : */
1962 : GkdExportedInternal *
1963 25 : gkd_exported_internal_skeleton_new (void)
1964 : {
1965 25 : return GKD_EXPORTED_INTERNAL (g_object_new (GKD_TYPE_EXPORTED_INTERNAL_SKELETON, NULL));
1966 : }
1967 :
|