From 9a77d2f81d693d64b63d38be7214626dedf91e11 Mon Sep 17 00:00:00 2001 From: Tanu Kaskinen Date: Tue, 21 Jul 2009 00:04:52 +0300 Subject: Add the forgotten src/modules/dbus directory to git. --- src/modules/dbus/iface-core.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/modules/dbus/iface-core.h (limited to 'src/modules/dbus/iface-core.h') diff --git a/src/modules/dbus/iface-core.h b/src/modules/dbus/iface-core.h new file mode 100644 index 00000000..964a37bd --- /dev/null +++ b/src/modules/dbus/iface-core.h @@ -0,0 +1,38 @@ +#ifndef foodbusifacecorehfoo +#define foodbusifacecorehfoo + +/*** + This file is part of PulseAudio. + + Copyright 2009 Tanu Kaskinen + + PulseAudio is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of the License, + or (at your option) any later version. + + PulseAudio is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with PulseAudio; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + USA. +***/ + +/* This object implements the D-Bus interface org.PulseAudio.Core1. + * + * See http://pulseaudio.org/wiki/DBusInterface for the Core interface + * documentation. + */ + +#include + +typedef struct pa_dbusiface_core pa_dbusiface_core; + +pa_dbusiface_core *pa_dbusiface_core_new(pa_core *core); +void pa_dbusiface_core_free(pa_dbusiface_core *c); + +#endif -- cgit From 8966c61d3343e13502cfa210bb7123b7d7e7b27e Mon Sep 17 00:00:00 2001 From: Tanu Kaskinen Date: Tue, 4 Aug 2009 17:50:18 +0300 Subject: dbusiface-core: Make the interface string a public constant. --- src/modules/dbus/iface-core.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/modules/dbus/iface-core.h') diff --git a/src/modules/dbus/iface-core.h b/src/modules/dbus/iface-core.h index 964a37bd..6c5191b9 100644 --- a/src/modules/dbus/iface-core.h +++ b/src/modules/dbus/iface-core.h @@ -30,6 +30,8 @@ #include +#define PA_DBUSIFACE_CORE_INTERFACE "org.PulseAudio.Core1" + typedef struct pa_dbusiface_core pa_dbusiface_core; pa_dbusiface_core *pa_dbusiface_core_new(pa_core *core); -- cgit From fcf68752e687123a171b1144f78f8eba1625a204 Mon Sep 17 00:00:00 2001 From: Tanu Kaskinen Date: Sun, 9 Aug 2009 08:37:33 +0300 Subject: dbus: Three entangled changes: * Make the dbus object constructors take a pa_dbusiface_core pointer as an argument. Remove the path_prefix argument. * Expose the core object path as a constant in protocol-dbus.h. * Move the core interface name constant from iface-core.h to protocol-dbus.h. --- src/modules/dbus/iface-core.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/modules/dbus/iface-core.h') diff --git a/src/modules/dbus/iface-core.h b/src/modules/dbus/iface-core.h index 6c5191b9..964a37bd 100644 --- a/src/modules/dbus/iface-core.h +++ b/src/modules/dbus/iface-core.h @@ -30,8 +30,6 @@ #include -#define PA_DBUSIFACE_CORE_INTERFACE "org.PulseAudio.Core1" - typedef struct pa_dbusiface_core pa_dbusiface_core; pa_dbusiface_core *pa_dbusiface_core_new(pa_core *core); -- cgit From 5ece8e8833ff40a4c535fc7d6705377fcf7fd0fd Mon Sep 17 00:00:00 2001 From: Tanu Kaskinen Date: Sun, 9 Aug 2009 09:10:05 +0300 Subject: dbusiface-core: Add functions for getting various object paths. --- src/modules/dbus/iface-core.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/modules/dbus/iface-core.h') diff --git a/src/modules/dbus/iface-core.h b/src/modules/dbus/iface-core.h index 964a37bd..1b73782f 100644 --- a/src/modules/dbus/iface-core.h +++ b/src/modules/dbus/iface-core.h @@ -35,4 +35,8 @@ typedef struct pa_dbusiface_core pa_dbusiface_core; pa_dbusiface_core *pa_dbusiface_core_new(pa_core *core); void pa_dbusiface_core_free(pa_dbusiface_core *c); +const char *pa_dbusiface_core_get_sink_path(pa_dbusiface_core *c, const pa_sink *sink); +const char *pa_dbusiface_core_get_source_path(pa_dbusiface_core *c, const pa_source *source); +const char *pa_dbusiface_core_get_module_path(pa_dbusiface_core *c, const pa_module *module); + #endif -- cgit From 1e65d8d35b23d3c76a30155c42bec282257579e5 Mon Sep 17 00:00:00 2001 From: Tanu Kaskinen Date: Sat, 15 Aug 2009 06:11:38 +0300 Subject: dbusiface-core: New function: pa_dbusiface_core_get_card_path(). --- src/modules/dbus/iface-core.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/modules/dbus/iface-core.h') diff --git a/src/modules/dbus/iface-core.h b/src/modules/dbus/iface-core.h index 1b73782f..70102054 100644 --- a/src/modules/dbus/iface-core.h +++ b/src/modules/dbus/iface-core.h @@ -35,6 +35,7 @@ typedef struct pa_dbusiface_core pa_dbusiface_core; pa_dbusiface_core *pa_dbusiface_core_new(pa_core *core); void pa_dbusiface_core_free(pa_dbusiface_core *c); +const char *pa_dbusiface_core_get_card_path(pa_dbusiface_core *c, const pa_card *card); const char *pa_dbusiface_core_get_sink_path(pa_dbusiface_core *c, const pa_sink *sink); const char *pa_dbusiface_core_get_source_path(pa_dbusiface_core *c, const pa_source *source); const char *pa_dbusiface_core_get_module_path(pa_dbusiface_core *c, const pa_module *module); -- cgit From f663d13acd306feafe2526c6a9258f14fd5d2ffc Mon Sep 17 00:00:00 2001 From: Tanu Kaskinen Date: Sat, 15 Aug 2009 16:54:11 +0300 Subject: dbusiface-core: Two new functions: pa_dbusiface_core_get_playback/record_stream_path(). --- src/modules/dbus/iface-core.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/modules/dbus/iface-core.h') diff --git a/src/modules/dbus/iface-core.h b/src/modules/dbus/iface-core.h index 70102054..14dff7eb 100644 --- a/src/modules/dbus/iface-core.h +++ b/src/modules/dbus/iface-core.h @@ -38,6 +38,8 @@ void pa_dbusiface_core_free(pa_dbusiface_core *c); const char *pa_dbusiface_core_get_card_path(pa_dbusiface_core *c, const pa_card *card); const char *pa_dbusiface_core_get_sink_path(pa_dbusiface_core *c, const pa_sink *sink); const char *pa_dbusiface_core_get_source_path(pa_dbusiface_core *c, const pa_source *source); +const char *pa_dbusiface_core_get_playback_stream_path(pa_dbusiface_core *c, const pa_sink_input *sink_input); +const char *pa_dbusiface_core_get_record_stream_path(pa_dbusiface_core *c, const pa_source_output *source_output); const char *pa_dbusiface_core_get_module_path(pa_dbusiface_core *c, const pa_module *module); #endif -- cgit From a10e8360d72626635de1242cfc2c77207f13d56f Mon Sep 17 00:00:00 2001 From: Tanu Kaskinen Date: Mon, 17 Aug 2009 16:42:06 +0300 Subject: dbusiface-core: New function: pa_dbusiface_core_get_client_path(). --- src/modules/dbus/iface-core.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/modules/dbus/iface-core.h') diff --git a/src/modules/dbus/iface-core.h b/src/modules/dbus/iface-core.h index 14dff7eb..cf2a3b20 100644 --- a/src/modules/dbus/iface-core.h +++ b/src/modules/dbus/iface-core.h @@ -41,5 +41,6 @@ const char *pa_dbusiface_core_get_source_path(pa_dbusiface_core *c, const pa_sou const char *pa_dbusiface_core_get_playback_stream_path(pa_dbusiface_core *c, const pa_sink_input *sink_input); const char *pa_dbusiface_core_get_record_stream_path(pa_dbusiface_core *c, const pa_source_output *source_output); const char *pa_dbusiface_core_get_module_path(pa_dbusiface_core *c, const pa_module *module); +const char *pa_dbusiface_core_get_client_path(pa_dbusiface_core *c, const pa_client *client); #endif -- cgit From efec274b6dcf239f580713f889957c370ac7ffc7 Mon Sep 17 00:00:00 2001 From: Tanu Kaskinen Date: Mon, 17 Aug 2009 16:42:58 +0300 Subject: dbusiface-core: Two new functions: pa_dbusiface_core_get_sink/source(). --- src/modules/dbus/iface-core.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/modules/dbus/iface-core.h') diff --git a/src/modules/dbus/iface-core.h b/src/modules/dbus/iface-core.h index cf2a3b20..900b6d1c 100644 --- a/src/modules/dbus/iface-core.h +++ b/src/modules/dbus/iface-core.h @@ -43,4 +43,10 @@ const char *pa_dbusiface_core_get_record_stream_path(pa_dbusiface_core *c, const const char *pa_dbusiface_core_get_module_path(pa_dbusiface_core *c, const pa_module *module); const char *pa_dbusiface_core_get_client_path(pa_dbusiface_core *c, const pa_client *client); +/* Returns NULL if there's no sink with the given path. */ +pa_sink *pa_dbusiface_core_get_sink(pa_dbusiface_core *c, const char *object_path); + +/* Returns NULL if there's no source with the given path. */ +pa_source *pa_dbusiface_core_get_source(pa_dbusiface_core *c, const char *object_path); + #endif -- cgit