59c3c4f6ff7f587a5e79f027eb4b2676ca51652d
[apps/native/ug-wifi-efl.git] / sources / libraries / Common / include / common_pswd_popup.h
1 /*
2  * Wi-Fi
3  *
4  * Copyright 2012-2013 Samsung Electronics Co., Ltd
5  *
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
9  *
10  * http://floralicense.org/license
11  *
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.
17  *
18  */
19
20 #ifndef __COMMON_PSWD_POPUP_H__
21 #define __COMMON_PSWD_POPUP_H__
22
23 #ifdef __cplusplus
24 extern "C"
25 {
26 #endif
27
28 #include <Evas.h>
29 #include <Ecore.h>
30 #include <wifi.h>
31
32 typedef struct {
33         /* PBC popup related attributes */
34         Evas_Object* popup;
35         Evas_Object* progressbar;
36         Evas_Object* timer_label;
37         Ecore_Timer *timer;
38         int checker;
39         double value;
40 } pbc_popup_t;
41
42 struct pswd_popup {
43         /* Password popup related attributes */
44         const char *str_pkg_name;
45         Evas_Object *win;
46         Evas_Object *popup;
47         Evas_Object *popup_entry_lyt;
48         pbc_popup_t *pbc_popup_data;
49         wifi_ap_h ap;
50 };
51
52 typedef struct {
53         char *title;
54         Eina_Bool show_wps_btn;
55         Evas_Smart_Cb ok_cb;
56         Evas_Smart_Cb cancel_cb;
57         Evas_Smart_Cb wps_btn_cb;
58         wifi_ap_h ap;
59         void *cb_data;
60 } pswd_popup_create_req_data_t;
61
62 typedef struct pswd_popup pswd_popup_t;
63
64 pswd_popup_t *create_passwd_popup(Evas_Object *win_main, const char *pkg_name,
65                 pswd_popup_create_req_data_t *popup_info);
66 void create_pbc_popup(pswd_popup_t *pswd_popup_data, Evas_Smart_Cb cancel_cb,
67                 void *cancel_cb_data);
68
69 void passwd_popup_free(pswd_popup_t *pswd_popup_data);
70
71 char *passwd_popup_get_txt(pswd_popup_t *pswd_popup_data);
72 wifi_ap_h passwd_popup_get_ap(pswd_popup_t *pswd_popup_data);
73
74 #ifdef __cplusplus
75 }
76 #endif
77
78 #endif