diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-11-26 16:05:46 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-11-26 16:05:46 +0900 |
| commit | fd4d379b6777168c3251c85d153dbdf6b82f2b35 (patch) | |
| tree | 348f190575762ef6655ce9f2a1119c16d2c5eebd /internal/pipewire/client.go | |
| parent | 77f5b89a4180600179d4f0d1683b063b43372811 (diff) | |
internal/pipewire: implement Client::Info
Everything is already supported, as usual.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/pipewire/client.go')
| -rw-r--r-- | internal/pipewire/client.go | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/internal/pipewire/client.go b/internal/pipewire/client.go index 4480dc8e..ce2b6272 100644 --- a/internal/pipewire/client.go +++ b/internal/pipewire/client.go @@ -35,6 +35,26 @@ const ( PW_VERSION_CLIENT_METHODS = 0 ) +// The ClientInfo event provides client information updates. +// This is emitted when binding to a client or when the client info is updated later. +type ClientInfo struct { + // The global id of the client. + ID Int + // The changes emitted by this event. + ChangeMask Long + // Properties of this object, valid when change_mask has PW_CLIENT_CHANGE_MASK_PROPS. + Props *SPADict +} + +// MarshalBinary satisfies [encoding.BinaryMarshaler] via [Marshal]. +func (c *ClientInfo) MarshalBinary() ([]byte, error) { return Marshal(c) } + +// UnmarshalBinary satisfies [encoding.BinaryUnmarshaler] via [Unmarshal]. +func (c *ClientInfo) UnmarshalBinary(data []byte) error { + _, err := Unmarshal(data, c) + return err +} + // ClientUpdateProperties is used to update the properties of a client. type ClientUpdateProperties struct { // Props are properties to update on the client. |
