4 * Copyright 2012 Samsung Electronics Co., Ltd
6 * Licensed under the Flora License, Version 1.0 (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 0, else return -1
55 * @param[in] data the pointer to the main data structure
57 int wfd_get_vconf_status(void *data);
60 * This function let the ug turn wifi off
61 * @return If success, return 0, else return -1
62 * @param[in] data the pointer to the main data structure
64 int wfd_wifi_off(void *data);
67 * This function let the ug turn AP on
68 * @return If success, return 0, else return -1
69 * @param[in] data the pointer to the main data structure
71 int wfd_mobile_ap_on(void *data);
74 * This function let the ug turn AP off
75 * @return If success, return 0, else return -1
76 * @param[in] data the pointer to the main data structure
78 int wfd_mobile_ap_off(void *data);
81 * This function let the ug do initialization
82 * @return If success, return 0, else return -1
83 * @param[in] data the pointer to the main data structure
85 int init_wfd_client(void *data);
88 * This function let the ug do de-initialization
89 * @return If success, return 0, else return -1
90 * @param[in] data the pointer to the main data structure
92 int deinit_wfd_client(void *data);
95 * This function let the ug turn wi-fi direct on
96 * @return If success, return 0, else return -1
97 * @param[in] data the pointer to the main data structure
99 int wfd_client_switch_on(void *data);
102 * This function let the ug turn wi-fi direct off
103 * @return If success, return 0, else return -1
104 * @param[in] data the pointer to the main data structure
106 int wfd_client_switch_off(void *data);
109 * This function let the ug turn wi-fi direct on/off forcely
110 * @return If success, return 0, else return -1
111 * @param[in] data the pointer to the main data structure
112 * @param[in] onoff whether to turn on/off wi-fi direct
114 int wfd_client_swtch_force(void *data, int onoff);
117 * This function let the ug create a group
118 * @return If success, return 0, else return -1
120 int wfd_client_group_add();
123 * This function let the ug connect to the device by mac address
124 * @return If success, return 0, else return -1
125 * @param[in] mac_addr the pointer to the mac address of device
127 int wfd_client_connect(const char *mac_addr);
130 * This function let the ug disconnect to the device by mac address
131 * @return If success, return 0, else return -1
132 * @param[in] mac_addr the pointer to the mac address of device
134 int wfd_client_disconnect(const char *mac_addr);
137 * This function let the ug set the intent of a group owner
138 * @return If success, return 0, else return -1
139 * @param[in] go_intent the intent parameter
141 int wfd_client_set_p2p_group_owner_intent(int go_intent);
143 #endif /* __WFD_CLIENT_H__ */