/CppWithProtoBufC/Source/ProtoBufRemote/RpcMessage.pb-c.c
https://code.google.com/p/protobuf-remote/ · C · 429 lines · 425 code · 2 blank · 2 comment · 4 complexity · 9caee809091207166cecbd06f2d00bb7 MD5 · raw file
- /* Generated by the protocol buffer compiler. DO NOT EDIT! */
- /* Do not generate deprecated warnings for self */
- #ifndef PROTOBUF_C_NO_DEPRECATED
- #define PROTOBUF_C_NO_DEPRECATED
- #endif
- #include "RpcMessage.pb-c.h"
- void proto_buf_remote__rpc_message__call__init
- (ProtoBufRemote__RpcMessage__Call *message)
- {
- static ProtoBufRemote__RpcMessage__Call init_value = PROTO_BUF_REMOTE__RPC_MESSAGE__CALL__INIT;
- *message = init_value;
- }
- void proto_buf_remote__rpc_message__result__init
- (ProtoBufRemote__RpcMessage__Result *message)
- {
- static ProtoBufRemote__RpcMessage__Result init_value = PROTO_BUF_REMOTE__RPC_MESSAGE__RESULT__INIT;
- *message = init_value;
- }
- void proto_buf_remote__rpc_message__parameter__init
- (ProtoBufRemote__RpcMessage__Parameter *message)
- {
- static ProtoBufRemote__RpcMessage__Parameter init_value = PROTO_BUF_REMOTE__RPC_MESSAGE__PARAMETER__INIT;
- *message = init_value;
- }
- void proto_buf_remote__rpc_message__init
- (ProtoBufRemote__RpcMessage *message)
- {
- static ProtoBufRemote__RpcMessage init_value = PROTO_BUF_REMOTE__RPC_MESSAGE__INIT;
- *message = init_value;
- }
- size_t proto_buf_remote__rpc_message__get_packed_size
- (const ProtoBufRemote__RpcMessage *message)
- {
- PROTOBUF_C_ASSERT (message->base.descriptor == &proto_buf_remote__rpc_message__descriptor);
- return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
- }
- size_t proto_buf_remote__rpc_message__pack
- (const ProtoBufRemote__RpcMessage *message,
- uint8_t *out)
- {
- PROTOBUF_C_ASSERT (message->base.descriptor == &proto_buf_remote__rpc_message__descriptor);
- return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
- }
- size_t proto_buf_remote__rpc_message__pack_to_buffer
- (const ProtoBufRemote__RpcMessage *message,
- ProtobufCBuffer *buffer)
- {
- PROTOBUF_C_ASSERT (message->base.descriptor == &proto_buf_remote__rpc_message__descriptor);
- return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
- }
- ProtoBufRemote__RpcMessage *
- proto_buf_remote__rpc_message__unpack
- (ProtobufCAllocator *allocator,
- size_t len,
- const uint8_t *data)
- {
- return (ProtoBufRemote__RpcMessage *)
- protobuf_c_message_unpack (&proto_buf_remote__rpc_message__descriptor,
- allocator, len, data);
- }
- void proto_buf_remote__rpc_message__free_unpacked
- (ProtoBufRemote__RpcMessage *message,
- ProtobufCAllocator *allocator)
- {
- PROTOBUF_C_ASSERT (message->base.descriptor == &proto_buf_remote__rpc_message__descriptor);
- protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
- }
- static const ProtobufCFieldDescriptor proto_buf_remote__rpc_message__call__field_descriptors[4] =
- {
- {
- "service",
- 1,
- PROTOBUF_C_LABEL_REQUIRED,
- PROTOBUF_C_TYPE_STRING,
- 0, /* quantifier_offset */
- PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Call, service),
- NULL,
- NULL,
- 0, /* packed */
- 0,NULL,NULL /* reserved1,reserved2, etc */
- },
- {
- "method",
- 2,
- PROTOBUF_C_LABEL_REQUIRED,
- PROTOBUF_C_TYPE_STRING,
- 0, /* quantifier_offset */
- PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Call, method),
- NULL,
- NULL,
- 0, /* packed */
- 0,NULL,NULL /* reserved1,reserved2, etc */
- },
- {
- "parameters",
- 3,
- PROTOBUF_C_LABEL_REPEATED,
- PROTOBUF_C_TYPE_MESSAGE,
- PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Call, n_parameters),
- PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Call, parameters),
- &proto_buf_remote__rpc_message__parameter__descriptor,
- NULL,
- 0, /* packed */
- 0,NULL,NULL /* reserved1,reserved2, etc */
- },
- {
- "expects_result",
- 4,
- PROTOBUF_C_LABEL_REQUIRED,
- PROTOBUF_C_TYPE_BOOL,
- 0, /* quantifier_offset */
- PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Call, expects_result),
- NULL,
- NULL,
- 0, /* packed */
- 0,NULL,NULL /* reserved1,reserved2, etc */
- },
- };
- static const unsigned proto_buf_remote__rpc_message__call__field_indices_by_name[] = {
- 3, /* field[3] = expects_result */
- 1, /* field[1] = method */
- 2, /* field[2] = parameters */
- 0, /* field[0] = service */
- };
- static const ProtobufCIntRange proto_buf_remote__rpc_message__call__number_ranges[1 + 1] =
- {
- { 1, 0 },
- { 0, 4 }
- };
- const ProtobufCMessageDescriptor proto_buf_remote__rpc_message__call__descriptor =
- {
- PROTOBUF_C_MESSAGE_DESCRIPTOR_MAGIC,
- "ProtoBufRemote.RpcMessage.Call",
- "Call",
- "ProtoBufRemote__RpcMessage__Call",
- "ProtoBufRemote",
- sizeof(ProtoBufRemote__RpcMessage__Call),
- 4,
- proto_buf_remote__rpc_message__call__field_descriptors,
- proto_buf_remote__rpc_message__call__field_indices_by_name,
- 1, proto_buf_remote__rpc_message__call__number_ranges,
- (ProtobufCMessageInit) proto_buf_remote__rpc_message__call__init,
- NULL,NULL,NULL /* reserved[123] */
- };
- static const ProtobufCFieldDescriptor proto_buf_remote__rpc_message__result__field_descriptors[3] =
- {
- {
- "is_failed",
- 1,
- PROTOBUF_C_LABEL_OPTIONAL,
- PROTOBUF_C_TYPE_BOOL,
- PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Result, has_is_failed),
- PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Result, is_failed),
- NULL,
- NULL,
- 0, /* packed */
- 0,NULL,NULL /* reserved1,reserved2, etc */
- },
- {
- "error_message",
- 2,
- PROTOBUF_C_LABEL_OPTIONAL,
- PROTOBUF_C_TYPE_STRING,
- 0, /* quantifier_offset */
- PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Result, error_message),
- NULL,
- NULL,
- 0, /* packed */
- 0,NULL,NULL /* reserved1,reserved2, etc */
- },
- {
- "call_result",
- 3,
- PROTOBUF_C_LABEL_OPTIONAL,
- PROTOBUF_C_TYPE_MESSAGE,
- 0, /* quantifier_offset */
- PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Result, call_result),
- &proto_buf_remote__rpc_message__parameter__descriptor,
- NULL,
- 0, /* packed */
- 0,NULL,NULL /* reserved1,reserved2, etc */
- },
- };
- static const unsigned proto_buf_remote__rpc_message__result__field_indices_by_name[] = {
- 2, /* field[2] = call_result */
- 1, /* field[1] = error_message */
- 0, /* field[0] = is_failed */
- };
- static const ProtobufCIntRange proto_buf_remote__rpc_message__result__number_ranges[1 + 1] =
- {
- { 1, 0 },
- { 0, 3 }
- };
- const ProtobufCMessageDescriptor proto_buf_remote__rpc_message__result__descriptor =
- {
- PROTOBUF_C_MESSAGE_DESCRIPTOR_MAGIC,
- "ProtoBufRemote.RpcMessage.Result",
- "Result",
- "ProtoBufRemote__RpcMessage__Result",
- "ProtoBufRemote",
- sizeof(ProtoBufRemote__RpcMessage__Result),
- 3,
- proto_buf_remote__rpc_message__result__field_descriptors,
- proto_buf_remote__rpc_message__result__field_indices_by_name,
- 1, proto_buf_remote__rpc_message__result__number_ranges,
- (ProtobufCMessageInit) proto_buf_remote__rpc_message__result__init,
- NULL,NULL,NULL /* reserved[123] */
- };
- static const ProtobufCFieldDescriptor proto_buf_remote__rpc_message__parameter__field_descriptors[10] =
- {
- {
- "proto_param",
- 1,
- PROTOBUF_C_LABEL_OPTIONAL,
- PROTOBUF_C_TYPE_BYTES,
- PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Parameter, has_proto_param),
- PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Parameter, proto_param),
- NULL,
- NULL,
- 0, /* packed */
- 0,NULL,NULL /* reserved1,reserved2, etc */
- },
- {
- "string_param",
- 2,
- PROTOBUF_C_LABEL_OPTIONAL,
- PROTOBUF_C_TYPE_STRING,
- 0, /* quantifier_offset */
- PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Parameter, string_param),
- NULL,
- NULL,
- 0, /* packed */
- 0,NULL,NULL /* reserved1,reserved2, etc */
- },
- {
- "int_param",
- 3,
- PROTOBUF_C_LABEL_OPTIONAL,
- PROTOBUF_C_TYPE_SINT32,
- PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Parameter, has_int_param),
- PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Parameter, int_param),
- NULL,
- NULL,
- 0, /* packed */
- 0,NULL,NULL /* reserved1,reserved2, etc */
- },
- {
- "uint_param",
- 4,
- PROTOBUF_C_LABEL_OPTIONAL,
- PROTOBUF_C_TYPE_UINT32,
- PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Parameter, has_uint_param),
- PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Parameter, uint_param),
- NULL,
- NULL,
- 0, /* packed */
- 0,NULL,NULL /* reserved1,reserved2, etc */
- },
- {
- "int64_param",
- 5,
- PROTOBUF_C_LABEL_OPTIONAL,
- PROTOBUF_C_TYPE_SINT64,
- PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Parameter, has_int64_param),
- PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Parameter, int64_param),
- NULL,
- NULL,
- 0, /* packed */
- 0,NULL,NULL /* reserved1,reserved2, etc */
- },
- {
- "uint64_param",
- 6,
- PROTOBUF_C_LABEL_OPTIONAL,
- PROTOBUF_C_TYPE_UINT64,
- PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Parameter, has_uint64_param),
- PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Parameter, uint64_param),
- NULL,
- NULL,
- 0, /* packed */
- 0,NULL,NULL /* reserved1,reserved2, etc */
- },
- {
- "bool_param",
- 7,
- PROTOBUF_C_LABEL_OPTIONAL,
- PROTOBUF_C_TYPE_BOOL,
- PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Parameter, has_bool_param),
- PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Parameter, bool_param),
- NULL,
- NULL,
- 0, /* packed */
- 0,NULL,NULL /* reserved1,reserved2, etc */
- },
- {
- "float_param",
- 8,
- PROTOBUF_C_LABEL_OPTIONAL,
- PROTOBUF_C_TYPE_FLOAT,
- PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Parameter, has_float_param),
- PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Parameter, float_param),
- NULL,
- NULL,
- 0, /* packed */
- 0,NULL,NULL /* reserved1,reserved2, etc */
- },
- {
- "double_param",
- 9,
- PROTOBUF_C_LABEL_OPTIONAL,
- PROTOBUF_C_TYPE_DOUBLE,
- PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Parameter, has_double_param),
- PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Parameter, double_param),
- NULL,
- NULL,
- 0, /* packed */
- 0,NULL,NULL /* reserved1,reserved2, etc */
- },
- {
- "is_null",
- 10,
- PROTOBUF_C_LABEL_OPTIONAL,
- PROTOBUF_C_TYPE_BOOL,
- PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Parameter, has_is_null),
- PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Parameter, is_null),
- NULL,
- NULL,
- 0, /* packed */
- 0,NULL,NULL /* reserved1,reserved2, etc */
- },
- };
- static const unsigned proto_buf_remote__rpc_message__parameter__field_indices_by_name[] = {
- 6, /* field[6] = bool_param */
- 8, /* field[8] = double_param */
- 7, /* field[7] = float_param */
- 4, /* field[4] = int64_param */
- 2, /* field[2] = int_param */
- 9, /* field[9] = is_null */
- 0, /* field[0] = proto_param */
- 1, /* field[1] = string_param */
- 5, /* field[5] = uint64_param */
- 3, /* field[3] = uint_param */
- };
- static const ProtobufCIntRange proto_buf_remote__rpc_message__parameter__number_ranges[1 + 1] =
- {
- { 1, 0 },
- { 0, 10 }
- };
- const ProtobufCMessageDescriptor proto_buf_remote__rpc_message__parameter__descriptor =
- {
- PROTOBUF_C_MESSAGE_DESCRIPTOR_MAGIC,
- "ProtoBufRemote.RpcMessage.Parameter",
- "Parameter",
- "ProtoBufRemote__RpcMessage__Parameter",
- "ProtoBufRemote",
- sizeof(ProtoBufRemote__RpcMessage__Parameter),
- 10,
- proto_buf_remote__rpc_message__parameter__field_descriptors,
- proto_buf_remote__rpc_message__parameter__field_indices_by_name,
- 1, proto_buf_remote__rpc_message__parameter__number_ranges,
- (ProtobufCMessageInit) proto_buf_remote__rpc_message__parameter__init,
- NULL,NULL,NULL /* reserved[123] */
- };
- static const ProtobufCFieldDescriptor proto_buf_remote__rpc_message__field_descriptors[3] =
- {
- {
- "id",
- 1,
- PROTOBUF_C_LABEL_REQUIRED,
- PROTOBUF_C_TYPE_INT32,
- 0, /* quantifier_offset */
- PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage, id),
- NULL,
- NULL,
- 0, /* packed */
- 0,NULL,NULL /* reserved1,reserved2, etc */
- },
- {
- "call_message",
- 2,
- PROTOBUF_C_LABEL_OPTIONAL,
- PROTOBUF_C_TYPE_MESSAGE,
- 0, /* quantifier_offset */
- PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage, call_message),
- &proto_buf_remote__rpc_message__call__descriptor,
- NULL,
- 0, /* packed */
- 0,NULL,NULL /* reserved1,reserved2, etc */
- },
- {
- "result_message",
- 3,
- PROTOBUF_C_LABEL_OPTIONAL,
- PROTOBUF_C_TYPE_MESSAGE,
- 0, /* quantifier_offset */
- PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage, result_message),
- &proto_buf_remote__rpc_message__result__descriptor,
- NULL,
- 0, /* packed */
- 0,NULL,NULL /* reserved1,reserved2, etc */
- },
- };
- static const unsigned proto_buf_remote__rpc_message__field_indices_by_name[] = {
- 1, /* field[1] = call_message */
- 0, /* field[0] = id */
- 2, /* field[2] = result_message */
- };
- static const ProtobufCIntRange proto_buf_remote__rpc_message__number_ranges[1 + 1] =
- {
- { 1, 0 },
- { 0, 3 }
- };
- const ProtobufCMessageDescriptor proto_buf_remote__rpc_message__descriptor =
- {
- PROTOBUF_C_MESSAGE_DESCRIPTOR_MAGIC,
- "ProtoBufRemote.RpcMessage",
- "RpcMessage",
- "ProtoBufRemote__RpcMessage",
- "ProtoBufRemote",
- sizeof(ProtoBufRemote__RpcMessage),
- 3,
- proto_buf_remote__rpc_message__field_descriptors,
- proto_buf_remote__rpc_message__field_indices_by_name,
- 1, proto_buf_remote__rpc_message__number_ranges,
- (ProtobufCMessageInit) proto_buf_remote__rpc_message__init,
- NULL,NULL,NULL /* reserved[123] */
- };