This repository has been archived by the owner on Jun 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
packet_push_md_autogen.go
153 lines (146 loc) · 3.07 KB
/
packet_push_md_autogen.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
// This file is automatically generated. DO NOT MODIFY!
package lumina
func (this *InputFile) readFrom(r Reader) (err error) {
// Field this.Path
// Basic string
if this.Path, err = readString(r); err != nil {
return
}
// Field this.MD5
// Array [16]byte
if err = readBytes(r, this.MD5[:]); err != nil {
return
}
return
}
func (this *InputFile) writeTo(w Writer) (err error) {
// Field this.Path
// Basic string
if err = writeString(w, this.Path); err != nil {
return
}
// Field this.MD5
// Array [16]byte
if err = writeBytes(w, this.MD5[:]); err != nil {
return
}
return
}
func (*PushMdPacket) getType() PacketType {
return PKT_PUSH_MD
}
func (*PushMdPacket) getResponseType() PacketType {
return PKT_PUSH_MD_RESULT
}
func (this *PushMdPacket) readFrom(r Reader) (err error) {
// Field this.Flags
// Basic uint32
// Typed PushMdFlag
var v1 uint32
if v1, err = readUint32(r); err != nil {
return
}
this.Flags = PushMdFlag(v1)
// Field this.Idb
// Basic string
if this.Idb, err = readString(r); err != nil {
return
}
// Field this.Input
// Struct InputFile
if err = this.Input.readFrom(r); err != nil {
return
}
// Field this.Hostname
// Basic string
if this.Hostname, err = readString(r); err != nil {
return
}
// Field this.Contents
// Slice []FuncInfoAndPattern
var v2 uint32
if v2, err = readUint32(r); err != nil {
return
}
this.Contents = make([]FuncInfoAndPattern, v2)
for v3 := uint32(0); v3 < v2; v3++ {
// Field this.Contents[v3]
// Struct FuncInfoAndPattern
if err = this.Contents[v3].readFrom(r); err != nil {
return
}
}
// Field this.EAs
// Slice []uint64
var v4 uint32
if v4, err = readUint32(r); err != nil {
return
}
this.EAs = make([]uint64, v4)
for v5 := uint32(0); v5 < v4; v5++ {
// Field this.EAs[v5]
// Basic uint64
if this.EAs[v5], err = readUint64(r); err != nil {
return
}
}
return
}
func (this *PushMdPacket) writeTo(w Writer) (err error) {
// Field this.Flags
// Basic uint32
// Typed PushMdFlag
if err = writeUint32(w, uint32(this.Flags)); err != nil {
return
}
// Field this.Idb
// Basic string
if err = writeString(w, this.Idb); err != nil {
return
}
// Field this.Input
// Struct InputFile
if err = this.Input.writeTo(w); err != nil {
return
}
// Field this.Hostname
// Basic string
if err = writeString(w, this.Hostname); err != nil {
return
}
// Field this.Contents
// Slice []FuncInfoAndPattern
if len(this.Contents) > 0x7FFFFFFF {
err = errTooLong
return
}
var v2 = uint32(len(this.Contents))
if err = writeUint32(w, v2); err != nil {
return
}
for v3 := uint32(0); v3 < v2; v3++ {
// Field this.Contents[v3]
// Struct FuncInfoAndPattern
if err = this.Contents[v3].writeTo(w); err != nil {
return
}
}
// Field this.EAs
// Slice []uint64
if len(this.EAs) > 0x7FFFFFFF {
err = errTooLong
return
}
var v4 = uint32(len(this.EAs))
if err = writeUint32(w, v4); err != nil {
return
}
for v5 := uint32(0); v5 < v4; v5++ {
// Field this.EAs[v5]
// Basic uint64
if err = writeUint64(w, this.EAs[v5]); err != nil {
return
}
}
return
}