[wifi-direct-manager]Merge Tizen 2.4 for sync
[platform/core/connectivity/wifi-direct-manager.git] / plugin / wpasupplicant / emul / wfd-plugin-wpasupplicant-emul.c
1 #include <stdio.h>
2 #include <string.h>
3 #include <sys/types.h>
4 #include <sys/socket.h>
5 #include <unistd.h>
6 #include <poll.h>
7 #include <errno.h>
8
9 #include <glib.h>
10
11 #include "wifi-direct-oem.h"
12 #include "wfd-plugin-wpasupplicant.h"
13
14
15 static wfd_oem_ops_s supplicant_ops = {
16         .init = ws_init,
17         .deinit = ws_deinit,
18         .activate = ws_activate,
19         .deactivate = ws_deactivate,
20
21         .start_scan = ws_start_scan,
22         .stop_scan = ws_stop_scan,
23         .get_visibility = ws_get_visibility,
24         .set_visibility = ws_set_visibility,
25         .get_scan_result = ws_get_scan_result,
26         .get_peer_info = ws_get_peer_info,
27
28         .prov_disc_req = ws_prov_disc_req,
29
30         .connect = ws_connect,
31         .disconnect = ws_disconnect,
32         .reject_connection = ws_reject_connection,
33         .cancel_connection = ws_cancel_connection,
34
35         .get_connected_peers = ws_get_connected_peers,
36         .get_pin = ws_get_pin,
37         .set_pin = ws_set_pin,
38         .get_supported_wps_mode = ws_get_supported_wps_mode,
39
40         .create_group = ws_create_group,
41         .destroy_group = ws_destroy_group,
42         .invite = ws_invite,
43         .wps_start = ws_wps_start,
44         .enrollee_start = ws_enrollee_start,
45         .wps_cancel = ws_wps_cancel,
46
47         .get_dev_name = ws_get_dev_name,
48         .set_dev_name = ws_set_dev_name,
49         .get_dev_mac = ws_get_dev_mac,
50         .get_dev_type = ws_get_dev_type,
51         .set_dev_type = ws_set_dev_type,
52         .get_go_intent = ws_get_go_intent,
53         .set_go_intent = ws_set_go_intent,
54         .get_persistent_groups = ws_get_persistent_groups,
55         .remove_persistent_group = ws_remove_persistent_group,
56         .set_persistent_reconnect = ws_set_persistent_reconnect,
57
58 #ifdef TIZEN_FEATURE_SERVICE_DISCOVERY
59         .start_service_discovery = ws_start_service_discovery,
60         .cancel_service_discovery = ws_cancel_service_discovery,
61
62         .serv_add = ws_serv_add,
63         .serv_del = ws_serv_del,
64 #endif /* TIZEN_FEATURE_SERVICE_DISCOVERY */
65
66 #ifdef TIZEN_FEATURE_WIFI_DISPLAY
67         .miracast_init = ws_miracast_init,
68         .set_display = ws_set_disply,
69 #endif /* TIZEN_FEATURE_WIFI_DISPLAY */
70         };
71
72 static ws_plugin_data_s *g_pd;
73
74 int wfd_plugin_load(wfd_oem_ops_s **ops)
75 {
76         return -1;
77 }
78
79 int ws_init(wfd_oem_event_cb callback, void *user_data)
80 {
81         __WDP_LOG_FUNC_ENTER__;
82
83         __WDP_LOG_FUNC_EXIT__;
84         return -1;
85 }
86
87 int ws_deinit()
88 {
89         __WDP_LOG_FUNC_ENTER__;
90
91         __WDP_LOG_FUNC_EXIT__;
92         return -1;
93 }
94
95 int ws_activate(int concurrent)
96 {
97         __WDP_LOG_FUNC_ENTER__;
98
99         __WDP_LOG_FUNC_EXIT__;
100         return -1;
101 }
102
103 int ws_deactivate(int concurrent)
104 {
105         __WDP_LOG_FUNC_ENTER__;
106
107         __WDP_LOG_FUNC_EXIT__;
108         return -1;
109 }
110
111 int ws_start_scan(wfd_oem_scan_param_s *param)
112 {
113         __WDP_LOG_FUNC_ENTER__;
114
115         __WDP_LOG_FUNC_EXIT__;
116         return -1;
117 }
118
119 int ws_stop_scan()
120 {
121         __WDP_LOG_FUNC_ENTER__;
122
123         __WDP_LOG_FUNC_EXIT__;
124         return -1;
125 }
126
127 int ws_get_visibility(int *visibility)
128 {
129         __WDP_LOG_FUNC_ENTER__;
130
131         __WDP_LOG_FUNC_EXIT__;
132         return -1;
133 }
134
135 int ws_set_visibility(int visibility)
136 {
137         __WDP_LOG_FUNC_ENTER__;
138
139         __WDP_LOG_FUNC_EXIT__;
140         return -1;
141 }
142
143 int ws_get_scan_result(GList **peers, int *peer_count)
144 {
145         __WDP_LOG_FUNC_ENTER__;
146
147         __WDP_LOG_FUNC_EXIT__;
148         return -1;
149 }
150
151 int ws_get_peer_info(unsigned char *peer_addr, wfd_oem_device_s **peer)
152 {
153         __WDP_LOG_FUNC_ENTER__;
154
155         __WDP_LOG_FUNC_EXIT__;
156         return -1;
157 }
158
159 int ws_prov_disc_req(unsigned char *peer_addr, wfd_oem_wps_mode_e wps_mode, int join)
160 {
161         __WDP_LOG_FUNC_ENTER__;
162
163         __WDP_LOG_FUNC_EXIT__;
164         return -1;
165 }
166
167 int ws_connect(unsigned char *peer_addr, wfd_oem_conn_param_s *param)
168 {
169         __WDP_LOG_FUNC_ENTER__;
170
171         __WDP_LOG_FUNC_EXIT__;
172         return -1;
173 }
174
175 int ws_disconnect(unsigned char *peer_addr)
176 {
177         __WDP_LOG_FUNC_ENTER__;
178
179         __WDP_LOG_FUNC_EXIT__;
180         return -1;
181 }
182
183 int ws_reject_connection(unsigned char *peer_addr)
184 {
185         __WDP_LOG_FUNC_ENTER__;
186
187         __WDP_LOG_FUNC_EXIT__;
188         return 0;
189 }
190
191 int ws_cancel_connection(unsigned char *peer_addr)
192 {
193         __WDP_LOG_FUNC_ENTER__;
194
195         __WDP_LOG_FUNC_EXIT__;
196         return 0;
197 }
198
199 int ws_get_connected_peers(GList **peers, int *peer_count)
200 {
201         __WDP_LOG_FUNC_ENTER__;
202
203         __WDP_LOG_FUNC_EXIT__;
204         return -1;
205 }
206
207 int ws_get_pin(char *pin)
208 {
209         __WDP_LOG_FUNC_ENTER__;
210
211         __WDP_LOG_FUNC_EXIT__;
212         return -1;
213 }
214
215 int ws_set_pin(char *pin)
216 {
217         __WDP_LOG_FUNC_ENTER__;
218
219         __WDP_LOG_FUNC_EXIT__;
220         return -1;
221 }
222
223 int ws_get_supported_wps_mode()
224 {
225         __WDP_LOG_FUNC_ENTER__;
226
227         __WDP_LOG_FUNC_EXIT__;
228         return -1;
229 }
230
231 int ws_create_group(int persistent, int freq)
232 {
233         __WDP_LOG_FUNC_ENTER__;
234
235         __WDP_LOG_FUNC_EXIT__;
236         return -1;
237 }
238
239 int ws_destroy_group(const char *ifname)
240 {
241         __WDP_LOG_FUNC_ENTER__;
242
243         __WDP_LOG_FUNC_EXIT__;
244         return -1;
245 }
246
247 int ws_invite(unsigned char *peer_addr, wfd_oem_invite_param_s *param)
248 {
249         __WDP_LOG_FUNC_ENTER__;
250
251         __WDP_LOG_FUNC_EXIT__;
252         return -1;
253 }
254
255 // Only group owner can use this command
256 int ws_wps_start(unsigned char *peer_addr, int wps_mode, const char *pin)
257 {
258         __WDP_LOG_FUNC_ENTER__;
259
260         __WDP_LOG_FUNC_EXIT__;
261         return -1;
262 }
263
264 int ws_enrollee_start(unsigned char *peer_addr, int wps_mode, const char *pin)
265 {
266         __WDP_LOG_FUNC_ENTER__;
267
268         __WDP_LOG_FUNC_EXIT__;
269         return -1;
270 }
271
272 int ws_wps_cancel()
273 {
274         __WDP_LOG_FUNC_ENTER__;
275
276         __WDP_LOG_FUNC_EXIT__;
277         return -1;
278 }
279
280 int ws_set_static_ip(unsigned char *ip_addr)
281 {
282         __WDP_LOG_FUNC_ENTER__;
283
284         __WDP_LOG_FUNC_EXIT__;
285         return -1;
286 }
287
288 int ws_get_dev_name(char *dev_name)
289 {
290         __WDP_LOG_FUNC_ENTER__;
291
292         __WDP_LOG_FUNC_EXIT__;
293         return -1;
294 }
295
296 int ws_set_dev_name(char *dev_name)
297 {
298         __WDP_LOG_FUNC_ENTER__;
299
300         __WDP_LOG_FUNC_EXIT__;
301         return -1;
302 }
303
304 int ws_get_dev_mac(char *dev_mac)
305 {
306         __WDP_LOG_FUNC_ENTER__;
307
308         __WDP_LOG_FUNC_EXIT__;
309         return -1;
310 }
311
312 int ws_get_dev_type(int *pri_dev_type, int *sec_dev_type)
313 {
314         __WDP_LOG_FUNC_ENTER__;
315
316         __WDP_LOG_FUNC_EXIT__;
317         return -1;
318 }
319
320 int ws_set_dev_type(int pri_dev_type, int sec_dev_type)
321 {
322         __WDP_LOG_FUNC_ENTER__;
323
324         __WDP_LOG_FUNC_EXIT__;
325         return -1;
326 }
327
328 int ws_get_go_intent(int *go_intent)
329 {
330         __WDP_LOG_FUNC_ENTER__;
331
332         __WDP_LOG_FUNC_EXIT__;
333         return -1;
334 }
335
336 int ws_set_go_intent(int go_intent)
337 {
338         __WDP_LOG_FUNC_ENTER__;
339
340         __WDP_LOG_FUNC_EXIT__;
341         return -1;
342 }
343
344 int ws_get_persistent_groups(wfd_oem_persistent_group_s **groups, int *group_count)
345 {
346         __WDP_LOG_FUNC_ENTER__;
347
348         __WDP_LOG_FUNC_EXIT__;
349         return -1;
350 }
351
352 int ws_remove_persistent_group(char *ssid, unsigned char *bssid)
353 {
354         __WDP_LOG_FUNC_ENTER__;
355
356         __WDP_LOG_FUNC_EXIT__;
357         return -1;
358 }
359
360 int ws_set_persistent_reconnect(unsigned char *bssid, int reconnect)
361 {
362         __WDP_LOG_FUNC_ENTER__;
363
364         __WDP_LOG_FUNC_EXIT__;
365         return -1;
366 }
367
368 #ifdef TIZEN_FEATURE_SERVICE_DISCOVERY
369
370 int ws_start_service_discovery(unsigned char *mac_addr, int service_type)
371 {
372         __WDP_LOG_FUNC_ENTER__;
373
374         __WDP_LOG_FUNC_EXUT__;
375         return -1;
376 }
377
378 int ws_cancel_service_discovery(unsigned char *mac_addr, int service_type);
379 {
380         __WDP_LOG_FUNC_ENTER__;
381
382         __WDP_LOG_FUNC_EXUT__;
383         return -1;
384 }
385
386 int ws_serv_add(wfd_oem_new_service_s *service)
387 {
388         __WDP_LOG_FUNC_ENTER__;
389
390         __WDP_LOG_FUNC_EXUT__;
391         return -1;
392 }
393
394 int ws_serv_del(wfd_oem_new_service_s *service)
395 {
396         __WDP_LOG_FUNC_ENTER__;
397
398         __WDP_LOG_FUNC_EXUT__;
399         return -1;
400 }
401 #endif /* TIZEN_FEATURE_SERVICE_DISCOVERY */
402
403 #ifdef TIZEN_FEATURE_WIFI_DISPLAY
404 int ws_miracast_init(int enable)
405 {
406         __WDP_LOG_FUNC_ENTER__;
407
408         __WDP_LOG_FUNC_EXUT__;
409         return -1;
410 }
411
412 int ws_set_wifi_display(wfd_oem_display_s *wifi_display)
413 {
414         __WDP_LOG_FUNC_ENTER__;
415
416         __WDP_LOG_FUNC_EXUT__;
417         return -1;
418 }
419 #endif /* TIZEN_FEATURE_WIFI_DISPLAY */