1 /* Generated by the protocol buffer compiler. DO NOT EDIT! */
2 /* Generated from: wifi_constants.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 "wifi_constants.pb-c.h"
wifi_connected_state__init(WifiConnectedState * message)10 void wifi_connected_state__init
11 (WifiConnectedState *message)
12 {
13 static const WifiConnectedState init_value = WIFI_CONNECTED_STATE__INIT;
14 *message = init_value;
15 }
wifi_connected_state__get_packed_size(const WifiConnectedState * message)16 size_t wifi_connected_state__get_packed_size
17 (const WifiConnectedState *message)
18 {
19 assert(message->base.descriptor == &wifi_connected_state__descriptor);
20 return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
21 }
wifi_connected_state__pack(const WifiConnectedState * message,uint8_t * out)22 size_t wifi_connected_state__pack
23 (const WifiConnectedState *message,
24 uint8_t *out)
25 {
26 assert(message->base.descriptor == &wifi_connected_state__descriptor);
27 return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
28 }
wifi_connected_state__pack_to_buffer(const WifiConnectedState * message,ProtobufCBuffer * buffer)29 size_t wifi_connected_state__pack_to_buffer
30 (const WifiConnectedState *message,
31 ProtobufCBuffer *buffer)
32 {
33 assert(message->base.descriptor == &wifi_connected_state__descriptor);
34 return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
35 }
36 WifiConnectedState *
wifi_connected_state__unpack(ProtobufCAllocator * allocator,size_t len,const uint8_t * data)37 wifi_connected_state__unpack
38 (ProtobufCAllocator *allocator,
39 size_t len,
40 const uint8_t *data)
41 {
42 return (WifiConnectedState *)
43 protobuf_c_message_unpack (&wifi_connected_state__descriptor,
44 allocator, len, data);
45 }
wifi_connected_state__free_unpacked(WifiConnectedState * message,ProtobufCAllocator * allocator)46 void wifi_connected_state__free_unpacked
47 (WifiConnectedState *message,
48 ProtobufCAllocator *allocator)
49 {
50 if(!message)
51 return;
52 assert(message->base.descriptor == &wifi_connected_state__descriptor);
53 protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
54 }
55 static const ProtobufCFieldDescriptor wifi_connected_state__field_descriptors[5] =
56 {
57 {
58 "ip4_addr",
59 1,
60 PROTOBUF_C_LABEL_NONE,
61 PROTOBUF_C_TYPE_STRING,
62 0, /* quantifier_offset */
63 offsetof(WifiConnectedState, ip4_addr),
64 NULL,
65 &protobuf_c_empty_string,
66 0, /* flags */
67 0,NULL,NULL /* reserved1,reserved2, etc */
68 },
69 {
70 "auth_mode",
71 2,
72 PROTOBUF_C_LABEL_NONE,
73 PROTOBUF_C_TYPE_ENUM,
74 0, /* quantifier_offset */
75 offsetof(WifiConnectedState, auth_mode),
76 &wifi_auth_mode__descriptor,
77 NULL,
78 0, /* flags */
79 0,NULL,NULL /* reserved1,reserved2, etc */
80 },
81 {
82 "ssid",
83 3,
84 PROTOBUF_C_LABEL_NONE,
85 PROTOBUF_C_TYPE_BYTES,
86 0, /* quantifier_offset */
87 offsetof(WifiConnectedState, ssid),
88 NULL,
89 NULL,
90 0, /* flags */
91 0,NULL,NULL /* reserved1,reserved2, etc */
92 },
93 {
94 "bssid",
95 4,
96 PROTOBUF_C_LABEL_NONE,
97 PROTOBUF_C_TYPE_BYTES,
98 0, /* quantifier_offset */
99 offsetof(WifiConnectedState, bssid),
100 NULL,
101 NULL,
102 0, /* flags */
103 0,NULL,NULL /* reserved1,reserved2, etc */
104 },
105 {
106 "channel",
107 5,
108 PROTOBUF_C_LABEL_NONE,
109 PROTOBUF_C_TYPE_INT32,
110 0, /* quantifier_offset */
111 offsetof(WifiConnectedState, channel),
112 NULL,
113 NULL,
114 0, /* flags */
115 0,NULL,NULL /* reserved1,reserved2, etc */
116 },
117 };
118 static const unsigned wifi_connected_state__field_indices_by_name[] = {
119 1, /* field[1] = auth_mode */
120 3, /* field[3] = bssid */
121 4, /* field[4] = channel */
122 0, /* field[0] = ip4_addr */
123 2, /* field[2] = ssid */
124 };
125 static const ProtobufCIntRange wifi_connected_state__number_ranges[1 + 1] =
126 {
127 { 1, 0 },
128 { 0, 5 }
129 };
130 const ProtobufCMessageDescriptor wifi_connected_state__descriptor =
131 {
132 PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
133 "WifiConnectedState",
134 "WifiConnectedState",
135 "WifiConnectedState",
136 "",
137 sizeof(WifiConnectedState),
138 5,
139 wifi_connected_state__field_descriptors,
140 wifi_connected_state__field_indices_by_name,
141 1, wifi_connected_state__number_ranges,
142 (ProtobufCMessageInit) wifi_connected_state__init,
143 NULL,NULL,NULL /* reserved[123] */
144 };
145 static const ProtobufCEnumValue wifi_station_state__enum_values_by_number[4] =
146 {
147 { "Connected", "WIFI_STATION_STATE__Connected", 0 },
148 { "Connecting", "WIFI_STATION_STATE__Connecting", 1 },
149 { "Disconnected", "WIFI_STATION_STATE__Disconnected", 2 },
150 { "ConnectionFailed", "WIFI_STATION_STATE__ConnectionFailed", 3 },
151 };
152 static const ProtobufCIntRange wifi_station_state__value_ranges[] = {
153 {0, 0},{0, 4}
154 };
155 static const ProtobufCEnumValueIndex wifi_station_state__enum_values_by_name[4] =
156 {
157 { "Connected", 0 },
158 { "Connecting", 1 },
159 { "ConnectionFailed", 3 },
160 { "Disconnected", 2 },
161 };
162 const ProtobufCEnumDescriptor wifi_station_state__descriptor =
163 {
164 PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
165 "WifiStationState",
166 "WifiStationState",
167 "WifiStationState",
168 "",
169 4,
170 wifi_station_state__enum_values_by_number,
171 4,
172 wifi_station_state__enum_values_by_name,
173 1,
174 wifi_station_state__value_ranges,
175 NULL,NULL,NULL,NULL /* reserved[1234] */
176 };
177 static const ProtobufCEnumValue wifi_connect_failed_reason__enum_values_by_number[2] =
178 {
179 { "AuthError", "WIFI_CONNECT_FAILED_REASON__AuthError", 0 },
180 { "NetworkNotFound", "WIFI_CONNECT_FAILED_REASON__NetworkNotFound", 1 },
181 };
182 static const ProtobufCIntRange wifi_connect_failed_reason__value_ranges[] = {
183 {0, 0},{0, 2}
184 };
185 static const ProtobufCEnumValueIndex wifi_connect_failed_reason__enum_values_by_name[2] =
186 {
187 { "AuthError", 0 },
188 { "NetworkNotFound", 1 },
189 };
190 const ProtobufCEnumDescriptor wifi_connect_failed_reason__descriptor =
191 {
192 PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
193 "WifiConnectFailedReason",
194 "WifiConnectFailedReason",
195 "WifiConnectFailedReason",
196 "",
197 2,
198 wifi_connect_failed_reason__enum_values_by_number,
199 2,
200 wifi_connect_failed_reason__enum_values_by_name,
201 1,
202 wifi_connect_failed_reason__value_ranges,
203 NULL,NULL,NULL,NULL /* reserved[1234] */
204 };
205 static const ProtobufCEnumValue wifi_auth_mode__enum_values_by_number[6] =
206 {
207 { "Open", "WIFI_AUTH_MODE__Open", 0 },
208 { "WEP", "WIFI_AUTH_MODE__WEP", 1 },
209 { "WPA_PSK", "WIFI_AUTH_MODE__WPA_PSK", 2 },
210 { "WPA2_PSK", "WIFI_AUTH_MODE__WPA2_PSK", 3 },
211 { "WPA_WPA2_PSK", "WIFI_AUTH_MODE__WPA_WPA2_PSK", 4 },
212 { "WPA2_ENTERPRISE", "WIFI_AUTH_MODE__WPA2_ENTERPRISE", 5 },
213 };
214 static const ProtobufCIntRange wifi_auth_mode__value_ranges[] = {
215 {0, 0},{0, 6}
216 };
217 static const ProtobufCEnumValueIndex wifi_auth_mode__enum_values_by_name[6] =
218 {
219 { "Open", 0 },
220 { "WEP", 1 },
221 { "WPA2_ENTERPRISE", 5 },
222 { "WPA2_PSK", 3 },
223 { "WPA_PSK", 2 },
224 { "WPA_WPA2_PSK", 4 },
225 };
226 const ProtobufCEnumDescriptor wifi_auth_mode__descriptor =
227 {
228 PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
229 "WifiAuthMode",
230 "WifiAuthMode",
231 "WifiAuthMode",
232 "",
233 6,
234 wifi_auth_mode__enum_values_by_number,
235 6,
236 wifi_auth_mode__enum_values_by_name,
237 1,
238 wifi_auth_mode__value_ranges,
239 NULL,NULL,NULL,NULL /* reserved[1234] */
240 };
241