2 * Generated by gdbus-codegen 2.50.3. DO NOT EDIT.
4 * The license of this code is the same as for the source it was derived from.
11 #include "ofono_voicecall_interface.h"
15 # include <gio/gunixfdlist.h>
20 GDBusArgInfo parent_struct;
21 gboolean use_gvariant;
22 } _ExtendedGDBusArgInfo;
26 GDBusMethodInfo parent_struct;
27 const gchar *signal_name;
29 } _ExtendedGDBusMethodInfo;
33 GDBusSignalInfo parent_struct;
34 const gchar *signal_name;
35 } _ExtendedGDBusSignalInfo;
39 GDBusPropertyInfo parent_struct;
40 const gchar *hyphen_name;
41 gboolean use_gvariant;
42 } _ExtendedGDBusPropertyInfo;
46 GDBusInterfaceInfo parent_struct;
47 const gchar *hyphen_name;
48 } _ExtendedGDBusInterfaceInfo;
52 const _ExtendedGDBusPropertyInfo *info;
54 GValue orig_value; /* the value before the change */
58 _changed_property_free (ChangedProperty *data)
60 g_value_unset (&data->orig_value);
65 _g_strv_equal0 (gchar **a, gchar **b)
69 if (a == NULL && b == NULL)
74 if (a == NULL || b == NULL)
76 if (g_strv_length (a) != g_strv_length (b))
78 for (n = 0; a[n] != NULL; n++)
79 if (g_strcmp0 (a[n], b[n]) != 0)
87 _g_variant_equal0 (GVariant *a, GVariant *b)
90 if (a == NULL && b == NULL)
95 if (a == NULL || b == NULL)
97 ret = g_variant_equal (a, b);
102 G_GNUC_UNUSED static gboolean
103 _g_value_equal (const GValue *a, const GValue *b)
105 gboolean ret = FALSE;
106 g_assert (G_VALUE_TYPE (a) == G_VALUE_TYPE (b));
107 switch (G_VALUE_TYPE (a))
110 ret = (g_value_get_boolean (a) == g_value_get_boolean (b));
113 ret = (g_value_get_uchar (a) == g_value_get_uchar (b));
116 ret = (g_value_get_int (a) == g_value_get_int (b));
119 ret = (g_value_get_uint (a) == g_value_get_uint (b));
122 ret = (g_value_get_int64 (a) == g_value_get_int64 (b));
125 ret = (g_value_get_uint64 (a) == g_value_get_uint64 (b));
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;
136 ret = (g_strcmp0 (g_value_get_string (a), g_value_get_string (b)) == 0);
139 ret = _g_variant_equal0 (g_value_get_variant (a), g_value_get_variant (b));
142 if (G_VALUE_TYPE (a) == G_TYPE_STRV)
143 ret = _g_strv_equal0 (g_value_get_boxed (a), g_value_get_boxed (b));
145 g_critical ("_g_value_equal() does not handle type %s", g_type_name (G_VALUE_TYPE (a)));
151 /* ------------------------------------------------------------------------
152 * Code for interface org.ofono.VoiceCall
153 * ------------------------------------------------------------------------
157 * SECTION:OrgOfonoVoiceCall
158 * @title: OrgOfonoVoiceCall
159 * @short_description: Generated C code for the org.ofono.VoiceCall D-Bus interface
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.
164 /* ---- Introspection data for org.ofono.VoiceCall ---- */
166 static const _ExtendedGDBusArgInfo _org_ofono_voice_call_method_info_get_properties_OUT_ARG_unnamed_arg0 =
170 (gchar *) "unnamed_arg0",
177 static const _ExtendedGDBusArgInfo * const _org_ofono_voice_call_method_info_get_properties_OUT_ARG_pointers[] =
179 &_org_ofono_voice_call_method_info_get_properties_OUT_ARG_unnamed_arg0,
183 static const _ExtendedGDBusMethodInfo _org_ofono_voice_call_method_info_get_properties =
187 (gchar *) "GetProperties",
189 (GDBusArgInfo **) &_org_ofono_voice_call_method_info_get_properties_OUT_ARG_pointers,
192 "handle-get-properties",
196 static const _ExtendedGDBusArgInfo _org_ofono_voice_call_method_info_set_property_IN_ARG_unnamed_arg0 =
200 (gchar *) "unnamed_arg0",
207 static const _ExtendedGDBusArgInfo _org_ofono_voice_call_method_info_set_property_IN_ARG_unnamed_arg1 =
211 (gchar *) "unnamed_arg1",
218 static const _ExtendedGDBusArgInfo * const _org_ofono_voice_call_method_info_set_property_IN_ARG_pointers[] =
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,
225 static const _ExtendedGDBusMethodInfo _org_ofono_voice_call_method_info_set_property =
229 (gchar *) "SetProperty",
230 (GDBusArgInfo **) &_org_ofono_voice_call_method_info_set_property_IN_ARG_pointers,
234 "handle-set-property",
238 static const _ExtendedGDBusMethodInfo _org_ofono_voice_call_method_info_answer =
251 static const _ExtendedGDBusMethodInfo _org_ofono_voice_call_method_info_hangup =
264 static const _ExtendedGDBusArgInfo _org_ofono_voice_call_method_info_deflect_IN_ARG_unnamed_arg0 =
268 (gchar *) "unnamed_arg0",
275 static const _ExtendedGDBusArgInfo * const _org_ofono_voice_call_method_info_deflect_IN_ARG_pointers[] =
277 &_org_ofono_voice_call_method_info_deflect_IN_ARG_unnamed_arg0,
281 static const _ExtendedGDBusMethodInfo _org_ofono_voice_call_method_info_deflect =
286 (GDBusArgInfo **) &_org_ofono_voice_call_method_info_deflect_IN_ARG_pointers,
294 static const _ExtendedGDBusMethodInfo * const _org_ofono_voice_call_method_info_pointers[] =
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,
304 static const _ExtendedGDBusArgInfo _org_ofono_voice_call_signal_info_property_changed_ARG_unnamed_arg0 =
308 (gchar *) "unnamed_arg0",
315 static const _ExtendedGDBusArgInfo _org_ofono_voice_call_signal_info_property_changed_ARG_unnamed_arg1 =
319 (gchar *) "unnamed_arg1",
326 static const _ExtendedGDBusArgInfo * const _org_ofono_voice_call_signal_info_property_changed_ARG_pointers[] =
328 &_org_ofono_voice_call_signal_info_property_changed_ARG_unnamed_arg0,
329 &_org_ofono_voice_call_signal_info_property_changed_ARG_unnamed_arg1,
333 static const _ExtendedGDBusSignalInfo _org_ofono_voice_call_signal_info_property_changed =
337 (gchar *) "PropertyChanged",
338 (GDBusArgInfo **) &_org_ofono_voice_call_signal_info_property_changed_ARG_pointers,
344 static const _ExtendedGDBusArgInfo _org_ofono_voice_call_signal_info_disconnect_reason_ARG_unnamed_arg0 =
348 (gchar *) "unnamed_arg0",
355 static const _ExtendedGDBusArgInfo * const _org_ofono_voice_call_signal_info_disconnect_reason_ARG_pointers[] =
357 &_org_ofono_voice_call_signal_info_disconnect_reason_ARG_unnamed_arg0,
361 static const _ExtendedGDBusSignalInfo _org_ofono_voice_call_signal_info_disconnect_reason =
365 (gchar *) "DisconnectReason",
366 (GDBusArgInfo **) &_org_ofono_voice_call_signal_info_disconnect_reason_ARG_pointers,
372 static const _ExtendedGDBusSignalInfo * const _org_ofono_voice_call_signal_info_pointers[] =
374 &_org_ofono_voice_call_signal_info_property_changed,
375 &_org_ofono_voice_call_signal_info_disconnect_reason,
379 static const _ExtendedGDBusInterfaceInfo _org_ofono_voice_call_interface_info =
383 (gchar *) "org.ofono.VoiceCall",
384 (GDBusMethodInfo **) &_org_ofono_voice_call_method_info_pointers,
385 (GDBusSignalInfo **) &_org_ofono_voice_call_signal_info_pointers,
389 "org-ofono-voice-call",
394 * org_ofono_voice_call_interface_info:
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.
398 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
401 org_ofono_voice_call_interface_info (void)
403 return (GDBusInterfaceInfo *) &_org_ofono_voice_call_interface_info.parent_struct;
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.
411 * Overrides all #GObject properties in the #OrgOfonoVoiceCall interface for a concrete class.
412 * The properties are overridden in the order they are defined.
414 * Returns: The last property id.
417 org_ofono_voice_call_override_properties (GObjectClass *klass, guint property_id_begin)
419 return property_id_begin - 1;
427 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-ofono-VoiceCall.top_of_page">org.ofono.VoiceCall</link>.
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.
441 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-ofono-VoiceCall.top_of_page">org.ofono.VoiceCall</link>.
444 typedef OrgOfonoVoiceCallIface OrgOfonoVoiceCallInterface;
445 G_DEFINE_INTERFACE (OrgOfonoVoiceCall, org_ofono_voice_call, G_TYPE_OBJECT);
448 org_ofono_voice_call_default_init (OrgOfonoVoiceCallIface *iface)
450 /* GObject signals for incoming D-Bus method calls: */
452 * OrgOfonoVoiceCall::handle-get-properties:
453 * @object: A #OrgOfonoVoiceCall.
454 * @invocation: A #GDBusMethodInvocation.
456 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-ofono-VoiceCall.GetProperties">GetProperties()</link> D-Bus method.
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.
460 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
462 g_signal_new ("handle-get-properties",
463 G_TYPE_FROM_INTERFACE (iface),
465 G_STRUCT_OFFSET (OrgOfonoVoiceCallIface, handle_get_properties),
466 g_signal_accumulator_true_handled,
468 g_cclosure_marshal_generic,
471 G_TYPE_DBUS_METHOD_INVOCATION);
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.
480 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-ofono-VoiceCall.SetProperty">SetProperty()</link> D-Bus method.
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.
484 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
486 g_signal_new ("handle-set-property",
487 G_TYPE_FROM_INTERFACE (iface),
489 G_STRUCT_OFFSET (OrgOfonoVoiceCallIface, handle_set_property),
490 g_signal_accumulator_true_handled,
492 g_cclosure_marshal_generic,
495 G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_VARIANT);
498 * OrgOfonoVoiceCall::handle-answer:
499 * @object: A #OrgOfonoVoiceCall.
500 * @invocation: A #GDBusMethodInvocation.
502 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-ofono-VoiceCall.Answer">Answer()</link> D-Bus method.
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.
506 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
508 g_signal_new ("handle-answer",
509 G_TYPE_FROM_INTERFACE (iface),
511 G_STRUCT_OFFSET (OrgOfonoVoiceCallIface, handle_answer),
512 g_signal_accumulator_true_handled,
514 g_cclosure_marshal_generic,
517 G_TYPE_DBUS_METHOD_INVOCATION);
520 * OrgOfonoVoiceCall::handle-hangup:
521 * @object: A #OrgOfonoVoiceCall.
522 * @invocation: A #GDBusMethodInvocation.
524 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-ofono-VoiceCall.Hangup">Hangup()</link> D-Bus method.
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.
528 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
530 g_signal_new ("handle-hangup",
531 G_TYPE_FROM_INTERFACE (iface),
533 G_STRUCT_OFFSET (OrgOfonoVoiceCallIface, handle_hangup),
534 g_signal_accumulator_true_handled,
536 g_cclosure_marshal_generic,
539 G_TYPE_DBUS_METHOD_INVOCATION);
542 * OrgOfonoVoiceCall::handle-deflect:
543 * @object: A #OrgOfonoVoiceCall.
544 * @invocation: A #GDBusMethodInvocation.
545 * @arg_unnamed_arg0: Argument passed by remote caller.
547 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-ofono-VoiceCall.Deflect">Deflect()</link> D-Bus method.
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.
551 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
553 g_signal_new ("handle-deflect",
554 G_TYPE_FROM_INTERFACE (iface),
556 G_STRUCT_OFFSET (OrgOfonoVoiceCallIface, handle_deflect),
557 g_signal_accumulator_true_handled,
559 g_cclosure_marshal_generic,
562 G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING);
564 /* GObject signals for received D-Bus signals: */
566 * OrgOfonoVoiceCall::property-changed:
567 * @object: A #OrgOfonoVoiceCall.
568 * @arg_unnamed_arg0: Argument.
569 * @arg_unnamed_arg1: Argument.
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.
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.
575 g_signal_new ("property-changed",
576 G_TYPE_FROM_INTERFACE (iface),
578 G_STRUCT_OFFSET (OrgOfonoVoiceCallIface, property_changed),
581 g_cclosure_marshal_generic,
583 2, G_TYPE_STRING, G_TYPE_VARIANT);
586 * OrgOfonoVoiceCall::disconnect-reason:
587 * @object: A #OrgOfonoVoiceCall.
588 * @arg_unnamed_arg0: Argument.
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.
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.
594 g_signal_new ("disconnect-reason",
595 G_TYPE_FROM_INTERFACE (iface),
597 G_STRUCT_OFFSET (OrgOfonoVoiceCallIface, disconnect_reason),
600 g_cclosure_marshal_generic,
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.
612 * Emits the <link linkend="gdbus-signal-org-ofono-VoiceCall.PropertyChanged">"PropertyChanged"</link> D-Bus signal.
615 org_ofono_voice_call_emit_property_changed (
616 OrgOfonoVoiceCall *object,
617 const gchar *arg_unnamed_arg0,
618 GVariant *arg_unnamed_arg1)
620 g_signal_emit_by_name (object, "property-changed", arg_unnamed_arg0, arg_unnamed_arg1);
624 * org_ofono_voice_call_emit_disconnect_reason:
625 * @object: A #OrgOfonoVoiceCall.
626 * @arg_unnamed_arg0: Argument to pass with the signal.
628 * Emits the <link linkend="gdbus-signal-org-ofono-VoiceCall.DisconnectReason">"DisconnectReason"</link> D-Bus signal.
631 org_ofono_voice_call_emit_disconnect_reason (
632 OrgOfonoVoiceCall *object,
633 const gchar *arg_unnamed_arg0)
635 g_signal_emit_by_name (object, "disconnect-reason", arg_unnamed_arg0);
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.
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.
649 * See org_ofono_voice_call_call_get_properties_sync() for the synchronous, blocking version of this method.
652 org_ofono_voice_call_call_get_properties (
653 OrgOfonoVoiceCall *proxy,
654 GCancellable *cancellable,
655 GAsyncReadyCallback callback,
658 g_dbus_proxy_call (G_DBUS_PROXY (proxy),
660 g_variant_new ("()"),
661 G_DBUS_CALL_FLAGS_NONE,
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.
675 * Finishes an operation started with org_ofono_voice_call_call_get_properties().
677 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
680 org_ofono_voice_call_call_get_properties_finish (
681 OrgOfonoVoiceCall *proxy,
682 GVariant **out_unnamed_arg0,
687 _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
693 g_variant_unref (_ret);
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.
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.
707 * See org_ofono_voice_call_call_get_properties() for the asynchronous version of this method.
709 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
712 org_ofono_voice_call_call_get_properties_sync (
713 OrgOfonoVoiceCall *proxy,
714 GVariant **out_unnamed_arg0,
715 GCancellable *cancellable,
719 _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
721 g_variant_new ("()"),
722 G_DBUS_CALL_FLAGS_NONE,
731 g_variant_unref (_ret);
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.
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.
749 * See org_ofono_voice_call_call_set_property_sync() for the synchronous, blocking version of this method.
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,
760 g_dbus_proxy_call (G_DBUS_PROXY (proxy),
762 g_variant_new ("(s@v)",
765 G_DBUS_CALL_FLAGS_NONE,
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.
778 * Finishes an operation started with org_ofono_voice_call_call_set_property().
780 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
783 org_ofono_voice_call_call_set_property_finish (
784 OrgOfonoVoiceCall *proxy,
789 _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
794 g_variant_unref (_ret);
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.
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.
809 * See org_ofono_voice_call_call_set_property() for the asynchronous version of this method.
811 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
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,
822 _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
824 g_variant_new ("(s@v)",
827 G_DBUS_CALL_FLAGS_NONE,
835 g_variant_unref (_ret);
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.
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.
851 * See org_ofono_voice_call_call_answer_sync() for the synchronous, blocking version of this method.
854 org_ofono_voice_call_call_answer (
855 OrgOfonoVoiceCall *proxy,
856 GCancellable *cancellable,
857 GAsyncReadyCallback callback,
860 g_dbus_proxy_call (G_DBUS_PROXY (proxy),
862 g_variant_new ("()"),
863 G_DBUS_CALL_FLAGS_NONE,
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.
876 * Finishes an operation started with org_ofono_voice_call_call_answer().
878 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
881 org_ofono_voice_call_call_answer_finish (
882 OrgOfonoVoiceCall *proxy,
887 _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
892 g_variant_unref (_ret);
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.
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.
905 * See org_ofono_voice_call_call_answer() for the asynchronous version of this method.
907 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
910 org_ofono_voice_call_call_answer_sync (
911 OrgOfonoVoiceCall *proxy,
912 GCancellable *cancellable,
916 _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
918 g_variant_new ("()"),
919 G_DBUS_CALL_FLAGS_NONE,
927 g_variant_unref (_ret);
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.
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.
943 * See org_ofono_voice_call_call_hangup_sync() for the synchronous, blocking version of this method.
946 org_ofono_voice_call_call_hangup (
947 OrgOfonoVoiceCall *proxy,
948 GCancellable *cancellable,
949 GAsyncReadyCallback callback,
952 g_dbus_proxy_call (G_DBUS_PROXY (proxy),
954 g_variant_new ("()"),
955 G_DBUS_CALL_FLAGS_NONE,
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.
968 * Finishes an operation started with org_ofono_voice_call_call_hangup().
970 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
973 org_ofono_voice_call_call_hangup_finish (
974 OrgOfonoVoiceCall *proxy,
979 _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
984 g_variant_unref (_ret);
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.
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.
997 * See org_ofono_voice_call_call_hangup() for the asynchronous version of this method.
999 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1002 org_ofono_voice_call_call_hangup_sync (
1003 OrgOfonoVoiceCall *proxy,
1004 GCancellable *cancellable,
1008 _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
1010 g_variant_new ("()"),
1011 G_DBUS_CALL_FLAGS_NONE,
1017 g_variant_get (_ret,
1019 g_variant_unref (_ret);
1021 return _ret != NULL;
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.
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.
1036 * See org_ofono_voice_call_call_deflect_sync() for the synchronous, blocking version of this method.
1039 org_ofono_voice_call_call_deflect (
1040 OrgOfonoVoiceCall *proxy,
1041 const gchar *arg_unnamed_arg0,
1042 GCancellable *cancellable,
1043 GAsyncReadyCallback callback,
1046 g_dbus_proxy_call (G_DBUS_PROXY (proxy),
1048 g_variant_new ("(s)",
1050 G_DBUS_CALL_FLAGS_NONE,
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.
1063 * Finishes an operation started with org_ofono_voice_call_call_deflect().
1065 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1068 org_ofono_voice_call_call_deflect_finish (
1069 OrgOfonoVoiceCall *proxy,
1074 _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
1077 g_variant_get (_ret,
1079 g_variant_unref (_ret);
1081 return _ret != NULL;
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.
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.
1093 * See org_ofono_voice_call_call_deflect() for the asynchronous version of this method.
1095 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1098 org_ofono_voice_call_call_deflect_sync (
1099 OrgOfonoVoiceCall *proxy,
1100 const gchar *arg_unnamed_arg0,
1101 GCancellable *cancellable,
1105 _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
1107 g_variant_new ("(s)",
1109 G_DBUS_CALL_FLAGS_NONE,
1115 g_variant_get (_ret,
1117 g_variant_unref (_ret);
1119 return _ret != NULL;
1123 * org_ofono_voice_call_complete_get_properties:
1124 * @object: A #OrgOfonoVoiceCall.
1125 * @invocation: (transfer full): A #GDBusMethodInvocation.
1126 * @unnamed_arg0: Parameter to return.
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.
1130 * This method will free @invocation, you cannot use it afterwards.
1133 org_ofono_voice_call_complete_get_properties (
1134 OrgOfonoVoiceCall *object,
1135 GDBusMethodInvocation *invocation,
1136 GVariant *unnamed_arg0)
1138 g_dbus_method_invocation_return_value (invocation,
1139 g_variant_new ("(@a{sv})",
1144 * org_ofono_voice_call_complete_set_property:
1145 * @object: A #OrgOfonoVoiceCall.
1146 * @invocation: (transfer full): A #GDBusMethodInvocation.
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.
1150 * This method will free @invocation, you cannot use it afterwards.
1153 org_ofono_voice_call_complete_set_property (
1154 OrgOfonoVoiceCall *object,
1155 GDBusMethodInvocation *invocation)
1157 g_dbus_method_invocation_return_value (invocation,
1158 g_variant_new ("()"));
1162 * org_ofono_voice_call_complete_answer:
1163 * @object: A #OrgOfonoVoiceCall.
1164 * @invocation: (transfer full): A #GDBusMethodInvocation.
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.
1168 * This method will free @invocation, you cannot use it afterwards.
1171 org_ofono_voice_call_complete_answer (
1172 OrgOfonoVoiceCall *object,
1173 GDBusMethodInvocation *invocation)
1175 g_dbus_method_invocation_return_value (invocation,
1176 g_variant_new ("()"));
1180 * org_ofono_voice_call_complete_hangup:
1181 * @object: A #OrgOfonoVoiceCall.
1182 * @invocation: (transfer full): A #GDBusMethodInvocation.
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.
1186 * This method will free @invocation, you cannot use it afterwards.
1189 org_ofono_voice_call_complete_hangup (
1190 OrgOfonoVoiceCall *object,
1191 GDBusMethodInvocation *invocation)
1193 g_dbus_method_invocation_return_value (invocation,
1194 g_variant_new ("()"));
1198 * org_ofono_voice_call_complete_deflect:
1199 * @object: A #OrgOfonoVoiceCall.
1200 * @invocation: (transfer full): A #GDBusMethodInvocation.
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.
1204 * This method will free @invocation, you cannot use it afterwards.
1207 org_ofono_voice_call_complete_deflect (
1208 OrgOfonoVoiceCall *object,
1209 GDBusMethodInvocation *invocation)
1211 g_dbus_method_invocation_return_value (invocation,
1212 g_variant_new ("()"));
1215 /* ------------------------------------------------------------------------ */
1218 * OrgOfonoVoiceCallProxy:
1220 * The #OrgOfonoVoiceCallProxy structure contains only private data and should only be accessed using the provided API.
1224 * OrgOfonoVoiceCallProxyClass:
1225 * @parent_class: The parent class.
1227 * Class structure for #OrgOfonoVoiceCallProxy.
1230 struct _OrgOfonoVoiceCallProxyPrivate
1235 static void org_ofono_voice_call_proxy_iface_init (OrgOfonoVoiceCallIface *iface);
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));
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));
1248 org_ofono_voice_call_proxy_finalize (GObject *object)
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);
1256 org_ofono_voice_call_proxy_get_property (GObject *object,
1259 GParamSpec *pspec G_GNUC_UNUSED)
1264 org_ofono_voice_call_proxy_set_property (GObject *object,
1266 const GValue *value,
1267 GParamSpec *pspec G_GNUC_UNUSED)
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)
1277 _ExtendedGDBusSignalInfo *info;
1284 info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_org_ofono_voice_call_interface_info.parent_struct, signal_name);
1287 num_params = g_variant_n_children (parameters);
1288 paramv = g_new0 (GValue, num_params + 1);
1289 g_value_init (¶mv[0], TYPE_ORG_OFONO_VOICE_CALL);
1290 g_value_set_object (¶mv[0], proxy);
1291 g_variant_iter_init (&iter, parameters);
1293 while ((child = g_variant_iter_next_value (&iter)) != NULL)
1295 _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
1296 if (arg_info->use_gvariant)
1298 g_value_init (¶mv[n], G_TYPE_VARIANT);
1299 g_value_set_variant (¶mv[n], child);
1303 g_dbus_gvariant_to_gvalue (child, ¶mv[n++]);
1304 g_variant_unref (child);
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 (¶mv[n]);
1314 org_ofono_voice_call_proxy_g_properties_changed (GDBusProxy *_proxy,
1315 GVariant *changed_properties,
1316 const gchar *const *invalidated_properties)
1318 OrgOfonoVoiceCallProxy *proxy = ORG_OFONO_VOICE_CALL_PROXY (_proxy);
1322 _ExtendedGDBusPropertyInfo *info;
1323 g_variant_get (changed_properties, "a{sv}", &iter);
1324 while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
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);
1329 g_object_notify (G_OBJECT (proxy), info->hyphen_name);
1331 g_variant_iter_free (iter);
1332 for (n = 0; invalidated_properties[n] != NULL; n++)
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]);
1337 g_object_notify (G_OBJECT (proxy), info->hyphen_name);
1342 org_ofono_voice_call_proxy_init (OrgOfonoVoiceCallProxy *proxy)
1344 #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
1345 proxy->priv = org_ofono_voice_call_proxy_get_instance_private (proxy);
1347 proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, TYPE_ORG_OFONO_VOICE_CALL_PROXY, OrgOfonoVoiceCallProxyPrivate);
1350 g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), org_ofono_voice_call_interface_info ());
1354 org_ofono_voice_call_proxy_class_init (OrgOfonoVoiceCallProxyClass *klass)
1356 GObjectClass *gobject_class;
1357 GDBusProxyClass *proxy_class;
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;
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;
1368 #if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
1369 g_type_class_add_private (klass, sizeof (OrgOfonoVoiceCallProxyPrivate));
1374 org_ofono_voice_call_proxy_iface_init (OrgOfonoVoiceCallIface *iface)
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.
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.
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.
1393 * See org_ofono_voice_call_proxy_new_sync() for the synchronous, blocking version of this constructor.
1396 org_ofono_voice_call_proxy_new (
1397 GDBusConnection *connection,
1398 GDBusProxyFlags flags,
1400 const gchar *object_path,
1401 GCancellable *cancellable,
1402 GAsyncReadyCallback callback,
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);
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
1413 * Finishes an operation started with org_ofono_voice_call_proxy_new().
1415 * Returns: (transfer full) (type OrgOfonoVoiceCallProxy): The constructed proxy object or %NULL if @error is set.
1418 org_ofono_voice_call_proxy_new_finish (
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);
1428 return ORG_OFONO_VOICE_CALL (ret);
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
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.
1444 * The calling thread is blocked until a reply is received.
1446 * See org_ofono_voice_call_proxy_new() for the asynchronous version of this constructor.
1448 * Returns: (transfer full) (type OrgOfonoVoiceCallProxy): The constructed proxy object or %NULL if @error is set.
1451 org_ofono_voice_call_proxy_new_sync (
1452 GDBusConnection *connection,
1453 GDBusProxyFlags flags,
1455 const gchar *object_path,
1456 GCancellable *cancellable,
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);
1462 return ORG_OFONO_VOICE_CALL (ret);
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.
1478 * Like org_ofono_voice_call_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
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.
1483 * See org_ofono_voice_call_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
1486 org_ofono_voice_call_proxy_new_for_bus (
1488 GDBusProxyFlags flags,
1490 const gchar *object_path,
1491 GCancellable *cancellable,
1492 GAsyncReadyCallback callback,
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);
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
1503 * Finishes an operation started with org_ofono_voice_call_proxy_new_for_bus().
1505 * Returns: (transfer full) (type OrgOfonoVoiceCallProxy): The constructed proxy object or %NULL if @error is set.
1508 org_ofono_voice_call_proxy_new_for_bus_finish (
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);
1518 return ORG_OFONO_VOICE_CALL (ret);
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
1532 * Like org_ofono_voice_call_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
1534 * The calling thread is blocked until a reply is received.
1536 * See org_ofono_voice_call_proxy_new_for_bus() for the asynchronous version of this constructor.
1538 * Returns: (transfer full) (type OrgOfonoVoiceCallProxy): The constructed proxy object or %NULL if @error is set.
1541 org_ofono_voice_call_proxy_new_for_bus_sync (
1543 GDBusProxyFlags flags,
1545 const gchar *object_path,
1546 GCancellable *cancellable,
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);
1552 return ORG_OFONO_VOICE_CALL (ret);
1558 /* ------------------------------------------------------------------------ */
1561 * OrgOfonoVoiceCallSkeleton:
1563 * The #OrgOfonoVoiceCallSkeleton structure contains only private data and should only be accessed using the provided API.
1567 * OrgOfonoVoiceCallSkeletonClass:
1568 * @parent_class: The parent class.
1570 * Class structure for #OrgOfonoVoiceCallSkeleton.
1573 struct _OrgOfonoVoiceCallSkeletonPrivate
1576 GList *changed_properties;
1577 GSource *changed_properties_idle_source;
1578 GMainContext *context;
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,
1593 OrgOfonoVoiceCallSkeleton *skeleton = ORG_OFONO_VOICE_CALL_SKELETON (user_data);
1594 _ExtendedGDBusMethodInfo *info;
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);
1608 g_value_init (¶mv[n], TYPE_ORG_OFONO_VOICE_CALL);
1609 g_value_set_object (¶mv[n++], skeleton);
1610 g_value_init (¶mv[n], G_TYPE_DBUS_METHOD_INVOCATION);
1611 g_value_set_object (¶mv[n++], invocation);
1612 if (info->pass_fdlist)
1615 g_value_init (¶mv[n], G_TYPE_UNIX_FD_LIST);
1616 g_value_set_object (¶mv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
1618 g_assert_not_reached ();
1621 g_variant_iter_init (&iter, parameters);
1622 while ((child = g_variant_iter_next_value (&iter)) != NULL)
1624 _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
1625 if (arg_info->use_gvariant)
1627 g_value_init (¶mv[n], G_TYPE_VARIANT);
1628 g_value_set_variant (¶mv[n], child);
1632 g_dbus_gvariant_to_gvalue (child, ¶mv[n++]);
1633 g_variant_unref (child);
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 (¶mv[n]);
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,
1656 OrgOfonoVoiceCallSkeleton *skeleton = ORG_OFONO_VOICE_CALL_SKELETON (user_data);
1657 GValue value = G_VALUE_INIT;
1659 _ExtendedGDBusPropertyInfo *info;
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);
1667 g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
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);
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,
1690 OrgOfonoVoiceCallSkeleton *skeleton = ORG_OFONO_VOICE_CALL_SKELETON (user_data);
1691 GValue value = G_VALUE_INIT;
1693 _ExtendedGDBusPropertyInfo *info;
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);
1701 g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
1705 if (info->use_gvariant)
1706 g_value_set_variant (&value, variant);
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);
1716 static const GDBusInterfaceVTable _org_ofono_voice_call_skeleton_vtable =
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,
1724 static GDBusInterfaceInfo *
1725 org_ofono_voice_call_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
1727 return org_ofono_voice_call_interface_info ();
1730 static GDBusInterfaceVTable *
1731 org_ofono_voice_call_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
1733 return (GDBusInterfaceVTable *) &_org_ofono_voice_call_skeleton_vtable;
1737 org_ofono_voice_call_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
1739 OrgOfonoVoiceCallSkeleton *skeleton = ORG_OFONO_VOICE_CALL_SKELETON (_skeleton);
1741 GVariantBuilder builder;
1743 g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
1744 if (_org_ofono_voice_call_interface_info.parent_struct.properties == NULL)
1746 for (n = 0; _org_ofono_voice_call_interface_info.parent_struct.properties[n] != NULL; n++)
1748 GDBusPropertyInfo *info = _org_ofono_voice_call_interface_info.parent_struct.properties[n];
1749 if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
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);
1755 g_variant_take_ref (value);
1756 g_variant_builder_add (&builder, "{sv}", info->name, value);
1757 g_variant_unref (value);
1762 return g_variant_builder_end (&builder);
1766 org_ofono_voice_call_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
1771 _org_ofono_voice_call_on_signal_property_changed (
1772 OrgOfonoVoiceCall *object,
1773 const gchar *arg_unnamed_arg0,
1774 GVariant *arg_unnamed_arg1)
1776 OrgOfonoVoiceCallSkeleton *skeleton = ORG_OFONO_VOICE_CALL_SKELETON (object);
1778 GList *connections, *l;
1779 GVariant *signal_variant;
1780 connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
1782 signal_variant = g_variant_ref_sink (g_variant_new ("(s@v)",
1785 for (l = connections; l != NULL; l = l->next)
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);
1792 g_variant_unref (signal_variant);
1793 g_list_free_full (connections, g_object_unref);
1797 _org_ofono_voice_call_on_signal_disconnect_reason (
1798 OrgOfonoVoiceCall *object,
1799 const gchar *arg_unnamed_arg0)
1801 OrgOfonoVoiceCallSkeleton *skeleton = ORG_OFONO_VOICE_CALL_SKELETON (object);
1803 GList *connections, *l;
1804 GVariant *signal_variant;
1805 connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
1807 signal_variant = g_variant_ref_sink (g_variant_new ("(s)",
1809 for (l = connections; l != NULL; l = l->next)
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);
1816 g_variant_unref (signal_variant);
1817 g_list_free_full (connections, g_object_unref);
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));
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));
1832 org_ofono_voice_call_skeleton_finalize (GObject *object)
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);
1844 org_ofono_voice_call_skeleton_init (OrgOfonoVoiceCallSkeleton *skeleton)
1846 #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
1847 skeleton->priv = org_ofono_voice_call_skeleton_get_instance_private (skeleton);
1849 skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, TYPE_ORG_OFONO_VOICE_CALL_SKELETON, OrgOfonoVoiceCallSkeletonPrivate);
1852 g_mutex_init (&skeleton->priv->lock);
1853 skeleton->priv->context = g_main_context_ref_thread_default ();
1857 org_ofono_voice_call_skeleton_class_init (OrgOfonoVoiceCallSkeletonClass *klass)
1859 GObjectClass *gobject_class;
1860 GDBusInterfaceSkeletonClass *skeleton_class;
1862 gobject_class = G_OBJECT_CLASS (klass);
1863 gobject_class->finalize = org_ofono_voice_call_skeleton_finalize;
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;
1871 #if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
1872 g_type_class_add_private (klass, sizeof (OrgOfonoVoiceCallSkeletonPrivate));
1877 org_ofono_voice_call_skeleton_iface_init (OrgOfonoVoiceCallIface *iface)
1879 iface->property_changed = _org_ofono_voice_call_on_signal_property_changed;
1880 iface->disconnect_reason = _org_ofono_voice_call_on_signal_disconnect_reason;
1884 * org_ofono_voice_call_skeleton_new:
1886 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-ofono-VoiceCall.top_of_page">org.ofono.VoiceCall</link>.
1888 * Returns: (transfer full) (type OrgOfonoVoiceCallSkeleton): The skeleton object.
1891 org_ofono_voice_call_skeleton_new (void)
1893 return ORG_OFONO_VOICE_CALL (g_object_new (TYPE_ORG_OFONO_VOICE_CALL_SKELETON, NULL));