|
/* Generated by the protocol buffer compiler. DO NOT EDIT! */ |
|
/* Generated from: enum_int_test.proto */ |
|
|
|
/* Do not generate deprecated warnings for self */ |
|
#ifndef PROTOBUF_C__NO_DEPRECATED |
|
#define PROTOBUF_C__NO_DEPRECATED |
|
#endif |
|
|
|
#include "enum_int_test.pb-c.h" |
|
void enum_int_test__init |
|
(EnumIntTest *message) |
|
{ |
|
static const EnumIntTest init_value = ENUM_INT_TEST__INIT; |
|
*message = init_value; |
|
} |
|
size_t enum_int_test__get_packed_size |
|
(const EnumIntTest *message) |
|
{ |
|
assert(message->base.descriptor == &enum_int_test__descriptor); |
|
return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); |
|
} |
|
size_t enum_int_test__pack |
|
(const EnumIntTest *message, |
|
uint8_t *out) |
|
{ |
|
assert(message->base.descriptor == &enum_int_test__descriptor); |
|
return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); |
|
} |
|
size_t enum_int_test__pack_to_buffer |
|
(const EnumIntTest *message, |
|
ProtobufCBuffer *buffer) |
|
{ |
|
assert(message->base.descriptor == &enum_int_test__descriptor); |
|
return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); |
|
} |
|
EnumIntTest * |
|
enum_int_test__unpack |
|
(ProtobufCAllocator *allocator, |
|
size_t len, |
|
const uint8_t *data) |
|
{ |
|
return (EnumIntTest *) |
|
protobuf_c_message_unpack (&enum_int_test__descriptor, |
|
allocator, len, data); |
|
} |
|
void enum_int_test__free_unpacked |
|
(EnumIntTest *message, |
|
ProtobufCAllocator *allocator) |
|
{ |
|
if(!message) |
|
return; |
|
assert(message->base.descriptor == &enum_int_test__descriptor); |
|
protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); |
|
} |
|
static const ProtobufCEnumValue enum_int_test__label__enum_values_by_number[2] = |
|
{ |
|
{ "LABEL_1", "ENUM_INT_TEST__LABEL__LABEL_1", 0 }, |
|
{ "LABEL_2", "ENUM_INT_TEST__LABEL__LABEL_2", 1 }, |
|
}; |
|
static const ProtobufCIntRange enum_int_test__label__value_ranges[] = { |
|
{0, 0},{0, 2} |
|
}; |
|
static const ProtobufCEnumValueIndex enum_int_test__label__enum_values_by_name[2] = |
|
{ |
|
{ "LABEL_1", 0 }, |
|
{ "LABEL_2", 1 }, |
|
}; |
|
const ProtobufCEnumDescriptor enum_int_test__label__descriptor = |
|
{ |
|
PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC, |
|
"EnumIntTest.Label", |
|
"Label", |
|
"EnumIntTest__Label", |
|
"", |
|
2, |
|
enum_int_test__label__enum_values_by_number, |
|
2, |
|
enum_int_test__label__enum_values_by_name, |
|
1, |
|
enum_int_test__label__value_ranges, |
|
NULL,NULL,NULL,NULL /* reserved[1234] */ |
|
}; |
|
static const ProtobufCFieldDescriptor enum_int_test__field_descriptors[2] = |
|
{ |
|
{ |
|
"label_label", |
|
123, |
|
PROTOBUF_C_LABEL_NONE, |
|
PROTOBUF_C_TYPE_ENUM, |
|
offsetof(EnumIntTest, label_case), |
|
offsetof(EnumIntTest, label_label), |
|
&enum_int_test__label__descriptor, |
|
NULL, |
|
0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */ |
|
0,NULL,NULL /* reserved1,reserved2, etc */ |
|
}, |
|
{ |
|
"label_uint64", |
|
124, |
|
PROTOBUF_C_LABEL_NONE, |
|
PROTOBUF_C_TYPE_UINT64, |
|
offsetof(EnumIntTest, label_case), |
|
offsetof(EnumIntTest, label_uint64), |
|
NULL, |
|
NULL, |
|
0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */ |
|
0,NULL,NULL /* reserved1,reserved2, etc */ |
|
}, |
|
}; |
|
static const unsigned enum_int_test__field_indices_by_name[] = { |
|
0, /* field[0] = label_label */ |
|
1, /* field[1] = label_uint64 */ |
|
}; |
|
static const ProtobufCIntRange enum_int_test__number_ranges[1 + 1] = |
|
{ |
|
{ 123, 0 }, |
|
{ 0, 2 } |
|
}; |
|
const ProtobufCMessageDescriptor enum_int_test__descriptor = |
|
{ |
|
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, |
|
"EnumIntTest", |
|
"EnumIntTest", |
|
"EnumIntTest", |
|
"", |
|
sizeof(EnumIntTest), |
|
2, |
|
enum_int_test__field_descriptors, |
|
enum_int_test__field_indices_by_name, |
|
1, enum_int_test__number_ranges, |
|
(ProtobufCMessageInit) enum_int_test__init, |
|
NULL,NULL,NULL /* reserved[123] */ |
|
}; |