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