mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2025-12-20 06:30:04 +01:00
m-dbus-connection: Add 'plugin.name' and 'bus.system' args
These allow creating a shared system D-Bus connection.
This commit is contained in:
parent
ed58f65184
commit
bc026593d6
2 changed files with 19 additions and 2 deletions
|
|
@ -255,10 +255,19 @@ wp_dbus_connection_class_init (WpDBusConnectionClass * klass)
|
||||||
WP_PLUGIN_EXPORT GObject *
|
WP_PLUGIN_EXPORT GObject *
|
||||||
wireplumber__module_init (WpCore * core, WpSpaJson * args, GError ** error)
|
wireplumber__module_init (WpCore * core, WpSpaJson * args, GError ** error)
|
||||||
{
|
{
|
||||||
|
g_autofree gchar *plugin_name = NULL;
|
||||||
|
gboolean is_system_bus = FALSE;
|
||||||
|
|
||||||
|
if (args)
|
||||||
|
wp_spa_json_object_get (args,
|
||||||
|
"plugin.name", "s", &plugin_name,
|
||||||
|
"bus.system", "b", &is_system_bus,
|
||||||
|
NULL);
|
||||||
|
|
||||||
return G_OBJECT (g_object_new (
|
return G_OBJECT (g_object_new (
|
||||||
wp_dbus_connection_get_type(),
|
wp_dbus_connection_get_type(),
|
||||||
"name", "dbus-connection",
|
"name", plugin_name ? plugin_name : "dbus-connection",
|
||||||
"core", core,
|
"core", core,
|
||||||
"bus-type", G_BUS_TYPE_SESSION,
|
"bus-type", is_system_bus ? G_BUS_TYPE_SYSTEM : G_BUS_TYPE_SESSION,
|
||||||
NULL));
|
NULL));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -265,9 +265,17 @@ wireplumber.components = [
|
||||||
## The shared D-Bus connection
|
## The shared D-Bus connection
|
||||||
{
|
{
|
||||||
name = libwireplumber-module-dbus-connection, type = module
|
name = libwireplumber-module-dbus-connection, type = module
|
||||||
|
arguments = { plugin.name = dbus-connection, bus.system = false }
|
||||||
provides = support.dbus
|
provides = support.dbus
|
||||||
}
|
}
|
||||||
|
|
||||||
|
## The shared system D-Bus connection
|
||||||
|
{
|
||||||
|
name = libwireplumber-module-dbus-connection, type = module
|
||||||
|
arguments = { plugin.name = system-dbus-connection, bus.system = true }
|
||||||
|
provides = support.system-dbus
|
||||||
|
}
|
||||||
|
|
||||||
## Module managing the portal permissions
|
## Module managing the portal permissions
|
||||||
{
|
{
|
||||||
name = libwireplumber-module-portal-permissionstore, type = module
|
name = libwireplumber-module-portal-permissionstore, type = module
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue