1 /* Generated by the protocol buffer compiler.  DO NOT EDIT! */
2 /* Generated from: wifi_scan.proto */
3 
4 #ifndef PROTOBUF_C_wifi_5fscan_2eproto__INCLUDED
5 #define PROTOBUF_C_wifi_5fscan_2eproto__INCLUDED
6 
7 #include <protobuf-c/protobuf-c.h>
8 
9 PROTOBUF_C__BEGIN_DECLS
10 
11 #if PROTOBUF_C_VERSION_NUMBER < 1003000
12 # error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers.
13 #elif 1003001 < PROTOBUF_C_MIN_COMPILER_VERSION
14 # error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c.
15 #endif
16 
17 #include "constants.pb-c.h"
18 #include "wifi_constants.pb-c.h"
19 
20 typedef struct _CmdScanStart CmdScanStart;
21 typedef struct _RespScanStart RespScanStart;
22 typedef struct _CmdScanStatus CmdScanStatus;
23 typedef struct _RespScanStatus RespScanStatus;
24 typedef struct _CmdScanResult CmdScanResult;
25 typedef struct _WiFiScanResult WiFiScanResult;
26 typedef struct _RespScanResult RespScanResult;
27 typedef struct _WiFiScanPayload WiFiScanPayload;
28 
29 
30 /* --- enums --- */
31 
32 typedef enum _WiFiScanMsgType {
33   WI_FI_SCAN_MSG_TYPE__TypeCmdScanStart = 0,
34   WI_FI_SCAN_MSG_TYPE__TypeRespScanStart = 1,
35   WI_FI_SCAN_MSG_TYPE__TypeCmdScanStatus = 2,
36   WI_FI_SCAN_MSG_TYPE__TypeRespScanStatus = 3,
37   WI_FI_SCAN_MSG_TYPE__TypeCmdScanResult = 4,
38   WI_FI_SCAN_MSG_TYPE__TypeRespScanResult = 5
39     PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(WI_FI_SCAN_MSG_TYPE)
40 } WiFiScanMsgType;
41 
42 /* --- messages --- */
43 
44 struct  _CmdScanStart
45 {
46   ProtobufCMessage base;
47   protobuf_c_boolean blocking;
48   protobuf_c_boolean passive;
49   uint32_t group_channels;
50   uint32_t period_ms;
51 };
52 #define CMD_SCAN_START__INIT \
53  { PROTOBUF_C_MESSAGE_INIT (&cmd_scan_start__descriptor) \
54     , 0, 0, 0, 0 }
55 
56 
57 struct  _RespScanStart
58 {
59   ProtobufCMessage base;
60 };
61 #define RESP_SCAN_START__INIT \
62  { PROTOBUF_C_MESSAGE_INIT (&resp_scan_start__descriptor) \
63      }
64 
65 
66 struct  _CmdScanStatus
67 {
68   ProtobufCMessage base;
69 };
70 #define CMD_SCAN_STATUS__INIT \
71  { PROTOBUF_C_MESSAGE_INIT (&cmd_scan_status__descriptor) \
72      }
73 
74 
75 struct  _RespScanStatus
76 {
77   ProtobufCMessage base;
78   protobuf_c_boolean scan_finished;
79   uint32_t result_count;
80 };
81 #define RESP_SCAN_STATUS__INIT \
82  { PROTOBUF_C_MESSAGE_INIT (&resp_scan_status__descriptor) \
83     , 0, 0 }
84 
85 
86 struct  _CmdScanResult
87 {
88   ProtobufCMessage base;
89   uint32_t start_index;
90   uint32_t count;
91 };
92 #define CMD_SCAN_RESULT__INIT \
93  { PROTOBUF_C_MESSAGE_INIT (&cmd_scan_result__descriptor) \
94     , 0, 0 }
95 
96 
97 struct  _WiFiScanResult
98 {
99   ProtobufCMessage base;
100   ProtobufCBinaryData ssid;
101   uint32_t channel;
102   int32_t rssi;
103   ProtobufCBinaryData bssid;
104   WifiAuthMode auth;
105 };
106 #define WI_FI_SCAN_RESULT__INIT \
107  { PROTOBUF_C_MESSAGE_INIT (&wi_fi_scan_result__descriptor) \
108     , {0,NULL}, 0, 0, {0,NULL}, WIFI_AUTH_MODE__Open }
109 
110 
111 struct  _RespScanResult
112 {
113   ProtobufCMessage base;
114   size_t n_entries;
115   WiFiScanResult **entries;
116 };
117 #define RESP_SCAN_RESULT__INIT \
118  { PROTOBUF_C_MESSAGE_INIT (&resp_scan_result__descriptor) \
119     , 0,NULL }
120 
121 
122 typedef enum {
123   WI_FI_SCAN_PAYLOAD__PAYLOAD__NOT_SET = 0,
124   WI_FI_SCAN_PAYLOAD__PAYLOAD_CMD_SCAN_START = 10,
125   WI_FI_SCAN_PAYLOAD__PAYLOAD_RESP_SCAN_START = 11,
126   WI_FI_SCAN_PAYLOAD__PAYLOAD_CMD_SCAN_STATUS = 12,
127   WI_FI_SCAN_PAYLOAD__PAYLOAD_RESP_SCAN_STATUS = 13,
128   WI_FI_SCAN_PAYLOAD__PAYLOAD_CMD_SCAN_RESULT = 14,
129   WI_FI_SCAN_PAYLOAD__PAYLOAD_RESP_SCAN_RESULT = 15
130     PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(WI_FI_SCAN_PAYLOAD__PAYLOAD)
131 } WiFiScanPayload__PayloadCase;
132 
133 struct  _WiFiScanPayload
134 {
135   ProtobufCMessage base;
136   WiFiScanMsgType msg;
137   Status status;
138   WiFiScanPayload__PayloadCase payload_case;
139   union {
140     CmdScanStart *cmd_scan_start;
141     RespScanStart *resp_scan_start;
142     CmdScanStatus *cmd_scan_status;
143     RespScanStatus *resp_scan_status;
144     CmdScanResult *cmd_scan_result;
145     RespScanResult *resp_scan_result;
146   };
147 };
148 #define WI_FI_SCAN_PAYLOAD__INIT \
149  { PROTOBUF_C_MESSAGE_INIT (&wi_fi_scan_payload__descriptor) \
150     , WI_FI_SCAN_MSG_TYPE__TypeCmdScanStart, STATUS__Success, WI_FI_SCAN_PAYLOAD__PAYLOAD__NOT_SET, {0} }
151 
152 
153 /* CmdScanStart methods */
154 void   cmd_scan_start__init
155                      (CmdScanStart         *message);
156 size_t cmd_scan_start__get_packed_size
157                      (const CmdScanStart   *message);
158 size_t cmd_scan_start__pack
159                      (const CmdScanStart   *message,
160                       uint8_t             *out);
161 size_t cmd_scan_start__pack_to_buffer
162                      (const CmdScanStart   *message,
163                       ProtobufCBuffer     *buffer);
164 CmdScanStart *
165        cmd_scan_start__unpack
166                      (ProtobufCAllocator  *allocator,
167                       size_t               len,
168                       const uint8_t       *data);
169 void   cmd_scan_start__free_unpacked
170                      (CmdScanStart *message,
171                       ProtobufCAllocator *allocator);
172 /* RespScanStart methods */
173 void   resp_scan_start__init
174                      (RespScanStart         *message);
175 size_t resp_scan_start__get_packed_size
176                      (const RespScanStart   *message);
177 size_t resp_scan_start__pack
178                      (const RespScanStart   *message,
179                       uint8_t             *out);
180 size_t resp_scan_start__pack_to_buffer
181                      (const RespScanStart   *message,
182                       ProtobufCBuffer     *buffer);
183 RespScanStart *
184        resp_scan_start__unpack
185                      (ProtobufCAllocator  *allocator,
186                       size_t               len,
187                       const uint8_t       *data);
188 void   resp_scan_start__free_unpacked
189                      (RespScanStart *message,
190                       ProtobufCAllocator *allocator);
191 /* CmdScanStatus methods */
192 void   cmd_scan_status__init
193                      (CmdScanStatus         *message);
194 size_t cmd_scan_status__get_packed_size
195                      (const CmdScanStatus   *message);
196 size_t cmd_scan_status__pack
197                      (const CmdScanStatus   *message,
198                       uint8_t             *out);
199 size_t cmd_scan_status__pack_to_buffer
200                      (const CmdScanStatus   *message,
201                       ProtobufCBuffer     *buffer);
202 CmdScanStatus *
203        cmd_scan_status__unpack
204                      (ProtobufCAllocator  *allocator,
205                       size_t               len,
206                       const uint8_t       *data);
207 void   cmd_scan_status__free_unpacked
208                      (CmdScanStatus *message,
209                       ProtobufCAllocator *allocator);
210 /* RespScanStatus methods */
211 void   resp_scan_status__init
212                      (RespScanStatus         *message);
213 size_t resp_scan_status__get_packed_size
214                      (const RespScanStatus   *message);
215 size_t resp_scan_status__pack
216                      (const RespScanStatus   *message,
217                       uint8_t             *out);
218 size_t resp_scan_status__pack_to_buffer
219                      (const RespScanStatus   *message,
220                       ProtobufCBuffer     *buffer);
221 RespScanStatus *
222        resp_scan_status__unpack
223                      (ProtobufCAllocator  *allocator,
224                       size_t               len,
225                       const uint8_t       *data);
226 void   resp_scan_status__free_unpacked
227                      (RespScanStatus *message,
228                       ProtobufCAllocator *allocator);
229 /* CmdScanResult methods */
230 void   cmd_scan_result__init
231                      (CmdScanResult         *message);
232 size_t cmd_scan_result__get_packed_size
233                      (const CmdScanResult   *message);
234 size_t cmd_scan_result__pack
235                      (const CmdScanResult   *message,
236                       uint8_t             *out);
237 size_t cmd_scan_result__pack_to_buffer
238                      (const CmdScanResult   *message,
239                       ProtobufCBuffer     *buffer);
240 CmdScanResult *
241        cmd_scan_result__unpack
242                      (ProtobufCAllocator  *allocator,
243                       size_t               len,
244                       const uint8_t       *data);
245 void   cmd_scan_result__free_unpacked
246                      (CmdScanResult *message,
247                       ProtobufCAllocator *allocator);
248 /* WiFiScanResult methods */
249 void   wi_fi_scan_result__init
250                      (WiFiScanResult         *message);
251 size_t wi_fi_scan_result__get_packed_size
252                      (const WiFiScanResult   *message);
253 size_t wi_fi_scan_result__pack
254                      (const WiFiScanResult   *message,
255                       uint8_t             *out);
256 size_t wi_fi_scan_result__pack_to_buffer
257                      (const WiFiScanResult   *message,
258                       ProtobufCBuffer     *buffer);
259 WiFiScanResult *
260        wi_fi_scan_result__unpack
261                      (ProtobufCAllocator  *allocator,
262                       size_t               len,
263                       const uint8_t       *data);
264 void   wi_fi_scan_result__free_unpacked
265                      (WiFiScanResult *message,
266                       ProtobufCAllocator *allocator);
267 /* RespScanResult methods */
268 void   resp_scan_result__init
269                      (RespScanResult         *message);
270 size_t resp_scan_result__get_packed_size
271                      (const RespScanResult   *message);
272 size_t resp_scan_result__pack
273                      (const RespScanResult   *message,
274                       uint8_t             *out);
275 size_t resp_scan_result__pack_to_buffer
276                      (const RespScanResult   *message,
277                       ProtobufCBuffer     *buffer);
278 RespScanResult *
279        resp_scan_result__unpack
280                      (ProtobufCAllocator  *allocator,
281                       size_t               len,
282                       const uint8_t       *data);
283 void   resp_scan_result__free_unpacked
284                      (RespScanResult *message,
285                       ProtobufCAllocator *allocator);
286 /* WiFiScanPayload methods */
287 void   wi_fi_scan_payload__init
288                      (WiFiScanPayload         *message);
289 size_t wi_fi_scan_payload__get_packed_size
290                      (const WiFiScanPayload   *message);
291 size_t wi_fi_scan_payload__pack
292                      (const WiFiScanPayload   *message,
293                       uint8_t             *out);
294 size_t wi_fi_scan_payload__pack_to_buffer
295                      (const WiFiScanPayload   *message,
296                       ProtobufCBuffer     *buffer);
297 WiFiScanPayload *
298        wi_fi_scan_payload__unpack
299                      (ProtobufCAllocator  *allocator,
300                       size_t               len,
301                       const uint8_t       *data);
302 void   wi_fi_scan_payload__free_unpacked
303                      (WiFiScanPayload *message,
304                       ProtobufCAllocator *allocator);
305 /* --- per-message closures --- */
306 
307 typedef void (*CmdScanStart_Closure)
308                  (const CmdScanStart *message,
309                   void *closure_data);
310 typedef void (*RespScanStart_Closure)
311                  (const RespScanStart *message,
312                   void *closure_data);
313 typedef void (*CmdScanStatus_Closure)
314                  (const CmdScanStatus *message,
315                   void *closure_data);
316 typedef void (*RespScanStatus_Closure)
317                  (const RespScanStatus *message,
318                   void *closure_data);
319 typedef void (*CmdScanResult_Closure)
320                  (const CmdScanResult *message,
321                   void *closure_data);
322 typedef void (*WiFiScanResult_Closure)
323                  (const WiFiScanResult *message,
324                   void *closure_data);
325 typedef void (*RespScanResult_Closure)
326                  (const RespScanResult *message,
327                   void *closure_data);
328 typedef void (*WiFiScanPayload_Closure)
329                  (const WiFiScanPayload *message,
330                   void *closure_data);
331 
332 /* --- services --- */
333 
334 
335 /* --- descriptors --- */
336 
337 extern const ProtobufCEnumDescriptor    wi_fi_scan_msg_type__descriptor;
338 extern const ProtobufCMessageDescriptor cmd_scan_start__descriptor;
339 extern const ProtobufCMessageDescriptor resp_scan_start__descriptor;
340 extern const ProtobufCMessageDescriptor cmd_scan_status__descriptor;
341 extern const ProtobufCMessageDescriptor resp_scan_status__descriptor;
342 extern const ProtobufCMessageDescriptor cmd_scan_result__descriptor;
343 extern const ProtobufCMessageDescriptor wi_fi_scan_result__descriptor;
344 extern const ProtobufCMessageDescriptor resp_scan_result__descriptor;
345 extern const ProtobufCMessageDescriptor wi_fi_scan_payload__descriptor;
346 
347 PROTOBUF_C__END_DECLS
348 
349 
350 #endif  /* PROTOBUF_C_wifi_5fscan_2eproto__INCLUDED */
351