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 * This file declares wifi direct application functions.
24 * @author Sungsik Jang (sungsik.jang@samsung.com)
29 #ifndef __WFD_SYS_POPAPP_MAIN_H__
30 #define __WFD_SYS_POPAPP_MAIN_H__
32 #include <appcore-efl.h>
34 #include <Elementary.h>
37 #include <notification.h>
38 #include <syspopup_caller.h>
40 #define PACKAGE "org.tizen.wifi-direct-popup"
41 #define EDJ_NAME RESDIR"/edje/wifi-direct-popup.edj"
42 #define WFD_MAX_PEER_NUM 10
43 #define WFD_POP_STR_MAX_LEN 256
44 #define NO_ACTION_TIME_OUT 300 /*5min*/
46 #define NOTIFICATION_BUNDLE_PARAM "NotiType"
47 #define NOTIFICATION_BUNDLE_VALUE "WiFi-Direct"
48 #define TICKERNOTI_SYSPOPUP "tickernoti-syspopup"
51 #define LOCALE_FILE_NAME "wifi-direct-popup"
52 #define LOCALEDIR "/opt/apps/org.tizen.wifi-direct-popup/res/locale"
54 #define _(s) dgettext(LOCALE_FILE_NAME, s)
55 #define N_(s) dgettext_noop(s)
56 #define S_(s) dgettext("sys_string", s)
63 WFD_POP_TIMER_10 = 10,
64 WFD_POP_TIMER_30 = 30,
65 WFD_POP_TIMER_120 = 120,
70 WFD_POP_APRV_CONNECTION_WPS_PUSHBUTTON_REQ,
71 WFD_POP_APRV_CONNECTION_WPS_DISPLAY_REQ,
72 WFD_POP_APRV_CONNECTION_WPS_KEYPAD_REQ,
75 WFD_POP_PROG_DISCONNECT,
76 WFD_POP_PROG_CONNECT_CANCEL,
77 WFD_POP_PROG_CONNECT_WITH_PIN,
78 WFD_POP_PROG_CONNECT_WITH_KEYPAD,
79 WFD_POP_NOTI_CONNECTED,
80 WFD_POP_NOTI_DISCONNECTED,
84 WFD_POP_INCORRECT_PIN,
86 //Automatic turn off wfd
87 WFD_POP_AUTOMATIC_TURN_OFF,
95 WFD_POP_RESP_APRV_CONNECT_PBC_YES = 1,
96 WFD_POP_RESP_APRV_CONNECT_DISPLAY_YES,
97 WFD_POP_RESP_APRV_CONNECT_KEYPAD_YES,
98 WFD_POP_RESP_APRV_CONNECT_NO,
99 WFD_POP_RESP_PROG_CONNECT_CANCEL,
100 WFD_POP_RESP_PROG_CONNECT_KEYPAD_OK,
101 WFD_POP_RESP_APRV_ENTER_PIN_YES,
102 WFD_POP_RESP_APRV_ENTER_PIN_NO,
103 WFD_POP_RESP_AUTOMATIC_TURNOFF_OK,
109 char text[WFD_POP_STR_MAX_LEN];
110 char label1[WFD_POP_STR_MAX_LEN];
111 char label2[WFD_POP_STR_MAX_LEN];
121 char mac_address[18];
128 Evas_Object *pin_entry;
129 wfd_popup_t *popup_data;
130 uint popup_timeout_handle;
134 wfd_device_info_t *discovered_peers;
135 int discovered_peer_count;
139 wfd_device_info_t raw_connected_peers[WFD_MAX_PEER_NUM];
140 int raw_connected_peer_cnt;
142 /* used for automatic turn off */
146 int last_wfd_transmit_time;
147 Ecore_Timer *monitor_timer;
148 Ecore_Timer *transmit_timer;
154 Evas_Object *progressbar;
156 } wfd_wps_display_popup_t;
158 extern wfd_appdata_t *wfd_get_appdata();
159 extern void wfd_destroy_popup();
160 extern void wfd_prepare_popup(int type, void *userdata);
161 extern void wfd_tickernoti_popup(char *msg);
163 #endif /* __WFD_SYS_POPAPP_MAIN_H__ */