-
Notifications
You must be signed in to change notification settings - Fork 321
/
bond_const.bond
59 lines (50 loc) · 1.25 KB
/
bond_const.bond
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
namespace bond
// Enumerator of Bond meta-schema types
enum BondDataType
{
BT_STOP = 0,
BT_STOP_BASE = 1,
BT_BOOL = 2,
BT_UINT8 = 3,
BT_UINT16 = 4,
BT_UINT32 = 5,
BT_UINT64 = 6,
BT_FLOAT = 7,
BT_DOUBLE = 8,
BT_STRING = 9,
BT_STRUCT = 10,
BT_LIST = 11,
BT_SET = 12,
BT_MAP = 13,
BT_INT8 = 14,
BT_INT16 = 15,
BT_INT32 = 16,
BT_INT64 = 17,
BT_WSTRING = 18,
BT_UNAVAILABLE= 127
}
// Enumerator to distinguish the different subtypes treated as BT_LIST
enum ListSubType
{
// Used when the type is a list/vector.
// Also used when the subtype cannot be determined.
NO_SUBTYPE = 0,
// Used when the type is nullable.
NULLABLE_SUBTYPE = 1,
// Used when the type is a blob.
BLOB_SUBTYPE = 2
}
// Magic numbers of predefined protocols
enum ProtocolType
{
// Actual protocol type is marshaled with payload
MARSHALED_PROTOCOL = 0,
// Fast binary protocol
FAST_PROTOCOL = 0x464d,
// Compact binary protocol
COMPACT_PROTOCOL = 0x4243,
// Simple JSON protocol
SIMPLE_JSON_PROTOCOL = 0x4a53,
// Simple binary protocol
SIMPLE_PROTOCOL = 0x5053,
}