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.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.go')
| -rw-r--r-- | system/dbus.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/system/dbus.go b/system/dbus.go index 81236b48..1a0b099e 100644 --- a/system/dbus.go +++ b/system/dbus.go @@ -21,7 +21,7 @@ var ( ) // MustProxyDBus calls ProxyDBus and panics if an error is returned. -func (sys *I) MustProxyDBus(sessionPath *container.Absolute, session *dbus.Config, systemPath *container.Absolute, system *dbus.Config) *I { +func (sys *I) MustProxyDBus(sessionPath *container.Absolute, session *hst.BusConfig, systemPath *container.Absolute, system *hst.BusConfig) *I { if err := sys.ProxyDBus(session, system, sessionPath, systemPath); err != nil { panic(err.Error()) } else { @@ -31,7 +31,7 @@ func (sys *I) MustProxyDBus(sessionPath *container.Absolute, session *dbus.Confi // ProxyDBus finalises configuration ahead of time and starts xdg-dbus-proxy via [dbus] and terminates it on revert. // This [Op] is always [Process] scoped. -func (sys *I) ProxyDBus(session, system *dbus.Config, sessionPath, systemPath *container.Absolute) error { +func (sys *I) ProxyDBus(session, system *hst.BusConfig, sessionPath, systemPath *container.Absolute) error { d := new(dbusProxyOp) // session bus is required as otherwise this is effectively a very expensive noop @@ -56,9 +56,9 @@ func (sys *I) ProxyDBus(session, system *dbus.Config, sessionPath, systemPath *c fmt.Sprintf("cannot finalise message bus proxy: %v", err), false) } else { if sys.msg.IsVerbose() { - sys.msg.Verbose("session bus proxy:", session.Args(sessionBus)) + sys.msg.Verbose("session bus proxy:", dbus.Args(session, sessionBus)) if system != nil { - sys.msg.Verbose("system bus proxy:", system.Args(systemBus)) + sys.msg.Verbose("system bus proxy:", dbus.Args(system, systemBus)) } // this calls the argsWt String method |
