internal/pipewire: implement client generation footer
All checks were successful
Test / Create distribution (push) Successful in 38s
Test / Sandbox (push) Successful in 2m26s
Test / Hakurei (push) Successful in 3m16s
Test / Hpkg (push) Successful in 4m13s
Test / Sandbox (race detector) (push) Successful in 4m22s
Test / Hakurei (race detector) (push) Successful in 5m12s
Test / Flake checks (push) Successful in 1m29s
All checks were successful
Test / Create distribution (push) Successful in 38s
Test / Sandbox (push) Successful in 2m26s
Test / Hakurei (push) Successful in 3m16s
Test / Hpkg (push) Successful in 4m13s
Test / Sandbox (race detector) (push) Successful in 4m22s
Test / Hakurei (race detector) (push) Successful in 5m12s
Test / Flake checks (push) Successful in 1m29s
This corresponds with the core generation footer and seem to be the only other possible footer type. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
parent
5c12425d48
commit
f703aa20a5
@ -81,6 +81,16 @@ type FooterCoreGeneration struct {
|
||||
RegistryGeneration Long `json:"registry_generation"`
|
||||
}
|
||||
|
||||
// The FooterClientGeneration indicates to the server what is the last
|
||||
// registry generation number the client has processed.
|
||||
//
|
||||
// The client shall include this footer in the next message it sends,
|
||||
// after it has processed an incoming message whose footer includes a
|
||||
// registry generation update.
|
||||
type FooterClientGeneration struct {
|
||||
ClientGeneration Long `json:"client_generation"`
|
||||
}
|
||||
|
||||
// A CoreInfo event is emitted by the server upon connection
|
||||
// with the more information about the server.
|
||||
type CoreInfo struct {
|
||||
|
||||
@ -10,15 +10,32 @@ func TestFooterCoreGeneration(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
encodingTestCases[pipewire.Footer[pipewire.FooterCoreGeneration], *pipewire.Footer[pipewire.FooterCoreGeneration]]{
|
||||
{"sample", samplePWContainer[1][0][2], pipewire.Footer[pipewire.FooterCoreGeneration]{
|
||||
/* recvmsg 0 */
|
||||
|
||||
{"sample0", samplePWContainer[1][0][2], pipewire.Footer[pipewire.FooterCoreGeneration]{
|
||||
Opcode: pipewire.FOOTER_CORE_OPCODE_GENERATION,
|
||||
Payload: pipewire.FooterCoreGeneration{RegistryGeneration: 0x22},
|
||||
}, nil},
|
||||
|
||||
{"sample*", samplePWContainer[1][5][2], pipewire.Footer[pipewire.FooterCoreGeneration]{
|
||||
{"sample1", samplePWContainer[1][5][2], pipewire.Footer[pipewire.FooterCoreGeneration]{
|
||||
Opcode: pipewire.FOOTER_CORE_OPCODE_GENERATION,
|
||||
Payload: pipewire.FooterCoreGeneration{RegistryGeneration: 0x23},
|
||||
}, nil},
|
||||
|
||||
{"sample2", samplePWContainer[1][42][2], pipewire.Footer[pipewire.FooterCoreGeneration]{
|
||||
Opcode: pipewire.FOOTER_CORE_OPCODE_GENERATION,
|
||||
Payload: pipewire.FooterCoreGeneration{RegistryGeneration: 0x24},
|
||||
}, nil},
|
||||
}.run(t)
|
||||
|
||||
encodingTestCases[pipewire.Footer[pipewire.FooterClientGeneration], *pipewire.Footer[pipewire.FooterClientGeneration]]{
|
||||
/* sendmsg 1 */
|
||||
|
||||
{"sample0", samplePWContainer[3][0][2], pipewire.Footer[pipewire.FooterClientGeneration]{
|
||||
Opcode: pipewire.FOOTER_CORE_OPCODE_GENERATION,
|
||||
// why does this not match FooterCoreGeneration sample2?
|
||||
Payload: pipewire.FooterClientGeneration{ClientGeneration: 0x23},
|
||||
}, nil},
|
||||
}.run(t)
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user