mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-07 13:30:03 -05:00
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.
This commit is contained in:
parent
1457df40ee
commit
fcf68752e6
17 changed files with 113 additions and 91 deletions
|
|
@ -24,6 +24,7 @@
|
|||
#endif
|
||||
|
||||
#include <pulsecore/core-util.h>
|
||||
#include <pulsecore/protocol-dbus.h>
|
||||
|
||||
#include "iface-sample.h"
|
||||
|
||||
|
|
@ -34,15 +35,15 @@ struct pa_dbusiface_sample {
|
|||
char *path;
|
||||
};
|
||||
|
||||
pa_dbusiface_sample *pa_dbusiface_sample_new(pa_scache_entry *sample, const char *path_prefix) {
|
||||
pa_dbusiface_sample *pa_dbusiface_sample_new(pa_dbusiface_core *core, pa_scache_entry *sample) {
|
||||
pa_dbusiface_sample *s;
|
||||
|
||||
pa_assert(core);
|
||||
pa_assert(sample);
|
||||
pa_assert(path_prefix);
|
||||
|
||||
s = pa_xnew(pa_dbusiface_sample, 1);
|
||||
s->sample = sample;
|
||||
s->path = pa_sprintf_malloc("%s/%s%u", path_prefix, OBJECT_NAME, sample->index);
|
||||
s->path = pa_sprintf_malloc("%s/%s%u", PA_DBUS_CORE_OBJECT_PATH, OBJECT_NAME, sample->index);
|
||||
|
||||
return s;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue