diff options
author | saman <mahmoudi.saman1@gmail.com> | 2020-10-12 08:56:02 +0330 |
---|---|---|
committer | saman <mahmoudi.saman1@gmail.com> | 2020-10-12 09:02:04 +0330 |
commit | 5762ff51fce596eadbd57522a6ab2978147cd830 (patch) | |
tree | 79b5c9cc02691cfcf0cc3ab91dd7dd201c620161 /binding/gdbus | |
parent | 17ce975cbe0b32326ee761718e91effad2b5169f (diff) |
Adding last call verb for calling last phone number
Initiates a new outgoing call for last phone number that was saved into phone
Change-Id: Iafd9259680f9bd83845220dc912d09cd4ecf53d6
Signed-off-by: saman <mahmoudi.saman1@gmail.com>
Diffstat (limited to 'binding/gdbus')
-rw-r--r-- | binding/gdbus/api/ofono_voicecallmanager.xml | 1 | ||||
-rw-r--r-- | binding/gdbus/ofono_voicecallmanager.c | 16 | ||||
-rw-r--r-- | binding/gdbus/ofono_voicecallmanager.h | 1 | ||||
-rw-r--r-- | binding/gdbus/ofono_voicecallmanager_interface.c | 301 | ||||
-rw-r--r-- | binding/gdbus/ofono_voicecallmanager_interface.h | 29 |
5 files changed, 270 insertions, 78 deletions
diff --git a/binding/gdbus/api/ofono_voicecallmanager.xml b/binding/gdbus/api/ofono_voicecallmanager.xml index 2a032f5..9ce90e2 100644 --- a/binding/gdbus/api/ofono_voicecallmanager.xml +++ b/binding/gdbus/api/ofono_voicecallmanager.xml @@ -11,6 +11,7 @@ <arg type="o" direction="out"/> </method> <method name="Transfer"/> + <method name="DialLast"/> <method name="SwapCalls"/> <method name="ReleaseAndAnswer"/> <method name="HoldAndAnswer"/> diff --git a/binding/gdbus/ofono_voicecallmanager.c b/binding/gdbus/ofono_voicecallmanager.c index 10d31d1..462ce08 100644 --- a/binding/gdbus/ofono_voicecallmanager.c +++ b/binding/gdbus/ofono_voicecallmanager.c @@ -147,6 +147,22 @@ gchar *ofono_voicecallmanager_dial(OrgOfonoVoiceCallManager *manager, return out; } +int ofono_voicecallmanager_last_dial(OrgOfonoVoiceCallManager *manager) +{ + GError *error = NULL; + + if (!manager) { + AFB_ERROR("Ofono VoiceCallmanager uninitialized\n"); + return NULL; + } + + org_ofono_voice_call_manager_call_dial_last_sync(manager, NULL, &error); + if (error != NULL) + return 0; + else + return -1; +} + void ofono_voicecallmanager_hangup_all(OrgOfonoVoiceCallManager *manager) { GError *error = NULL; diff --git a/binding/gdbus/ofono_voicecallmanager.h b/binding/gdbus/ofono_voicecallmanager.h index 81e4bb6..1a14111 100644 --- a/binding/gdbus/ofono_voicecallmanager.h +++ b/binding/gdbus/ofono_voicecallmanager.h @@ -25,4 +25,5 @@ OrgOfonoVoiceCallManager void(*)(OrgOfonoVoiceCallManager *, gchar *)); void ofono_voicecallmanager_free(OrgOfonoVoiceCallManager *); gchar *ofono_voicecallmanager_dial(OrgOfonoVoiceCallManager *, gchar *, gchar *); +int ofono_voicecallmanager_last_dial(OrgOfonoVoiceCallManager *manager); void ofono_hangup_all(OrgOfonoVoiceCallManager *); diff --git a/binding/gdbus/ofono_voicecallmanager_interface.c b/binding/gdbus/ofono_voicecallmanager_interface.c index 6552dbb..f0bdf70 100644 --- a/binding/gdbus/ofono_voicecallmanager_interface.c +++ b/binding/gdbus/ofono_voicecallmanager_interface.c @@ -1,8 +1,9 @@ /* - * Generated by gdbus-codegen 2.56.3. DO NOT EDIT. + * This file is generated by gdbus-codegen, do not modify it. * * The license of this code is the same as for the D-Bus interface description - * it was derived from. + * it was derived from. Note that it links to GLib, so must comply with the + * LGPL linking clauses. */ #ifdef HAVE_CONFIG_H @@ -39,7 +40,8 @@ typedef struct { GDBusPropertyInfo parent_struct; const gchar *hyphen_name; - gboolean use_gvariant; + guint use_gvariant : 1; + guint emits_changed_signal : 1; } _ExtendedGDBusPropertyInfo; typedef struct @@ -175,9 +177,9 @@ static const _ExtendedGDBusArgInfo _org_ofono_voice_call_manager_method_info_get FALSE }; -static const _ExtendedGDBusArgInfo * const _org_ofono_voice_call_manager_method_info_get_properties_OUT_ARG_pointers[] = +static const GDBusArgInfo * const _org_ofono_voice_call_manager_method_info_get_properties_OUT_ARG_pointers[] = { - &_org_ofono_voice_call_manager_method_info_get_properties_OUT_ARG_unnamed_arg0, + &_org_ofono_voice_call_manager_method_info_get_properties_OUT_ARG_unnamed_arg0.parent_struct, NULL }; @@ -216,10 +218,10 @@ static const _ExtendedGDBusArgInfo _org_ofono_voice_call_manager_method_info_dia FALSE }; -static const _ExtendedGDBusArgInfo * const _org_ofono_voice_call_manager_method_info_dial_IN_ARG_pointers[] = +static const GDBusArgInfo * const _org_ofono_voice_call_manager_method_info_dial_IN_ARG_pointers[] = { - &_org_ofono_voice_call_manager_method_info_dial_IN_ARG_unnamed_arg0, - &_org_ofono_voice_call_manager_method_info_dial_IN_ARG_unnamed_arg1, + &_org_ofono_voice_call_manager_method_info_dial_IN_ARG_unnamed_arg0.parent_struct, + &_org_ofono_voice_call_manager_method_info_dial_IN_ARG_unnamed_arg1.parent_struct, NULL }; @@ -234,9 +236,9 @@ static const _ExtendedGDBusArgInfo _org_ofono_voice_call_manager_method_info_dia FALSE }; -static const _ExtendedGDBusArgInfo * const _org_ofono_voice_call_manager_method_info_dial_OUT_ARG_pointers[] = +static const GDBusArgInfo * const _org_ofono_voice_call_manager_method_info_dial_OUT_ARG_pointers[] = { - &_org_ofono_voice_call_manager_method_info_dial_OUT_ARG_unnamed_arg2, + &_org_ofono_voice_call_manager_method_info_dial_OUT_ARG_unnamed_arg2.parent_struct, NULL }; @@ -266,6 +268,19 @@ static const _ExtendedGDBusMethodInfo _org_ofono_voice_call_manager_method_info_ FALSE }; +static const _ExtendedGDBusMethodInfo _org_ofono_voice_call_manager_method_info_dial_last = +{ + { + -1, + (gchar *) "DialLast", + NULL, + NULL, + NULL + }, + "handle-dial-last", + FALSE +}; + static const _ExtendedGDBusMethodInfo _org_ofono_voice_call_manager_method_info_swap_calls = { { @@ -329,9 +344,9 @@ static const _ExtendedGDBusArgInfo _org_ofono_voice_call_manager_method_info_pri FALSE }; -static const _ExtendedGDBusArgInfo * const _org_ofono_voice_call_manager_method_info_private_chat_IN_ARG_pointers[] = +static const GDBusArgInfo * const _org_ofono_voice_call_manager_method_info_private_chat_IN_ARG_pointers[] = { - &_org_ofono_voice_call_manager_method_info_private_chat_IN_ARG_unnamed_arg0, + &_org_ofono_voice_call_manager_method_info_private_chat_IN_ARG_unnamed_arg0.parent_struct, NULL }; @@ -346,9 +361,9 @@ static const _ExtendedGDBusArgInfo _org_ofono_voice_call_manager_method_info_pri FALSE }; -static const _ExtendedGDBusArgInfo * const _org_ofono_voice_call_manager_method_info_private_chat_OUT_ARG_pointers[] = +static const GDBusArgInfo * const _org_ofono_voice_call_manager_method_info_private_chat_OUT_ARG_pointers[] = { - &_org_ofono_voice_call_manager_method_info_private_chat_OUT_ARG_unnamed_arg1, + &_org_ofono_voice_call_manager_method_info_private_chat_OUT_ARG_unnamed_arg1.parent_struct, NULL }; @@ -376,9 +391,9 @@ static const _ExtendedGDBusArgInfo _org_ofono_voice_call_manager_method_info_cre FALSE }; -static const _ExtendedGDBusArgInfo * const _org_ofono_voice_call_manager_method_info_create_multiparty_OUT_ARG_pointers[] = +static const GDBusArgInfo * const _org_ofono_voice_call_manager_method_info_create_multiparty_OUT_ARG_pointers[] = { - &_org_ofono_voice_call_manager_method_info_create_multiparty_OUT_ARG_unnamed_arg0, + &_org_ofono_voice_call_manager_method_info_create_multiparty_OUT_ARG_unnamed_arg0.parent_struct, NULL }; @@ -419,9 +434,9 @@ static const _ExtendedGDBusArgInfo _org_ofono_voice_call_manager_method_info_sen FALSE }; -static const _ExtendedGDBusArgInfo * const _org_ofono_voice_call_manager_method_info_send_tones_IN_ARG_pointers[] = +static const GDBusArgInfo * const _org_ofono_voice_call_manager_method_info_send_tones_IN_ARG_pointers[] = { - &_org_ofono_voice_call_manager_method_info_send_tones_IN_ARG_unnamed_arg0, + &_org_ofono_voice_call_manager_method_info_send_tones_IN_ARG_unnamed_arg0.parent_struct, NULL }; @@ -449,9 +464,9 @@ static const _ExtendedGDBusArgInfo _org_ofono_voice_call_manager_method_info_get FALSE }; -static const _ExtendedGDBusArgInfo * const _org_ofono_voice_call_manager_method_info_get_calls_OUT_ARG_pointers[] = +static const GDBusArgInfo * const _org_ofono_voice_call_manager_method_info_get_calls_OUT_ARG_pointers[] = { - &_org_ofono_voice_call_manager_method_info_get_calls_OUT_ARG_unnamed_arg0, + &_org_ofono_voice_call_manager_method_info_get_calls_OUT_ARG_unnamed_arg0.parent_struct, NULL }; @@ -468,20 +483,21 @@ static const _ExtendedGDBusMethodInfo _org_ofono_voice_call_manager_method_info_ FALSE }; -static const _ExtendedGDBusMethodInfo * const _org_ofono_voice_call_manager_method_info_pointers[] = -{ - &_org_ofono_voice_call_manager_method_info_get_properties, - &_org_ofono_voice_call_manager_method_info_dial, - &_org_ofono_voice_call_manager_method_info_transfer, - &_org_ofono_voice_call_manager_method_info_swap_calls, - &_org_ofono_voice_call_manager_method_info_release_and_answer, - &_org_ofono_voice_call_manager_method_info_hold_and_answer, - &_org_ofono_voice_call_manager_method_info_hangup_all, - &_org_ofono_voice_call_manager_method_info_private_chat, - &_org_ofono_voice_call_manager_method_info_create_multiparty, - &_org_ofono_voice_call_manager_method_info_hangup_multiparty, - &_org_ofono_voice_call_manager_method_info_send_tones, - &_org_ofono_voice_call_manager_method_info_get_calls, +static const GDBusMethodInfo * const _org_ofono_voice_call_manager_method_info_pointers[] = +{ + &_org_ofono_voice_call_manager_method_info_get_properties.parent_struct, + &_org_ofono_voice_call_manager_method_info_dial.parent_struct, + &_org_ofono_voice_call_manager_method_info_transfer.parent_struct, + &_org_ofono_voice_call_manager_method_info_dial_last.parent_struct, + &_org_ofono_voice_call_manager_method_info_swap_calls.parent_struct, + &_org_ofono_voice_call_manager_method_info_release_and_answer.parent_struct, + &_org_ofono_voice_call_manager_method_info_hold_and_answer.parent_struct, + &_org_ofono_voice_call_manager_method_info_hangup_all.parent_struct, + &_org_ofono_voice_call_manager_method_info_private_chat.parent_struct, + &_org_ofono_voice_call_manager_method_info_create_multiparty.parent_struct, + &_org_ofono_voice_call_manager_method_info_hangup_multiparty.parent_struct, + &_org_ofono_voice_call_manager_method_info_send_tones.parent_struct, + &_org_ofono_voice_call_manager_method_info_get_calls.parent_struct, NULL }; @@ -507,10 +523,10 @@ static const _ExtendedGDBusArgInfo _org_ofono_voice_call_manager_signal_info_pro FALSE }; -static const _ExtendedGDBusArgInfo * const _org_ofono_voice_call_manager_signal_info_property_changed_ARG_pointers[] = +static const GDBusArgInfo * const _org_ofono_voice_call_manager_signal_info_property_changed_ARG_pointers[] = { - &_org_ofono_voice_call_manager_signal_info_property_changed_ARG_unnamed_arg0, - &_org_ofono_voice_call_manager_signal_info_property_changed_ARG_unnamed_arg1, + &_org_ofono_voice_call_manager_signal_info_property_changed_ARG_unnamed_arg0.parent_struct, + &_org_ofono_voice_call_manager_signal_info_property_changed_ARG_unnamed_arg1.parent_struct, NULL }; @@ -547,10 +563,10 @@ static const _ExtendedGDBusArgInfo _org_ofono_voice_call_manager_signal_info_cal FALSE }; -static const _ExtendedGDBusArgInfo * const _org_ofono_voice_call_manager_signal_info_call_added_ARG_pointers[] = +static const GDBusArgInfo * const _org_ofono_voice_call_manager_signal_info_call_added_ARG_pointers[] = { - &_org_ofono_voice_call_manager_signal_info_call_added_ARG_unnamed_arg0, - &_org_ofono_voice_call_manager_signal_info_call_added_ARG_unnamed_arg1, + &_org_ofono_voice_call_manager_signal_info_call_added_ARG_unnamed_arg0.parent_struct, + &_org_ofono_voice_call_manager_signal_info_call_added_ARG_unnamed_arg1.parent_struct, NULL }; @@ -576,9 +592,9 @@ static const _ExtendedGDBusArgInfo _org_ofono_voice_call_manager_signal_info_cal FALSE }; -static const _ExtendedGDBusArgInfo * const _org_ofono_voice_call_manager_signal_info_call_removed_ARG_pointers[] = +static const GDBusArgInfo * const _org_ofono_voice_call_manager_signal_info_call_removed_ARG_pointers[] = { - &_org_ofono_voice_call_manager_signal_info_call_removed_ARG_unnamed_arg0, + &_org_ofono_voice_call_manager_signal_info_call_removed_ARG_unnamed_arg0.parent_struct, NULL }; @@ -604,9 +620,9 @@ static const _ExtendedGDBusArgInfo _org_ofono_voice_call_manager_signal_info_bar FALSE }; -static const _ExtendedGDBusArgInfo * const _org_ofono_voice_call_manager_signal_info_barring_active_ARG_pointers[] = +static const GDBusArgInfo * const _org_ofono_voice_call_manager_signal_info_barring_active_ARG_pointers[] = { - &_org_ofono_voice_call_manager_signal_info_barring_active_ARG_unnamed_arg0, + &_org_ofono_voice_call_manager_signal_info_barring_active_ARG_unnamed_arg0.parent_struct, NULL }; @@ -632,9 +648,9 @@ static const _ExtendedGDBusArgInfo _org_ofono_voice_call_manager_signal_info_for FALSE }; -static const _ExtendedGDBusArgInfo * const _org_ofono_voice_call_manager_signal_info_forwarded_ARG_pointers[] = +static const GDBusArgInfo * const _org_ofono_voice_call_manager_signal_info_forwarded_ARG_pointers[] = { - &_org_ofono_voice_call_manager_signal_info_forwarded_ARG_unnamed_arg0, + &_org_ofono_voice_call_manager_signal_info_forwarded_ARG_unnamed_arg0.parent_struct, NULL }; @@ -649,13 +665,13 @@ static const _ExtendedGDBusSignalInfo _org_ofono_voice_call_manager_signal_info_ "forwarded" }; -static const _ExtendedGDBusSignalInfo * const _org_ofono_voice_call_manager_signal_info_pointers[] = +static const GDBusSignalInfo * const _org_ofono_voice_call_manager_signal_info_pointers[] = { - &_org_ofono_voice_call_manager_signal_info_property_changed, - &_org_ofono_voice_call_manager_signal_info_call_added, - &_org_ofono_voice_call_manager_signal_info_call_removed, - &_org_ofono_voice_call_manager_signal_info_barring_active, - &_org_ofono_voice_call_manager_signal_info_forwarded, + &_org_ofono_voice_call_manager_signal_info_property_changed.parent_struct, + &_org_ofono_voice_call_manager_signal_info_call_added.parent_struct, + &_org_ofono_voice_call_manager_signal_info_call_removed.parent_struct, + &_org_ofono_voice_call_manager_signal_info_barring_active.parent_struct, + &_org_ofono_voice_call_manager_signal_info_forwarded.parent_struct, NULL }; @@ -715,6 +731,7 @@ org_ofono_voice_call_manager_override_properties (GObjectClass *klass, guint pro * @parent_iface: The parent interface. * @handle_create_multiparty: Handler for the #OrgOfonoVoiceCallManager::handle-create-multiparty signal. * @handle_dial: Handler for the #OrgOfonoVoiceCallManager::handle-dial signal. + * @handle_dial_last: Handler for the #OrgOfonoVoiceCallManager::handle-dial-last signal. * @handle_get_calls: Handler for the #OrgOfonoVoiceCallManager::handle-get-calls signal. * @handle_get_properties: Handler for the #OrgOfonoVoiceCallManager::handle-get-properties signal. * @handle_hangup_all: Handler for the #OrgOfonoVoiceCallManager::handle-hangup-all signal. @@ -810,6 +827,28 @@ org_ofono_voice_call_manager_default_init (OrgOfonoVoiceCallManagerIface *iface) G_TYPE_DBUS_METHOD_INVOCATION); /** + * OrgOfonoVoiceCallManager::handle-dial-last: + * @object: A #OrgOfonoVoiceCallManager. + * @invocation: A #GDBusMethodInvocation. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-ofono-VoiceCallManager.DialLast">DialLast()</link> D-Bus method. + * + * 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_manager_complete_dial_last() 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. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-dial-last", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (OrgOfonoVoiceCallManagerIface, handle_dial_last), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 1, + G_TYPE_DBUS_METHOD_INVOCATION); + + /** * OrgOfonoVoiceCallManager::handle-swap-calls: * @object: A #OrgOfonoVoiceCallManager. * @invocation: A #GDBusMethodInvocation. @@ -1196,7 +1235,7 @@ org_ofono_voice_call_manager_emit_forwarded ( * @user_data: User data to pass to @callback. * * Asynchronously invokes the <link linkend="gdbus-method-org-ofono-VoiceCallManager.GetProperties">GetProperties()</link> D-Bus method on @proxy. - * 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. + * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). * You can then call org_ofono_voice_call_manager_call_get_properties_finish() to get the result of the operation. * * See org_ofono_voice_call_manager_call_get_properties_sync() for the synchronous, blocking version of this method. @@ -1221,7 +1260,7 @@ org_ofono_voice_call_manager_call_get_properties ( /** * org_ofono_voice_call_manager_call_get_properties_finish: * @proxy: A #OrgOfonoVoiceCallManagerProxy. - * @out_unnamed_arg0: (out): Return location for return parameter or %NULL to ignore. + * @out_unnamed_arg0: (out) (optional): Return location for return parameter or %NULL to ignore. * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to org_ofono_voice_call_manager_call_get_properties(). * @error: Return location for error or %NULL. * @@ -1251,7 +1290,7 @@ _out: /** * org_ofono_voice_call_manager_call_get_properties_sync: * @proxy: A #OrgOfonoVoiceCallManagerProxy. - * @out_unnamed_arg0: (out): Return location for return parameter or %NULL to ignore. + * @out_unnamed_arg0: (out) (optional): Return location for return parameter or %NULL to ignore. * @cancellable: (nullable): A #GCancellable or %NULL. * @error: Return location for error or %NULL. * @@ -1296,7 +1335,7 @@ _out: * @user_data: User data to pass to @callback. * * Asynchronously invokes the <link linkend="gdbus-method-org-ofono-VoiceCallManager.Dial">Dial()</link> D-Bus method on @proxy. - * 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. + * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). * You can then call org_ofono_voice_call_manager_call_dial_finish() to get the result of the operation. * * See org_ofono_voice_call_manager_call_dial_sync() for the synchronous, blocking version of this method. @@ -1325,7 +1364,7 @@ org_ofono_voice_call_manager_call_dial ( /** * org_ofono_voice_call_manager_call_dial_finish: * @proxy: A #OrgOfonoVoiceCallManagerProxy. - * @out_unnamed_arg2: (out): Return location for return parameter or %NULL to ignore. + * @out_unnamed_arg2: (out) (optional): Return location for return parameter or %NULL to ignore. * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to org_ofono_voice_call_manager_call_dial(). * @error: Return location for error or %NULL. * @@ -1357,7 +1396,7 @@ _out: * @proxy: A #OrgOfonoVoiceCallManagerProxy. * @arg_unnamed_arg0: Argument to pass with the method invocation. * @arg_unnamed_arg1: Argument to pass with the method invocation. - * @out_unnamed_arg2: (out): Return location for return parameter or %NULL to ignore. + * @out_unnamed_arg2: (out) (optional): Return location for return parameter or %NULL to ignore. * @cancellable: (nullable): A #GCancellable or %NULL. * @error: Return location for error or %NULL. * @@ -1404,7 +1443,7 @@ _out: * @user_data: User data to pass to @callback. * * Asynchronously invokes the <link linkend="gdbus-method-org-ofono-VoiceCallManager.Transfer">Transfer()</link> D-Bus method on @proxy. - * 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. + * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). * You can then call org_ofono_voice_call_manager_call_transfer_finish() to get the result of the operation. * * See org_ofono_voice_call_manager_call_transfer_sync() for the synchronous, blocking version of this method. @@ -1489,6 +1528,98 @@ _out: } /** + * org_ofono_voice_call_manager_call_dial_last: + * @proxy: A #OrgOfonoVoiceCallManagerProxy. + * @cancellable: (nullable): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-ofono-VoiceCallManager.DialLast">DialLast()</link> D-Bus method on @proxy. + * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). + * You can then call org_ofono_voice_call_manager_call_dial_last_finish() to get the result of the operation. + * + * See org_ofono_voice_call_manager_call_dial_last_sync() for the synchronous, blocking version of this method. + */ +void +org_ofono_voice_call_manager_call_dial_last ( + OrgOfonoVoiceCallManager *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "DialLast", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * org_ofono_voice_call_manager_call_dial_last_finish: + * @proxy: A #OrgOfonoVoiceCallManagerProxy. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to org_ofono_voice_call_manager_call_dial_last(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with org_ofono_voice_call_manager_call_dial_last(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +org_ofono_voice_call_manager_call_dial_last_finish ( + OrgOfonoVoiceCallManager *proxy, + GAsyncResult *res, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "()"); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * org_ofono_voice_call_manager_call_dial_last_sync: + * @proxy: A #OrgOfonoVoiceCallManagerProxy. + * @cancellable: (nullable): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-ofono-VoiceCallManager.DialLast">DialLast()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See org_ofono_voice_call_manager_call_dial_last() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +org_ofono_voice_call_manager_call_dial_last_sync ( + OrgOfonoVoiceCallManager *proxy, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "DialLast", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "()"); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** * org_ofono_voice_call_manager_call_swap_calls: * @proxy: A #OrgOfonoVoiceCallManagerProxy. * @cancellable: (nullable): A #GCancellable or %NULL. @@ -1496,7 +1627,7 @@ _out: * @user_data: User data to pass to @callback. * * Asynchronously invokes the <link linkend="gdbus-method-org-ofono-VoiceCallManager.SwapCalls">SwapCalls()</link> D-Bus method on @proxy. - * 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. + * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). * You can then call org_ofono_voice_call_manager_call_swap_calls_finish() to get the result of the operation. * * See org_ofono_voice_call_manager_call_swap_calls_sync() for the synchronous, blocking version of this method. @@ -1588,7 +1719,7 @@ _out: * @user_data: User data to pass to @callback. * * Asynchronously invokes the <link linkend="gdbus-method-org-ofono-VoiceCallManager.ReleaseAndAnswer">ReleaseAndAnswer()</link> D-Bus method on @proxy. - * 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. + * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). * You can then call org_ofono_voice_call_manager_call_release_and_answer_finish() to get the result of the operation. * * See org_ofono_voice_call_manager_call_release_and_answer_sync() for the synchronous, blocking version of this method. @@ -1680,7 +1811,7 @@ _out: * @user_data: User data to pass to @callback. * * Asynchronously invokes the <link linkend="gdbus-method-org-ofono-VoiceCallManager.HoldAndAnswer">HoldAndAnswer()</link> D-Bus method on @proxy. - * 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. + * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). * You can then call org_ofono_voice_call_manager_call_hold_and_answer_finish() to get the result of the operation. * * See org_ofono_voice_call_manager_call_hold_and_answer_sync() for the synchronous, blocking version of this method. @@ -1772,7 +1903,7 @@ _out: * @user_data: User data to pass to @callback. * * Asynchronously invokes the <link linkend="gdbus-method-org-ofono-VoiceCallManager.HangupAll">HangupAll()</link> D-Bus method on @proxy. - * 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. + * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). * You can then call org_ofono_voice_call_manager_call_hangup_all_finish() to get the result of the operation. * * See org_ofono_voice_call_manager_call_hangup_all_sync() for the synchronous, blocking version of this method. @@ -1865,7 +1996,7 @@ _out: * @user_data: User data to pass to @callback. * * Asynchronously invokes the <link linkend="gdbus-method-org-ofono-VoiceCallManager.PrivateChat">PrivateChat()</link> D-Bus method on @proxy. - * 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. + * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). * You can then call org_ofono_voice_call_manager_call_private_chat_finish() to get the result of the operation. * * See org_ofono_voice_call_manager_call_private_chat_sync() for the synchronous, blocking version of this method. @@ -1892,7 +2023,7 @@ org_ofono_voice_call_manager_call_private_chat ( /** * org_ofono_voice_call_manager_call_private_chat_finish: * @proxy: A #OrgOfonoVoiceCallManagerProxy. - * @out_unnamed_arg1: (out) (array zero-terminated=1): Return location for return parameter or %NULL to ignore. + * @out_unnamed_arg1: (out) (optional) (array zero-terminated=1): Return location for return parameter or %NULL to ignore. * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to org_ofono_voice_call_manager_call_private_chat(). * @error: Return location for error or %NULL. * @@ -1923,7 +2054,7 @@ _out: * org_ofono_voice_call_manager_call_private_chat_sync: * @proxy: A #OrgOfonoVoiceCallManagerProxy. * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @out_unnamed_arg1: (out) (array zero-terminated=1): Return location for return parameter or %NULL to ignore. + * @out_unnamed_arg1: (out) (optional) (array zero-terminated=1): Return location for return parameter or %NULL to ignore. * @cancellable: (nullable): A #GCancellable or %NULL. * @error: Return location for error or %NULL. * @@ -1968,7 +2099,7 @@ _out: * @user_data: User data to pass to @callback. * * Asynchronously invokes the <link linkend="gdbus-method-org-ofono-VoiceCallManager.CreateMultiparty">CreateMultiparty()</link> D-Bus method on @proxy. - * 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. + * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). * You can then call org_ofono_voice_call_manager_call_create_multiparty_finish() to get the result of the operation. * * See org_ofono_voice_call_manager_call_create_multiparty_sync() for the synchronous, blocking version of this method. @@ -1993,7 +2124,7 @@ org_ofono_voice_call_manager_call_create_multiparty ( /** * org_ofono_voice_call_manager_call_create_multiparty_finish: * @proxy: A #OrgOfonoVoiceCallManagerProxy. - * @out_unnamed_arg0: (out) (array zero-terminated=1): Return location for return parameter or %NULL to ignore. + * @out_unnamed_arg0: (out) (optional) (array zero-terminated=1): Return location for return parameter or %NULL to ignore. * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to org_ofono_voice_call_manager_call_create_multiparty(). * @error: Return location for error or %NULL. * @@ -2023,7 +2154,7 @@ _out: /** * org_ofono_voice_call_manager_call_create_multiparty_sync: * @proxy: A #OrgOfonoVoiceCallManagerProxy. - * @out_unnamed_arg0: (out) (array zero-terminated=1): Return location for return parameter or %NULL to ignore. + * @out_unnamed_arg0: (out) (optional) (array zero-terminated=1): Return location for return parameter or %NULL to ignore. * @cancellable: (nullable): A #GCancellable or %NULL. * @error: Return location for error or %NULL. * @@ -2066,7 +2197,7 @@ _out: * @user_data: User data to pass to @callback. * * Asynchronously invokes the <link linkend="gdbus-method-org-ofono-VoiceCallManager.HangupMultiparty">HangupMultiparty()</link> D-Bus method on @proxy. - * 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. + * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). * You can then call org_ofono_voice_call_manager_call_hangup_multiparty_finish() to get the result of the operation. * * See org_ofono_voice_call_manager_call_hangup_multiparty_sync() for the synchronous, blocking version of this method. @@ -2159,7 +2290,7 @@ _out: * @user_data: User data to pass to @callback. * * Asynchronously invokes the <link linkend="gdbus-method-org-ofono-VoiceCallManager.SendTones">SendTones()</link> D-Bus method on @proxy. - * 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. + * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). * You can then call org_ofono_voice_call_manager_call_send_tones_finish() to get the result of the operation. * * See org_ofono_voice_call_manager_call_send_tones_sync() for the synchronous, blocking version of this method. @@ -2256,7 +2387,7 @@ _out: * @user_data: User data to pass to @callback. * * Asynchronously invokes the <link linkend="gdbus-method-org-ofono-VoiceCallManager.GetCalls">GetCalls()</link> D-Bus method on @proxy. - * 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. + * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). * You can then call org_ofono_voice_call_manager_call_get_calls_finish() to get the result of the operation. * * See org_ofono_voice_call_manager_call_get_calls_sync() for the synchronous, blocking version of this method. @@ -2281,7 +2412,7 @@ org_ofono_voice_call_manager_call_get_calls ( /** * org_ofono_voice_call_manager_call_get_calls_finish: * @proxy: A #OrgOfonoVoiceCallManagerProxy. - * @out_unnamed_arg0: (out): Return location for return parameter or %NULL to ignore. + * @out_unnamed_arg0: (out) (optional): Return location for return parameter or %NULL to ignore. * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to org_ofono_voice_call_manager_call_get_calls(). * @error: Return location for error or %NULL. * @@ -2311,7 +2442,7 @@ _out: /** * org_ofono_voice_call_manager_call_get_calls_sync: * @proxy: A #OrgOfonoVoiceCallManagerProxy. - * @out_unnamed_arg0: (out): Return location for return parameter or %NULL to ignore. + * @out_unnamed_arg0: (out) (optional): Return location for return parameter or %NULL to ignore. * @cancellable: (nullable): A #GCancellable or %NULL. * @error: Return location for error or %NULL. * @@ -2407,6 +2538,24 @@ org_ofono_voice_call_manager_complete_transfer ( } /** + * org_ofono_voice_call_manager_complete_dial_last: + * @object: A #OrgOfonoVoiceCallManager. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-ofono-VoiceCallManager.DialLast">DialLast()</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. + * + * This method will free @invocation, you cannot use it afterwards. + */ +void +org_ofono_voice_call_manager_complete_dial_last ( + OrgOfonoVoiceCallManager *object, + GDBusMethodInvocation *invocation) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("()")); +} + +/** * org_ofono_voice_call_manager_complete_swap_calls: * @object: A #OrgOfonoVoiceCallManager. * @invocation: (transfer full): A #GDBusMethodInvocation. @@ -2752,7 +2901,7 @@ org_ofono_voice_call_manager_proxy_iface_init (OrgOfonoVoiceCallManagerIface *if * * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-ofono-VoiceCallManager.top_of_page">org.ofono.VoiceCallManager</link>. See g_dbus_proxy_new() for more details. * - * 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. + * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). * You can then call org_ofono_voice_call_manager_proxy_new_finish() to get the result of the operation. * * See org_ofono_voice_call_manager_proxy_new_sync() for the synchronous, blocking version of this constructor. @@ -2842,7 +2991,7 @@ org_ofono_voice_call_manager_proxy_new_sync ( * * Like org_ofono_voice_call_manager_proxy_new() but takes a #GBusType instead of a #GDBusConnection. * - * 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. + * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). * You can then call org_ofono_voice_call_manager_proxy_new_for_bus_finish() to get the result of the operation. * * See org_ofono_voice_call_manager_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor. diff --git a/binding/gdbus/ofono_voicecallmanager_interface.h b/binding/gdbus/ofono_voicecallmanager_interface.h index e05fdea..de5c3ce 100644 --- a/binding/gdbus/ofono_voicecallmanager_interface.h +++ b/binding/gdbus/ofono_voicecallmanager_interface.h @@ -1,8 +1,9 @@ /* - * Generated by gdbus-codegen 2.56.3. DO NOT EDIT. + * This file is generated by gdbus-codegen, do not modify it. * * The license of this code is the same as for the D-Bus interface description - * it was derived from. + * it was derived from. Note that it links to GLib, so must comply with the + * LGPL linking clauses. */ #ifndef __OFONO_VOICECALLMANAGER_INTERFACE_H__ @@ -40,6 +41,10 @@ struct _OrgOfonoVoiceCallManagerIface const gchar *arg_unnamed_arg0, const gchar *arg_unnamed_arg1); + gboolean (*handle_dial_last) ( + OrgOfonoVoiceCallManager *object, + GDBusMethodInvocation *invocation); + gboolean (*handle_get_calls) ( OrgOfonoVoiceCallManager *object, GDBusMethodInvocation *invocation); @@ -127,6 +132,10 @@ void org_ofono_voice_call_manager_complete_transfer ( OrgOfonoVoiceCallManager *object, GDBusMethodInvocation *invocation); +void org_ofono_voice_call_manager_complete_dial_last ( + OrgOfonoVoiceCallManager *object, + GDBusMethodInvocation *invocation); + void org_ofono_voice_call_manager_complete_swap_calls ( OrgOfonoVoiceCallManager *object, GDBusMethodInvocation *invocation); @@ -250,6 +259,22 @@ gboolean org_ofono_voice_call_manager_call_transfer_sync ( GCancellable *cancellable, GError **error); +void org_ofono_voice_call_manager_call_dial_last ( + OrgOfonoVoiceCallManager *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean org_ofono_voice_call_manager_call_dial_last_finish ( + OrgOfonoVoiceCallManager *proxy, + GAsyncResult *res, + GError **error); + +gboolean org_ofono_voice_call_manager_call_dial_last_sync ( + OrgOfonoVoiceCallManager *proxy, + GCancellable *cancellable, + GError **error); + void org_ofono_voice_call_manager_call_swap_calls ( OrgOfonoVoiceCallManager *proxy, GCancellable *cancellable, |