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