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-portal-request-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 (
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_ObjectFunc)
210 : (void *data1,
211 : GDBusMethodInvocation *arg_method_invocation,
212 : void *data2);
213 : _GDbusCodegenMarshalBoolean_ObjectFunc callback;
214 0 : GCClosure *cc = (GCClosure*) closure;
215 : void *data1, *data2;
216 : gboolean v_return;
217 :
218 0 : g_return_if_fail (return_value != NULL);
219 0 : g_return_if_fail (n_param_values == 2);
220 :
221 0 : if (G_CCLOSURE_SWAP_DATA (closure))
222 : {
223 0 : data1 = closure->data;
224 0 : data2 = g_value_peek_pointer (param_values + 0);
225 : }
226 : else
227 : {
228 0 : data1 = g_value_peek_pointer (param_values + 0);
229 0 : data2 = closure->data;
230 : }
231 :
232 0 : callback = (_GDbusCodegenMarshalBoolean_ObjectFunc)
233 0 : (marshal_data ? marshal_data : cc->callback);
234 :
235 : v_return =
236 0 : callback (data1,
237 0 : g_marshal_value_peek_object (param_values + 1),
238 : data2);
239 :
240 0 : g_value_set_boolean (return_value, v_return);
241 : }
242 :
243 : /* ------------------------------------------------------------------------
244 : * Code for interface org.freedesktop.impl.portal.Request
245 : * ------------------------------------------------------------------------
246 : */
247 :
248 : /**
249 : * SECTION:GkdExportedPortalRequest
250 : * @title: GkdExportedPortalRequest
251 : * @short_description: Generated C code for the org.freedesktop.impl.portal.Request D-Bus interface
252 : *
253 : * This section contains code for working with the <link linkend="gdbus-interface-org-freedesktop-impl-portal-Request.top_of_page">org.freedesktop.impl.portal.Request</link> D-Bus interface in C.
254 : */
255 :
256 : /* ---- Introspection data for org.freedesktop.impl.portal.Request ---- */
257 :
258 : static const _ExtendedGDBusMethodInfo _gkd_exported_portal_request_method_info_close =
259 : {
260 : {
261 : -1,
262 : (gchar *) "Close",
263 : NULL,
264 : NULL,
265 : NULL
266 : },
267 : "handle-close",
268 : FALSE
269 : };
270 :
271 : static const GDBusMethodInfo * const _gkd_exported_portal_request_method_info_pointers[] =
272 : {
273 : &_gkd_exported_portal_request_method_info_close.parent_struct,
274 : NULL
275 : };
276 :
277 : static const _ExtendedGDBusInterfaceInfo _gkd_exported_portal_request_interface_info =
278 : {
279 : {
280 : -1,
281 : (gchar *) "org.freedesktop.impl.portal.Request",
282 : (GDBusMethodInfo **) &_gkd_exported_portal_request_method_info_pointers,
283 : NULL,
284 : NULL,
285 : NULL
286 : },
287 : "exported-portal-request",
288 : };
289 :
290 :
291 : /**
292 : * gkd_exported_portal_request_interface_info:
293 : *
294 : * Gets a machine-readable description of the <link linkend="gdbus-interface-org-freedesktop-impl-portal-Request.top_of_page">org.freedesktop.impl.portal.Request</link> D-Bus interface.
295 : *
296 : * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
297 : */
298 : GDBusInterfaceInfo *
299 4 : gkd_exported_portal_request_interface_info (void)
300 : {
301 4 : return (GDBusInterfaceInfo *) &_gkd_exported_portal_request_interface_info.parent_struct;
302 : }
303 :
304 : /**
305 : * gkd_exported_portal_request_override_properties:
306 : * @klass: The class structure for a #GObject derived class.
307 : * @property_id_begin: The property id to assign to the first overridden property.
308 : *
309 : * Overrides all #GObject properties in the #GkdExportedPortalRequest interface for a concrete class.
310 : * The properties are overridden in the order they are defined.
311 : *
312 : * Returns: The last property id.
313 : */
314 : guint
315 0 : gkd_exported_portal_request_override_properties (GObjectClass *klass G_GNUC_UNUSED, guint property_id_begin)
316 : {
317 0 : return property_id_begin - 1;
318 : }
319 :
320 :
321 : inline static void
322 0 : gkd_exported_portal_request_method_marshal_close (
323 : GClosure *closure,
324 : GValue *return_value,
325 : unsigned int n_param_values,
326 : const GValue *param_values,
327 : void *invocation_hint,
328 : void *marshal_data)
329 : {
330 0 : _g_dbus_codegen_marshal_BOOLEAN__OBJECT (closure,
331 : return_value, n_param_values, param_values, invocation_hint, marshal_data);
332 0 : }
333 :
334 :
335 : /**
336 : * GkdExportedPortalRequest:
337 : *
338 : * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Request.top_of_page">org.freedesktop.impl.portal.Request</link>.
339 : */
340 :
341 : /**
342 : * GkdExportedPortalRequestIface:
343 : * @parent_iface: The parent interface.
344 : * @handle_close: Handler for the #GkdExportedPortalRequest::handle-close signal.
345 : *
346 : * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Request.top_of_page">org.freedesktop.impl.portal.Request</link>.
347 : */
348 :
349 : typedef GkdExportedPortalRequestIface GkdExportedPortalRequestInterface;
350 6 : G_DEFINE_INTERFACE (GkdExportedPortalRequest, gkd_exported_portal_request, G_TYPE_OBJECT)
351 :
352 : static void
353 2 : gkd_exported_portal_request_default_init (GkdExportedPortalRequestIface *iface)
354 : {
355 : /* GObject signals for incoming D-Bus method calls: */
356 : /**
357 : * GkdExportedPortalRequest::handle-close:
358 : * @object: A #GkdExportedPortalRequest.
359 : * @invocation: A #GDBusMethodInvocation.
360 : *
361 : * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-Request.Close">Close()</link> D-Bus method.
362 : *
363 : * 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_portal_request_complete_close() 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.
364 : *
365 : * 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.
366 : */
367 2 : g_signal_new ("handle-close",
368 : G_TYPE_FROM_INTERFACE (iface),
369 : G_SIGNAL_RUN_LAST,
370 : G_STRUCT_OFFSET (GkdExportedPortalRequestIface, handle_close),
371 : g_signal_accumulator_true_handled,
372 : NULL,
373 : gkd_exported_portal_request_method_marshal_close,
374 : G_TYPE_BOOLEAN,
375 : 1,
376 : G_TYPE_DBUS_METHOD_INVOCATION);
377 :
378 2 : }
379 :
380 : /**
381 : * gkd_exported_portal_request_call_close:
382 : * @proxy: A #GkdExportedPortalRequestProxy.
383 : * @cancellable: (nullable): A #GCancellable or %NULL.
384 : * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
385 : * @user_data: User data to pass to @callback.
386 : *
387 : * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-Request.Close">Close()</link> D-Bus method on @proxy.
388 : * 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()).
389 : * You can then call gkd_exported_portal_request_call_close_finish() to get the result of the operation.
390 : *
391 : * See gkd_exported_portal_request_call_close_sync() for the synchronous, blocking version of this method.
392 : */
393 : void
394 0 : gkd_exported_portal_request_call_close (
395 : GkdExportedPortalRequest *proxy,
396 : GCancellable *cancellable,
397 : GAsyncReadyCallback callback,
398 : gpointer user_data)
399 : {
400 0 : g_dbus_proxy_call (G_DBUS_PROXY (proxy),
401 : "Close",
402 : g_variant_new ("()"),
403 : G_DBUS_CALL_FLAGS_NONE,
404 : -1,
405 : cancellable,
406 : callback,
407 : user_data);
408 0 : }
409 :
410 : /**
411 : * gkd_exported_portal_request_call_close_finish:
412 : * @proxy: A #GkdExportedPortalRequestProxy.
413 : * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gkd_exported_portal_request_call_close().
414 : * @error: Return location for error or %NULL.
415 : *
416 : * Finishes an operation started with gkd_exported_portal_request_call_close().
417 : *
418 : * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
419 : */
420 : gboolean
421 0 : gkd_exported_portal_request_call_close_finish (
422 : GkdExportedPortalRequest *proxy,
423 : GAsyncResult *res,
424 : GError **error)
425 : {
426 : GVariant *_ret;
427 0 : _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
428 0 : if (_ret == NULL)
429 0 : goto _out;
430 0 : g_variant_get (_ret,
431 : "()");
432 0 : g_variant_unref (_ret);
433 0 : _out:
434 0 : return _ret != NULL;
435 : }
436 :
437 : /**
438 : * gkd_exported_portal_request_call_close_sync:
439 : * @proxy: A #GkdExportedPortalRequestProxy.
440 : * @cancellable: (nullable): A #GCancellable or %NULL.
441 : * @error: Return location for error or %NULL.
442 : *
443 : * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-Request.Close">Close()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
444 : *
445 : * See gkd_exported_portal_request_call_close() for the asynchronous version of this method.
446 : *
447 : * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
448 : */
449 : gboolean
450 0 : gkd_exported_portal_request_call_close_sync (
451 : GkdExportedPortalRequest *proxy,
452 : GCancellable *cancellable,
453 : GError **error)
454 : {
455 : GVariant *_ret;
456 0 : _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
457 : "Close",
458 : g_variant_new ("()"),
459 : G_DBUS_CALL_FLAGS_NONE,
460 : -1,
461 : cancellable,
462 : error);
463 0 : if (_ret == NULL)
464 0 : goto _out;
465 0 : g_variant_get (_ret,
466 : "()");
467 0 : g_variant_unref (_ret);
468 0 : _out:
469 0 : return _ret != NULL;
470 : }
471 :
472 : /**
473 : * gkd_exported_portal_request_complete_close:
474 : * @object: A #GkdExportedPortalRequest.
475 : * @invocation: (transfer full): A #GDBusMethodInvocation.
476 : *
477 : * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-Request.Close">Close()</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.
478 : *
479 : * This method will free @invocation, you cannot use it afterwards.
480 : */
481 : void
482 0 : gkd_exported_portal_request_complete_close (
483 : GkdExportedPortalRequest *object G_GNUC_UNUSED,
484 : GDBusMethodInvocation *invocation)
485 : {
486 0 : g_dbus_method_invocation_return_value (invocation,
487 : g_variant_new ("()"));
488 0 : }
489 :
490 : /* ------------------------------------------------------------------------ */
491 :
492 : /**
493 : * GkdExportedPortalRequestProxy:
494 : *
495 : * The #GkdExportedPortalRequestProxy structure contains only private data and should only be accessed using the provided API.
496 : */
497 :
498 : /**
499 : * GkdExportedPortalRequestProxyClass:
500 : * @parent_class: The parent class.
501 : *
502 : * Class structure for #GkdExportedPortalRequestProxy.
503 : */
504 :
505 : struct _GkdExportedPortalRequestProxyPrivate
506 : {
507 : GData *qdata;
508 : };
509 :
510 : static void gkd_exported_portal_request_proxy_iface_init (GkdExportedPortalRequestIface *iface);
511 :
512 : #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
513 0 : G_DEFINE_TYPE_WITH_CODE (GkdExportedPortalRequestProxy, gkd_exported_portal_request_proxy, G_TYPE_DBUS_PROXY,
514 : G_ADD_PRIVATE (GkdExportedPortalRequestProxy)
515 : G_IMPLEMENT_INTERFACE (GKD_TYPE_EXPORTED_PORTAL_REQUEST, gkd_exported_portal_request_proxy_iface_init))
516 :
517 : #else
518 : G_DEFINE_TYPE_WITH_CODE (GkdExportedPortalRequestProxy, gkd_exported_portal_request_proxy, G_TYPE_DBUS_PROXY,
519 : G_IMPLEMENT_INTERFACE (GKD_TYPE_EXPORTED_PORTAL_REQUEST, gkd_exported_portal_request_proxy_iface_init))
520 :
521 : #endif
522 : static void
523 0 : gkd_exported_portal_request_proxy_finalize (GObject *object)
524 : {
525 0 : GkdExportedPortalRequestProxy *proxy = GKD_EXPORTED_PORTAL_REQUEST_PROXY (object);
526 0 : g_datalist_clear (&proxy->priv->qdata);
527 0 : G_OBJECT_CLASS (gkd_exported_portal_request_proxy_parent_class)->finalize (object);
528 0 : }
529 :
530 : static void
531 0 : gkd_exported_portal_request_proxy_get_property (GObject *object G_GNUC_UNUSED,
532 : guint prop_id G_GNUC_UNUSED,
533 : GValue *value G_GNUC_UNUSED,
534 : GParamSpec *pspec G_GNUC_UNUSED)
535 : {
536 0 : }
537 :
538 : static void
539 0 : gkd_exported_portal_request_proxy_set_property (GObject *object G_GNUC_UNUSED,
540 : guint prop_id G_GNUC_UNUSED,
541 : const GValue *value G_GNUC_UNUSED,
542 : GParamSpec *pspec G_GNUC_UNUSED)
543 : {
544 0 : }
545 :
546 : static void
547 0 : gkd_exported_portal_request_proxy_g_signal (GDBusProxy *proxy,
548 : const gchar *sender_name G_GNUC_UNUSED,
549 : const gchar *signal_name,
550 : GVariant *parameters)
551 : {
552 : _ExtendedGDBusSignalInfo *info;
553 : GVariantIter iter;
554 : GVariant *child;
555 : GValue *paramv;
556 : gsize num_params;
557 : gsize n;
558 : guint signal_id;
559 0 : info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_gkd_exported_portal_request_interface_info.parent_struct, signal_name);
560 0 : if (info == NULL)
561 0 : return;
562 0 : num_params = g_variant_n_children (parameters);
563 0 : paramv = g_new0 (GValue, num_params + 1);
564 0 : g_value_init (¶mv[0], GKD_TYPE_EXPORTED_PORTAL_REQUEST);
565 0 : g_value_set_object (¶mv[0], proxy);
566 0 : g_variant_iter_init (&iter, parameters);
567 0 : n = 1;
568 0 : while ((child = g_variant_iter_next_value (&iter)) != NULL)
569 : {
570 0 : _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
571 0 : if (arg_info->use_gvariant)
572 : {
573 0 : g_value_init (¶mv[n], G_TYPE_VARIANT);
574 0 : g_value_set_variant (¶mv[n], child);
575 0 : n++;
576 : }
577 : else
578 0 : g_dbus_gvariant_to_gvalue (child, ¶mv[n++]);
579 0 : g_variant_unref (child);
580 : }
581 0 : signal_id = g_signal_lookup (info->signal_name, GKD_TYPE_EXPORTED_PORTAL_REQUEST);
582 0 : g_signal_emitv (paramv, signal_id, 0, NULL);
583 0 : for (n = 0; n < num_params + 1; n++)
584 0 : g_value_unset (¶mv[n]);
585 0 : g_free (paramv);
586 : }
587 :
588 : static void
589 0 : gkd_exported_portal_request_proxy_g_properties_changed (GDBusProxy *_proxy,
590 : GVariant *changed_properties,
591 : const gchar *const *invalidated_properties)
592 : {
593 0 : GkdExportedPortalRequestProxy *proxy = GKD_EXPORTED_PORTAL_REQUEST_PROXY (_proxy);
594 : guint n;
595 : const gchar *key;
596 : GVariantIter *iter;
597 : _ExtendedGDBusPropertyInfo *info;
598 0 : g_variant_get (changed_properties, "a{sv}", &iter);
599 0 : while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
600 : {
601 0 : info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gkd_exported_portal_request_interface_info.parent_struct, key);
602 0 : g_datalist_remove_data (&proxy->priv->qdata, key);
603 0 : if (info != NULL)
604 0 : g_object_notify (G_OBJECT (proxy), info->hyphen_name);
605 : }
606 0 : g_variant_iter_free (iter);
607 0 : for (n = 0; invalidated_properties[n] != NULL; n++)
608 : {
609 0 : info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gkd_exported_portal_request_interface_info.parent_struct, invalidated_properties[n]);
610 0 : g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
611 0 : if (info != NULL)
612 0 : g_object_notify (G_OBJECT (proxy), info->hyphen_name);
613 : }
614 0 : }
615 :
616 : static void
617 0 : gkd_exported_portal_request_proxy_init (GkdExportedPortalRequestProxy *proxy)
618 : {
619 : #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
620 0 : proxy->priv = gkd_exported_portal_request_proxy_get_instance_private (proxy);
621 : #else
622 : proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, GKD_TYPE_EXPORTED_PORTAL_REQUEST_PROXY, GkdExportedPortalRequestProxyPrivate);
623 : #endif
624 :
625 0 : g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), gkd_exported_portal_request_interface_info ());
626 0 : }
627 :
628 : static void
629 0 : gkd_exported_portal_request_proxy_class_init (GkdExportedPortalRequestProxyClass *klass)
630 : {
631 : GObjectClass *gobject_class;
632 : GDBusProxyClass *proxy_class;
633 :
634 0 : gobject_class = G_OBJECT_CLASS (klass);
635 0 : gobject_class->finalize = gkd_exported_portal_request_proxy_finalize;
636 0 : gobject_class->get_property = gkd_exported_portal_request_proxy_get_property;
637 0 : gobject_class->set_property = gkd_exported_portal_request_proxy_set_property;
638 :
639 0 : proxy_class = G_DBUS_PROXY_CLASS (klass);
640 0 : proxy_class->g_signal = gkd_exported_portal_request_proxy_g_signal;
641 0 : proxy_class->g_properties_changed = gkd_exported_portal_request_proxy_g_properties_changed;
642 :
643 : #if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
644 : g_type_class_add_private (klass, sizeof (GkdExportedPortalRequestProxyPrivate));
645 : #endif
646 0 : }
647 :
648 : static void
649 0 : gkd_exported_portal_request_proxy_iface_init (GkdExportedPortalRequestIface *iface G_GNUC_UNUSED)
650 : {
651 0 : }
652 :
653 : /**
654 : * gkd_exported_portal_request_proxy_new:
655 : * @connection: A #GDBusConnection.
656 : * @flags: Flags from the #GDBusProxyFlags enumeration.
657 : * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
658 : * @object_path: An object path.
659 : * @cancellable: (nullable): A #GCancellable or %NULL.
660 : * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
661 : * @user_data: User data to pass to @callback.
662 : *
663 : * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Request.top_of_page">org.freedesktop.impl.portal.Request</link>. See g_dbus_proxy_new() for more details.
664 : *
665 : * 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()).
666 : * You can then call gkd_exported_portal_request_proxy_new_finish() to get the result of the operation.
667 : *
668 : * See gkd_exported_portal_request_proxy_new_sync() for the synchronous, blocking version of this constructor.
669 : */
670 : void
671 0 : gkd_exported_portal_request_proxy_new (
672 : GDBusConnection *connection,
673 : GDBusProxyFlags flags,
674 : const gchar *name,
675 : const gchar *object_path,
676 : GCancellable *cancellable,
677 : GAsyncReadyCallback callback,
678 : gpointer user_data)
679 : {
680 0 : g_async_initable_new_async (GKD_TYPE_EXPORTED_PORTAL_REQUEST_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.freedesktop.impl.portal.Request", NULL);
681 0 : }
682 :
683 : /**
684 : * gkd_exported_portal_request_proxy_new_finish:
685 : * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gkd_exported_portal_request_proxy_new().
686 : * @error: Return location for error or %NULL
687 : *
688 : * Finishes an operation started with gkd_exported_portal_request_proxy_new().
689 : *
690 : * Returns: (transfer full) (type GkdExportedPortalRequestProxy): The constructed proxy object or %NULL if @error is set.
691 : */
692 : GkdExportedPortalRequest *
693 0 : gkd_exported_portal_request_proxy_new_finish (
694 : GAsyncResult *res,
695 : GError **error)
696 : {
697 : GObject *ret;
698 : GObject *source_object;
699 0 : source_object = g_async_result_get_source_object (res);
700 0 : ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
701 0 : g_object_unref (source_object);
702 0 : if (ret != NULL)
703 0 : return GKD_EXPORTED_PORTAL_REQUEST (ret);
704 : else
705 0 : return NULL;
706 : }
707 :
708 : /**
709 : * gkd_exported_portal_request_proxy_new_sync:
710 : * @connection: A #GDBusConnection.
711 : * @flags: Flags from the #GDBusProxyFlags enumeration.
712 : * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
713 : * @object_path: An object path.
714 : * @cancellable: (nullable): A #GCancellable or %NULL.
715 : * @error: Return location for error or %NULL
716 : *
717 : * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Request.top_of_page">org.freedesktop.impl.portal.Request</link>. See g_dbus_proxy_new_sync() for more details.
718 : *
719 : * The calling thread is blocked until a reply is received.
720 : *
721 : * See gkd_exported_portal_request_proxy_new() for the asynchronous version of this constructor.
722 : *
723 : * Returns: (transfer full) (type GkdExportedPortalRequestProxy): The constructed proxy object or %NULL if @error is set.
724 : */
725 : GkdExportedPortalRequest *
726 0 : gkd_exported_portal_request_proxy_new_sync (
727 : GDBusConnection *connection,
728 : GDBusProxyFlags flags,
729 : const gchar *name,
730 : const gchar *object_path,
731 : GCancellable *cancellable,
732 : GError **error)
733 : {
734 : GInitable *ret;
735 0 : ret = g_initable_new (GKD_TYPE_EXPORTED_PORTAL_REQUEST_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.Request", NULL);
736 0 : if (ret != NULL)
737 0 : return GKD_EXPORTED_PORTAL_REQUEST (ret);
738 : else
739 0 : return NULL;
740 : }
741 :
742 :
743 : /**
744 : * gkd_exported_portal_request_proxy_new_for_bus:
745 : * @bus_type: A #GBusType.
746 : * @flags: Flags from the #GDBusProxyFlags enumeration.
747 : * @name: A bus name (well-known or unique).
748 : * @object_path: An object path.
749 : * @cancellable: (nullable): A #GCancellable or %NULL.
750 : * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
751 : * @user_data: User data to pass to @callback.
752 : *
753 : * Like gkd_exported_portal_request_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
754 : *
755 : * 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()).
756 : * You can then call gkd_exported_portal_request_proxy_new_for_bus_finish() to get the result of the operation.
757 : *
758 : * See gkd_exported_portal_request_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
759 : */
760 : void
761 0 : gkd_exported_portal_request_proxy_new_for_bus (
762 : GBusType bus_type,
763 : GDBusProxyFlags flags,
764 : const gchar *name,
765 : const gchar *object_path,
766 : GCancellable *cancellable,
767 : GAsyncReadyCallback callback,
768 : gpointer user_data)
769 : {
770 0 : g_async_initable_new_async (GKD_TYPE_EXPORTED_PORTAL_REQUEST_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.freedesktop.impl.portal.Request", NULL);
771 0 : }
772 :
773 : /**
774 : * gkd_exported_portal_request_proxy_new_for_bus_finish:
775 : * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gkd_exported_portal_request_proxy_new_for_bus().
776 : * @error: Return location for error or %NULL
777 : *
778 : * Finishes an operation started with gkd_exported_portal_request_proxy_new_for_bus().
779 : *
780 : * Returns: (transfer full) (type GkdExportedPortalRequestProxy): The constructed proxy object or %NULL if @error is set.
781 : */
782 : GkdExportedPortalRequest *
783 0 : gkd_exported_portal_request_proxy_new_for_bus_finish (
784 : GAsyncResult *res,
785 : GError **error)
786 : {
787 : GObject *ret;
788 : GObject *source_object;
789 0 : source_object = g_async_result_get_source_object (res);
790 0 : ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
791 0 : g_object_unref (source_object);
792 0 : if (ret != NULL)
793 0 : return GKD_EXPORTED_PORTAL_REQUEST (ret);
794 : else
795 0 : return NULL;
796 : }
797 :
798 : /**
799 : * gkd_exported_portal_request_proxy_new_for_bus_sync:
800 : * @bus_type: A #GBusType.
801 : * @flags: Flags from the #GDBusProxyFlags enumeration.
802 : * @name: A bus name (well-known or unique).
803 : * @object_path: An object path.
804 : * @cancellable: (nullable): A #GCancellable or %NULL.
805 : * @error: Return location for error or %NULL
806 : *
807 : * Like gkd_exported_portal_request_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
808 : *
809 : * The calling thread is blocked until a reply is received.
810 : *
811 : * See gkd_exported_portal_request_proxy_new_for_bus() for the asynchronous version of this constructor.
812 : *
813 : * Returns: (transfer full) (type GkdExportedPortalRequestProxy): The constructed proxy object or %NULL if @error is set.
814 : */
815 : GkdExportedPortalRequest *
816 0 : gkd_exported_portal_request_proxy_new_for_bus_sync (
817 : GBusType bus_type,
818 : GDBusProxyFlags flags,
819 : const gchar *name,
820 : const gchar *object_path,
821 : GCancellable *cancellable,
822 : GError **error)
823 : {
824 : GInitable *ret;
825 0 : ret = g_initable_new (GKD_TYPE_EXPORTED_PORTAL_REQUEST_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.Request", NULL);
826 0 : if (ret != NULL)
827 0 : return GKD_EXPORTED_PORTAL_REQUEST (ret);
828 : else
829 0 : return NULL;
830 : }
831 :
832 :
833 : /* ------------------------------------------------------------------------ */
834 :
835 : /**
836 : * GkdExportedPortalRequestSkeleton:
837 : *
838 : * The #GkdExportedPortalRequestSkeleton structure contains only private data and should only be accessed using the provided API.
839 : */
840 :
841 : /**
842 : * GkdExportedPortalRequestSkeletonClass:
843 : * @parent_class: The parent class.
844 : *
845 : * Class structure for #GkdExportedPortalRequestSkeleton.
846 : */
847 :
848 : struct _GkdExportedPortalRequestSkeletonPrivate
849 : {
850 : GValue *properties;
851 : GList *changed_properties;
852 : GSource *changed_properties_idle_source;
853 : GMainContext *context;
854 : GMutex lock;
855 : };
856 :
857 : static void
858 0 : _gkd_exported_portal_request_skeleton_handle_method_call (
859 : GDBusConnection *connection G_GNUC_UNUSED,
860 : const gchar *sender G_GNUC_UNUSED,
861 : const gchar *object_path G_GNUC_UNUSED,
862 : const gchar *interface_name,
863 : const gchar *method_name,
864 : GVariant *parameters,
865 : GDBusMethodInvocation *invocation,
866 : gpointer user_data)
867 : {
868 0 : GkdExportedPortalRequestSkeleton *skeleton = GKD_EXPORTED_PORTAL_REQUEST_SKELETON (user_data);
869 : _ExtendedGDBusMethodInfo *info;
870 : GVariantIter iter;
871 : GVariant *child;
872 : GValue *paramv;
873 : gsize num_params;
874 : guint num_extra;
875 : gsize n;
876 : guint signal_id;
877 0 : GValue return_value = G_VALUE_INIT;
878 0 : info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
879 0 : g_assert (info != NULL);
880 0 : num_params = g_variant_n_children (parameters);
881 0 : num_extra = info->pass_fdlist ? 3 : 2; paramv = g_new0 (GValue, num_params + num_extra);
882 0 : n = 0;
883 0 : g_value_init (¶mv[n], GKD_TYPE_EXPORTED_PORTAL_REQUEST);
884 0 : g_value_set_object (¶mv[n++], skeleton);
885 0 : g_value_init (¶mv[n], G_TYPE_DBUS_METHOD_INVOCATION);
886 0 : g_value_set_object (¶mv[n++], invocation);
887 0 : if (info->pass_fdlist)
888 : {
889 : #ifdef G_OS_UNIX
890 0 : g_value_init (¶mv[n], G_TYPE_UNIX_FD_LIST);
891 0 : g_value_set_object (¶mv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
892 : #else
893 : g_assert_not_reached ();
894 : #endif
895 : }
896 0 : g_variant_iter_init (&iter, parameters);
897 0 : while ((child = g_variant_iter_next_value (&iter)) != NULL)
898 : {
899 0 : _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
900 0 : if (arg_info->use_gvariant)
901 : {
902 0 : g_value_init (¶mv[n], G_TYPE_VARIANT);
903 0 : g_value_set_variant (¶mv[n], child);
904 0 : n++;
905 : }
906 : else
907 0 : g_dbus_gvariant_to_gvalue (child, ¶mv[n++]);
908 0 : g_variant_unref (child);
909 : }
910 0 : signal_id = g_signal_lookup (info->signal_name, GKD_TYPE_EXPORTED_PORTAL_REQUEST);
911 0 : g_value_init (&return_value, G_TYPE_BOOLEAN);
912 0 : g_signal_emitv (paramv, signal_id, 0, &return_value);
913 0 : if (!g_value_get_boolean (&return_value))
914 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);
915 0 : g_value_unset (&return_value);
916 0 : for (n = 0; n < num_params + num_extra; n++)
917 0 : g_value_unset (¶mv[n]);
918 0 : g_free (paramv);
919 0 : }
920 :
921 : static GVariant *
922 0 : _gkd_exported_portal_request_skeleton_handle_get_property (
923 : GDBusConnection *connection G_GNUC_UNUSED,
924 : const gchar *sender G_GNUC_UNUSED,
925 : const gchar *object_path G_GNUC_UNUSED,
926 : const gchar *interface_name G_GNUC_UNUSED,
927 : const gchar *property_name,
928 : GError **error,
929 : gpointer user_data)
930 : {
931 0 : GkdExportedPortalRequestSkeleton *skeleton = GKD_EXPORTED_PORTAL_REQUEST_SKELETON (user_data);
932 0 : GValue value = G_VALUE_INIT;
933 : GParamSpec *pspec;
934 : _ExtendedGDBusPropertyInfo *info;
935 : GVariant *ret;
936 0 : ret = NULL;
937 0 : info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gkd_exported_portal_request_interface_info.parent_struct, property_name);
938 0 : g_assert (info != NULL);
939 0 : pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
940 0 : if (pspec == NULL)
941 : {
942 0 : g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
943 : }
944 : else
945 : {
946 0 : g_value_init (&value, pspec->value_type);
947 0 : g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
948 0 : ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
949 0 : g_value_unset (&value);
950 : }
951 0 : return ret;
952 : }
953 :
954 : static gboolean
955 0 : _gkd_exported_portal_request_skeleton_handle_set_property (
956 : GDBusConnection *connection G_GNUC_UNUSED,
957 : const gchar *sender G_GNUC_UNUSED,
958 : const gchar *object_path G_GNUC_UNUSED,
959 : const gchar *interface_name G_GNUC_UNUSED,
960 : const gchar *property_name,
961 : GVariant *variant,
962 : GError **error,
963 : gpointer user_data)
964 : {
965 0 : GkdExportedPortalRequestSkeleton *skeleton = GKD_EXPORTED_PORTAL_REQUEST_SKELETON (user_data);
966 0 : GValue value = G_VALUE_INIT;
967 : GParamSpec *pspec;
968 : _ExtendedGDBusPropertyInfo *info;
969 : gboolean ret;
970 0 : ret = FALSE;
971 0 : info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gkd_exported_portal_request_interface_info.parent_struct, property_name);
972 0 : g_assert (info != NULL);
973 0 : pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
974 0 : if (pspec == NULL)
975 : {
976 0 : g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
977 : }
978 : else
979 : {
980 0 : if (info->use_gvariant)
981 0 : g_value_set_variant (&value, variant);
982 : else
983 0 : g_dbus_gvariant_to_gvalue (variant, &value);
984 0 : g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
985 0 : g_value_unset (&value);
986 0 : ret = TRUE;
987 : }
988 0 : return ret;
989 : }
990 :
991 : static const GDBusInterfaceVTable _gkd_exported_portal_request_skeleton_vtable =
992 : {
993 : _gkd_exported_portal_request_skeleton_handle_method_call,
994 : _gkd_exported_portal_request_skeleton_handle_get_property,
995 : _gkd_exported_portal_request_skeleton_handle_set_property,
996 : {NULL}
997 : };
998 :
999 : static GDBusInterfaceInfo *
1000 4 : gkd_exported_portal_request_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
1001 : {
1002 4 : return gkd_exported_portal_request_interface_info ();
1003 : }
1004 :
1005 : static GDBusInterfaceVTable *
1006 4 : gkd_exported_portal_request_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
1007 : {
1008 4 : return (GDBusInterfaceVTable *) &_gkd_exported_portal_request_skeleton_vtable;
1009 : }
1010 :
1011 : static GVariant *
1012 0 : gkd_exported_portal_request_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
1013 : {
1014 0 : GkdExportedPortalRequestSkeleton *skeleton = GKD_EXPORTED_PORTAL_REQUEST_SKELETON (_skeleton);
1015 :
1016 : GVariantBuilder builder;
1017 : guint n;
1018 0 : g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
1019 0 : if (_gkd_exported_portal_request_interface_info.parent_struct.properties == NULL)
1020 0 : goto out;
1021 0 : for (n = 0; _gkd_exported_portal_request_interface_info.parent_struct.properties[n] != NULL; n++)
1022 : {
1023 0 : GDBusPropertyInfo *info = _gkd_exported_portal_request_interface_info.parent_struct.properties[n];
1024 0 : if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
1025 : {
1026 : GVariant *value;
1027 0 : value = _gkd_exported_portal_request_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.freedesktop.impl.portal.Request", info->name, NULL, skeleton);
1028 0 : if (value != NULL)
1029 : {
1030 0 : g_variant_take_ref (value);
1031 0 : g_variant_builder_add (&builder, "{sv}", info->name, value);
1032 0 : g_variant_unref (value);
1033 : }
1034 : }
1035 : }
1036 0 : out:
1037 0 : return g_variant_builder_end (&builder);
1038 : }
1039 :
1040 : static void
1041 0 : gkd_exported_portal_request_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton G_GNUC_UNUSED)
1042 : {
1043 0 : }
1044 :
1045 : static void gkd_exported_portal_request_skeleton_iface_init (GkdExportedPortalRequestIface *iface);
1046 : #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
1047 16 : G_DEFINE_TYPE_WITH_CODE (GkdExportedPortalRequestSkeleton, gkd_exported_portal_request_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
1048 : G_ADD_PRIVATE (GkdExportedPortalRequestSkeleton)
1049 : G_IMPLEMENT_INTERFACE (GKD_TYPE_EXPORTED_PORTAL_REQUEST, gkd_exported_portal_request_skeleton_iface_init))
1050 :
1051 : #else
1052 : G_DEFINE_TYPE_WITH_CODE (GkdExportedPortalRequestSkeleton, gkd_exported_portal_request_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
1053 : G_IMPLEMENT_INTERFACE (GKD_TYPE_EXPORTED_PORTAL_REQUEST, gkd_exported_portal_request_skeleton_iface_init))
1054 :
1055 : #endif
1056 : static void
1057 4 : gkd_exported_portal_request_skeleton_finalize (GObject *object)
1058 : {
1059 4 : GkdExportedPortalRequestSkeleton *skeleton = GKD_EXPORTED_PORTAL_REQUEST_SKELETON (object);
1060 4 : g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
1061 4 : if (skeleton->priv->changed_properties_idle_source != NULL)
1062 0 : g_source_destroy (skeleton->priv->changed_properties_idle_source);
1063 4 : g_main_context_unref (skeleton->priv->context);
1064 4 : g_mutex_clear (&skeleton->priv->lock);
1065 4 : G_OBJECT_CLASS (gkd_exported_portal_request_skeleton_parent_class)->finalize (object);
1066 4 : }
1067 :
1068 : static void
1069 4 : gkd_exported_portal_request_skeleton_init (GkdExportedPortalRequestSkeleton *skeleton)
1070 : {
1071 : #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
1072 4 : skeleton->priv = gkd_exported_portal_request_skeleton_get_instance_private (skeleton);
1073 : #else
1074 : skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, GKD_TYPE_EXPORTED_PORTAL_REQUEST_SKELETON, GkdExportedPortalRequestSkeletonPrivate);
1075 : #endif
1076 :
1077 4 : g_mutex_init (&skeleton->priv->lock);
1078 4 : skeleton->priv->context = g_main_context_ref_thread_default ();
1079 4 : }
1080 :
1081 : static void
1082 2 : gkd_exported_portal_request_skeleton_class_init (GkdExportedPortalRequestSkeletonClass *klass)
1083 : {
1084 : GObjectClass *gobject_class;
1085 : GDBusInterfaceSkeletonClass *skeleton_class;
1086 :
1087 2 : gobject_class = G_OBJECT_CLASS (klass);
1088 2 : gobject_class->finalize = gkd_exported_portal_request_skeleton_finalize;
1089 :
1090 2 : skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
1091 2 : skeleton_class->get_info = gkd_exported_portal_request_skeleton_dbus_interface_get_info;
1092 2 : skeleton_class->get_properties = gkd_exported_portal_request_skeleton_dbus_interface_get_properties;
1093 2 : skeleton_class->flush = gkd_exported_portal_request_skeleton_dbus_interface_flush;
1094 2 : skeleton_class->get_vtable = gkd_exported_portal_request_skeleton_dbus_interface_get_vtable;
1095 :
1096 : #if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
1097 : g_type_class_add_private (klass, sizeof (GkdExportedPortalRequestSkeletonPrivate));
1098 : #endif
1099 2 : }
1100 :
1101 : static void
1102 2 : gkd_exported_portal_request_skeleton_iface_init (GkdExportedPortalRequestIface *iface G_GNUC_UNUSED)
1103 : {
1104 2 : }
1105 :
1106 : /**
1107 : * gkd_exported_portal_request_skeleton_new:
1108 : *
1109 : * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Request.top_of_page">org.freedesktop.impl.portal.Request</link>.
1110 : *
1111 : * Returns: (transfer full) (type GkdExportedPortalRequestSkeleton): The skeleton object.
1112 : */
1113 : GkdExportedPortalRequest *
1114 4 : gkd_exported_portal_request_skeleton_new (void)
1115 : {
1116 4 : return GKD_EXPORTED_PORTAL_REQUEST (g_object_new (GKD_TYPE_EXPORTED_PORTAL_REQUEST_SKELETON, NULL));
1117 : }
1118 :
|