internal/system: integrate PipeWire SecurityContext
All checks were successful
Test / Create distribution (push) Successful in 29s
Test / Sandbox (race detector) (push) Successful in 42s
Test / Sandbox (push) Successful in 43s
Test / Hakurei (push) Successful in 47s
Test / Hakurei (race detector) (push) Successful in 46s
Test / Hpkg (push) Successful in 43s
Test / Flake checks (push) Successful in 1m32s
All checks were successful
Test / Create distribution (push) Successful in 29s
Test / Sandbox (race detector) (push) Successful in 42s
Test / Sandbox (push) Successful in 43s
Test / Hakurei (push) Successful in 47s
Test / Hakurei (race detector) (push) Successful in 46s
Test / Hpkg (push) Successful in 43s
Test / Flake checks (push) Successful in 1m32s
Tests for this Op happens to be the best out of everything due to the robust infrastructure offered by internal/pipewire. This is now ready to use in internal/outcome for implementing #26. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
"hakurei.app/hst"
|
||||
"hakurei.app/internal/acl"
|
||||
"hakurei.app/internal/dbus"
|
||||
"hakurei.app/internal/pipewire"
|
||||
"hakurei.app/internal/wayland"
|
||||
"hakurei.app/internal/xcb"
|
||||
)
|
||||
@@ -47,8 +48,12 @@ type syscallDispatcher interface {
|
||||
// aclUpdate provides [acl.Update].
|
||||
aclUpdate(name string, uid int, perms ...acl.Perm) error
|
||||
|
||||
// waylandNew provides [wayland.New].
|
||||
waylandNew(displayPath, bindPath *check.Absolute, appID, instanceID string) (io.Closer, error)
|
||||
|
||||
// pipewireConnect provides [pipewire.Connect].
|
||||
pipewireConnect() (*pipewire.Context, error)
|
||||
|
||||
// xcbChangeHosts provides [xcb.ChangeHosts].
|
||||
xcbChangeHosts(mode xcb.HostMode, family xcb.Family, address string) error
|
||||
|
||||
@@ -84,6 +89,8 @@ func (k direct) waylandNew(displayPath, bindPath *check.Absolute, appID, instanc
|
||||
return wayland.New(displayPath, bindPath, appID, instanceID)
|
||||
}
|
||||
|
||||
func (k direct) pipewireConnect() (*pipewire.Context, error) { return pipewire.Connect(true) }
|
||||
|
||||
func (k direct) xcbChangeHosts(mode xcb.HostMode, family xcb.Family, address string) error {
|
||||
return xcb.ChangeHosts(mode, family, address)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user