From d23b4dc9e64d3f00e746c65f3038a1a6de44b8f5 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Tue, 7 Oct 2025 19:01:18 +0900 Subject: hst/dbus: move dbus config struct This allows holding a xdg-dbus-proxy configuration without importing system/dbus. It also makes more sense in the project structure since the config struct is part of the hst API however the rest of the implementation is not. Signed-off-by: Ophestra --- system/dbus/proxy.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'system/dbus/proxy.go') diff --git a/system/dbus/proxy.go b/system/dbus/proxy.go index a83bc9c3..59a1d7d4 100644 --- a/system/dbus/proxy.go +++ b/system/dbus/proxy.go @@ -9,6 +9,7 @@ import ( "hakurei.app/container" "hakurei.app/helper" + "hakurei.app/hst" ) // ProxyName is the file name or path to the proxy program. @@ -66,23 +67,23 @@ type Final struct { } // Finalise creates a checked argument writer for [Proxy]. -func Finalise(sessionBus, systemBus ProxyPair, session, system *Config) (final *Final, err error) { +func Finalise(sessionBus, systemBus ProxyPair, session, system *hst.BusConfig) (final *Final, err error) { if session == nil && system == nil { return nil, syscall.EBADE } var args []string if session != nil { - if err = session.checkInterfaces("session"); err != nil { + if err = checkInterfaces(session, "session"); err != nil { return } - args = append(args, session.Args(sessionBus)...) + args = append(args, Args(session, sessionBus)...) } if system != nil { - if err = system.checkInterfaces("system"); err != nil { + if err = checkInterfaces(system, "system"); err != nil { return } - args = append(args, system.Args(systemBus)...) + args = append(args, Args(system, systemBus)...) } final = &Final{Session: sessionBus, System: systemBus} -- cgit v1.3.1