aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/pipewire/client.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/pipewire/client.go')
-rw-r--r--internal/pipewire/client.go13
1 files changed, 12 insertions, 1 deletions
diff --git a/internal/pipewire/client.go b/internal/pipewire/client.go
index 8e901d8e..faa114b9 100644
--- a/internal/pipewire/client.go
+++ b/internal/pipewire/client.go
@@ -46,6 +46,12 @@ type ClientInfo struct {
Properties *SPADict `json:"props"`
}
+// Opcode satisfies [Message] with a constant value.
+func (c *ClientInfo) Opcode() byte { return PW_CLIENT_EVENT_INFO }
+
+// FileCount satisfies [Message] with a constant value.
+func (c *ClientInfo) FileCount() Int { return 0 }
+
// Size satisfies [KnownSize] with a value computed at runtime.
func (c *ClientInfo) Size() Word {
return SizePrefix +
@@ -66,6 +72,12 @@ type ClientUpdateProperties struct {
Properties *SPADict `json:"props"`
}
+// Opcode satisfies [Message] with a constant value.
+func (c *ClientUpdateProperties) Opcode() byte { return PW_CLIENT_METHOD_UPDATE_PROPERTIES }
+
+// FileCount satisfies [Message] with a constant value.
+func (c *ClientUpdateProperties) FileCount() Int { return 0 }
+
// Size satisfies [KnownSize] with a value computed at runtime.
func (c *ClientUpdateProperties) Size() Word { return SizePrefix + c.Properties.Size() }
@@ -80,7 +92,6 @@ func (c *ClientUpdateProperties) UnmarshalBinary(data []byte) error { return Unm
func (ctx *Context) clientUpdateProperties(props SPADict) error {
return ctx.writeMessage(
PW_ID_CLIENT,
- PW_CLIENT_METHOD_UPDATE_PROPERTIES,
&ClientUpdateProperties{&props},
)
}