This repository has been archived by the owner on Jan 23, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmsg.pb-c.h
151 lines (129 loc) · 4.68 KB
/
msg.pb-c.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
/* Generated by the protocol buffer compiler. DO NOT EDIT! */
#ifndef PROTOBUF_C_msg_2eproto__INCLUDED
#define PROTOBUF_C_msg_2eproto__INCLUDED
#include <google/protobuf-c/protobuf-c.h>
PROTOBUF_C_BEGIN_DECLS
typedef struct _Doozer__Request Doozer__Request;
typedef struct _Doozer__Response Doozer__Response;
/* --- enums --- */
typedef enum _Doozer__Request__Verb {
DOOZER__REQUEST__VERB__GET = 1,
DOOZER__REQUEST__VERB__SET = 2,
DOOZER__REQUEST__VERB__DEL = 3,
DOOZER__REQUEST__VERB__REV = 5,
DOOZER__REQUEST__VERB__WAIT = 6,
DOOZER__REQUEST__VERB__NOP = 7,
DOOZER__REQUEST__VERB__WALK = 9,
DOOZER__REQUEST__VERB__GETDIR = 14,
DOOZER__REQUEST__VERB__STAT = 16,
DOOZER__REQUEST__VERB__ACCESS = 99
} Doozer__Request__Verb;
typedef enum _Doozer__Response__Err {
DOOZER__RESPONSE__ERR__OTHER = 127,
DOOZER__RESPONSE__ERR__TAG_IN_USE = 1,
DOOZER__RESPONSE__ERR__UNKNOWN_VERB = 2,
DOOZER__RESPONSE__ERR__READONLY = 3,
DOOZER__RESPONSE__ERR__TOO_LATE = 4,
DOOZER__RESPONSE__ERR__REV_MISMATCH = 5,
DOOZER__RESPONSE__ERR__BAD_PATH = 6,
DOOZER__RESPONSE__ERR__MISSING_ARG = 7,
DOOZER__RESPONSE__ERR__RANGE = 8,
DOOZER__RESPONSE__ERR__NOTDIR = 20,
DOOZER__RESPONSE__ERR__ISDIR = 21,
DOOZER__RESPONSE__ERR__NOENT = 22
} Doozer__Response__Err;
/* --- messages --- */
struct _Doozer__Request
{
ProtobufCMessage base;
protobuf_c_boolean has_tag;
int32_t tag;
protobuf_c_boolean has_verb;
Doozer__Request__Verb verb;
char *path;
protobuf_c_boolean has_value;
ProtobufCBinaryData value;
protobuf_c_boolean has_other_tag;
int32_t other_tag;
protobuf_c_boolean has_offset;
int32_t offset;
protobuf_c_boolean has_rev;
int64_t rev;
};
#define DOOZER__REQUEST__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&doozer__request__descriptor) \
, 0,0, 0,0, NULL, 0,{0,NULL}, 0,0, 0,0, 0,0 }
struct _Doozer__Response
{
ProtobufCMessage base;
protobuf_c_boolean has_tag;
int32_t tag;
protobuf_c_boolean has_flags;
int32_t flags;
protobuf_c_boolean has_rev;
int64_t rev;
char *path;
protobuf_c_boolean has_value;
ProtobufCBinaryData value;
protobuf_c_boolean has_len;
int32_t len;
protobuf_c_boolean has_err_code;
Doozer__Response__Err err_code;
char *err_detail;
};
#define DOOZER__RESPONSE__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&doozer__response__descriptor) \
, 0,0, 0,0, 0,0, NULL, 0,{0,NULL}, 0,0, 0,0, NULL }
/* Doozer__Request methods */
void doozer__request__init
(Doozer__Request *message);
size_t doozer__request__get_packed_size
(const Doozer__Request *message);
size_t doozer__request__pack
(const Doozer__Request *message,
uint8_t *out);
size_t doozer__request__pack_to_buffer
(const Doozer__Request *message,
ProtobufCBuffer *buffer);
Doozer__Request *
doozer__request__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void doozer__request__free_unpacked
(Doozer__Request *message,
ProtobufCAllocator *allocator);
/* Doozer__Response methods */
void doozer__response__init
(Doozer__Response *message);
size_t doozer__response__get_packed_size
(const Doozer__Response *message);
size_t doozer__response__pack
(const Doozer__Response *message,
uint8_t *out);
size_t doozer__response__pack_to_buffer
(const Doozer__Response *message,
ProtobufCBuffer *buffer);
Doozer__Response *
doozer__response__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void doozer__response__free_unpacked
(Doozer__Response *message,
ProtobufCAllocator *allocator);
/* --- per-message closures --- */
typedef void (*Doozer__Request_Closure)
(const Doozer__Request *message,
void *closure_data);
typedef void (*Doozer__Response_Closure)
(const Doozer__Response *message,
void *closure_data);
/* --- services --- */
/* --- descriptors --- */
extern const ProtobufCMessageDescriptor doozer__request__descriptor;
extern const ProtobufCEnumDescriptor doozer__request__verb__descriptor;
extern const ProtobufCMessageDescriptor doozer__response__descriptor;
extern const ProtobufCEnumDescriptor doozer__response__err__descriptor;
PROTOBUF_C_END_DECLS
#endif /* PROTOBUF_msg_2eproto__INCLUDED */