/* Generated by the protocol buffer compiler. DO NOT EDIT! */ /* Generated from: RGB.proto */ /* Do not generate deprecated warnings for self */ #ifndef PROTOBUF_C__NO_DEPRECATED #define PROTOBUF_C__NO_DEPRECATED #endif #include "RGB.pb-c.h" void rgb__init (RGB *message) { static const RGB init_value = RGB__INIT; *message = init_value; } size_t rgb__get_packed_size (const RGB *message) { assert(message->base.descriptor == &rgb__descriptor); return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); } size_t rgb__pack (const RGB *message, uint8_t *out) { assert(message->base.descriptor == &rgb__descriptor); return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); } size_t rgb__pack_to_buffer (const RGB *message, ProtobufCBuffer *buffer) { assert(message->base.descriptor == &rgb__descriptor); return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); } RGB * rgb__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data) { return (RGB *) protobuf_c_message_unpack (&rgb__descriptor, allocator, len, data); } void rgb__free_unpacked (RGB *message, ProtobufCAllocator *allocator) { if(!message) return; assert(message->base.descriptor == &rgb__descriptor); protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); } static const ProtobufCFieldDescriptor rgb__field_descriptors[3] = { { "R", 1, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_INT32, offsetof(RGB, has_r), offsetof(RGB, r), NULL, NULL, 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, { "G", 2, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_INT32, offsetof(RGB, has_g), offsetof(RGB, g), NULL, NULL, 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, { "B", 3, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_INT32, offsetof(RGB, has_b), offsetof(RGB, b), NULL, NULL, 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, }; static const unsigned rgb__field_indices_by_name[] = { 2, /* field[2] = B */ 1, /* field[1] = G */ 0, /* field[0] = R */ }; static const ProtobufCIntRange rgb__number_ranges[1 + 1] = { { 1, 0 }, { 0, 3 } }; const ProtobufCMessageDescriptor rgb__descriptor = { PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, "RGB", "RGB", "RGB", "", sizeof(RGB), 3, rgb__field_descriptors, rgb__field_indices_by_name, 1, rgb__number_ranges, (ProtobufCMessageInit) rgb__init, NULL,NULL,NULL /* reserved[123] */ };