-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmp2_types.h
428 lines (323 loc) · 9.17 KB
/
mp2_types.h
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
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
/**
* Autogenerated by Thrift Compiler (0.8.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
#ifndef mp2_TYPES_H
#define mp2_TYPES_H
#include <Thrift.h>
#include <TApplicationException.h>
#include <protocol/TProtocol.h>
#include <transport/TTransport.h>
namespace mp2 {
typedef struct _node__isset {
_node__isset() : my_m(false), my_id(false), my_port(false), introducer_port(false) {}
bool my_m;
bool my_id;
bool my_port;
bool introducer_port;
} _node__isset;
class node {
public:
static const char* ascii_fingerprint; // = "154BB42C2FFD70F8B3993568C50C5613";
static const uint8_t binary_fingerprint[16]; // = {0x15,0x4B,0xB4,0x2C,0x2F,0xFD,0x70,0xF8,0xB3,0x99,0x35,0x68,0xC5,0x0C,0x56,0x13};
node() : my_m(0), my_id(0), my_port(0), introducer_port(0) {
}
virtual ~node() throw() {}
int32_t my_m;
int32_t my_id;
int32_t my_port;
int32_t introducer_port;
_node__isset __isset;
void __set_my_m(const int32_t val) {
my_m = val;
}
void __set_my_id(const int32_t val) {
my_id = val;
}
void __set_my_port(const int32_t val) {
my_port = val;
}
void __set_introducer_port(const int32_t val) {
introducer_port = val;
}
bool operator == (const node & rhs) const
{
if (!(my_m == rhs.my_m))
return false;
if (!(my_id == rhs.my_id))
return false;
if (!(my_port == rhs.my_port))
return false;
if (!(introducer_port == rhs.introducer_port))
return false;
return true;
}
bool operator != (const node &rhs) const {
return !(*this == rhs);
}
bool operator < (const node & ) const;
uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
};
typedef struct _neighbor__isset {
_neighbor__isset() : id(false), port(false), succ_id(false), succ_port(false) {}
bool id;
bool port;
bool succ_id;
bool succ_port;
} _neighbor__isset;
class neighbor {
public:
static const char* ascii_fingerprint; // = "154BB42C2FFD70F8B3993568C50C5613";
static const uint8_t binary_fingerprint[16]; // = {0x15,0x4B,0xB4,0x2C,0x2F,0xFD,0x70,0xF8,0xB3,0x99,0x35,0x68,0xC5,0x0C,0x56,0x13};
neighbor() : id(0), port(0), succ_id(0), succ_port(0) {
}
virtual ~neighbor() throw() {}
int32_t id;
int32_t port;
int32_t succ_id;
int32_t succ_port;
_neighbor__isset __isset;
void __set_id(const int32_t val) {
id = val;
}
void __set_port(const int32_t val) {
port = val;
}
void __set_succ_id(const int32_t val) {
succ_id = val;
}
void __set_succ_port(const int32_t val) {
succ_port = val;
}
bool operator == (const neighbor & rhs) const
{
if (!(id == rhs.id))
return false;
if (!(port == rhs.port))
return false;
if (!(succ_id == rhs.succ_id))
return false;
if (!(succ_port == rhs.succ_port))
return false;
return true;
}
bool operator != (const neighbor &rhs) const {
return !(*this == rhs);
}
bool operator < (const neighbor & ) const;
uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
};
typedef struct _successor__isset {
_successor__isset() : id(false), port(false) {}
bool id;
bool port;
} _successor__isset;
class successor {
public:
static const char* ascii_fingerprint; // = "989D1F1AE8D148D5E2119FFEC4BBBEE3";
static const uint8_t binary_fingerprint[16]; // = {0x98,0x9D,0x1F,0x1A,0xE8,0xD1,0x48,0xD5,0xE2,0x11,0x9F,0xFE,0xC4,0xBB,0xBE,0xE3};
successor() : id(0), port(0) {
}
virtual ~successor() throw() {}
int32_t id;
int32_t port;
_successor__isset __isset;
void __set_id(const int32_t val) {
id = val;
}
void __set_port(const int32_t val) {
port = val;
}
bool operator == (const successor & rhs) const
{
if (!(id == rhs.id))
return false;
if (!(port == rhs.port))
return false;
return true;
}
bool operator != (const successor &rhs) const {
return !(*this == rhs);
}
bool operator < (const successor & ) const;
uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
};
typedef struct _predecessor__isset {
_predecessor__isset() : id(false), port(false) {}
bool id;
bool port;
} _predecessor__isset;
class predecessor {
public:
static const char* ascii_fingerprint; // = "989D1F1AE8D148D5E2119FFEC4BBBEE3";
static const uint8_t binary_fingerprint[16]; // = {0x98,0x9D,0x1F,0x1A,0xE8,0xD1,0x48,0xD5,0xE2,0x11,0x9F,0xFE,0xC4,0xBB,0xBE,0xE3};
predecessor() : id(0), port(0) {
}
virtual ~predecessor() throw() {}
int32_t id;
int32_t port;
_predecessor__isset __isset;
void __set_id(const int32_t val) {
id = val;
}
void __set_port(const int32_t val) {
port = val;
}
bool operator == (const predecessor & rhs) const
{
if (!(id == rhs.id))
return false;
if (!(port == rhs.port))
return false;
return true;
}
bool operator != (const predecessor &rhs) const {
return !(*this == rhs);
}
bool operator < (const predecessor & ) const;
uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
};
typedef struct _key_and_node__isset {
_key_and_node__isset() : key(false), node_id(false), success(false), data(false) {}
bool key;
bool node_id;
bool success;
bool data;
} _key_and_node__isset;
class key_and_node {
public:
static const char* ascii_fingerprint; // = "8220B0A040CF420E767040EB2631CB83";
static const uint8_t binary_fingerprint[16]; // = {0x82,0x20,0xB0,0xA0,0x40,0xCF,0x42,0x0E,0x76,0x70,0x40,0xEB,0x26,0x31,0xCB,0x83};
key_and_node() : key(0), node_id(0), success(0), data("") {
}
virtual ~key_and_node() throw() {}
int32_t key;
int32_t node_id;
bool success;
std::string data;
_key_and_node__isset __isset;
void __set_key(const int32_t val) {
key = val;
}
void __set_node_id(const int32_t val) {
node_id = val;
}
void __set_success(const bool val) {
success = val;
}
void __set_data(const std::string& val) {
data = val;
}
bool operator == (const key_and_node & rhs) const
{
if (!(key == rhs.key))
return false;
if (!(node_id == rhs.node_id))
return false;
if (!(success == rhs.success))
return false;
if (!(data == rhs.data))
return false;
return true;
}
bool operator != (const key_and_node &rhs) const {
return !(*this == rhs);
}
bool operator < (const key_and_node & ) const;
uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
};
typedef struct _UserProfile__isset {
_UserProfile__isset() : uid(false), name(false), blurb(false) {}
bool uid;
bool name;
bool blurb;
} _UserProfile__isset;
class UserProfile {
public:
static const char* ascii_fingerprint; // = "3368C2F81F2FEF71F11EDACDB2A3ECEF";
static const uint8_t binary_fingerprint[16]; // = {0x33,0x68,0xC2,0xF8,0x1F,0x2F,0xEF,0x71,0xF1,0x1E,0xDA,0xCD,0xB2,0xA3,0xEC,0xEF};
UserProfile() : uid(0), name(""), blurb("") {
}
virtual ~UserProfile() throw() {}
int32_t uid;
std::string name;
std::string blurb;
_UserProfile__isset __isset;
void __set_uid(const int32_t val) {
uid = val;
}
void __set_name(const std::string& val) {
name = val;
}
void __set_blurb(const std::string& val) {
blurb = val;
}
bool operator == (const UserProfile & rhs) const
{
if (!(uid == rhs.uid))
return false;
if (!(name == rhs.name))
return false;
if (!(blurb == rhs.blurb))
return false;
return true;
}
bool operator != (const UserProfile &rhs) const {
return !(*this == rhs);
}
bool operator < (const UserProfile & ) const;
uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
};
typedef struct _previous_try__isset {
_previous_try__isset() : left(false), right(false), t(false) {}
bool left;
bool right;
bool t;
} _previous_try__isset;
class previous_try {
public:
static const char* ascii_fingerprint; // = "6435B39C87AB0E30F30BEDEFD7328C0D";
static const uint8_t binary_fingerprint[16]; // = {0x64,0x35,0xB3,0x9C,0x87,0xAB,0x0E,0x30,0xF3,0x0B,0xED,0xEF,0xD7,0x32,0x8C,0x0D};
previous_try() : left(0), right(0), t(0) {
}
virtual ~previous_try() throw() {}
int32_t left;
int32_t right;
int32_t t;
_previous_try__isset __isset;
void __set_left(const int32_t val) {
left = val;
}
void __set_right(const int32_t val) {
right = val;
}
void __set_t(const int32_t val) {
t = val;
}
bool operator == (const previous_try & rhs) const
{
if (!(left == rhs.left))
return false;
if (!(right == rhs.right))
return false;
if (!(t == rhs.t))
return false;
return true;
}
bool operator != (const previous_try &rhs) const {
return !(*this == rhs);
}
bool operator < (const previous_try & ) const;
uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
};
} // namespace
#endif