diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-12-07 17:39:34 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-12-07 17:39:34 +0900 |
| commit | 093e30c78872a5d8605de4b2a3aeb35abca63835 (patch) | |
| tree | 15e87de000864f78f7c02a5c1f12ed829027b5d8 /internal/system/dispatcher.go | |
| parent | 1b17ccda914de78a88e1edbb42ce70d963d4b5a2 (diff) | |
internal/system: integrate PipeWire SecurityContext
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>
Diffstat (limited to 'internal/system/dispatcher.go')
| -rw-r--r-- | internal/system/dispatcher.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/internal/system/dispatcher.go b/internal/system/dispatcher.go index 1641c3ed..eae92477 100644 --- a/internal/system/dispatcher.go +++ b/internal/system/dispatcher.go @@ -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) } |
