[security,password] remove unused code
[apps/core/preloaded/settings.git] / setting-security / include / setting-security.h
1 /*
2  * setting
3  *
4  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
5  *
6  * Contact: MyoungJune Park <mj2004.park@samsung.com>
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  *
20  */
21 #ifndef __SETTING_SECURITY_H__
22 #define __SETTING_SECURITY_H__
23
24 #include <glib.h>
25 #include <stdio.h>
26 #include <Elementary.h>
27 #include <Ecore_IMF.h>
28
29 #include <ITapiSim.h>
30 #include <TelSim.h>
31 #include <TelErr.h>
32 #include <TapiUtility.h>
33 #include <ITapiModem.h>
34
35 #include <glib-object.h>
36
37 #include <setting-common-draw-widget.h>
38 #include <setting-common-view.h>
39 #include <setting-debug.h>
40
41 #define USELESS_SIM_CARD "Not useful SIM card"
42
43 #if SUPPORT_PARENTAL_MODE
44 #define Keystr_ParentalMode             "Parental mode"
45 #endif
46
47 typedef struct _SettingSecurityUG SettingSecurityUG;
48
49 typedef enum {
50         SETTING_SEC_PW_SIM_LOCK_ON,
51         SETTING_SEC_PW_SIM_LOCK_OFF,
52         SETTING_SEC_PW_SIM_LOCK_DISABLED,
53         SETTING_SEC_PW_PIN_LOCK_ON,
54         SETTING_SEC_PW_PIN_LOCK_OFF,
55         SETTING_SEC_PW_CHANGE_PIN1,
56         SETTING_SEC_PW_CHANGE_PIN2,
57         SETTING_SEC_PW_PIN1_BLOCKED,
58         SETTING_SEC_PW_PIN2_BLOCKED,
59         SETTING_SEC_PW_PIN1_UNBLOCKED,
60         SETTING_SEC_PW_PIN2_UNBLOCKED,
61         SETTING_SEC_PW_MAX
62 } setting_sec_pw_type;
63
64 struct _security_item {
65         int pw_type_num;
66         char *pw_type_string;
67         int (*passwd_handler)(SettingSecurityUG *ad, void* data);
68 };
69
70 /**
71  * Setting Security UG context
72  * all UG function has void* as an agument. this is casted back to SettingSecurityUG
73  * and the functions access app context.
74  */
75 struct _SettingSecurityUG {
76         ui_gadget_h ug;
77         TapiHandle *handle;
78         TelSimFacilityStatus_t sim_status;
79         TelSimFacilityStatus_t pin1_status;
80         TelSimFacilityStatus_t pin2_status;//it indicates fdn status too
81
82         /* add more variables here (move your appdata to here) */
83         Evas *evas;
84         Evas_Object *win_main_layout;
85         Evas_Object *win_get;
86         Evas_Object *notify;
87
88         Evas_Object *ly_main;
89         Evas_Object *navi_bar;
90         ui_gadget_h ug_passwd;
91
92         Setting_GenGroupItem_Data *data_sim_lk;
93         Setting_GenGroupItem_Data *data_pin_lk;
94         Setting_GenGroupItem_Data *data_change_pin1;
95         Setting_GenGroupItem_Data *data_change_pin2;
96         /* for simple password */
97
98         Elm_Genlist_Item_Class itc_1text;
99         Elm_Genlist_Item_Class itc_1text_1icon;
100         Elm_Genlist_Item_Class itc_seperator;
101         Elm_Genlist_Item_Class itc_2text_2;
102
103         setting_sec_pw_type pw_type;
104
105         char *input_pwd;
106
107         int sel_item; /**< It's used to check PIN1, PIN2 _BLOCKED. 0:click pin lock, 1:change pin1 code, 2:fdn, 3: change pin2 code */
108         Ecore_Timer *update_view_timer;
109 };
110
111 extern setting_view setting_view_security_main;
112 extern setting_view setting_view_security_sim_settings;
113
114 SettingSecurityUG *g_ad;        /* for tapi callback */
115
116 char *get_find_my_mobile_on_off_str(void *priv);
117 void setting_security_result_password_ug_cb(ui_gadget_h ug,
118                                             service_h service, void *priv);
119 void setting_security_sim_get_facility_cb(TapiHandle *handle, int result, void *data, void *user_data);
120
121 gboolean setting_security_create_password_sg(void *data);
122
123 #endif