summaryrefslogtreecommitdiffstats
path: root/src/modules/dbus/iface-stream.c
diff options
context:
space:
mode:
authorTanu Kaskinen <tanuk@iki.fi>2009-08-09 08:37:33 +0300
committerTanu Kaskinen <tanuk@iki.fi>2009-08-09 08:37:33 +0300
commitfcf68752e687123a171b1144f78f8eba1625a204 (patch)
tree2970a44e556502c107e3c266ff911c4790a26dc0 /src/modules/dbus/iface-stream.c
parent1457df40eee692834d1c5faf95ca0057d74f86d1 (diff)
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.
Diffstat (limited to 'src/modules/dbus/iface-stream.c')
-rw-r--r--src/modules/dbus/iface-stream.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/modules/dbus/iface-stream.c b/src/modules/dbus/iface-stream.c
index 1d9ffee6..b5a17894 100644
--- a/src/modules/dbus/iface-stream.c
+++ b/src/modules/dbus/iface-stream.c
@@ -24,6 +24,7 @@
#endif
#include <pulsecore/core-util.h>
+#include <pulsecore/protocol-dbus.h>
#include "iface-stream.h"
@@ -44,30 +45,30 @@ struct pa_dbusiface_stream {
char *path;
};
-pa_dbusiface_stream *pa_dbusiface_stream_new_playback(pa_sink_input *sink_input, const char *path_prefix) {
+pa_dbusiface_stream *pa_dbusiface_stream_new_playback(pa_dbusiface_core *core, pa_sink_input *sink_input) {
pa_dbusiface_stream *s;
+ pa_assert(core);
pa_assert(sink_input);
- pa_assert(path_prefix);
s = pa_xnew(pa_dbusiface_stream, 1);
s->sink_input = pa_sink_input_ref(sink_input);
s->type = STREAM_TYPE_PLAYBACK;
- s->path = pa_sprintf_malloc("%s/%s%u", path_prefix, PLAYBACK_OBJECT_NAME, sink_input->index);
+ s->path = pa_sprintf_malloc("%s/%s%u", PA_DBUS_CORE_OBJECT_PATH, PLAYBACK_OBJECT_NAME, sink_input->index);
return s;
}
-pa_dbusiface_stream *pa_dbusiface_stream_new_record(pa_source_output *source_output, const char *path_prefix) {
+pa_dbusiface_stream *pa_dbusiface_stream_new_record(pa_dbusiface_core *core, pa_source_output *source_output) {
pa_dbusiface_stream *s;
+ pa_assert(core);
pa_assert(source_output);
- pa_assert(path_prefix);
s = pa_xnew(pa_dbusiface_stream, 1);
s->source_output = pa_source_output_ref(source_output);
s->type = STREAM_TYPE_RECORD;
- s->path = pa_sprintf_malloc("%s/%s%u", path_prefix, RECORD_OBJECT_NAME, source_output->index);
+ s->path = pa_sprintf_malloc("%s/%s%u", PA_DBUS_CORE_OBJECT_PATH, RECORD_OBJECT_NAME, source_output->index);
return s;
}