summaryrefslogtreecommitdiff
path: root/ug-wifidirect/include
diff options
context:
space:
mode:
Diffstat (limited to 'ug-wifidirect/include')
-rw-r--r--ug-wifidirect/include/wfd_client.h143
-rwxr-xr-xug-wifidirect/include/wfd_ug.h268
-rwxr-xr-xug-wifidirect/include/wfd_ug_view.h304
3 files changed, 715 insertions, 0 deletions
diff --git a/ug-wifidirect/include/wfd_client.h b/ug-wifidirect/include/wfd_client.h
new file mode 100644
index 0000000..067fb08
--- /dev/null
+++ b/ug-wifidirect/include/wfd_client.h
@@ -0,0 +1,143 @@
+/*
+* WiFi-Direct UG
+*
+* Copyright 2012 Samsung Electronics Co., Ltd
+
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+
+* http://www.tizenopensource.org/license
+
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*/
+
+
+#ifndef __WFD_CLIENT_H__
+#define __WFD_CLIENT_H__
+
+
+typedef enum {
+ WFD_DEVICE_TYPE_COMPUTER = WIFI_DIRECT_PRIMARY_DEVICE_TYPE_COMPUTER,
+ WFD_DEVICE_TYPE_INPUT_DEVICE = WIFI_DIRECT_PRIMARY_DEVICE_TYPE_INPUT_DEVICE,
+ WFD_DEVICE_TYPE_PRINTER = WIFI_DIRECT_PRIMARY_DEVICE_TYPE_PRINTER,
+ WFD_DEVICE_TYPE_CAMERA = WIFI_DIRECT_PRIMARY_DEVICE_TYPE_CAMERA,
+ WFD_DEVICE_TYPE_STORAGE = WIFI_DIRECT_PRIMARY_DEVICE_TYPE_STORAGE,
+ WFD_DEVICE_TYPE_NW_INFRA = WIFI_DIRECT_PRIMARY_DEVICE_TYPE_NETWORK_INFRA,
+ WFD_DEVICE_TYPE_DISPLAYS = WIFI_DIRECT_PRIMARY_DEVICE_TYPE_DISPLAY,
+ WFD_DEVICE_TYPE_MM_DEVICES = WIFI_DIRECT_PRIMARY_DEVICE_TYPE_MULTIMEDIA_DEVICE,
+ WFD_DEVICE_TYPE_GAME_DEVICES = WIFI_DIRECT_PRIMARY_DEVICE_TYPE_GAME_DEVICE,
+ WFD_DEVICE_TYPE_TELEPHONE = WIFI_DIRECT_PRIMARY_DEVICE_TYPE_TELEPHONE,
+ WFD_DEVICE_TYPE_AUDIO = WIFI_DIRECT_PRIMARY_DEVICE_TYPE_AUDIO,
+ WFD_DEVICE_TYPE_OTHER = WIFI_DIRECT_PRIMARY_DEVICE_TYPE_OTHER,
+} device_type_e;
+
+typedef enum {
+ WFD_LINK_STATUS_DEACTIVATED = WIFI_DIRECT_STATE_DEACTIVATED,
+ WFD_LINK_STATUS_DEACTIVATING = WIFI_DIRECT_STATE_DEACTIVATING,
+ WFD_LINK_STATUS_ACTIVATING = WIFI_DIRECT_STATE_ACTIVATING,
+ WFD_LINK_STATUS_ACTIVATED = WIFI_DIRECT_STATE_ACTIVATED,
+ WFD_LINK_STATUS_DISCOVERING = WIFI_DIRECT_STATE_DISCOVERING,
+ WFD_LINK_STATUS_CONNECTING = WIFI_DIRECT_STATE_CONNECTING,
+ WFD_LINK_STATUS_DISCONNECTING = WIFI_DIRECT_STATE_DISCONNECTING,
+ WFD_LINK_STATUS_CONNECTED = WIFI_DIRECT_STATE_CONNECTED,
+ WFD_LINK_STATUS_GROUP_OWNER = WIFI_DIRECT_STATE_GROUP_OWNER,
+} link_status_e;
+
+/**
+ * This function let the ug get wi-fi direct status from vconf
+ * @return If success, return 0, else return -1
+ * @param[in] data the pointer to the main data structure
+ */
+int wfd_get_vconf_status(void *data);
+
+/**
+ * This function let the ug turn wifi off
+ * @return If success, return 0, else return -1
+ * @param[in] data the pointer to the main data structure
+ */
+int wfd_wifi_off(void *data);
+
+/**
+ * This function let the ug turn AP on
+ * @return If success, return 0, else return -1
+ * @param[in] data the pointer to the main data structure
+ */
+int wfd_mobile_ap_on(void *data);
+
+/**
+ * This function let the ug turn AP off
+ * @return If success, return 0, else return -1
+ * @param[in] data the pointer to the main data structure
+ */
+int wfd_mobile_ap_off(void *data);
+
+/**
+ * This function let the ug do initialization
+ * @return If success, return 0, else return -1
+ * @param[in] data the pointer to the main data structure
+ */
+int init_wfd_client(void *data);
+
+/**
+ * This function let the ug do de-initialization
+ * @return If success, return 0, else return -1
+ * @param[in] data the pointer to the main data structure
+ */
+int deinit_wfd_client(void *data);
+
+/**
+ * This function let the ug turn wi-fi direct on
+ * @return If success, return 0, else return -1
+ * @param[in] data the pointer to the main data structure
+ */
+int wfd_client_switch_on(void *data);
+
+/**
+ * This function let the ug turn wi-fi direct off
+ * @return If success, return 0, else return -1
+ * @param[in] data the pointer to the main data structure
+ */
+int wfd_client_switch_off(void *data);
+
+/**
+ * This function let the ug turn wi-fi direct on/off forcely
+ * @return If success, return 0, else return -1
+ * @param[in] data the pointer to the main data structure
+ * @param[in] onoff whether to turn on/off wi-fi direct
+ */
+int wfd_client_swtch_force(void *data, int onoff);
+
+/**
+ * This function let the ug create a group
+ * @return If success, return 0, else return -1
+ */
+int wfd_client_group_add();
+
+/**
+ * This function let the ug connect to the device by mac address
+ * @return If success, return 0, else return -1
+ * @param[in] mac_addr the pointer to the mac address of device
+ */
+int wfd_client_connect(const char *mac_addr);
+
+/**
+ * This function let the ug disconnect to the device by mac address
+ * @return If success, return 0, else return -1
+ * @param[in] mac_addr the pointer to the mac address of device
+ */
+int wfd_client_disconnect(const char *mac_addr);
+
+/**
+ * This function let the ug set the intent of a group owner
+ * @return If success, return 0, else return -1
+ * @param[in] go_intent the intent parameter
+ */
+int wfd_client_set_p2p_group_owner_intent(int go_intent);
+
+#endif /* __WFD_CLIENT_H__ */
diff --git a/ug-wifidirect/include/wfd_ug.h b/ug-wifidirect/include/wfd_ug.h
new file mode 100755
index 0000000..ff16f49
--- /dev/null
+++ b/ug-wifidirect/include/wfd_ug.h
@@ -0,0 +1,268 @@
+/*
+* WiFi-Direct UG
+*
+* Copyright 2012 Samsung Electronics Co., Ltd
+
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+
+* http://www.tizenopensource.org/license
+
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*/
+
+
+#ifndef __WFD_UG_H__
+#define __WFD_UG_H__
+
+#include <ui-gadget-module.h>
+#include <tethering.h>
+#include <wifi-direct.h>
+
+#define PACKAGE "ug-setting-wifidirect-efl"
+#define LOCALEDIR "/usr/ug/res/locale"
+#define VCONF_WFD_APNAME "db/setting/device_name"
+
+#ifdef USE_DLOG
+#include <dlog.h>
+
+#undef LOG_TAG
+#define LOG_TAG "UG_WIFI_DIRECT"
+
+#define WDUG_LOGV(format, args...) LOGV(format, ##args)
+#define WDUG_LOGD(format, args...) LOGD(format, ##args)
+#define WDUG_LOGI(format, args...) LOGI(format, ##args)
+#define WDUG_LOGW(format, args...) LOGW(format, ##args)
+#define WDUG_LOGE(format, args...) LOGE(format, ##args)
+#define WDUG_LOGF(format, args...) LOGF(format, ##args)
+
+#define __WDUG_LOG_FUNC_ENTER__ LOGV("Enter")
+#define __WDUG_LOG_FUNC_EXIT__ LOGV("Quit")
+
+#define assertm_if(expr, fmt, args...) do { \
+ if (expr) { \
+ WDUG_LOGF(" ##(%s) -> assert!!## "fmt, #expr, ##args); \
+ assert(1); \
+ } \
+} while (0)
+
+#else /** _DLOG_UTIL */
+
+#define WDUG_LOGV(format, args...) \
+ printf("[V/UG_WIFI_DIRECT] %s: %s()(%4d)> "format, __FILE__, __FUNCTION__, __LINE__, ##args)
+#define WDUG_LOGD(format, args...) \
+ printf("[D/UG_WIFI_DIRECT] %s: %s()(%4d)> "format, __FILE__, __FUNCTION__, __LINE__, ##args)
+#define WDUG_LOGI(format, args...) \
+ printf("[I/UG_WIFI_DIRECT] %s: %s()(%4d)> "format, __FILE__, __FUNCTION__, __LINE__, ##args)
+#define WDUG_LOGW(format, args...) \
+ printf("[W/UG_WIFI_DIRECT] %s: %s()(%4d)> "format, __FILE__, __FUNCTION__, __LINE__, ##args)
+#define WDUG_LOGE(format, args...) \
+ printf("[E/UG_WIFI_DIRECT] %s: %s()(%4d)> "format, __FILE__, __FUNCTION__, __LINE__, ##args)
+#define WDUG_LOGF(format, args...) \
+ printf("[F/UG_WIFI_DIRECT] %s: %s()(%4d)> "format, __FILE__, __FUNCTION__, __LINE__, ##args)
+
+#define __WDUG_LOG_FUNC_ENTER__ \
+ printf("[V/UG_WIFI_DIRECT] %s: %s()(%4d)> Enter", __FILE__, __FUNCTION__, __LINE__)
+#define __WDUG_LOG_FUNC_EXIT__ \
+ printf("[V/UG_WIFI_DIRECT] %s: %s()(%4d)> Exit", __FILE__, __FUNCTION__, __LINE__)
+
+#endif /** _DLOG_UTIL */
+
+#define MAC2STR(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5]
+#define MACSTR "%02x:%02x:%02x:%02x:%02x:%02x"
+
+#define AP_NAME_LENGTH_MAX 32
+#define AP_PASSWORD_LENGTH_MAX 64
+#define AP_PASSWORD_LENGTH_MIN 8
+#define AP_REJECT_CHAR_LIST "=,"
+
+#define DEFAULT_DEV_NAME "Tizen"
+#define MAC_LENGTH 18
+#define SSID_LENGTH 32
+#define MAX_PEER_NUM 10
+#define MAX_POPUP_PEER_NUM 7
+#define MAX_POPUP_TEXT_SIZE 256
+#define MAX_DISPLAY_TIME_OUT 30
+#define MAX_NO_ACTION_TIME_OUT 300 /*5min*/
+#define MAX_SCAN_TIME_OUT 30
+
+#define _(s) dgettext(PACKAGE, s)
+#define N_(s) dgettext_noop(s)
+#define S_(s) dgettext("sys_string", s)
+
+#if 1
+/* To-Do : Text should be translated. */
+#define IDS_WFD_POP_SCAN_AGAIN "Current connection will be disconnected so that scanning can start.Continue?"
+#define IDS_WFD_POP_WARN_BUSY_DEVICE "Unavailable device. Device is connected to another device."
+#define IDS_WFD_POP_AUTOMATIC_TURN_OFF "There has been no activity for 5 minutes since Wi-Fi Direct was enabled. To extend battery life, Wi-Fi Direct has been disabled."
+#define IDS_WFD_BODY_FAILED_DEVICES "Failed Devices"
+#define IDS_WFD_TITLE_ABOUT_WIFI_DIRECT "About Wi-Fi Direct"
+#endif
+
+
+#define WFD_GLOBALIZATION_STR_LENGTH 256
+
+typedef enum {
+ WFD_MULTI_CONNECT_MODE_NONE,
+ WFD_MULTI_CONNECT_MODE_IN_PROGRESS,
+ WFD_MULTI_CONNECT_MODE_COMPLETED,
+} wfd_multi_connect_mode_e;
+
+typedef enum {
+ PEER_CONN_STATUS_DISCONNECTED,
+ PEER_CONN_STATUS_DISCONNECTING,
+ PEER_CONN_STATUS_CONNECTING = PEER_CONN_STATUS_DISCONNECTING,
+ PEER_CONN_STATUS_CONNECTED,
+ PEER_CONN_STATUS_FAILED_TO_CONNECT,
+ PEER_CONN_STATUS_WAIT_FOR_CONNECT,
+} conn_status_e;
+
+
+typedef struct {
+ char ssid[SSID_LENGTH];
+ unsigned int category;
+ char mac_addr[MAC_LENGTH];
+ char if_addr[MAC_LENGTH];
+ conn_status_e conn_status;
+ bool is_group_owner; /** Is an active P2P Group Owner */
+ bool is_persistent_group_owner; /** Is a stored Persistent GO */
+ bool is_connected; /** Is peer connected*/
+ Elm_Object_Item *gl_item;
+} device_type_s;
+
+typedef struct {
+ bool dev_sel_state;
+ device_type_s peer;
+} wfd_multi_sel_data_s;
+
+struct ug_data {
+ Evas_Object *base;
+ ui_gadget_h ug;
+
+ Evas_Object *win;
+ Evas_Object *bg;
+ Evas_Object *naviframe;
+ Evas_Object *genlist;
+ Evas_Object *multiconn_view_genlist;
+ Evas_Object *popup;
+ Evas_Object *act_popup;
+ Evas_Object *warn_popup;
+
+ Elm_Object_Item *head;
+ Evas_Object *scan_btn;
+ Evas_Object *multi_scan_btn;
+ Evas_Object *multi_connect_btn;
+
+ Elm_Object_Item *nodevice_title_item;
+ Elm_Object_Item *nodevice_item;
+
+ Elm_Object_Item *about_wfd_item;
+ Elm_Object_Item *about_wfd_sep_high_item;
+ Elm_Object_Item *about_wfd_sep_low_item;
+
+ Elm_Object_Item *conn_wfd_item;
+ Elm_Object_Item *conn_failed_wfd_item;
+ Elm_Object_Item *avlbl_wfd_item;
+ Elm_Object_Item *busy_wfd_item;
+ Elm_Object_Item *multi_connect_wfd_item;
+
+ Elm_Object_Item *multi_button_item;
+ Elm_Object_Item *multi_button_sep_item;
+
+ Elm_Object_Item *mcview_select_all_item;
+ Elm_Object_Item *mcview_title_item;
+ Elm_Object_Item *mcview_nodevice_item;
+
+ Evas_Object *back_btn;
+ Evas_Object *multi_btn;
+
+ // Notify
+ Evas_Object *notify;
+ Evas_Object *notify_layout;
+
+ int head_text_mode;
+
+ // Raw peer data
+ device_type_s raw_connected_peers[MAX_PEER_NUM];
+ int raw_connected_peer_cnt;
+ device_type_s raw_discovered_peers[MAX_PEER_NUM];
+ int raw_discovered_peer_cnt;
+
+ // Peer data in the Genlist
+ device_type_s gl_connected_peers[MAX_PEER_NUM];
+ int gl_connected_peer_cnt;
+
+ device_type_s gl_connected_failed_peers[MAX_PEER_NUM];
+ int gl_connected_failed_peer_cnt;
+
+ device_type_s gl_available_peers[MAX_PEER_NUM];
+ int gl_available_peer_cnt;
+
+ device_type_s gl_busy_peers[MAX_PEER_NUM];
+ int gl_busy_peer_cnt;
+
+ device_type_s raw_multi_selected_peers[MAX_PEER_NUM];
+ int raw_multi_selected_peer_cnt;
+
+ device_type_s gl_multi_connect_peers[MAX_PEER_NUM];
+ int gl_multi_connect_peer_cnt;
+
+ // My status
+ bool I_am_group_owner;
+ bool I_am_connected;
+
+ // Following variables are used at the Multi connect view.
+ wfd_multi_connect_mode_e multi_connect_mode;
+ wfd_multi_sel_data_s multi_conn_dev_list[MAX_PEER_NUM];
+ int gl_available_dev_cnt_at_multiconn_view;
+ int g_source_multi_connect_next;
+
+ int wfd_onoff;
+ wifi_direct_state_e wfd_status;
+ char *dev_name;
+ char *dev_pass;
+
+ // For connect failed peers
+ int last_display_time;
+ Ecore_Timer *display_timer;
+
+ // Tethering
+ bool is_hotspot_off;
+ tethering_h hotspot_handle;
+
+ // Used for automatic turn off
+ int last_wfd_status;
+ int last_wfd_time;
+ Ecore_Timer *monitor_timer;
+
+ // Re-discover or not
+ bool is_re_discover;
+};
+
+extern Elm_Gen_Item_Class head_itc;
+extern Elm_Gen_Item_Class name_itc;
+extern Elm_Gen_Item_Class title_itc;
+extern Elm_Gen_Item_Class peer_itc;
+extern Elm_Gen_Item_Class noitem_itc;
+extern Elm_Gen_Item_Class button_itc;
+
+extern Elm_Gen_Item_Class title_conn_itc;
+extern Elm_Gen_Item_Class peer_conn_itc;
+
+extern Elm_Gen_Item_Class title_busy_itc;
+extern Elm_Gen_Item_Class peer_busy_itc;
+
+extern Elm_Gen_Item_Class title_multi_connect_itc;
+extern Elm_Gen_Item_Class peer_multi_connect_itc;
+
+extern Elm_Gen_Item_Class title_conn_failed_itc;
+extern Elm_Gen_Item_Class peer_conn_failed_itc;
+
+
+#endif /* __WFD_UG_H__ */
diff --git a/ug-wifidirect/include/wfd_ug_view.h b/ug-wifidirect/include/wfd_ug_view.h
new file mode 100755
index 0000000..7a6359b
--- /dev/null
+++ b/ug-wifidirect/include/wfd_ug_view.h
@@ -0,0 +1,304 @@
+/*
+* WiFi-Direct UG
+*
+* Copyright 2012 Samsung Electronics Co., Ltd
+
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+
+* http://www.tizenopensource.org/license
+
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*/
+
+#ifndef __WFD_UG_VIEW_H__
+#define __WFD_UG_VIEW_H__
+
+#include <glib.h>
+#include <syspopup_caller.h>
+
+#define EDJDIR "/usr/ug/res/edje/ug-setting-wifidirect-efl"
+#define WFD_UG_EDJ_PATH EDJDIR"/wfd_ug.edj"
+#define WFD_IMG_DIR "/usr/ug/res/images/ug-setting-wifidirect-efl"
+#define TICKERNOTI_SYSPOPUP "tickernoti-syspopup"
+
+
+/* Define icons */
+
+#define WFD_ICON_DEVICE_COMPUTER WFD_IMG_DIR"/A09_device_computer.png"
+#define WFD_ICON_DEVICE_INPUT_DEVICE WFD_IMG_DIR"/A09_device_input_device.png"
+#define WFD_ICON_DEVICE_PRINTER WFD_IMG_DIR"/A09_device_printer.png"
+#define WFD_ICON_DEVICE_CAMERA WFD_IMG_DIR"/A09_device_camera.png"
+#define WFD_ICON_DEVICE_STORAGE WFD_IMG_DIR"/A09_device_storage.png"
+#define WFD_ICON_DEVICE_NETWORK_INFRA WFD_IMG_DIR"/A09_device_network_infrastructure.png"
+#define WFD_ICON_DEVICE_DISPLAY WFD_IMG_DIR"/A09_device_display.png"
+#define WFD_ICON_DEVICE_MULTIMEDIA_DEVICE WFD_IMG_DIR"/A09_device_multimedia_devices.png"
+#define WFD_ICON_DEVICE_GAMING_DEVICE WFD_IMG_DIR"/A09_device_gaming_devices.png"
+#define WFD_ICON_DEVICE_TELEPHONE WFD_IMG_DIR"/A09_device_telephone.png"
+#define WFD_ICON_DEVICE_AUDIO_DEVICE WFD_IMG_DIR"/A09_device_audio_devices.png"
+
+#define WFD_ICON_DEVICE_COMPUTER_CONNECT WFD_IMG_DIR"/A09_device_computer_connect.png"
+#define WFD_ICON_DEVICE_INPUT_DEVICE_CONNECT WFD_IMG_DIR"/A09_device_input_device_connect.png"
+#define WFD_ICON_DEVICE_PRINTER_CONNECT WFD_IMG_DIR"/A09_device_printer_connect.png"
+#define WFD_ICON_DEVICE_CAMERA_CONNECT WFD_IMG_DIR"/A09_device_camera_connect.png"
+#define WFD_ICON_DEVICE_STORAGE_CONNECT WFD_IMG_DIR"/A09_device_storage_connect.png"
+#define WFD_ICON_DEVICE_NETWORK_INFRA_CONNECT WFD_IMG_DIR"/A09_device_network_infrastructure_connect.png"
+#define WFD_ICON_DEVICE_DISPLAY_CONNECT WFD_IMG_DIR"/A09_device_display_connect.png"
+#define WFD_ICON_DEVICE_MULTIMEDIA_DEVICE_CONNECT WFD_IMG_DIR"/A09_device_multimedia_devices_connect.png"
+#define WFD_ICON_DEVICE_GAMING_DEVICE_CONNECT WFD_IMG_DIR"/A09_device_gaming_devices_connect.png"
+#define WFD_ICON_DEVICE_TELEPHONE_CONNECT WFD_IMG_DIR"/A09_device_telephone_connect.png"
+#define WFD_ICON_DEVICE_AUDIO_DEVICE_CONNECT WFD_IMG_DIR"/A09_device_audio_devices_connect.png"
+
+#define WFD_ICON_CONNECTED WFD_IMG_DIR"/A09_Connect.png"
+
+
+enum {
+ HEAD_TEXT_TYPE_DIRECT,
+ HEAD_TEXT_TYPE_DEACTIVATING,
+ HEAD_TEXT_TYPE_ACTIVATING,
+ HEAD_TEXT_TYPE_ACTIVATED,
+ HEAD_TEXT_TYPE_SCANING,
+};
+
+enum {
+ /* User confirm */
+ POPUP_TYPE_WIFI_OFF,
+ POPUP_TYPE_HOTSPOT_OFF,
+
+ /* Activation */
+ POPUP_TYPE_ACTIVATE_FAIL,
+ POPUP_TYPE_DEACTIVATE_FAIL,
+
+ /* Connection */
+ POPUP_TYPE_LINK_TIMEOUT,
+ POPUP_TYPE_AUTH_FAIL,
+ POPUP_TYPE_LINK_FAIL,
+ POPUP_TYPE_UNKNOWN_ERROR,
+
+ POPUP_TYPE_TERMINATE,
+
+ /* Disconnect */
+ POP_TYPE_DISCONNECT,
+
+ /* Disconnect All*/
+ POP_TYPE_DISCONNECT_ALL,
+
+ /* Scan again */
+ POP_TYPE_SCAN_AGAIN,
+
+ /* multi connect */
+ POP_TYPE_MULTI_CONNECT_POPUP,
+
+ /* Busy device */
+ POP_TYPE_BUSY_DEVICE_POPUP,
+
+ /* Automaticlly turn off */
+ POP_TYPE_AUTOMATIC_TURN_OFF,
+};
+
+struct ug_data *wfd_get_ug_data();
+
+/**
+ * This function let the ug create the main view
+ * @return void
+ * @param[in] data the pointer to the main data structure
+ */
+void create_wfd_ug_view(void *data);
+
+/**
+ * This function let the ug destroy the main view
+ * @return void
+ * @param[in] data the pointer to the main data structure
+ */
+void destroy_wfd_ug_view(void *data);
+
+/**
+ * This function let the ug update the genlist item
+ * @return void
+ * @param[in] obj the pointer to genlist item
+ */
+void wfd_ug_view_refresh_glitem(void *obj);
+
+/**
+ * This function let the ug refresh the attributes of button
+ * @return void
+ * @param[in] obj the pointer to the button
+ * @param[in] text the pointer to the text of button
+ * @param[in] enable whether the button is disabled
+ */
+void wfd_ug_view_refresh_button(void *obj, const char *text, int enable);
+
+/**
+ * This function let the ug update the peers
+ * @return void
+ * @param[in] data the pointer to the main data structure
+ */
+void wfd_ug_view_update_peers(void *data);
+
+/**
+ * This function let the ug free the peers
+ * @return void
+ * @param[in] data the pointer to the main data structure
+ */
+void wfd_ug_view_free_peers(void *data);
+
+/**
+ * This function let the ug create a action popup
+ * @return void
+ * @param[in] data the pointer to the main data structure
+ * @param[in] message the pointer to the text of popup
+ * @param[in] popup_type the message type
+ */
+void wfd_ug_act_popup(void *data, const char *message, int popup_type);
+
+/**
+ * This function let the ug remove the action popup
+ * @return void
+ * @param[in] data the pointer to the main data structure
+ */
+void wfg_ug_act_popup_remove(void *data);
+
+/**
+ * This function let the ug create a warning popup
+ * @return void
+ * @param[in] data the pointer to the main data structure
+ * @param[in] message the pointer to the text of popup
+ * @param[in] popup_type the message type
+ */
+void wfd_ug_warn_popup(void *data, const char *message, int popup_type);
+
+/**
+ * This function let the ug change the text of multi button
+ * @return If success, return 0, else return -1
+ * @param[in] data the pointer to the main data structure
+ */
+int _change_multi_button_title(void *data);
+
+/**
+ * This function let the ug create about view
+ * @return void
+ * @param[in] ugd the pointer to the main data structure
+ */
+void _wifid_create_about_view(struct ug_data *ugd);
+
+/**
+ * This function let the ug create the view for multi connection
+ * @return void
+ * @param[in] ugd the pointer to the main data structure
+ */
+void _wifid_create_multiconnect_view(struct ug_data *ugd);
+
+/**
+ * This function let the ug call it when click 'back' button
+ * @return void
+ * @param[in] data the pointer to the main data structure
+ * @param[in] obj the pointer to the evas object
+ * @param[in] event_info the pointer to the event information
+ */
+void _back_btn_cb(void *data, Evas_Object * obj, void *event_info);
+
+/**
+ * This function let the ug call it when click 'scan' button
+ * @return void
+ * @param[in] data the pointer to the main data structure
+ * @param[in] obj the pointer to the evas object
+ * @param[in] event_info the pointer to the event information
+ */
+void _scan_btn_cb(void *data, Evas_Object * obj, void *event_info);
+
+/**
+ * This function let the ug call it when click 'multi connect' button
+ * @return void
+ * @param[in] data the pointer to the main data structure
+ * @param[in] obj the pointer to the evas object
+ * @param[in] event_info the pointer to the event information
+ */
+void _wifid_create_multibutton_cb(void *data, Evas_Object *obj, void *event_info);
+
+/**
+ * This function let the ug get the found peers
+ * @return If success, return 0, else return -1
+ * @param[in] ugd the pointer to the main data structure
+ */
+int wfd_ug_get_discovered_peers(struct ug_data *ugd);
+
+/**
+ * This function let the ug get the connected peers
+ * @return If success, return 0, else return -1
+ * @param[in] ugd the pointer to the main data structure
+ */
+int wfd_ug_get_connected_peers(struct ug_data *ugd);
+
+/**
+ * This function let the ug get the device status
+ * @return If success, return 0-3(available: 0, connected: 1, busy: 2, connected failed: 3), else return -1
+ * @param[in] ugd the pointer to the main data structure
+ * @param[in] device the pointer to the number of connected failed devices
+ */
+int wfd_get_device_status(void *data, device_type_s *device);
+
+/**
+ * This function let the ug refresh current status of wi-fi direct
+ * @return If success, return 0, else return -1
+ * @param[in] data the pointer to the main data structure
+ */
+int wfd_refresh_wifi_direct_state(void *data);
+
+/**
+ * This function let the ug free the selected peers in multi connect view
+ * @return void
+ * @param[in] data the pointer to the main data structure
+ */
+void wfd_free_multi_selected_peers(void *data);
+
+/**
+ * This function let the ug stop to connect to selected peer
+ * @return If success, return 0, else return -1
+ * @param[in] data the pointer to the main data structure
+ */
+int wfd_stop_multi_connect(void *data);
+
+/**
+ * This function let the ug connect to the next selected peer automatically
+ * @return If stop the timer, return false, else return true
+ * @param[in] data the pointer to the main data structure
+ */
+gboolean wfd_multi_connect_next_cb(void *data);
+
+/**
+ * This function let the ug add a dialogue separator
+ * @return the separator item
+ * @param[in] genlist the pointer to the genlist
+ * @param[in] separator_style the style of separator
+ */
+Elm_Object_Item *wfd_add_dialogue_separator(Evas_Object *genlist, const char *separator_style);
+
+/**
+ * This function let the ug fee the multi connect devices
+ * @return 0
+ * @param[in] data the pointer to the main data structure
+ */
+int wfd_free_multiconnect_device(struct ug_data *ugd);
+
+/**
+ * This function let the ug update the multi connect devices
+ * @return 0
+ * @param[in] data the pointer to the main data structure
+ */
+int wfd_update_multiconnect_device(struct ug_data *ugd);
+
+/**
+ * This function let the ug create the view for multi connection
+ * @return void
+ * @param[in] ugd the pointer to the main data structure
+ */
+void wfd_create_multiconnect_view(struct ug_data *ugd);
+
+
+#endif /* __WFD_UG_VIEW_H__ */