File: packets.proto

package info (click to toggle)
libgadu 1:1.12.1-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,820 kB
  • ctags: 1,649
  • sloc: ansic: 21,459; perl: 370; makefile: 209; sh: 124
file content (244 lines) | stat: -rw-r--r-- 5,676 bytes parent folder | download | duplicates (3)
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
// server -> client
message GG110LoginOK
{
	required int32 dummy1 = 1 [default = 1];
	required string dummyhash = 2;
	required uint32 uin = 3;
	required fixed32 server_time = 4;
}

// server -> client
message GG110Pong
{
	required fixed32 server_time = 1;
}

// client -> server
message GG110Ack
{
	enum Type
	{
		MSG = 1;
		CHAT = 2;
		CHAT_INFO = 3;
		MAGIC_NOTIFICATION = 5;
		MPA = 6;
		TRANSFER_INFO = 7;
	}

	required Type type = 1;
	required uint32 seq = 2;
	required uint32 dummy1 = 3 [default = 1];
}

// client -> server
message GG105Login
{
	required string lang = 1;
	required bytes uin = 2;
	required bytes hash = 3;
	required string client = 7;
	required fixed32 initial_status = 8 [default = 0x2023]; // GG_STATUS_NOT_SET | USE_LAST_STATUS
	required string initial_descr = 9 [default = ""];
	required string supported_features = 11;

	/**
	 * GG11.2: 0x02
	 * GG11.3: 0x04
	 */
	required int32 dummy1 = 4 [default = 4];

	/* GG10.5: 0x0002e737
	 * GG11.0: 0x01aeff77
	 * GG11.2: 0x03eeff77
	 */
	required fixed32 dummy2 = 5 [default = 0x03eeff77];

	/* privacy flag: 0x00000600
	 * GG11.0:       0x00030014
	 * GG10.5:       0x00000003
	 */
	required fixed32 dummy3 = 6 [default = 0x00030614];

	required bytes dummy4 = 10; // 4x 0x00
	required int32 dummy5 = 12 [default = 0xFF];
	required int32 dummy6 = 13 [default = 100];
	optional fixed32 dummy7 = 14 [default = 0x7F]; // GG11.0+
	optional int32 dummy8 = 15 [default = 0]; // GG11.0+
	//optional unknown_type dummy9 = 16;
	optional uint32 dummy10 = 17 [default = 0]; // GG11.0+
}

// komponent GG110MessageAck
message GG110MessageAckLink
{
	required fixed64 id = 1;
	required string url = 2;
}

// server -> client
message GG110MessageAck
{
	required uint32 msg_type = 1;
	required uint32 seq = 2;
	required fixed32 time = 3;
	optional fixed64 msg_id = 4;
	optional fixed64 conv_id = 5;
	repeated GG110MessageAckLink links = 6;
	required uint32 dummy1 = 7 [default = 0];
}

// server -> client
message GG110Event
{
	enum Type
	{
		XML = 0;
		JSON = 2;
	}

	required Type type = 1;
	required uint32 seq = 2;
	required string data = 3;
	required string subtype = 4;
	optional uint64 id = 5;
}

// server -> client
message GG110RecvMessage
{
	optional bytes sender = 1; // nieobecne w GG_CHAT_RECV_OWN_MSG

	/*       0x09: archiwalna wiadomość
	 *     0x4040: odbierany obrazek
	 * 0x00080008: GG w orange
	 */
	required uint32 flags = 2;

	required uint32 seq = 3;
	required fixed32 time = 4;
	required string msg_plain = 5 [default = ""];
	optional string msg_xhtml = 6;
	optional bytes data = 7;
	//optional unknown_type dummy1 = 8;
	optional fixed64 msg_id = 9;
	optional fixed64 chat_id = 10; // tylko w GG_CHAT_RECV_MSG i GG_CHAT_RECV_OWN_MSG
	optional fixed64 conv_id = 11;
}

// client -> server
// bardzo podobne do GG110RecvMessage
message GG110SendMessage
{
	optional bytes recipient = 1;
	required uint32 dummy1 = 2 [default = 0x08];
	required uint32 seq = 3;
	//optional unknown_type dummy2 = 4;
	required string msg_plain = 5;
	required string msg_xhtml = 6;
	optional string dummy3 = 7 [default = ""]; // tylko, gdy chat_id jest ustawiony
	//optional uknown_type dummy4 = 8;
	//optional uknown_type dummy5 = 9;
	optional fixed64 chat_id = 10;
}

// server -> client
message GG110Imtoken
{
	required string imtoken = 1;
}

// server -> client
message GG110ChatInfoUpdate
{
	required bytes participant = 1;
	required bytes inviter = 2;
	required fixed32 update_type = 3;
	required fixed32 time = 4;
	required fixed32 dummy1 = 5;
	required uint32 version = 6;
	required uint32 dummy2 = 7;
	//optional unknown_type dummy3 = 8;
	required fixed64 msg_id = 9;
	required fixed64 chat_id = 10;
	required fixed64 conv_id = 11;
}

message ProtobufKVP
{
	required string key = 1;
	required string value = 2;
}

/* aol_enabled: zawsze 1
 * expires_at: 0 lub data (z przeszłości?) powiązana z kontem
 * state: 1 (jeżeli expires_at=0) lub 2
 * subnet: zawsze 1
 */
// server -> client
message GG110Options
{
	repeated ProtobufKVP options = 1;
	required uint32 dummy1 = 2 [default = 0];
}

// server -> client
message GG110AccessInfo
{
	required uint32 dummy1 = 1 [default = 1];
	required uint32 dummy2 = 2; // 1 - stare numery, 2 - nowsze
	required uint32 last_message = 3;
	required uint32 last_file_transfer = 4;
	required uint32 last_conference_ch = 5;
}

// komponent GG112TransferInfo
message GG112TransferInfoUin
{
	required uint32 dummy1 = 1 [default = 1];
	required bytes uin = 2;
}

// komponent GG112TransferInfo
message GG112TransferInfoFile
{
	required string type = 1 [default = "other"]; // other, image
	required string url = 2; // drive://...
	// nieznane pola: 3-5
	required string content_type = 6;
	required string filename = 7;
	required uint32 filesize = 8;
	required fixed64 msg_id = 1001;
}

/* tablica data:
 *  contentType
 *  deliveryStatus = delivered
 *  fileName
 *  fileSize
 *  fileUrl
 */
// server -> client
message GG112TransferInfo
{
	required uint32 dummy1 = 1; // 6 for file transfers; 5 for missed video call info
	required GG112TransferInfoUin peer = 2; // osoba, z którą się wymieniamy plikiem
	required GG112TransferInfoUin sender = 4; // nadawca (my, albo peer)
	required fixed32 time = 3;
	repeated ProtobufKVP data = 5;
	optional GG112TransferInfoFile file = 6; // only for dummy1 = 6
	required uint32 seq = 7;
	required fixed64 msg_id = 1001;
	required fixed64 conv_id = 1002;
}

// server -> client
message GG110MagicNotification
{
	required int32 dummy1 = 1 [default = 2];
	required int32 seq = 2;
	required int32 dummy2 = 3 [default = 1];
	required int32 dummy3 = 4 [default = 1];
	required bytes uin = 5;
	required string dummy4 = 6 [default = ""];
}