4 * Copyright 2012 Samsung Electronics Co., Ltd
6 * Licensed under the Flora License, Version 1.1 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.tizenopensource.org/license
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
21 #ifndef __WFD_CLIENT_H__
22 #define __WFD_CLIENT_H__
26 WFD_DEVICE_TYPE_COMPUTER = WIFI_DIRECT_PRIMARY_DEVICE_TYPE_COMPUTER,
27 WFD_DEVICE_TYPE_INPUT_DEVICE = WIFI_DIRECT_PRIMARY_DEVICE_TYPE_INPUT_DEVICE,
28 WFD_DEVICE_TYPE_PRINTER = WIFI_DIRECT_PRIMARY_DEVICE_TYPE_PRINTER,
29 WFD_DEVICE_TYPE_CAMERA = WIFI_DIRECT_PRIMARY_DEVICE_TYPE_CAMERA,
30 WFD_DEVICE_TYPE_STORAGE = WIFI_DIRECT_PRIMARY_DEVICE_TYPE_STORAGE,
31 WFD_DEVICE_TYPE_NW_INFRA = WIFI_DIRECT_PRIMARY_DEVICE_TYPE_NETWORK_INFRA,
32 WFD_DEVICE_TYPE_DISPLAYS = WIFI_DIRECT_PRIMARY_DEVICE_TYPE_DISPLAY,
33 WFD_DEVICE_TYPE_MM_DEVICES = WIFI_DIRECT_PRIMARY_DEVICE_TYPE_MULTIMEDIA_DEVICE,
34 WFD_DEVICE_TYPE_GAME_DEVICES = WIFI_DIRECT_PRIMARY_DEVICE_TYPE_GAME_DEVICE,
35 WFD_DEVICE_TYPE_TELEPHONE = WIFI_DIRECT_PRIMARY_DEVICE_TYPE_TELEPHONE,
36 WFD_DEVICE_TYPE_AUDIO = WIFI_DIRECT_PRIMARY_DEVICE_TYPE_AUDIO,
37 WFD_DEVICE_TYPE_OTHER = WIFI_DIRECT_PRIMARY_DEVICE_TYPE_OTHER,
41 WFD_LINK_STATUS_DEACTIVATED = WIFI_DIRECT_STATE_DEACTIVATED,
42 WFD_LINK_STATUS_DEACTIVATING = WIFI_DIRECT_STATE_DEACTIVATING,
43 WFD_LINK_STATUS_ACTIVATING = WIFI_DIRECT_STATE_ACTIVATING,
44 WFD_LINK_STATUS_ACTIVATED = WIFI_DIRECT_STATE_ACTIVATED,
45 WFD_LINK_STATUS_DISCOVERING = WIFI_DIRECT_STATE_DISCOVERING,
46 WFD_LINK_STATUS_CONNECTING = WIFI_DIRECT_STATE_CONNECTING,
47 WFD_LINK_STATUS_DISCONNECTING = WIFI_DIRECT_STATE_DISCONNECTING,
48 WFD_LINK_STATUS_CONNECTED = WIFI_DIRECT_STATE_CONNECTED,
49 WFD_LINK_STATUS_GROUP_OWNER = WIFI_DIRECT_STATE_GROUP_OWNER,
53 * This function let the ug get wi-fi direct status from vconf
54 * @return If success, return the wfd status, else return -1
57 int wfd_get_vconf_status();
60 * This function let the ug get device name from vconf
61 * @return If success, return 0, else return -1
62 * @param[in] data the pointer to the main data structure
64 int wfd_get_vconf_device_name(void *data);
66 #ifndef MODEL_BUILD_FEATURE_WLAN_CONCURRENT_MODE
68 * This function let the ug turn wifi off
69 * @return If success, return 0, else return -1
70 * @param[in] data the pointer to the main data structure
72 int wfd_wifi_off(void *data);
73 #endif /* MODEL_BUILD_FEATURE_WLAN_CONCURRENT_MODE */
76 * This function let the ug turn AP on
77 * @return If success, return 0, else return -1
78 * @param[in] data the pointer to the main data structure
80 int wfd_mobile_ap_on(void *data);
83 * This function let the ug turn AP off
84 * @return If success, return 0, else return -1
85 * @param[in] data the pointer to the main data structure
87 int wfd_mobile_ap_off(void *data);
90 * This function let the ug do initialization
91 * @return If success, return 0, else return -1
92 * @param[in] data the pointer to the main data structure
94 int init_wfd_client(void *data);
98 * This function let the ug load wfd manager
99 * @return If success, return 0, else return -1
100 * @param[in] data the pointer to the main data structure
102 int launch_wifi_direct_manager(void *data);
105 * This function let the ug do de-initialization
106 * @return If success, return 0, else return -1
107 * @param[in] data the pointer to the main data structure
109 int deinit_wfd_client(void *data);
112 * This function let the ug turn wi-fi direct on
113 * @return If success, return 0, else return -1
114 * @param[in] data the pointer to the main data structure
116 int wfd_client_switch_on(void *data);
119 * This function let the ug turn wi-fi direct off
120 * @return If success, return 0, else return -1
121 * @param[in] data the pointer to the main data structure
123 int wfd_client_switch_off(void *data);
126 * This function let the ug turn wi-fi direct on/off forcely
127 * @return If success, return 0, else return -1
128 * @param[in] data the pointer to the main data structure
129 * @param[in] onoff whether to turn on/off wi-fi direct
131 int wfd_client_swtch_force(void *data, int onoff);
134 * This function let the ug create a group
135 * @return If success, return 0, else return -1
137 int wfd_client_group_add();
140 * This function let the ug connect to the device by mac address
141 * @return If success, return 0, else return -1
142 * @param[in] mac_addr the pointer to the mac address of device
144 int wfd_client_connect(const char *mac_addr);
147 * This function let the ug disconnect to the device by mac address
148 * @return If success, return 0, else return -1
149 * @param[in] mac_addr the pointer to the mac address of device
151 int wfd_client_disconnect(const char *mac_addr);
154 * This function let the ug set the intent of a group owner
155 * @return If success, return 0, else return -1
156 * @param[in] go_intent the intent parameter
158 int wfd_client_set_p2p_group_owner_intent(int go_intent);
161 * This function let the ug destroy tethering
163 * @param[in] ugd the pointer to the main data structure
165 void wfd_client_destroy_tethering(struct ug_data *ugd);
167 void wfd_client_free_raw_discovered_peers(struct ug_data *ugd);
169 #endif /* __WFD_CLIENT_H__ */