PageRenderTime 37ms CodeModel.GetById 13ms RepoModel.GetById 1ms app.codeStats 0ms

/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
  1. /* Generated by the protocol buffer compiler. DO NOT EDIT! */
  2. /* Do not generate deprecated warnings for self */
  3. #ifndef PROTOBUF_C_NO_DEPRECATED
  4. #define PROTOBUF_C_NO_DEPRECATED
  5. #endif
  6. #include "RpcMessage.pb-c.h"
  7. void proto_buf_remote__rpc_message__call__init
  8. (ProtoBufRemote__RpcMessage__Call *message)
  9. {
  10. static ProtoBufRemote__RpcMessage__Call init_value = PROTO_BUF_REMOTE__RPC_MESSAGE__CALL__INIT;
  11. *message = init_value;
  12. }
  13. void proto_buf_remote__rpc_message__result__init
  14. (ProtoBufRemote__RpcMessage__Result *message)
  15. {
  16. static ProtoBufRemote__RpcMessage__Result init_value = PROTO_BUF_REMOTE__RPC_MESSAGE__RESULT__INIT;
  17. *message = init_value;
  18. }
  19. void proto_buf_remote__rpc_message__parameter__init
  20. (ProtoBufRemote__RpcMessage__Parameter *message)
  21. {
  22. static ProtoBufRemote__RpcMessage__Parameter init_value = PROTO_BUF_REMOTE__RPC_MESSAGE__PARAMETER__INIT;
  23. *message = init_value;
  24. }
  25. void proto_buf_remote__rpc_message__init
  26. (ProtoBufRemote__RpcMessage *message)
  27. {
  28. static ProtoBufRemote__RpcMessage init_value = PROTO_BUF_REMOTE__RPC_MESSAGE__INIT;
  29. *message = init_value;
  30. }
  31. size_t proto_buf_remote__rpc_message__get_packed_size
  32. (const ProtoBufRemote__RpcMessage *message)
  33. {
  34. PROTOBUF_C_ASSERT (message->base.descriptor == &proto_buf_remote__rpc_message__descriptor);
  35. return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
  36. }
  37. size_t proto_buf_remote__rpc_message__pack
  38. (const ProtoBufRemote__RpcMessage *message,
  39. uint8_t *out)
  40. {
  41. PROTOBUF_C_ASSERT (message->base.descriptor == &proto_buf_remote__rpc_message__descriptor);
  42. return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
  43. }
  44. size_t proto_buf_remote__rpc_message__pack_to_buffer
  45. (const ProtoBufRemote__RpcMessage *message,
  46. ProtobufCBuffer *buffer)
  47. {
  48. PROTOBUF_C_ASSERT (message->base.descriptor == &proto_buf_remote__rpc_message__descriptor);
  49. return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
  50. }
  51. ProtoBufRemote__RpcMessage *
  52. proto_buf_remote__rpc_message__unpack
  53. (ProtobufCAllocator *allocator,
  54. size_t len,
  55. const uint8_t *data)
  56. {
  57. return (ProtoBufRemote__RpcMessage *)
  58. protobuf_c_message_unpack (&proto_buf_remote__rpc_message__descriptor,
  59. allocator, len, data);
  60. }
  61. void proto_buf_remote__rpc_message__free_unpacked
  62. (ProtoBufRemote__RpcMessage *message,
  63. ProtobufCAllocator *allocator)
  64. {
  65. PROTOBUF_C_ASSERT (message->base.descriptor == &proto_buf_remote__rpc_message__descriptor);
  66. protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
  67. }
  68. static const ProtobufCFieldDescriptor proto_buf_remote__rpc_message__call__field_descriptors[4] =
  69. {
  70. {
  71. "service",
  72. 1,
  73. PROTOBUF_C_LABEL_REQUIRED,
  74. PROTOBUF_C_TYPE_STRING,
  75. 0, /* quantifier_offset */
  76. PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Call, service),
  77. NULL,
  78. NULL,
  79. 0, /* packed */
  80. 0,NULL,NULL /* reserved1,reserved2, etc */
  81. },
  82. {
  83. "method",
  84. 2,
  85. PROTOBUF_C_LABEL_REQUIRED,
  86. PROTOBUF_C_TYPE_STRING,
  87. 0, /* quantifier_offset */
  88. PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Call, method),
  89. NULL,
  90. NULL,
  91. 0, /* packed */
  92. 0,NULL,NULL /* reserved1,reserved2, etc */
  93. },
  94. {
  95. "parameters",
  96. 3,
  97. PROTOBUF_C_LABEL_REPEATED,
  98. PROTOBUF_C_TYPE_MESSAGE,
  99. PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Call, n_parameters),
  100. PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Call, parameters),
  101. &proto_buf_remote__rpc_message__parameter__descriptor,
  102. NULL,
  103. 0, /* packed */
  104. 0,NULL,NULL /* reserved1,reserved2, etc */
  105. },
  106. {
  107. "expects_result",
  108. 4,
  109. PROTOBUF_C_LABEL_REQUIRED,
  110. PROTOBUF_C_TYPE_BOOL,
  111. 0, /* quantifier_offset */
  112. PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Call, expects_result),
  113. NULL,
  114. NULL,
  115. 0, /* packed */
  116. 0,NULL,NULL /* reserved1,reserved2, etc */
  117. },
  118. };
  119. static const unsigned proto_buf_remote__rpc_message__call__field_indices_by_name[] = {
  120. 3, /* field[3] = expects_result */
  121. 1, /* field[1] = method */
  122. 2, /* field[2] = parameters */
  123. 0, /* field[0] = service */
  124. };
  125. static const ProtobufCIntRange proto_buf_remote__rpc_message__call__number_ranges[1 + 1] =
  126. {
  127. { 1, 0 },
  128. { 0, 4 }
  129. };
  130. const ProtobufCMessageDescriptor proto_buf_remote__rpc_message__call__descriptor =
  131. {
  132. PROTOBUF_C_MESSAGE_DESCRIPTOR_MAGIC,
  133. "ProtoBufRemote.RpcMessage.Call",
  134. "Call",
  135. "ProtoBufRemote__RpcMessage__Call",
  136. "ProtoBufRemote",
  137. sizeof(ProtoBufRemote__RpcMessage__Call),
  138. 4,
  139. proto_buf_remote__rpc_message__call__field_descriptors,
  140. proto_buf_remote__rpc_message__call__field_indices_by_name,
  141. 1, proto_buf_remote__rpc_message__call__number_ranges,
  142. (ProtobufCMessageInit) proto_buf_remote__rpc_message__call__init,
  143. NULL,NULL,NULL /* reserved[123] */
  144. };
  145. static const ProtobufCFieldDescriptor proto_buf_remote__rpc_message__result__field_descriptors[3] =
  146. {
  147. {
  148. "is_failed",
  149. 1,
  150. PROTOBUF_C_LABEL_OPTIONAL,
  151. PROTOBUF_C_TYPE_BOOL,
  152. PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Result, has_is_failed),
  153. PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Result, is_failed),
  154. NULL,
  155. NULL,
  156. 0, /* packed */
  157. 0,NULL,NULL /* reserved1,reserved2, etc */
  158. },
  159. {
  160. "error_message",
  161. 2,
  162. PROTOBUF_C_LABEL_OPTIONAL,
  163. PROTOBUF_C_TYPE_STRING,
  164. 0, /* quantifier_offset */
  165. PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Result, error_message),
  166. NULL,
  167. NULL,
  168. 0, /* packed */
  169. 0,NULL,NULL /* reserved1,reserved2, etc */
  170. },
  171. {
  172. "call_result",
  173. 3,
  174. PROTOBUF_C_LABEL_OPTIONAL,
  175. PROTOBUF_C_TYPE_MESSAGE,
  176. 0, /* quantifier_offset */
  177. PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Result, call_result),
  178. &proto_buf_remote__rpc_message__parameter__descriptor,
  179. NULL,
  180. 0, /* packed */
  181. 0,NULL,NULL /* reserved1,reserved2, etc */
  182. },
  183. };
  184. static const unsigned proto_buf_remote__rpc_message__result__field_indices_by_name[] = {
  185. 2, /* field[2] = call_result */
  186. 1, /* field[1] = error_message */
  187. 0, /* field[0] = is_failed */
  188. };
  189. static const ProtobufCIntRange proto_buf_remote__rpc_message__result__number_ranges[1 + 1] =
  190. {
  191. { 1, 0 },
  192. { 0, 3 }
  193. };
  194. const ProtobufCMessageDescriptor proto_buf_remote__rpc_message__result__descriptor =
  195. {
  196. PROTOBUF_C_MESSAGE_DESCRIPTOR_MAGIC,
  197. "ProtoBufRemote.RpcMessage.Result",
  198. "Result",
  199. "ProtoBufRemote__RpcMessage__Result",
  200. "ProtoBufRemote",
  201. sizeof(ProtoBufRemote__RpcMessage__Result),
  202. 3,
  203. proto_buf_remote__rpc_message__result__field_descriptors,
  204. proto_buf_remote__rpc_message__result__field_indices_by_name,
  205. 1, proto_buf_remote__rpc_message__result__number_ranges,
  206. (ProtobufCMessageInit) proto_buf_remote__rpc_message__result__init,
  207. NULL,NULL,NULL /* reserved[123] */
  208. };
  209. static const ProtobufCFieldDescriptor proto_buf_remote__rpc_message__parameter__field_descriptors[10] =
  210. {
  211. {
  212. "proto_param",
  213. 1,
  214. PROTOBUF_C_LABEL_OPTIONAL,
  215. PROTOBUF_C_TYPE_BYTES,
  216. PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Parameter, has_proto_param),
  217. PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Parameter, proto_param),
  218. NULL,
  219. NULL,
  220. 0, /* packed */
  221. 0,NULL,NULL /* reserved1,reserved2, etc */
  222. },
  223. {
  224. "string_param",
  225. 2,
  226. PROTOBUF_C_LABEL_OPTIONAL,
  227. PROTOBUF_C_TYPE_STRING,
  228. 0, /* quantifier_offset */
  229. PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Parameter, string_param),
  230. NULL,
  231. NULL,
  232. 0, /* packed */
  233. 0,NULL,NULL /* reserved1,reserved2, etc */
  234. },
  235. {
  236. "int_param",
  237. 3,
  238. PROTOBUF_C_LABEL_OPTIONAL,
  239. PROTOBUF_C_TYPE_SINT32,
  240. PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Parameter, has_int_param),
  241. PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Parameter, int_param),
  242. NULL,
  243. NULL,
  244. 0, /* packed */
  245. 0,NULL,NULL /* reserved1,reserved2, etc */
  246. },
  247. {
  248. "uint_param",
  249. 4,
  250. PROTOBUF_C_LABEL_OPTIONAL,
  251. PROTOBUF_C_TYPE_UINT32,
  252. PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Parameter, has_uint_param),
  253. PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Parameter, uint_param),
  254. NULL,
  255. NULL,
  256. 0, /* packed */
  257. 0,NULL,NULL /* reserved1,reserved2, etc */
  258. },
  259. {
  260. "int64_param",
  261. 5,
  262. PROTOBUF_C_LABEL_OPTIONAL,
  263. PROTOBUF_C_TYPE_SINT64,
  264. PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Parameter, has_int64_param),
  265. PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Parameter, int64_param),
  266. NULL,
  267. NULL,
  268. 0, /* packed */
  269. 0,NULL,NULL /* reserved1,reserved2, etc */
  270. },
  271. {
  272. "uint64_param",
  273. 6,
  274. PROTOBUF_C_LABEL_OPTIONAL,
  275. PROTOBUF_C_TYPE_UINT64,
  276. PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Parameter, has_uint64_param),
  277. PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Parameter, uint64_param),
  278. NULL,
  279. NULL,
  280. 0, /* packed */
  281. 0,NULL,NULL /* reserved1,reserved2, etc */
  282. },
  283. {
  284. "bool_param",
  285. 7,
  286. PROTOBUF_C_LABEL_OPTIONAL,
  287. PROTOBUF_C_TYPE_BOOL,
  288. PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Parameter, has_bool_param),
  289. PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Parameter, bool_param),
  290. NULL,
  291. NULL,
  292. 0, /* packed */
  293. 0,NULL,NULL /* reserved1,reserved2, etc */
  294. },
  295. {
  296. "float_param",
  297. 8,
  298. PROTOBUF_C_LABEL_OPTIONAL,
  299. PROTOBUF_C_TYPE_FLOAT,
  300. PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Parameter, has_float_param),
  301. PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Parameter, float_param),
  302. NULL,
  303. NULL,
  304. 0, /* packed */
  305. 0,NULL,NULL /* reserved1,reserved2, etc */
  306. },
  307. {
  308. "double_param",
  309. 9,
  310. PROTOBUF_C_LABEL_OPTIONAL,
  311. PROTOBUF_C_TYPE_DOUBLE,
  312. PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Parameter, has_double_param),
  313. PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Parameter, double_param),
  314. NULL,
  315. NULL,
  316. 0, /* packed */
  317. 0,NULL,NULL /* reserved1,reserved2, etc */
  318. },
  319. {
  320. "is_null",
  321. 10,
  322. PROTOBUF_C_LABEL_OPTIONAL,
  323. PROTOBUF_C_TYPE_BOOL,
  324. PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Parameter, has_is_null),
  325. PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage__Parameter, is_null),
  326. NULL,
  327. NULL,
  328. 0, /* packed */
  329. 0,NULL,NULL /* reserved1,reserved2, etc */
  330. },
  331. };
  332. static const unsigned proto_buf_remote__rpc_message__parameter__field_indices_by_name[] = {
  333. 6, /* field[6] = bool_param */
  334. 8, /* field[8] = double_param */
  335. 7, /* field[7] = float_param */
  336. 4, /* field[4] = int64_param */
  337. 2, /* field[2] = int_param */
  338. 9, /* field[9] = is_null */
  339. 0, /* field[0] = proto_param */
  340. 1, /* field[1] = string_param */
  341. 5, /* field[5] = uint64_param */
  342. 3, /* field[3] = uint_param */
  343. };
  344. static const ProtobufCIntRange proto_buf_remote__rpc_message__parameter__number_ranges[1 + 1] =
  345. {
  346. { 1, 0 },
  347. { 0, 10 }
  348. };
  349. const ProtobufCMessageDescriptor proto_buf_remote__rpc_message__parameter__descriptor =
  350. {
  351. PROTOBUF_C_MESSAGE_DESCRIPTOR_MAGIC,
  352. "ProtoBufRemote.RpcMessage.Parameter",
  353. "Parameter",
  354. "ProtoBufRemote__RpcMessage__Parameter",
  355. "ProtoBufRemote",
  356. sizeof(ProtoBufRemote__RpcMessage__Parameter),
  357. 10,
  358. proto_buf_remote__rpc_message__parameter__field_descriptors,
  359. proto_buf_remote__rpc_message__parameter__field_indices_by_name,
  360. 1, proto_buf_remote__rpc_message__parameter__number_ranges,
  361. (ProtobufCMessageInit) proto_buf_remote__rpc_message__parameter__init,
  362. NULL,NULL,NULL /* reserved[123] */
  363. };
  364. static const ProtobufCFieldDescriptor proto_buf_remote__rpc_message__field_descriptors[3] =
  365. {
  366. {
  367. "id",
  368. 1,
  369. PROTOBUF_C_LABEL_REQUIRED,
  370. PROTOBUF_C_TYPE_INT32,
  371. 0, /* quantifier_offset */
  372. PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage, id),
  373. NULL,
  374. NULL,
  375. 0, /* packed */
  376. 0,NULL,NULL /* reserved1,reserved2, etc */
  377. },
  378. {
  379. "call_message",
  380. 2,
  381. PROTOBUF_C_LABEL_OPTIONAL,
  382. PROTOBUF_C_TYPE_MESSAGE,
  383. 0, /* quantifier_offset */
  384. PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage, call_message),
  385. &proto_buf_remote__rpc_message__call__descriptor,
  386. NULL,
  387. 0, /* packed */
  388. 0,NULL,NULL /* reserved1,reserved2, etc */
  389. },
  390. {
  391. "result_message",
  392. 3,
  393. PROTOBUF_C_LABEL_OPTIONAL,
  394. PROTOBUF_C_TYPE_MESSAGE,
  395. 0, /* quantifier_offset */
  396. PROTOBUF_C_OFFSETOF(ProtoBufRemote__RpcMessage, result_message),
  397. &proto_buf_remote__rpc_message__result__descriptor,
  398. NULL,
  399. 0, /* packed */
  400. 0,NULL,NULL /* reserved1,reserved2, etc */
  401. },
  402. };
  403. static const unsigned proto_buf_remote__rpc_message__field_indices_by_name[] = {
  404. 1, /* field[1] = call_message */
  405. 0, /* field[0] = id */
  406. 2, /* field[2] = result_message */
  407. };
  408. static const ProtobufCIntRange proto_buf_remote__rpc_message__number_ranges[1 + 1] =
  409. {
  410. { 1, 0 },
  411. { 0, 3 }
  412. };
  413. const ProtobufCMessageDescriptor proto_buf_remote__rpc_message__descriptor =
  414. {
  415. PROTOBUF_C_MESSAGE_DESCRIPTOR_MAGIC,
  416. "ProtoBufRemote.RpcMessage",
  417. "RpcMessage",
  418. "ProtoBufRemote__RpcMessage",
  419. "ProtoBufRemote",
  420. sizeof(ProtoBufRemote__RpcMessage),
  421. 3,
  422. proto_buf_remote__rpc_message__field_descriptors,
  423. proto_buf_remote__rpc_message__field_indices_by_name,
  424. 1, proto_buf_remote__rpc_message__number_ranges,
  425. (ProtobufCMessageInit) proto_buf_remote__rpc_message__init,
  426. NULL,NULL,NULL /* reserved[123] */
  427. };