Updates to autotools for library detection
[distributedratelimiting.git] / include / zookeeper / zookeeper.jute.h
1 #ifndef __ZOOKEEPER_JUTE__
2 #define __ZOOKEEPER_JUTE__
3 #include "recordio.h"
4
5 #ifdef __cplusplus
6 extern "C" {
7 #endif
8
9 struct Id {
10     char * scheme;
11     char * id;
12 };
13 int serialize_Id(struct oarchive *out, const char *tag, struct Id *v);
14 int deserialize_Id(struct iarchive *in, const char *tag, struct Id*v);
15 void deallocate_Id(struct Id*);
16 struct ACL {
17     int32_t perms;
18     struct Id id;
19 };
20 int serialize_ACL(struct oarchive *out, const char *tag, struct ACL *v);
21 int deserialize_ACL(struct iarchive *in, const char *tag, struct ACL*v);
22 void deallocate_ACL(struct ACL*);
23 struct Stat {
24     int64_t czxid;
25     int64_t mzxid;
26     int64_t ctime;
27     int64_t mtime;
28     int32_t version;
29     int32_t cversion;
30     int32_t aversion;
31     int64_t ephemeralOwner;
32     int32_t dataLength;
33     int32_t numChildren;
34     int64_t pzxid;
35 };
36 int serialize_Stat(struct oarchive *out, const char *tag, struct Stat *v);
37 int deserialize_Stat(struct iarchive *in, const char *tag, struct Stat*v);
38 void deallocate_Stat(struct Stat*);
39 struct StatPersisted {
40     int64_t czxid;
41     int64_t mzxid;
42     int64_t ctime;
43     int64_t mtime;
44     int32_t version;
45     int32_t cversion;
46     int32_t aversion;
47     int64_t ephemeralOwner;
48     int64_t pzxid;
49 };
50 int serialize_StatPersisted(struct oarchive *out, const char *tag, struct StatPersisted *v);
51 int deserialize_StatPersisted(struct iarchive *in, const char *tag, struct StatPersisted*v);
52 void deallocate_StatPersisted(struct StatPersisted*);
53 struct StatPersistedV1 {
54     int64_t czxid;
55     int64_t mzxid;
56     int64_t ctime;
57     int64_t mtime;
58     int32_t version;
59     int32_t cversion;
60     int32_t aversion;
61     int64_t ephemeralOwner;
62 };
63 int serialize_StatPersistedV1(struct oarchive *out, const char *tag, struct StatPersistedV1 *v);
64 int deserialize_StatPersistedV1(struct iarchive *in, const char *tag, struct StatPersistedV1*v);
65 void deallocate_StatPersistedV1(struct StatPersistedV1*);
66 struct op_result_t {
67     int32_t rc;
68     int32_t op;
69     struct buffer response;
70 };
71 int serialize_op_result_t(struct oarchive *out, const char *tag, struct op_result_t *v);
72 int deserialize_op_result_t(struct iarchive *in, const char *tag, struct op_result_t*v);
73 void deallocate_op_result_t(struct op_result_t*);
74 struct ConnectRequest {
75     int32_t protocolVersion;
76     int64_t lastZxidSeen;
77     int32_t timeOut;
78     int64_t sessionId;
79     struct buffer passwd;
80 };
81 int serialize_ConnectRequest(struct oarchive *out, const char *tag, struct ConnectRequest *v);
82 int deserialize_ConnectRequest(struct iarchive *in, const char *tag, struct ConnectRequest*v);
83 void deallocate_ConnectRequest(struct ConnectRequest*);
84 struct ConnectResponse {
85     int32_t protocolVersion;
86     int32_t timeOut;
87     int64_t sessionId;
88     struct buffer passwd;
89 };
90 int serialize_ConnectResponse(struct oarchive *out, const char *tag, struct ConnectResponse *v);
91 int deserialize_ConnectResponse(struct iarchive *in, const char *tag, struct ConnectResponse*v);
92 void deallocate_ConnectResponse(struct ConnectResponse*);
93 struct String_vector {
94     int32_t count;
95     char * *data;
96 ;
97 };
98 int serialize_String_vector(struct oarchive *out, const char *tag, struct String_vector *v);
99 int deserialize_String_vector(struct iarchive *in, const char *tag, struct String_vector *v);
100 int allocate_String_vector(struct String_vector *v, int32_t len);
101 int deallocate_String_vector(struct String_vector *v);
102 struct SetWatches {
103     int64_t relativeZxid;
104     struct String_vector dataWatches;
105     struct String_vector existWatches;
106     struct String_vector childWatches;
107 };
108 int serialize_SetWatches(struct oarchive *out, const char *tag, struct SetWatches *v);
109 int deserialize_SetWatches(struct iarchive *in, const char *tag, struct SetWatches*v);
110 void deallocate_SetWatches(struct SetWatches*);
111 struct RequestHeader {
112     int32_t xid;
113     int32_t type;
114 };
115 int serialize_RequestHeader(struct oarchive *out, const char *tag, struct RequestHeader *v);
116 int deserialize_RequestHeader(struct iarchive *in, const char *tag, struct RequestHeader*v);
117 void deallocate_RequestHeader(struct RequestHeader*);
118 struct AuthPacket {
119     int32_t type;
120     char * scheme;
121     struct buffer auth;
122 };
123 int serialize_AuthPacket(struct oarchive *out, const char *tag, struct AuthPacket *v);
124 int deserialize_AuthPacket(struct iarchive *in, const char *tag, struct AuthPacket*v);
125 void deallocate_AuthPacket(struct AuthPacket*);
126 struct ReplyHeader {
127     int32_t xid;
128     int64_t zxid;
129     int32_t err;
130 };
131 int serialize_ReplyHeader(struct oarchive *out, const char *tag, struct ReplyHeader *v);
132 int deserialize_ReplyHeader(struct iarchive *in, const char *tag, struct ReplyHeader*v);
133 void deallocate_ReplyHeader(struct ReplyHeader*);
134 struct GetDataRequest {
135     char * path;
136     int32_t watch;
137 };
138 int serialize_GetDataRequest(struct oarchive *out, const char *tag, struct GetDataRequest *v);
139 int deserialize_GetDataRequest(struct iarchive *in, const char *tag, struct GetDataRequest*v);
140 void deallocate_GetDataRequest(struct GetDataRequest*);
141 struct SetDataRequest {
142     char * path;
143     struct buffer data;
144     int32_t version;
145 };
146 int serialize_SetDataRequest(struct oarchive *out, const char *tag, struct SetDataRequest *v);
147 int deserialize_SetDataRequest(struct iarchive *in, const char *tag, struct SetDataRequest*v);
148 void deallocate_SetDataRequest(struct SetDataRequest*);
149 struct SetDataResponse {
150     struct Stat stat;
151 };
152 int serialize_SetDataResponse(struct oarchive *out, const char *tag, struct SetDataResponse *v);
153 int deserialize_SetDataResponse(struct iarchive *in, const char *tag, struct SetDataResponse*v);
154 void deallocate_SetDataResponse(struct SetDataResponse*);
155 struct ACL_vector {
156     int32_t count;
157     struct ACL *data;
158 ;
159 };
160 int serialize_ACL_vector(struct oarchive *out, const char *tag, struct ACL_vector *v);
161 int deserialize_ACL_vector(struct iarchive *in, const char *tag, struct ACL_vector *v);
162 int allocate_ACL_vector(struct ACL_vector *v, int32_t len);
163 int deallocate_ACL_vector(struct ACL_vector *v);
164 struct CreateRequest {
165     char * path;
166     struct buffer data;
167     struct ACL_vector acl;
168     int32_t flags;
169 };
170 int serialize_CreateRequest(struct oarchive *out, const char *tag, struct CreateRequest *v);
171 int deserialize_CreateRequest(struct iarchive *in, const char *tag, struct CreateRequest*v);
172 void deallocate_CreateRequest(struct CreateRequest*);
173 struct DeleteRequest {
174     char * path;
175     int32_t version;
176 };
177 int serialize_DeleteRequest(struct oarchive *out, const char *tag, struct DeleteRequest *v);
178 int deserialize_DeleteRequest(struct iarchive *in, const char *tag, struct DeleteRequest*v);
179 void deallocate_DeleteRequest(struct DeleteRequest*);
180 struct GetChildrenRequest {
181     char * path;
182     int32_t watch;
183 };
184 int serialize_GetChildrenRequest(struct oarchive *out, const char *tag, struct GetChildrenRequest *v);
185 int deserialize_GetChildrenRequest(struct iarchive *in, const char *tag, struct GetChildrenRequest*v);
186 void deallocate_GetChildrenRequest(struct GetChildrenRequest*);
187 struct GetMaxChildrenRequest {
188     char * path;
189 };
190 int serialize_GetMaxChildrenRequest(struct oarchive *out, const char *tag, struct GetMaxChildrenRequest *v);
191 int deserialize_GetMaxChildrenRequest(struct iarchive *in, const char *tag, struct GetMaxChildrenRequest*v);
192 void deallocate_GetMaxChildrenRequest(struct GetMaxChildrenRequest*);
193 struct GetMaxChildrenResponse {
194     int32_t max;
195 };
196 int serialize_GetMaxChildrenResponse(struct oarchive *out, const char *tag, struct GetMaxChildrenResponse *v);
197 int deserialize_GetMaxChildrenResponse(struct iarchive *in, const char *tag, struct GetMaxChildrenResponse*v);
198 void deallocate_GetMaxChildrenResponse(struct GetMaxChildrenResponse*);
199 struct SetMaxChildrenRequest {
200     char * path;
201     int32_t max;
202 };
203 int serialize_SetMaxChildrenRequest(struct oarchive *out, const char *tag, struct SetMaxChildrenRequest *v);
204 int deserialize_SetMaxChildrenRequest(struct iarchive *in, const char *tag, struct SetMaxChildrenRequest*v);
205 void deallocate_SetMaxChildrenRequest(struct SetMaxChildrenRequest*);
206 struct SyncRequest {
207     char * path;
208 };
209 int serialize_SyncRequest(struct oarchive *out, const char *tag, struct SyncRequest *v);
210 int deserialize_SyncRequest(struct iarchive *in, const char *tag, struct SyncRequest*v);
211 void deallocate_SyncRequest(struct SyncRequest*);
212 struct SyncResponse {
213     char * path;
214 };
215 int serialize_SyncResponse(struct oarchive *out, const char *tag, struct SyncResponse *v);
216 int deserialize_SyncResponse(struct iarchive *in, const char *tag, struct SyncResponse*v);
217 void deallocate_SyncResponse(struct SyncResponse*);
218 struct GetACLRequest {
219     char * path;
220 };
221 int serialize_GetACLRequest(struct oarchive *out, const char *tag, struct GetACLRequest *v);
222 int deserialize_GetACLRequest(struct iarchive *in, const char *tag, struct GetACLRequest*v);
223 void deallocate_GetACLRequest(struct GetACLRequest*);
224 struct SetACLRequest {
225     char * path;
226     struct ACL_vector acl;
227     int32_t version;
228 };
229 int serialize_SetACLRequest(struct oarchive *out, const char *tag, struct SetACLRequest *v);
230 int deserialize_SetACLRequest(struct iarchive *in, const char *tag, struct SetACLRequest*v);
231 void deallocate_SetACLRequest(struct SetACLRequest*);
232 struct SetACLResponse {
233     struct Stat stat;
234 };
235 int serialize_SetACLResponse(struct oarchive *out, const char *tag, struct SetACLResponse *v);
236 int deserialize_SetACLResponse(struct iarchive *in, const char *tag, struct SetACLResponse*v);
237 void deallocate_SetACLResponse(struct SetACLResponse*);
238 struct WatcherEvent {
239     int32_t type;
240     int32_t state;
241     char * path;
242 };
243 int serialize_WatcherEvent(struct oarchive *out, const char *tag, struct WatcherEvent *v);
244 int deserialize_WatcherEvent(struct iarchive *in, const char *tag, struct WatcherEvent*v);
245 void deallocate_WatcherEvent(struct WatcherEvent*);
246 struct CreateResponse {
247     char * path;
248 };
249 int serialize_CreateResponse(struct oarchive *out, const char *tag, struct CreateResponse *v);
250 int deserialize_CreateResponse(struct iarchive *in, const char *tag, struct CreateResponse*v);
251 void deallocate_CreateResponse(struct CreateResponse*);
252 struct ExistsRequest {
253     char * path;
254     int32_t watch;
255 };
256 int serialize_ExistsRequest(struct oarchive *out, const char *tag, struct ExistsRequest *v);
257 int deserialize_ExistsRequest(struct iarchive *in, const char *tag, struct ExistsRequest*v);
258 void deallocate_ExistsRequest(struct ExistsRequest*);
259 struct ExistsResponse {
260     struct Stat stat;
261 };
262 int serialize_ExistsResponse(struct oarchive *out, const char *tag, struct ExistsResponse *v);
263 int deserialize_ExistsResponse(struct iarchive *in, const char *tag, struct ExistsResponse*v);
264 void deallocate_ExistsResponse(struct ExistsResponse*);
265 struct GetDataResponse {
266     struct buffer data;
267     struct Stat stat;
268 };
269 int serialize_GetDataResponse(struct oarchive *out, const char *tag, struct GetDataResponse *v);
270 int deserialize_GetDataResponse(struct iarchive *in, const char *tag, struct GetDataResponse*v);
271 void deallocate_GetDataResponse(struct GetDataResponse*);
272 struct GetChildrenResponse {
273     struct String_vector children;
274 };
275 int serialize_GetChildrenResponse(struct oarchive *out, const char *tag, struct GetChildrenResponse *v);
276 int deserialize_GetChildrenResponse(struct iarchive *in, const char *tag, struct GetChildrenResponse*v);
277 void deallocate_GetChildrenResponse(struct GetChildrenResponse*);
278 struct GetACLResponse {
279     struct ACL_vector acl;
280     struct Stat stat;
281 };
282 int serialize_GetACLResponse(struct oarchive *out, const char *tag, struct GetACLResponse *v);
283 int deserialize_GetACLResponse(struct iarchive *in, const char *tag, struct GetACLResponse*v);
284 void deallocate_GetACLResponse(struct GetACLResponse*);
285 struct Id_vector {
286     int32_t count;
287     struct Id *data;
288 ;
289 };
290 int serialize_Id_vector(struct oarchive *out, const char *tag, struct Id_vector *v);
291 int deserialize_Id_vector(struct iarchive *in, const char *tag, struct Id_vector *v);
292 int allocate_Id_vector(struct Id_vector *v, int32_t len);
293 int deallocate_Id_vector(struct Id_vector *v);
294 struct QuorumPacket {
295     int32_t type;
296     int64_t zxid;
297     struct buffer data;
298     struct Id_vector authinfo;
299 };
300 int serialize_QuorumPacket(struct oarchive *out, const char *tag, struct QuorumPacket *v);
301 int deserialize_QuorumPacket(struct iarchive *in, const char *tag, struct QuorumPacket*v);
302 void deallocate_QuorumPacket(struct QuorumPacket*);
303 struct FileHeader {
304     int32_t magic;
305     int32_t version;
306     int64_t dbid;
307 };
308 int serialize_FileHeader(struct oarchive *out, const char *tag, struct FileHeader *v);
309 int deserialize_FileHeader(struct iarchive *in, const char *tag, struct FileHeader*v);
310 void deallocate_FileHeader(struct FileHeader*);
311 struct TxnHeader {
312     int64_t clientId;
313     int32_t cxid;
314     int64_t zxid;
315     int64_t time;
316     int32_t type;
317 };
318 int serialize_TxnHeader(struct oarchive *out, const char *tag, struct TxnHeader *v);
319 int deserialize_TxnHeader(struct iarchive *in, const char *tag, struct TxnHeader*v);
320 void deallocate_TxnHeader(struct TxnHeader*);
321 struct CreateTxn {
322     char * path;
323     struct buffer data;
324     struct ACL_vector acl;
325     int32_t ephemeral;
326 };
327 int serialize_CreateTxn(struct oarchive *out, const char *tag, struct CreateTxn *v);
328 int deserialize_CreateTxn(struct iarchive *in, const char *tag, struct CreateTxn*v);
329 void deallocate_CreateTxn(struct CreateTxn*);
330 struct DeleteTxn {
331     char * path;
332 };
333 int serialize_DeleteTxn(struct oarchive *out, const char *tag, struct DeleteTxn *v);
334 int deserialize_DeleteTxn(struct iarchive *in, const char *tag, struct DeleteTxn*v);
335 void deallocate_DeleteTxn(struct DeleteTxn*);
336 struct SetDataTxn {
337     char * path;
338     struct buffer data;
339     int32_t version;
340 };
341 int serialize_SetDataTxn(struct oarchive *out, const char *tag, struct SetDataTxn *v);
342 int deserialize_SetDataTxn(struct iarchive *in, const char *tag, struct SetDataTxn*v);
343 void deallocate_SetDataTxn(struct SetDataTxn*);
344 struct SetACLTxn {
345     char * path;
346     struct ACL_vector acl;
347     int32_t version;
348 };
349 int serialize_SetACLTxn(struct oarchive *out, const char *tag, struct SetACLTxn *v);
350 int deserialize_SetACLTxn(struct iarchive *in, const char *tag, struct SetACLTxn*v);
351 void deallocate_SetACLTxn(struct SetACLTxn*);
352 struct SetMaxChildrenTxn {
353     char * path;
354     int32_t max;
355 };
356 int serialize_SetMaxChildrenTxn(struct oarchive *out, const char *tag, struct SetMaxChildrenTxn *v);
357 int deserialize_SetMaxChildrenTxn(struct iarchive *in, const char *tag, struct SetMaxChildrenTxn*v);
358 void deallocate_SetMaxChildrenTxn(struct SetMaxChildrenTxn*);
359 struct CreateSessionTxn {
360     int32_t timeOut;
361 };
362 int serialize_CreateSessionTxn(struct oarchive *out, const char *tag, struct CreateSessionTxn *v);
363 int deserialize_CreateSessionTxn(struct iarchive *in, const char *tag, struct CreateSessionTxn*v);
364 void deallocate_CreateSessionTxn(struct CreateSessionTxn*);
365 struct ErrorTxn {
366     int32_t err;
367 };
368 int serialize_ErrorTxn(struct oarchive *out, const char *tag, struct ErrorTxn *v);
369 int deserialize_ErrorTxn(struct iarchive *in, const char *tag, struct ErrorTxn*v);
370 void deallocate_ErrorTxn(struct ErrorTxn*);
371
372 #ifdef __cplusplus
373 }
374 #endif
375
376 #endif //ZOOKEEPER_JUTE__