feat(backend): IOSScreen message
This commit is contained in:
parent
3d142bcf67
commit
f3fad20e6e
3 changed files with 17 additions and 5 deletions
|
|
@ -7,5 +7,5 @@ func IsReplayerType(id uint64) bool {
|
|||
}
|
||||
|
||||
func IsIOSType(id uint64) bool {
|
||||
return 90 == id || 91 == id || 92 == id || 93 == id || 94 == id || 95 == id || 96 == id || 97 == id || 98 == id || 99 == id || 100 == id || 101 == id || 102 == id || 103 == id || 104 == id || 105 == id || 110 == id || 111 == id
|
||||
return 107 == id || 90 == id || 91 == id || 92 == id || 93 == id || 94 == id || 95 == id || 96 == id || 97 == id || 98 == id || 99 == id || 100 == id || 101 == id || 102 == id || 103 == id || 104 == id || 105 == id || 110 == id || 111 == id
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1321,14 +1321,22 @@ p = WriteString(msg.Value, buf, p)
|
|||
type IOSScreenChanges struct {
|
||||
*meta
|
||||
Timestamp uint64
|
||||
SkipData []byte
|
||||
Length uint64
|
||||
X uint64
|
||||
Y uint64
|
||||
Width uint64
|
||||
Height uint64
|
||||
}
|
||||
func (msg *IOSScreenChanges) Encode() []byte{
|
||||
buf := make([]byte, 21 + len(msg.SkipData))
|
||||
buf := make([]byte, 61 )
|
||||
buf[0] = 96
|
||||
p := 1
|
||||
p = WriteUint(msg.Timestamp, buf, p)
|
||||
p = WriteData(msg.SkipData, buf, p)
|
||||
p = WriteUint(msg.Length, buf, p)
|
||||
p = WriteUint(msg.X, buf, p)
|
||||
p = WriteUint(msg.Y, buf, p)
|
||||
p = WriteUint(msg.Width, buf, p)
|
||||
p = WriteUint(msg.Height, buf, p)
|
||||
return buf[:p]
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -591,7 +591,11 @@ if msg.Value, err = ReadString(reader); err != nil { return nil, err }
|
|||
case 96:
|
||||
msg := &IOSScreenChanges{ meta: &meta{ TypeID: 96} }
|
||||
if msg.Timestamp, err = ReadUint(reader); err != nil { return nil, err }
|
||||
if msg.SkipData, err = ReadData(reader); err != nil { return nil, err }
|
||||
if msg.Length, err = ReadUint(reader); err != nil { return nil, err }
|
||||
if msg.X, err = ReadUint(reader); err != nil { return nil, err }
|
||||
if msg.Y, err = ReadUint(reader); err != nil { return nil, err }
|
||||
if msg.Width, err = ReadUint(reader); err != nil { return nil, err }
|
||||
if msg.Height, err = ReadUint(reader); err != nil { return nil, err }
|
||||
return msg, nil
|
||||
|
||||
case 97:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue