1 /* Generated by the protocol buffer compiler.  DO NOT EDIT! */
2 /* Generated from: modules/pb_tests/pb_tests.proto */
3 
4 #ifndef PROTOBUF_C_modules_2fpb_5ftests_2fpb_5ftests_2eproto__INCLUDED
5 #define PROTOBUF_C_modules_2fpb_5ftests_2fpb_5ftests_2eproto__INCLUDED
6 
7 #include <protobuf-c/protobuf-c.h>
8 
9 PROTOBUF_C__BEGIN_DECLS
10 
11 #if PROTOBUF_C_VERSION_NUMBER < 1000000
12 # error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers.
13 #elif 1003002 < PROTOBUF_C_MIN_COMPILER_VERSION
14 # error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c.
15 #endif
16 
17 #include "yara.pb-c.h"
18 
19 typedef struct _Test__Struct Test__Struct;
20 typedef struct _Test__Struct__NestedStruct Test__Struct__NestedStruct;
21 typedef struct _Test__MapStruct Test__MapStruct;
22 typedef struct _Test__RootMessage Test__RootMessage;
23 typedef struct _Test__RootMessage__FMapInt32Entry Test__RootMessage__FMapInt32Entry;
24 typedef struct _Test__RootMessage__FMapBoolEntry Test__RootMessage__FMapBoolEntry;
25 typedef struct _Test__RootMessage__FMapStringEntry Test__RootMessage__FMapStringEntry;
26 typedef struct _Test__RootMessage__FMapFloatEntry Test__RootMessage__FMapFloatEntry;
27 typedef struct _Test__RootMessage__FMapStructEntry Test__RootMessage__FMapStructEntry;
28 
29 
30 /* --- enums --- */
31 
32 typedef enum _Test__Struct__Enum {
33   TEST__STRUCT__ENUM__FIRST = 0,
34   TEST__STRUCT__ENUM__SECOND = 1
35     PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(TEST__STRUCT__ENUM)
36 } Test__Struct__Enum;
37 
38 /* --- messages --- */
39 
40 struct  _Test__Struct__NestedStruct
41 {
42   ProtobufCMessage base;
43   protobuf_c_boolean has_f_int32;
44   int32_t f_int32;
45   char *f_string;
46 };
47 #define TEST__STRUCT__NESTED_STRUCT__INIT \
48  { PROTOBUF_C_MESSAGE_INIT (&test__struct__nested_struct__descriptor) \
49     , 0, 0, NULL }
50 
51 
52 struct  _Test__Struct
53 {
54   ProtobufCMessage base;
55   char *f_string;
56   protobuf_c_boolean has_f_enum;
57   Test__Struct__Enum f_enum;
58   Test__Struct__NestedStruct *f_nested_struct;
59   size_t n_f_nested_struct_array;
60   Test__Struct__NestedStruct **f_nested_struct_array;
61 };
62 #define TEST__STRUCT__INIT \
63  { PROTOBUF_C_MESSAGE_INIT (&test__struct__descriptor) \
64     , NULL, 0, TEST__STRUCT__ENUM__FIRST, NULL, 0,NULL }
65 
66 
67 struct  _Test__MapStruct
68 {
69   ProtobufCMessage base;
70   protobuf_c_boolean has_f_int32;
71   int32_t f_int32;
72   protobuf_c_boolean has_f_int64;
73   int64_t f_int64;
74 };
75 #define TEST__MAP_STRUCT__INIT \
76  { PROTOBUF_C_MESSAGE_INIT (&test__map_struct__descriptor) \
77     , 0, 0, 0, 0 }
78 
79 
80 struct  _Test__RootMessage__FMapInt32Entry
81 {
82   ProtobufCMessage base;
83   char *key;
84   protobuf_c_boolean has_value;
85   int32_t value;
86 };
87 #define TEST__ROOT_MESSAGE__FMAP_INT32_ENTRY__INIT \
88  { PROTOBUF_C_MESSAGE_INIT (&test__root_message__fmap_int32_entry__descriptor) \
89     , NULL, 0, 0 }
90 
91 
92 struct  _Test__RootMessage__FMapBoolEntry
93 {
94   ProtobufCMessage base;
95   char *key;
96   protobuf_c_boolean has_value;
97   protobuf_c_boolean value;
98 };
99 #define TEST__ROOT_MESSAGE__FMAP_BOOL_ENTRY__INIT \
100  { PROTOBUF_C_MESSAGE_INIT (&test__root_message__fmap_bool_entry__descriptor) \
101     , NULL, 0, 0 }
102 
103 
104 struct  _Test__RootMessage__FMapStringEntry
105 {
106   ProtobufCMessage base;
107   char *key;
108   char *value;
109 };
110 #define TEST__ROOT_MESSAGE__FMAP_STRING_ENTRY__INIT \
111  { PROTOBUF_C_MESSAGE_INIT (&test__root_message__fmap_string_entry__descriptor) \
112     , NULL, NULL }
113 
114 
115 struct  _Test__RootMessage__FMapFloatEntry
116 {
117   ProtobufCMessage base;
118   char *key;
119   protobuf_c_boolean has_value;
120   float value;
121 };
122 #define TEST__ROOT_MESSAGE__FMAP_FLOAT_ENTRY__INIT \
123  { PROTOBUF_C_MESSAGE_INIT (&test__root_message__fmap_float_entry__descriptor) \
124     , NULL, 0, 0 }
125 
126 
127 struct  _Test__RootMessage__FMapStructEntry
128 {
129   ProtobufCMessage base;
130   char *key;
131   Test__MapStruct *value;
132 };
133 #define TEST__ROOT_MESSAGE__FMAP_STRUCT_ENTRY__INIT \
134  { PROTOBUF_C_MESSAGE_INIT (&test__root_message__fmap_struct_entry__descriptor) \
135     , NULL, NULL }
136 
137 
138 typedef enum {
139   TEST__ROOT_MESSAGE__F_ONEOF__NOT_SET = 0,
140   TEST__ROOT_MESSAGE__F_ONEOF_F_ONEOF_STRING = 20,
141   TEST__ROOT_MESSAGE__F_ONEOF_F_ONEOF_STRUCT = 21
142     PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(TEST__ROOT_MESSAGE__F_ONEOF)
143 } Test__RootMessage__FOneofCase;
144 
145 struct  _Test__RootMessage
146 {
147   ProtobufCMessage base;
148   protobuf_c_boolean has_f_int32;
149   int32_t f_int32;
150   protobuf_c_boolean has_f_int64;
151   int64_t f_int64;
152   /*
153    *optional uint32 f_uint32 = 3;  // not supported
154    *optional uint64 f_uint64 = 4;  // not supported
155    */
156   protobuf_c_boolean has_f_sint32;
157   int32_t f_sint32;
158   protobuf_c_boolean has_f_sint64;
159   int64_t f_sint64;
160   /*
161    *optional fixed32 f_fixed32 = 7;  // not supported
162    *optional fixed64 f_fixed64 = 8;  // not supported
163    */
164   protobuf_c_boolean has_f_sfixed32;
165   int32_t f_sfixed32;
166   protobuf_c_boolean has_f_sfixed64;
167   int64_t f_sfixed64;
168   protobuf_c_boolean has_f_bool;
169   protobuf_c_boolean f_bool;
170   char *f_string;
171   protobuf_c_boolean has_f_bytes;
172   ProtobufCBinaryData f_bytes;
173   size_t n_f_struct_array;
174   Test__Struct **f_struct_array;
175   size_t n_f_map_int32;
176   Test__RootMessage__FMapInt32Entry **f_map_int32;
177   size_t n_f_map_bool;
178   Test__RootMessage__FMapBoolEntry **f_map_bool;
179   size_t n_f_map_string;
180   Test__RootMessage__FMapStringEntry **f_map_string;
181   size_t n_f_map_float;
182   Test__RootMessage__FMapFloatEntry **f_map_float;
183   size_t n_f_map_struct;
184   Test__RootMessage__FMapStructEntry **f_map_struct;
185   char *f_ignored;
186   char *f_renamed;
187   Test__RootMessage__FOneofCase f_oneof_case;
188   union {
189     char *f_oneof_string;
190     Test__MapStruct *f_oneof_struct;
191   };
192 };
193 #define TEST__ROOT_MESSAGE__INIT \
194  { PROTOBUF_C_MESSAGE_INIT (&test__root_message__descriptor) \
195     , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, 0, {0,NULL}, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, NULL, NULL, TEST__ROOT_MESSAGE__F_ONEOF__NOT_SET, {0} }
196 
197 
198 /* Test__Struct__NestedStruct methods */
199 void   test__struct__nested_struct__init
200                      (Test__Struct__NestedStruct         *message);
201 /* Test__Struct methods */
202 void   test__struct__init
203                      (Test__Struct         *message);
204 size_t test__struct__get_packed_size
205                      (const Test__Struct   *message);
206 size_t test__struct__pack
207                      (const Test__Struct   *message,
208                       uint8_t             *out);
209 size_t test__struct__pack_to_buffer
210                      (const Test__Struct   *message,
211                       ProtobufCBuffer     *buffer);
212 Test__Struct *
213        test__struct__unpack
214                      (ProtobufCAllocator  *allocator,
215                       size_t               len,
216                       const uint8_t       *data);
217 void   test__struct__free_unpacked
218                      (Test__Struct *message,
219                       ProtobufCAllocator *allocator);
220 /* Test__MapStruct methods */
221 void   test__map_struct__init
222                      (Test__MapStruct         *message);
223 size_t test__map_struct__get_packed_size
224                      (const Test__MapStruct   *message);
225 size_t test__map_struct__pack
226                      (const Test__MapStruct   *message,
227                       uint8_t             *out);
228 size_t test__map_struct__pack_to_buffer
229                      (const Test__MapStruct   *message,
230                       ProtobufCBuffer     *buffer);
231 Test__MapStruct *
232        test__map_struct__unpack
233                      (ProtobufCAllocator  *allocator,
234                       size_t               len,
235                       const uint8_t       *data);
236 void   test__map_struct__free_unpacked
237                      (Test__MapStruct *message,
238                       ProtobufCAllocator *allocator);
239 /* Test__RootMessage__FMapInt32Entry methods */
240 void   test__root_message__fmap_int32_entry__init
241                      (Test__RootMessage__FMapInt32Entry         *message);
242 /* Test__RootMessage__FMapBoolEntry methods */
243 void   test__root_message__fmap_bool_entry__init
244                      (Test__RootMessage__FMapBoolEntry         *message);
245 /* Test__RootMessage__FMapStringEntry methods */
246 void   test__root_message__fmap_string_entry__init
247                      (Test__RootMessage__FMapStringEntry         *message);
248 /* Test__RootMessage__FMapFloatEntry methods */
249 void   test__root_message__fmap_float_entry__init
250                      (Test__RootMessage__FMapFloatEntry         *message);
251 /* Test__RootMessage__FMapStructEntry methods */
252 void   test__root_message__fmap_struct_entry__init
253                      (Test__RootMessage__FMapStructEntry         *message);
254 /* Test__RootMessage methods */
255 void   test__root_message__init
256                      (Test__RootMessage         *message);
257 size_t test__root_message__get_packed_size
258                      (const Test__RootMessage   *message);
259 size_t test__root_message__pack
260                      (const Test__RootMessage   *message,
261                       uint8_t             *out);
262 size_t test__root_message__pack_to_buffer
263                      (const Test__RootMessage   *message,
264                       ProtobufCBuffer     *buffer);
265 Test__RootMessage *
266        test__root_message__unpack
267                      (ProtobufCAllocator  *allocator,
268                       size_t               len,
269                       const uint8_t       *data);
270 void   test__root_message__free_unpacked
271                      (Test__RootMessage *message,
272                       ProtobufCAllocator *allocator);
273 /* --- per-message closures --- */
274 
275 typedef void (*Test__Struct__NestedStruct_Closure)
276                  (const Test__Struct__NestedStruct *message,
277                   void *closure_data);
278 typedef void (*Test__Struct_Closure)
279                  (const Test__Struct *message,
280                   void *closure_data);
281 typedef void (*Test__MapStruct_Closure)
282                  (const Test__MapStruct *message,
283                   void *closure_data);
284 typedef void (*Test__RootMessage__FMapInt32Entry_Closure)
285                  (const Test__RootMessage__FMapInt32Entry *message,
286                   void *closure_data);
287 typedef void (*Test__RootMessage__FMapBoolEntry_Closure)
288                  (const Test__RootMessage__FMapBoolEntry *message,
289                   void *closure_data);
290 typedef void (*Test__RootMessage__FMapStringEntry_Closure)
291                  (const Test__RootMessage__FMapStringEntry *message,
292                   void *closure_data);
293 typedef void (*Test__RootMessage__FMapFloatEntry_Closure)
294                  (const Test__RootMessage__FMapFloatEntry *message,
295                   void *closure_data);
296 typedef void (*Test__RootMessage__FMapStructEntry_Closure)
297                  (const Test__RootMessage__FMapStructEntry *message,
298                   void *closure_data);
299 typedef void (*Test__RootMessage_Closure)
300                  (const Test__RootMessage *message,
301                   void *closure_data);
302 
303 /* --- services --- */
304 
305 
306 /* --- descriptors --- */
307 
308 extern const ProtobufCMessageDescriptor test__struct__descriptor;
309 extern const ProtobufCMessageDescriptor test__struct__nested_struct__descriptor;
310 extern const ProtobufCEnumDescriptor    test__struct__enum__descriptor;
311 extern const ProtobufCMessageDescriptor test__map_struct__descriptor;
312 extern const ProtobufCMessageDescriptor test__root_message__descriptor;
313 extern const ProtobufCMessageDescriptor test__root_message__fmap_int32_entry__descriptor;
314 extern const ProtobufCMessageDescriptor test__root_message__fmap_bool_entry__descriptor;
315 extern const ProtobufCMessageDescriptor test__root_message__fmap_string_entry__descriptor;
316 extern const ProtobufCMessageDescriptor test__root_message__fmap_float_entry__descriptor;
317 extern const ProtobufCMessageDescriptor test__root_message__fmap_struct_entry__descriptor;
318 
319 PROTOBUF_C__END_DECLS
320 
321 
322 #endif  /* PROTOBUF_C_modules_2fpb_5ftests_2fpb_5ftests_2eproto__INCLUDED */
323