From 8da8dbe025eb650fae5f79183a8e4abd6661bf5d Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 19 Jan 2018 16:10:32 +0100 Subject: [PATCH] core: add some core properties to the global --- src/pipewire/core.c | 7 ++++++- src/pipewire/core.h | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/pipewire/core.c b/src/pipewire/core.c index 338b4a14c..24b899bcb 100644 --- a/src/pipewire/core.c +++ b/src/pipewire/core.c @@ -393,7 +393,12 @@ struct pw_core *pw_core_new(struct pw_loop *main_loop, struct pw_properties *pro this->global = pw_global_new(this, this->type.core, PW_VERSION_CORE, - NULL, + pw_properties_new( + PW_CORE_PROP_USER_NAME, this->info.user_name, + PW_CORE_PROP_HOST_NAME, this->info.host_name, + PW_CORE_PROP_NAME, this->info.name, + PW_CORE_PROP_VERSION, this->info.version, + NULL), core_bind_func, this); if (this->global != NULL) { diff --git a/src/pipewire/core.h b/src/pipewire/core.h index b2036e291..566d6f8e2 100644 --- a/src/pipewire/core.h +++ b/src/pipewire/core.h @@ -105,6 +105,10 @@ struct pw_core_events { void (*global_removed) (void *data, struct pw_global *global); }; +/** The user name that started the core */ +#define PW_CORE_PROP_USER_NAME "pipewire.core.user-name" +/** The host name of the machine */ +#define PW_CORE_PROP_HOST_NAME "pipewire.core.host-name" /** The name of the core. Default is pipewire-- */ #define PW_CORE_PROP_NAME "pipewire.core.name" /** The version of the core. */