summaryrefslogtreecommitdiffstats
path: root/src/dbus/audio_manager_interface.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dbus/audio_manager_interface.c')
-rw-r--r--src/dbus/audio_manager_interface.c194
1 files changed, 194 insertions, 0 deletions
diff --git a/src/dbus/audio_manager_interface.c b/src/dbus/audio_manager_interface.c
index c276d70..15ad786 100644
--- a/src/dbus/audio_manager_interface.c
+++ b/src/dbus/audio_manager_interface.c
@@ -542,6 +542,48 @@ static const _ExtendedGDBusMethodInfo _audiomanager_commandinterface_method_info
FALSE
};
+static const _ExtendedGDBusArgInfo _audiomanager_commandinterface_method_info_get_list_main_sources_OUT_ARG_result =
+{
+ {
+ -1,
+ (gchar *) "result",
+ (gchar *) "n",
+ NULL
+ },
+ FALSE
+};
+
+static const _ExtendedGDBusArgInfo _audiomanager_commandinterface_method_info_get_list_main_sources_OUT_ARG_listMainSources =
+{
+ {
+ -1,
+ (gchar *) "listMainSources",
+ (gchar *) "a(qs(nn)q)",
+ NULL
+ },
+ FALSE
+};
+
+static const _ExtendedGDBusArgInfo * const _audiomanager_commandinterface_method_info_get_list_main_sources_OUT_ARG_pointers[] =
+{
+ &_audiomanager_commandinterface_method_info_get_list_main_sources_OUT_ARG_result,
+ &_audiomanager_commandinterface_method_info_get_list_main_sources_OUT_ARG_listMainSources,
+ NULL
+};
+
+static const _ExtendedGDBusMethodInfo _audiomanager_commandinterface_method_info_get_list_main_sources =
+{
+ {
+ -1,
+ (gchar *) "GetListMainSources",
+ NULL,
+ (GDBusArgInfo **) &_audiomanager_commandinterface_method_info_get_list_main_sources_OUT_ARG_pointers,
+ NULL
+ },
+ "handle-get-list-main-sources",
+ FALSE
+};
+
static const _ExtendedGDBusMethodInfo * const _audiomanager_commandinterface_method_info_pointers[] =
{
&_audiomanager_commandinterface_method_info_connect,
@@ -551,6 +593,7 @@ static const _ExtendedGDBusMethodInfo * const _audiomanager_commandinterface_met
&_audiomanager_commandinterface_method_info_set_sink_mute_state,
&_audiomanager_commandinterface_method_info_get_list_main_connections,
&_audiomanager_commandinterface_method_info_get_list_main_sinks,
+ &_audiomanager_commandinterface_method_info_get_list_main_sources,
NULL
};
@@ -827,6 +870,7 @@ audiomanager_commandinterface_override_properties (GObjectClass *klass, guint pr
* @handle_disconnect: Handler for the #AudiomanagerCommandinterface::handle-disconnect signal.
* @handle_get_list_main_connections: Handler for the #AudiomanagerCommandinterface::handle-get-list-main-connections signal.
* @handle_get_list_main_sinks: Handler for the #AudiomanagerCommandinterface::handle-get-list-main-sinks signal.
+ * @handle_get_list_main_sources: Handler for the #AudiomanagerCommandinterface::handle-get-list-main-sources signal.
* @handle_set_sink_mute_state: Handler for the #AudiomanagerCommandinterface::handle-set-sink-mute-state signal.
* @handle_set_volume: Handler for the #AudiomanagerCommandinterface::handle-set-volume signal.
* @handle_volume_step: Handler for the #AudiomanagerCommandinterface::handle-volume-step signal.
@@ -1010,6 +1054,28 @@ audiomanager_commandinterface_default_init (AudiomanagerCommandinterfaceIface *i
1,
G_TYPE_DBUS_METHOD_INVOCATION);
+ /**
+ * AudiomanagerCommandinterface::handle-get-list-main-sources:
+ * @object: A #AudiomanagerCommandinterface.
+ * @invocation: A #GDBusMethodInvocation.
+ *
+ * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-genivi-audiomanager-commandinterface.GetListMainSources">GetListMainSources()</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 audiomanager_commandinterface_complete_get_list_main_sources() 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-get-list-main-sources",
+ G_TYPE_FROM_INTERFACE (iface),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (AudiomanagerCommandinterfaceIface, handle_get_list_main_sources),
+ g_signal_accumulator_true_handled,
+ NULL,
+ g_cclosure_marshal_generic,
+ G_TYPE_BOOLEAN,
+ 1,
+ G_TYPE_DBUS_METHOD_INVOCATION);
+
/* GObject signals for received D-Bus signals: */
/**
* AudiomanagerCommandinterface::new-main-connection:
@@ -1985,6 +2051,110 @@ _out:
}
/**
+ * audiomanager_commandinterface_call_get_list_main_sources:
+ * @proxy: A #AudiomanagerCommandinterfaceProxy.
+ * @cancellable: (allow-none): 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-genivi-audiomanager-commandinterface.GetListMainSources">GetListMainSources()</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.
+ * You can then call audiomanager_commandinterface_call_get_list_main_sources_finish() to get the result of the operation.
+ *
+ * See audiomanager_commandinterface_call_get_list_main_sources_sync() for the synchronous, blocking version of this method.
+ */
+void
+audiomanager_commandinterface_call_get_list_main_sources (
+ AudiomanagerCommandinterface *proxy,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ g_dbus_proxy_call (G_DBUS_PROXY (proxy),
+ "GetListMainSources",
+ g_variant_new ("()"),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ cancellable,
+ callback,
+ user_data);
+}
+
+/**
+ * audiomanager_commandinterface_call_get_list_main_sources_finish:
+ * @proxy: A #AudiomanagerCommandinterfaceProxy.
+ * @out_result: (out): Return location for return parameter or %NULL to ignore.
+ * @out_listMainSources: (out): Return location for return parameter or %NULL to ignore.
+ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to audiomanager_commandinterface_call_get_list_main_sources().
+ * @error: Return location for error or %NULL.
+ *
+ * Finishes an operation started with audiomanager_commandinterface_call_get_list_main_sources().
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+audiomanager_commandinterface_call_get_list_main_sources_finish (
+ AudiomanagerCommandinterface *proxy,
+ gint16 *out_result,
+ GVariant **out_listMainSources,
+ 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,
+ "(n@a(qs(nn)q))",
+ out_result,
+ out_listMainSources);
+ g_variant_unref (_ret);
+_out:
+ return _ret != NULL;
+}
+
+/**
+ * audiomanager_commandinterface_call_get_list_main_sources_sync:
+ * @proxy: A #AudiomanagerCommandinterfaceProxy.
+ * @out_result: (out): Return location for return parameter or %NULL to ignore.
+ * @out_listMainSources: (out): Return location for return parameter or %NULL to ignore.
+ * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @error: Return location for error or %NULL.
+ *
+ * Synchronously invokes the <link linkend="gdbus-method-org-genivi-audiomanager-commandinterface.GetListMainSources">GetListMainSources()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
+ *
+ * See audiomanager_commandinterface_call_get_list_main_sources() for the asynchronous version of this method.
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+audiomanager_commandinterface_call_get_list_main_sources_sync (
+ AudiomanagerCommandinterface *proxy,
+ gint16 *out_result,
+ GVariant **out_listMainSources,
+ GCancellable *cancellable,
+ GError **error)
+{
+ GVariant *_ret;
+ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
+ "GetListMainSources",
+ g_variant_new ("()"),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ cancellable,
+ error);
+ if (_ret == NULL)
+ goto _out;
+ g_variant_get (_ret,
+ "(n@a(qs(nn)q))",
+ out_result,
+ out_listMainSources);
+ g_variant_unref (_ret);
+_out:
+ return _ret != NULL;
+}
+
+/**
* audiomanager_commandinterface_complete_connect:
* @object: A #AudiomanagerCommandinterface.
* @invocation: (transfer full): A #GDBusMethodInvocation.
@@ -2140,6 +2310,30 @@ audiomanager_commandinterface_complete_get_list_main_sinks (
listMainSinks));
}
+/**
+ * audiomanager_commandinterface_complete_get_list_main_sources:
+ * @object: A #AudiomanagerCommandinterface.
+ * @invocation: (transfer full): A #GDBusMethodInvocation.
+ * @result: Parameter to return.
+ * @listMainSources: Parameter to return.
+ *
+ * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-genivi-audiomanager-commandinterface.GetListMainSources">GetListMainSources()</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
+audiomanager_commandinterface_complete_get_list_main_sources (
+ AudiomanagerCommandinterface *object,
+ GDBusMethodInvocation *invocation,
+ gint16 result,
+ GVariant *listMainSources)
+{
+ g_dbus_method_invocation_return_value (invocation,
+ g_variant_new ("(n@a(qs(nn)q))",
+ result,
+ listMainSources));
+}
+
/* ------------------------------------------------------------------------ */
/**