diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-04-16 23:10:04 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-04-16 23:35:17 +0900 |
| commit | 5979d8b1e0fc4249fb73de9b0ba099bae7707214 (patch) | |
| tree | ec3e9c859007005889cfad99158d3fd401587bf1 /dbus/config.go | |
| parent | e587112e6382aae80d46097c2e7636e22abdf917 (diff) | |
dbus: clean up wrapper implementation
The dbus proxy wrapper haven't been updated much ever since the helper interface was introduced.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'dbus/config.go')
| -rw-r--r-- | dbus/config.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/dbus/config.go b/dbus/config.go index 160a7ca2..26fce463 100644 --- a/dbus/config.go +++ b/dbus/config.go @@ -7,6 +7,9 @@ import ( "os" ) +// ProxyPair is an upstream dbus address and a downstream socket path. +type ProxyPair [2]string + type Config struct { // See set 'see' policy for NAME (--see=NAME) See []string `json:"see"` @@ -24,7 +27,7 @@ type Config struct { Filter bool `json:"filter"` } -func (c *Config) Args(bus [2]string) (args []string) { +func (c *Config) Args(bus ProxyPair) (args []string) { argc := 2 + len(c.See) + len(c.Talk) + len(c.Own) + len(c.Call) + len(c.Broadcast) if c.Log { argc++ |
