forked from security/hakurei
internal/pipewire: expose connection props
Unused in hakurei but could be useful when the package is moved out of internal. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -820,8 +820,7 @@ func connectName(name string, manager bool) (conn *net.UnixConn, err error) {
|
||||
}
|
||||
|
||||
// ConnectName connects to a PipeWire remote by name.
|
||||
func ConnectName(name string, manager bool) (ctx *Context, err error) {
|
||||
var props SPADict
|
||||
func ConnectName(name string, manager bool, props SPADict) (ctx *Context, err error) {
|
||||
if manager {
|
||||
props = append(props, SPADictItem{Key: PW_KEY_REMOTE_INTENTION, Value: "manager"})
|
||||
}
|
||||
@@ -847,4 +846,6 @@ func ConnectName(name string, manager bool) (ctx *Context, err error) {
|
||||
}
|
||||
|
||||
// Connect connects to the PipeWire remote.
|
||||
func Connect(manager bool) (ctx *Context, err error) { return ConnectName("", manager) }
|
||||
func Connect(manager bool, props SPADict) (ctx *Context, err error) {
|
||||
return ConnectName("", manager, props)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user