pbf_parser 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,532 @@
1
+ /* Generated by the protocol buffer compiler. DO NOT EDIT! */
2
+
3
+ #ifndef PROTOBUF_C_osmformat_2eproto__INCLUDED
4
+ #define PROTOBUF_C_osmformat_2eproto__INCLUDED
5
+
6
+ #include <google/protobuf-c/protobuf-c.h>
7
+
8
+ PROTOBUF_C_BEGIN_DECLS
9
+
10
+
11
+ typedef struct _HeaderBlock HeaderBlock;
12
+ typedef struct _HeaderBBox HeaderBBox;
13
+ typedef struct _PrimitiveBlock PrimitiveBlock;
14
+ typedef struct _PrimitiveGroup PrimitiveGroup;
15
+ typedef struct _StringTable StringTable;
16
+ typedef struct _Info Info;
17
+ typedef struct _DenseInfo DenseInfo;
18
+ typedef struct _ChangeSet ChangeSet;
19
+ typedef struct _Node Node;
20
+ typedef struct _DenseNodes DenseNodes;
21
+ typedef struct _Way Way;
22
+ typedef struct _Relation Relation;
23
+
24
+
25
+ /* --- enums --- */
26
+
27
+ typedef enum _Relation__MemberType {
28
+ RELATION__MEMBER_TYPE__NODE = 0,
29
+ RELATION__MEMBER_TYPE__WAY = 1,
30
+ RELATION__MEMBER_TYPE__RELATION = 2
31
+ } Relation__MemberType;
32
+
33
+ /* --- messages --- */
34
+
35
+ struct _HeaderBlock
36
+ {
37
+ ProtobufCMessage base;
38
+ HeaderBBox *bbox;
39
+ size_t n_required_features;
40
+ char **required_features;
41
+ size_t n_optional_features;
42
+ char **optional_features;
43
+ char *writingprogram;
44
+ char *source;
45
+ protobuf_c_boolean has_osmosis_replication_timestamp;
46
+ int64_t osmosis_replication_timestamp;
47
+ protobuf_c_boolean has_osmosis_replication_sequence_number;
48
+ int64_t osmosis_replication_sequence_number;
49
+ char *osmosis_replication_base_url;
50
+ };
51
+ #define HEADER_BLOCK__INIT \
52
+ { PROTOBUF_C_MESSAGE_INIT (&header_block__descriptor) \
53
+ , NULL, 0,NULL, 0,NULL, NULL, NULL, 0,0, 0,0, NULL }
54
+
55
+
56
+ struct _HeaderBBox
57
+ {
58
+ ProtobufCMessage base;
59
+ int64_t left;
60
+ int64_t right;
61
+ int64_t top;
62
+ int64_t bottom;
63
+ };
64
+ #define HEADER_BBOX__INIT \
65
+ { PROTOBUF_C_MESSAGE_INIT (&header_bbox__descriptor) \
66
+ , 0, 0, 0, 0 }
67
+
68
+
69
+ struct _PrimitiveBlock
70
+ {
71
+ ProtobufCMessage base;
72
+ StringTable *stringtable;
73
+ size_t n_primitivegroup;
74
+ PrimitiveGroup **primitivegroup;
75
+ protobuf_c_boolean has_granularity;
76
+ int32_t granularity;
77
+ protobuf_c_boolean has_lat_offset;
78
+ int64_t lat_offset;
79
+ protobuf_c_boolean has_lon_offset;
80
+ int64_t lon_offset;
81
+ protobuf_c_boolean has_date_granularity;
82
+ int32_t date_granularity;
83
+ };
84
+ #define PRIMITIVE_BLOCK__INIT \
85
+ { PROTOBUF_C_MESSAGE_INIT (&primitive_block__descriptor) \
86
+ , NULL, 0,NULL, 0,100, 0,0, 0,0, 0,1000 }
87
+
88
+
89
+ struct _PrimitiveGroup
90
+ {
91
+ ProtobufCMessage base;
92
+ size_t n_nodes;
93
+ Node **nodes;
94
+ DenseNodes *dense;
95
+ size_t n_ways;
96
+ Way **ways;
97
+ size_t n_relations;
98
+ Relation **relations;
99
+ size_t n_changesets;
100
+ ChangeSet **changesets;
101
+ };
102
+ #define PRIMITIVE_GROUP__INIT \
103
+ { PROTOBUF_C_MESSAGE_INIT (&primitive_group__descriptor) \
104
+ , 0,NULL, NULL, 0,NULL, 0,NULL, 0,NULL }
105
+
106
+
107
+ struct _StringTable
108
+ {
109
+ ProtobufCMessage base;
110
+ size_t n_s;
111
+ ProtobufCBinaryData *s;
112
+ };
113
+ #define STRING_TABLE__INIT \
114
+ { PROTOBUF_C_MESSAGE_INIT (&string_table__descriptor) \
115
+ , 0,NULL }
116
+
117
+
118
+ struct _Info
119
+ {
120
+ ProtobufCMessage base;
121
+ protobuf_c_boolean has_version;
122
+ int32_t version;
123
+ protobuf_c_boolean has_timestamp;
124
+ int64_t timestamp;
125
+ protobuf_c_boolean has_changeset;
126
+ int64_t changeset;
127
+ protobuf_c_boolean has_uid;
128
+ int32_t uid;
129
+ protobuf_c_boolean has_user_sid;
130
+ uint32_t user_sid;
131
+ protobuf_c_boolean has_visible;
132
+ protobuf_c_boolean visible;
133
+ };
134
+ #define INFO__INIT \
135
+ { PROTOBUF_C_MESSAGE_INIT (&info__descriptor) \
136
+ , 0,-1, 0,0, 0,0, 0,0, 0,0, 0,0 }
137
+
138
+
139
+ struct _DenseInfo
140
+ {
141
+ ProtobufCMessage base;
142
+ size_t n_version;
143
+ int32_t *version;
144
+ size_t n_timestamp;
145
+ int64_t *timestamp;
146
+ size_t n_changeset;
147
+ int64_t *changeset;
148
+ size_t n_uid;
149
+ int32_t *uid;
150
+ size_t n_user_sid;
151
+ int32_t *user_sid;
152
+ size_t n_visible;
153
+ protobuf_c_boolean *visible;
154
+ };
155
+ #define DENSE_INFO__INIT \
156
+ { PROTOBUF_C_MESSAGE_INIT (&dense_info__descriptor) \
157
+ , 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL }
158
+
159
+
160
+ struct _ChangeSet
161
+ {
162
+ ProtobufCMessage base;
163
+ int64_t id;
164
+ };
165
+ #define CHANGE_SET__INIT \
166
+ { PROTOBUF_C_MESSAGE_INIT (&change_set__descriptor) \
167
+ , 0 }
168
+
169
+
170
+ struct _Node
171
+ {
172
+ ProtobufCMessage base;
173
+ int64_t id;
174
+ size_t n_keys;
175
+ uint32_t *keys;
176
+ size_t n_vals;
177
+ uint32_t *vals;
178
+ Info *info;
179
+ int64_t lat;
180
+ int64_t lon;
181
+ };
182
+ #define NODE__INIT \
183
+ { PROTOBUF_C_MESSAGE_INIT (&node__descriptor) \
184
+ , 0, 0,NULL, 0,NULL, NULL, 0, 0 }
185
+
186
+
187
+ struct _DenseNodes
188
+ {
189
+ ProtobufCMessage base;
190
+ size_t n_id;
191
+ int64_t *id;
192
+ DenseInfo *denseinfo;
193
+ size_t n_lat;
194
+ int64_t *lat;
195
+ size_t n_lon;
196
+ int64_t *lon;
197
+ size_t n_keys_vals;
198
+ int32_t *keys_vals;
199
+ };
200
+ #define DENSE_NODES__INIT \
201
+ { PROTOBUF_C_MESSAGE_INIT (&dense_nodes__descriptor) \
202
+ , 0,NULL, NULL, 0,NULL, 0,NULL, 0,NULL }
203
+
204
+
205
+ struct _Way
206
+ {
207
+ ProtobufCMessage base;
208
+ int64_t id;
209
+ size_t n_keys;
210
+ uint32_t *keys;
211
+ size_t n_vals;
212
+ uint32_t *vals;
213
+ Info *info;
214
+ size_t n_refs;
215
+ int64_t *refs;
216
+ };
217
+ #define WAY__INIT \
218
+ { PROTOBUF_C_MESSAGE_INIT (&way__descriptor) \
219
+ , 0, 0,NULL, 0,NULL, NULL, 0,NULL }
220
+
221
+
222
+ struct _Relation
223
+ {
224
+ ProtobufCMessage base;
225
+ int64_t id;
226
+ size_t n_keys;
227
+ uint32_t *keys;
228
+ size_t n_vals;
229
+ uint32_t *vals;
230
+ Info *info;
231
+ size_t n_roles_sid;
232
+ int32_t *roles_sid;
233
+ size_t n_memids;
234
+ int64_t *memids;
235
+ size_t n_types;
236
+ Relation__MemberType *types;
237
+ };
238
+ #define RELATION__INIT \
239
+ { PROTOBUF_C_MESSAGE_INIT (&relation__descriptor) \
240
+ , 0, 0,NULL, 0,NULL, NULL, 0,NULL, 0,NULL, 0,NULL }
241
+
242
+
243
+ /* HeaderBlock methods */
244
+ void header_block__init
245
+ (HeaderBlock *message);
246
+ size_t header_block__get_packed_size
247
+ (const HeaderBlock *message);
248
+ size_t header_block__pack
249
+ (const HeaderBlock *message,
250
+ uint8_t *out);
251
+ size_t header_block__pack_to_buffer
252
+ (const HeaderBlock *message,
253
+ ProtobufCBuffer *buffer);
254
+ HeaderBlock *
255
+ header_block__unpack
256
+ (ProtobufCAllocator *allocator,
257
+ size_t len,
258
+ const uint8_t *data);
259
+ void header_block__free_unpacked
260
+ (HeaderBlock *message,
261
+ ProtobufCAllocator *allocator);
262
+ /* HeaderBBox methods */
263
+ void header_bbox__init
264
+ (HeaderBBox *message);
265
+ size_t header_bbox__get_packed_size
266
+ (const HeaderBBox *message);
267
+ size_t header_bbox__pack
268
+ (const HeaderBBox *message,
269
+ uint8_t *out);
270
+ size_t header_bbox__pack_to_buffer
271
+ (const HeaderBBox *message,
272
+ ProtobufCBuffer *buffer);
273
+ HeaderBBox *
274
+ header_bbox__unpack
275
+ (ProtobufCAllocator *allocator,
276
+ size_t len,
277
+ const uint8_t *data);
278
+ void header_bbox__free_unpacked
279
+ (HeaderBBox *message,
280
+ ProtobufCAllocator *allocator);
281
+ /* PrimitiveBlock methods */
282
+ void primitive_block__init
283
+ (PrimitiveBlock *message);
284
+ size_t primitive_block__get_packed_size
285
+ (const PrimitiveBlock *message);
286
+ size_t primitive_block__pack
287
+ (const PrimitiveBlock *message,
288
+ uint8_t *out);
289
+ size_t primitive_block__pack_to_buffer
290
+ (const PrimitiveBlock *message,
291
+ ProtobufCBuffer *buffer);
292
+ PrimitiveBlock *
293
+ primitive_block__unpack
294
+ (ProtobufCAllocator *allocator,
295
+ size_t len,
296
+ const uint8_t *data);
297
+ void primitive_block__free_unpacked
298
+ (PrimitiveBlock *message,
299
+ ProtobufCAllocator *allocator);
300
+ /* PrimitiveGroup methods */
301
+ void primitive_group__init
302
+ (PrimitiveGroup *message);
303
+ size_t primitive_group__get_packed_size
304
+ (const PrimitiveGroup *message);
305
+ size_t primitive_group__pack
306
+ (const PrimitiveGroup *message,
307
+ uint8_t *out);
308
+ size_t primitive_group__pack_to_buffer
309
+ (const PrimitiveGroup *message,
310
+ ProtobufCBuffer *buffer);
311
+ PrimitiveGroup *
312
+ primitive_group__unpack
313
+ (ProtobufCAllocator *allocator,
314
+ size_t len,
315
+ const uint8_t *data);
316
+ void primitive_group__free_unpacked
317
+ (PrimitiveGroup *message,
318
+ ProtobufCAllocator *allocator);
319
+ /* StringTable methods */
320
+ void string_table__init
321
+ (StringTable *message);
322
+ size_t string_table__get_packed_size
323
+ (const StringTable *message);
324
+ size_t string_table__pack
325
+ (const StringTable *message,
326
+ uint8_t *out);
327
+ size_t string_table__pack_to_buffer
328
+ (const StringTable *message,
329
+ ProtobufCBuffer *buffer);
330
+ StringTable *
331
+ string_table__unpack
332
+ (ProtobufCAllocator *allocator,
333
+ size_t len,
334
+ const uint8_t *data);
335
+ void string_table__free_unpacked
336
+ (StringTable *message,
337
+ ProtobufCAllocator *allocator);
338
+ /* Info methods */
339
+ void info__init
340
+ (Info *message);
341
+ size_t info__get_packed_size
342
+ (const Info *message);
343
+ size_t info__pack
344
+ (const Info *message,
345
+ uint8_t *out);
346
+ size_t info__pack_to_buffer
347
+ (const Info *message,
348
+ ProtobufCBuffer *buffer);
349
+ Info *
350
+ info__unpack
351
+ (ProtobufCAllocator *allocator,
352
+ size_t len,
353
+ const uint8_t *data);
354
+ void info__free_unpacked
355
+ (Info *message,
356
+ ProtobufCAllocator *allocator);
357
+ /* DenseInfo methods */
358
+ void dense_info__init
359
+ (DenseInfo *message);
360
+ size_t dense_info__get_packed_size
361
+ (const DenseInfo *message);
362
+ size_t dense_info__pack
363
+ (const DenseInfo *message,
364
+ uint8_t *out);
365
+ size_t dense_info__pack_to_buffer
366
+ (const DenseInfo *message,
367
+ ProtobufCBuffer *buffer);
368
+ DenseInfo *
369
+ dense_info__unpack
370
+ (ProtobufCAllocator *allocator,
371
+ size_t len,
372
+ const uint8_t *data);
373
+ void dense_info__free_unpacked
374
+ (DenseInfo *message,
375
+ ProtobufCAllocator *allocator);
376
+ /* ChangeSet methods */
377
+ void change_set__init
378
+ (ChangeSet *message);
379
+ size_t change_set__get_packed_size
380
+ (const ChangeSet *message);
381
+ size_t change_set__pack
382
+ (const ChangeSet *message,
383
+ uint8_t *out);
384
+ size_t change_set__pack_to_buffer
385
+ (const ChangeSet *message,
386
+ ProtobufCBuffer *buffer);
387
+ ChangeSet *
388
+ change_set__unpack
389
+ (ProtobufCAllocator *allocator,
390
+ size_t len,
391
+ const uint8_t *data);
392
+ void change_set__free_unpacked
393
+ (ChangeSet *message,
394
+ ProtobufCAllocator *allocator);
395
+ /* Node methods */
396
+ void node__init
397
+ (Node *message);
398
+ size_t node__get_packed_size
399
+ (const Node *message);
400
+ size_t node__pack
401
+ (const Node *message,
402
+ uint8_t *out);
403
+ size_t node__pack_to_buffer
404
+ (const Node *message,
405
+ ProtobufCBuffer *buffer);
406
+ Node *
407
+ node__unpack
408
+ (ProtobufCAllocator *allocator,
409
+ size_t len,
410
+ const uint8_t *data);
411
+ void node__free_unpacked
412
+ (Node *message,
413
+ ProtobufCAllocator *allocator);
414
+ /* DenseNodes methods */
415
+ void dense_nodes__init
416
+ (DenseNodes *message);
417
+ size_t dense_nodes__get_packed_size
418
+ (const DenseNodes *message);
419
+ size_t dense_nodes__pack
420
+ (const DenseNodes *message,
421
+ uint8_t *out);
422
+ size_t dense_nodes__pack_to_buffer
423
+ (const DenseNodes *message,
424
+ ProtobufCBuffer *buffer);
425
+ DenseNodes *
426
+ dense_nodes__unpack
427
+ (ProtobufCAllocator *allocator,
428
+ size_t len,
429
+ const uint8_t *data);
430
+ void dense_nodes__free_unpacked
431
+ (DenseNodes *message,
432
+ ProtobufCAllocator *allocator);
433
+ /* Way methods */
434
+ void way__init
435
+ (Way *message);
436
+ size_t way__get_packed_size
437
+ (const Way *message);
438
+ size_t way__pack
439
+ (const Way *message,
440
+ uint8_t *out);
441
+ size_t way__pack_to_buffer
442
+ (const Way *message,
443
+ ProtobufCBuffer *buffer);
444
+ Way *
445
+ way__unpack
446
+ (ProtobufCAllocator *allocator,
447
+ size_t len,
448
+ const uint8_t *data);
449
+ void way__free_unpacked
450
+ (Way *message,
451
+ ProtobufCAllocator *allocator);
452
+ /* Relation methods */
453
+ void relation__init
454
+ (Relation *message);
455
+ size_t relation__get_packed_size
456
+ (const Relation *message);
457
+ size_t relation__pack
458
+ (const Relation *message,
459
+ uint8_t *out);
460
+ size_t relation__pack_to_buffer
461
+ (const Relation *message,
462
+ ProtobufCBuffer *buffer);
463
+ Relation *
464
+ relation__unpack
465
+ (ProtobufCAllocator *allocator,
466
+ size_t len,
467
+ const uint8_t *data);
468
+ void relation__free_unpacked
469
+ (Relation *message,
470
+ ProtobufCAllocator *allocator);
471
+ /* --- per-message closures --- */
472
+
473
+ typedef void (*HeaderBlock_Closure)
474
+ (const HeaderBlock *message,
475
+ void *closure_data);
476
+ typedef void (*HeaderBBox_Closure)
477
+ (const HeaderBBox *message,
478
+ void *closure_data);
479
+ typedef void (*PrimitiveBlock_Closure)
480
+ (const PrimitiveBlock *message,
481
+ void *closure_data);
482
+ typedef void (*PrimitiveGroup_Closure)
483
+ (const PrimitiveGroup *message,
484
+ void *closure_data);
485
+ typedef void (*StringTable_Closure)
486
+ (const StringTable *message,
487
+ void *closure_data);
488
+ typedef void (*Info_Closure)
489
+ (const Info *message,
490
+ void *closure_data);
491
+ typedef void (*DenseInfo_Closure)
492
+ (const DenseInfo *message,
493
+ void *closure_data);
494
+ typedef void (*ChangeSet_Closure)
495
+ (const ChangeSet *message,
496
+ void *closure_data);
497
+ typedef void (*Node_Closure)
498
+ (const Node *message,
499
+ void *closure_data);
500
+ typedef void (*DenseNodes_Closure)
501
+ (const DenseNodes *message,
502
+ void *closure_data);
503
+ typedef void (*Way_Closure)
504
+ (const Way *message,
505
+ void *closure_data);
506
+ typedef void (*Relation_Closure)
507
+ (const Relation *message,
508
+ void *closure_data);
509
+
510
+ /* --- services --- */
511
+
512
+
513
+ /* --- descriptors --- */
514
+
515
+ extern const ProtobufCMessageDescriptor header_block__descriptor;
516
+ extern const ProtobufCMessageDescriptor header_bbox__descriptor;
517
+ extern const ProtobufCMessageDescriptor primitive_block__descriptor;
518
+ extern const ProtobufCMessageDescriptor primitive_group__descriptor;
519
+ extern const ProtobufCMessageDescriptor string_table__descriptor;
520
+ extern const ProtobufCMessageDescriptor info__descriptor;
521
+ extern const ProtobufCMessageDescriptor dense_info__descriptor;
522
+ extern const ProtobufCMessageDescriptor change_set__descriptor;
523
+ extern const ProtobufCMessageDescriptor node__descriptor;
524
+ extern const ProtobufCMessageDescriptor dense_nodes__descriptor;
525
+ extern const ProtobufCMessageDescriptor way__descriptor;
526
+ extern const ProtobufCMessageDescriptor relation__descriptor;
527
+ extern const ProtobufCEnumDescriptor relation__member_type__descriptor;
528
+
529
+ PROTOBUF_C_END_DECLS
530
+
531
+
532
+ #endif /* PROTOBUF_osmformat_2eproto__INCLUDED */