session.pb-c.c 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. /* Generated by the protocol buffer compiler. DO NOT EDIT! */
  2. /* Generated from: session.proto */
  3. /* Do not generate deprecated warnings for self */
  4. #ifndef PROTOBUF_C__NO_DEPRECATED
  5. #define PROTOBUF_C__NO_DEPRECATED
  6. #endif
  7. #include "session.pb-c.h"
  8. void session_data__init
  9. (SessionData *message)
  10. {
  11. static const SessionData init_value = SESSION_DATA__INIT;
  12. *message = init_value;
  13. }
  14. size_t session_data__get_packed_size
  15. (const SessionData *message)
  16. {
  17. assert(message->base.descriptor == &session_data__descriptor);
  18. return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
  19. }
  20. size_t session_data__pack
  21. (const SessionData *message,
  22. uint8_t *out)
  23. {
  24. assert(message->base.descriptor == &session_data__descriptor);
  25. return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
  26. }
  27. size_t session_data__pack_to_buffer
  28. (const SessionData *message,
  29. ProtobufCBuffer *buffer)
  30. {
  31. assert(message->base.descriptor == &session_data__descriptor);
  32. return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
  33. }
  34. SessionData *
  35. session_data__unpack
  36. (ProtobufCAllocator *allocator,
  37. size_t len,
  38. const uint8_t *data)
  39. {
  40. return (SessionData *)
  41. protobuf_c_message_unpack (&session_data__descriptor,
  42. allocator, len, data);
  43. }
  44. void session_data__free_unpacked
  45. (SessionData *message,
  46. ProtobufCAllocator *allocator)
  47. {
  48. if(!message)
  49. return;
  50. assert(message->base.descriptor == &session_data__descriptor);
  51. protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
  52. }
  53. static const ProtobufCFieldDescriptor session_data__field_descriptors[3] =
  54. {
  55. {
  56. "sec_ver",
  57. 2,
  58. PROTOBUF_C_LABEL_NONE,
  59. PROTOBUF_C_TYPE_ENUM,
  60. 0, /* quantifier_offset */
  61. offsetof(SessionData, sec_ver),
  62. &sec_scheme_version__descriptor,
  63. NULL,
  64. 0, /* flags */
  65. 0,NULL,NULL /* reserved1,reserved2, etc */
  66. },
  67. {
  68. "sec0",
  69. 10,
  70. PROTOBUF_C_LABEL_NONE,
  71. PROTOBUF_C_TYPE_MESSAGE,
  72. offsetof(SessionData, proto_case),
  73. offsetof(SessionData, sec0),
  74. &sec0_payload__descriptor,
  75. NULL,
  76. 0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */
  77. 0,NULL,NULL /* reserved1,reserved2, etc */
  78. },
  79. {
  80. "sec1",
  81. 11,
  82. PROTOBUF_C_LABEL_NONE,
  83. PROTOBUF_C_TYPE_MESSAGE,
  84. offsetof(SessionData, proto_case),
  85. offsetof(SessionData, sec1),
  86. &sec1_payload__descriptor,
  87. NULL,
  88. 0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */
  89. 0,NULL,NULL /* reserved1,reserved2, etc */
  90. },
  91. };
  92. static const unsigned session_data__field_indices_by_name[] = {
  93. 1, /* field[1] = sec0 */
  94. 2, /* field[2] = sec1 */
  95. 0, /* field[0] = sec_ver */
  96. };
  97. static const ProtobufCIntRange session_data__number_ranges[2 + 1] =
  98. {
  99. { 2, 0 },
  100. { 10, 1 },
  101. { 0, 3 }
  102. };
  103. const ProtobufCMessageDescriptor session_data__descriptor =
  104. {
  105. PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
  106. "SessionData",
  107. "SessionData",
  108. "SessionData",
  109. "",
  110. sizeof(SessionData),
  111. 3,
  112. session_data__field_descriptors,
  113. session_data__field_indices_by_name,
  114. 2, session_data__number_ranges,
  115. (ProtobufCMessageInit) session_data__init,
  116. NULL,NULL,NULL /* reserved[123] */
  117. };
  118. static const ProtobufCEnumValue sec_scheme_version__enum_values_by_number[2] =
  119. {
  120. { "SecScheme0", "SEC_SCHEME_VERSION__SecScheme0", 0 },
  121. { "SecScheme1", "SEC_SCHEME_VERSION__SecScheme1", 1 },
  122. };
  123. static const ProtobufCIntRange sec_scheme_version__value_ranges[] = {
  124. {0, 0},{0, 2}
  125. };
  126. static const ProtobufCEnumValueIndex sec_scheme_version__enum_values_by_name[2] =
  127. {
  128. { "SecScheme0", 0 },
  129. { "SecScheme1", 1 },
  130. };
  131. const ProtobufCEnumDescriptor sec_scheme_version__descriptor =
  132. {
  133. PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
  134. "SecSchemeVersion",
  135. "SecSchemeVersion",
  136. "SecSchemeVersion",
  137. "",
  138. 2,
  139. sec_scheme_version__enum_values_by_number,
  140. 2,
  141. sec_scheme_version__enum_values_by_name,
  142. 1,
  143. sec_scheme_version__value_ranges,
  144. NULL,NULL,NULL,NULL /* reserved[1234] */
  145. };