4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
6 * Contact: MyoungJune Park <mj2004.park@samsung.com>
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
12 * http://www.apache.org/licenses/LICENSE-2.0
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.
21 #ifndef __SETTING_SECURITY_H__
22 #define __SETTING_SECURITY_H__
26 #include <Elementary.h>
27 #include <Ecore_IMF.h>
32 #include <TapiUtility.h>
33 #include <ITapiModem.h>
35 #include <glib-object.h>
37 #include <setting-common-draw-widget.h>
38 #include <setting-common-view.h>
39 #include <setting-debug.h>
41 #define USELESS_SIM_CARD "Not useful SIM card"
43 #if SUPPORT_PARENTAL_MODE
44 #define Keystr_ParentalMode "Parental mode"
47 typedef struct _SettingSecurityUG SettingSecurityUG;
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,
62 } setting_sec_pw_type;
64 struct _security_item {
67 int (*passwd_handler)(SettingSecurityUG *ad, void* data);
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.
75 struct _SettingSecurityUG {
78 TelSimFacilityStatus_t sim_status;
79 TelSimFacilityStatus_t pin1_status;
80 TelSimFacilityStatus_t pin2_status;//it indicates fdn status too
82 /* add more variables here (move your appdata to here) */
84 Evas_Object *win_main_layout;
89 Evas_Object *navi_bar;
90 ui_gadget_h ug_passwd;
92 Setting_GenGroupItem_Data *data_sim_lk;
93 Setting_GenGroupItem_Data *data_pin_lk;
94 Setting_GenGroupItem_Data *data_change_pin1;
95 /* for simple password */
97 Elm_Genlist_Item_Class itc_1text;
98 Elm_Genlist_Item_Class itc_1text_1icon;
99 Elm_Genlist_Item_Class itc_seperator;
100 Elm_Genlist_Item_Class itc_2text_2;
102 setting_sec_pw_type pw_type;
106 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 */
107 Ecore_Timer *update_view_timer;
110 extern setting_view setting_view_security_main;
111 extern setting_view setting_view_security_sim_settings;
113 SettingSecurityUG *g_ad; /* for tapi callback */
115 char *get_find_my_mobile_on_off_str(void *priv);
116 void setting_security_result_password_ug_cb(ui_gadget_h ug,
117 service_h service, void *priv);
118 void setting_security_sim_get_facility_cb(TapiHandle *handle, int result, void *data, void *user_data);
120 gboolean setting_security_create_password_sg(void *data);