aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/pipewire/pipewire.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-12-11 03:34:33 +0900
committerOphestra <cat@gensokyo.uk>2025-12-11 03:34:33 +0900
commit0a3fe5f907d868f828f64c650e7a63a599e7ed68 (patch)
tree9cec0462e6ec4cddd8c4de1cbe27b0c0c860d97f /internal/pipewire/pipewire.go
parentb72d502f1c5568cd8f93c9142247fa0d94caece5 (diff)
internal/pipewire: export Registry::Destroy
This handles the error returned by Sync. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/pipewire/pipewire.go')
-rw-r--r--internal/pipewire/pipewire.go14
1 files changed, 13 insertions, 1 deletions
diff --git a/internal/pipewire/pipewire.go b/internal/pipewire/pipewire.go
index a87a4e95..5473797c 100644
--- a/internal/pipewire/pipewire.go
+++ b/internal/pipewire/pipewire.go
@@ -636,7 +636,7 @@ func (ctx *Context) roundtrip() (err error) {
}
// currentSeq returns the current sequence number.
-// This must only be called from eventProxy.consume.
+// This must only be called immediately after queueing a message.
func (ctx *Context) currentSeq() Int { return ctx.sequence - 1 }
// currentRemoteSeq returns the current remote sequence number.
@@ -786,6 +786,18 @@ func (ctx *Context) Close() (err error) {
}
}
+// A PermissionError describes an error emitted by the server when trying to
+// perform an operation that the client has no permission for.
+type PermissionError struct {
+ // The id of the resource (proxy if emitted by the client) that is in error.
+ ID Int `json:"id"`
+ // An error message.
+ Message string `json:"message"`
+}
+
+func (*PermissionError) Unwrap() error { return syscall.EPERM }
+func (e *PermissionError) Error() string { return e.Message }
+
// Remote is the environment (sic) with the remote name.
const Remote = "PIPEWIRE_REMOTE"