aboutsummaryrefslogtreecommitdiff
path: root/pkg/messages/types/svcSplitScreen.go
blob: e7f77c020ae2d5b2539f2c4062061e17480aa27b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package messages

import (
	"github.com/pektezol/bitreader"
	"github.com/pektezol/sdp.go/pkg/writer"
)

type SvcSplitScreen struct {
	RemoveUser bool
	Length     uint16
	Data       []byte
}

func ParseSvcSplitScreen(reader *bitreader.Reader) SvcSplitScreen {
	svcSplitScreen := SvcSplitScreen{
		RemoveUser: reader.TryReadBool(),
		Length:     uint16(reader.TryReadBits(11)),
	}
	svcSplitScreen.Data = reader.TryReadBitsToSlice(uint64(svcSplitScreen.Length))
	writer.TempAppendLine("\t\tRemove User: %t", svcSplitScreen.RemoveUser)
	writer.TempAppendLine("\t\tData: %v", svcSplitScreen.Data)
	return svcSplitScreen
}