diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-11-25 18:37:50 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-11-25 18:40:19 +0900 |
| commit | 77f5b89a4180600179d4f0d1683b063b43372811 (patch) | |
| tree | e805e5654d79c4a8a035c4d18b2849b0e003ad46 /internal/pipewire/core.go | |
| parent | 14e33f17e52f27997380bdf87d12bf5d8121c586 (diff) | |
internal/pipewire: implement Core::BoundProps
Very straightforward type, everything is already supported.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/pipewire/core.go')
| -rw-r--r-- | internal/pipewire/core.go | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/internal/pipewire/core.go b/internal/pipewire/core.go index e5b6abbb..75d2b768 100644 --- a/internal/pipewire/core.go +++ b/internal/pipewire/core.go @@ -111,6 +111,26 @@ func (c *CoreInfo) UnmarshalBinary(data []byte) error { return err } +// The CoreBoundProps event is emitted when a local object ID is bound to a global ID. +// It is emitted before the global becomes visible in the registry. +type CoreBoundProps struct { + // A proxy id. + ID Int + // The global_id as it will appear in the registry. + GlobalID Int + // The properties of the global. + Props *SPADict +} + +// MarshalBinary satisfies [encoding.BinaryMarshaler] via [Marshal]. +func (c *CoreBoundProps) MarshalBinary() ([]byte, error) { return Marshal(c) } + +// UnmarshalBinary satisfies [encoding.BinaryUnmarshaler] via [Unmarshal]. +func (c *CoreBoundProps) UnmarshalBinary(data []byte) error { + _, err := Unmarshal(data, c) + return err +} + // CoreHello is the first message sent by a client. type CoreHello struct { // The version number of the client, usually PW_VERSION_CORE. |
