diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-10-07 19:01:18 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-10-07 19:03:51 +0900 |
| commit | d23b4dc9e64d3f00e746c65f3038a1a6de44b8f5 (patch) | |
| tree | 46e7f73bc2b06047561588294759ddb8a71184f2 /system/dbus/proxy.go | |
| parent | 3ce63e95d7691450f7b368e639d984a223a764b1 (diff) | |
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 <cat@gensokyo.uk>
Diffstat (limited to 'system/dbus/proxy.go')
| -rw-r--r-- | system/dbus/proxy.go | 11 |
1 files changed, 6 insertions, 5 deletions
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} |
