tizen 2.4 release
[apps/home/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 <dirent.h>
27
28 #include <Elementary.h>
29 #include <Ecore_IMF.h>
30
31 #include <ITapiSim.h>
32 #include <TelSim.h>
33 #include <TapiUtility.h>
34 #include <ITapiModem.h>
35
36 #include <glib-object.h>
37
38 #include <setting-common-draw-widget.h>
39 #include <setting-common-view.h>
40 #include <setting-debug.h>
41 #include <recorder.h>
42 #include <dlog.h>
43 #include <net_connection.h>
44
45 #include <app_manager.h>
46 #include <dd-deviced.h>
47
48
49 /*///////////////////face and voice unlock */
50 #define SET_AS_LOCK_STR "IDS_ST_SK_SET_LITE"/*"Set as lock" */
51 #define CONTINUE_STR "Continue"
52 #define SET_UP_STR "Set it up"
53 #define ADAPT_VOICE_STR "Adapt Voice"
54
55 #define About_Motion_Unlock_Str "IDS_ST_HEADER_MOTION_UNLOCK"
56 #define About_Face_Unlock_Str "About Face Unlock"
57 #define Setup_Face_Unlock_Str   "Set up Face Unlock"
58 #define Voice_Record_BtnStr "Voice record icon"
59 #define Put_Face_Str "<align=middle>Put your face here</align>"
60 #define Show_Face_Str "Show your face"
61
62 #define Motion_Unlock_Guildtext "Unlock device using motion<br><br>"\
63         "Tap and hold the screen then tilt the device "\
64         "towards you to unlock it. If the screen does not unlock, "\
65         "try tiling the device more. When learn about tilt or motion "\
66         "lock are set,motion activation will be automatically enabled "\
67         "in Settings"
68
69 #define Motion_Unlock_Guildtext1 "IDS_ST_HEADER_UNLOCK_DEVICE_USING_MOTION_ABB"
70 #define Motion_Unlock_Guildtext2 "IDS_ST_BODY_TAP_AND_HOLD_THE_SCREEN_THEN_TILT_THE_DEVICE_TOWARDS_YOU_TO_UNLOCK_IT_IF_THE_SCREEN_DOES_NOT_UNLOCK_TRY_TILTING_THE_DEVICE_MORE"
71 #define Motion_Unlock_Guildtext3 "IDS_ST_BODY_WHEN_LEARN_ABOUT_TILT_OR_MOTION_UNLOCK_ARE_SET_MOTION_ACTIVATION_WILL_BE_AUTOMATICALLY_ENABLED_IN_SETTINGS"
72
73 #define Face_Unlock_Warring     "Warning<br><br>"\
74         "Do not use face unlock while driving, it may distract you from "\
75         "the road and cause an accident"
76
77 #define Face_Unlock_Warring2    "Look at your phone to Unlock it<br><br>"\
78         "Keep these things in mind<br>"\
79         ".Face Unlock is less secure than PIN or password.<br><br>"\
80         ".Someone who looks similar to you could unlock your phone.<br><br>"\
81         ".The data used to identify your face is kept private on the phone."
82
83 #define Face_Unlock_Warring3    "For best results:<br><br>"\
84         ".Find an indoor spot that is not too bright or too dim.<br><br>"\
85         ".Hold the phone at eye level."
86
87 #define Voice_Unlock_Guildtext "Tap button below then say voice command you want to use for Unlock 4 times all at once"
88 #define Voice_Unlock_Guildtext2 "Use 3-5 syllable words and maintain constant intonation.<br><br>"\
89         "All background music and recording will stop when you unlock the device using Face and voice<br>"
90 #define Voice_Recognized_text "Recognised. Now you can use your own voice command for Unlock.<br><br>"\
91         "For assuring higher security. You can adapt voice command by tapping 'Adapt voice' button."
92
93 #define Adapt_voice_Str "Adapt Voice"
94
95 #define Finish_Setup_Face "You've finished!<br><br>"\
96         "To unlock your phone, just look at it.<br><br>"\
97         "Tip : improve face matching by having your face capture in different "\
98         "conditions."
99
100 #define Speak_Now_Str                                   "Speak now"
101 #define Keystr_FDN                                              "IDS_ST_BODY_FIXED_DIALLING_MODE"
102
103 #define SEC_FIREWALL_DIR "/home/app/.firewall"
104
105 #define PIN_BLOCKED_ENTER_PUK_DESC "IDS_ST_BODY_PIN_BLOCKED_ENTER_PUK_TO_CONTINUE_JPN_DCM"
106 #define SECURITY_MANUAL_UPDATE_TEXT "IDS_ST_POP_CHECK_FOR_SECURITY_UPDATES_AND_DOWNLOAD_NEW_UPDATES_Q_NOTI_MSG"
107 #define SECURITY_UPDATE_TOGGLE_ON "IDS_ST_POP_ENABLING_AUTO_UPDATE_MEANS_YOUR_DEVICE_WILL_CHECK_FOR_SECURITY_UPDATES_AUTOMATICALLY_NOTI_MSG"
108 #define SECURITY_UPDATE_TOGGLE_OFF "IDS_ST_POP_DISABLING_AUTO_UPDATE_MEANS_YOU_HAVE_TO_CHECK_FOR_SECURITY_UPDATES_MANUALLY_NOTI_MSG"
109 #define SECURITY_UPDATE_TEXT "IDS_EMAIL_POP_SECURITY_UPDATE_ABB"
110 #define UPDATE_TEXT "IDS_ST_BODY_CHECK_FOR_UPDATES"
111 #define CHECK_UPDATES "IDS_ST_BODY_CHECK_FOR_UPDATES_ABB"
112 #define AUTO_UPDATE "IDS_ST_OPT_AUTO_UPDATE_ABB"
113 #define CHECK_UPDATE_AUTO "IDS_ST_BODY_CHECK_FOR_UPDATES_AUTOMATICALLY_ABB"
114 #define CHECK_UPDATE_AUTO_MSG "IDS_ST_SBODY_AUTOMATICALLY_CHECK_FOR_CHANGES_TO_THE_SECURITY_POLICY_MSG"
115 #define CONNECT_TO_SERVER "IDS_ST_POP_CONNECTING_TO_THE_SERVER_ING"
116 #define SECURITY_VIA_WIFI "IDS_ST_MBODY_VIA_WI_FI_ONLY"
117 #define SECURITY_VIA_WIFI_HELP_MSG "IDS_ST_SBODY_ONLY_UPDATE_THE_SECURITY_POLICY_AUTOMATICALLY_WHEN_YOUR_DEVICE_IS_CONNECTED_TO_A_WI_FI_NETWORK"
118 #define SECURITY_SIM_NOT_PRESENT_MSG ""
119 #define SECURITY_SIM_SETTINGS "IDS_JAVA_OPT_SIM_SETTINGS"
120
121
122 #define SETTING_SECURITY_FIREWALL_BLOCKLIST_NAME_LEN_MAX                256
123
124 #if SUPPORT_SECURITY_FIREWALL
125 typedef struct _BlockList_Info BlockList_Info;
126 struct _BlockList_Info {
127         char name[SETTING_SECURITY_FIREWALL_BLOCKLIST_NAME_LEN_MAX + 1];
128 };
129
130 #endif
131
132 #if SUPPORT_ENCRYPTION
133 #define Keystr_DeviceEncryption                         "IDS_ASEML_BODY_DEVICE_ENCRYPTION"
134 #define keystr_DeviceDecryption                 "Device decryption"
135 #define DEVICE_ENCRYPTION_DESC          "IDS_ST_BODY_PASSWORD_REQUIRED_TO_DECRYPT_DEVICE_EACH_TIME_YOU_TURN_IT_ON"
136 #define DEVICE_DECRYPTION_DESC          "IDS_ST_BODY_DEVICE_ENCRYPTED"
137
138 #define Keystr_ConfirmEncryption                        "IDS_ST_HEADER_CONFIRM_ENCRYPTION"
139 #define Keystr_ConfirmDecryption                        "IDS_ST_BODY_CONFIRM_DECRYPTION"
140 #define DEVICE_ENCRYPTION_GUIDE_01      "IDS_ST_BODY_DEVICE_ENCRYPTION_HELP_MSG"
141 #define DEVICE_ENCRYPTION_GUIDE_03      "IDS_ST_BODY_SET_AN_UNLOCK_PASSWORD_OF_AT_LEAST_6_CHARACTERS_CONTAINING_AT_LEAST_1_NUMBER"
142 #define DEVICE_ENCRYPTION_GUIDE_04      "IDS_ST_BODY_PLUG_IN_CHARGER_AND_TRY_AGAIN"
143 #define DEVICE_ENCRYPTION_GUIDE_05      "IDS_ST_BODY_CHARGE_BATTERY_TO_ABOVE_80P_AND_TRY_AGAIN"
144 #define DEVICE_DECRYPTION_GUIDE_01      "IDS_ST_BODY_YOU_CAN_DECRYPT_ACCOUNTS_SETTINGS_DOWNLOADED_APPLICATIONS_AND_THEIR_DATA_MEDIA_AND_OTHER_FILES_DECRYPTION_WARNING_MSG"
145 #define CONFIRM_ENCRYPTION_GUIDE_01     "IDS_ST_BODY_ENCRYPT_DEVICE_Q_WARNING_MSG"
146 #define CONFIRM_ENCRYPTION_GUIDE_02     "IDS_ST_BODY_FAST_ENCRYPTION"
147 #define CONFIRM_ENCRYPTION_GUIDE_03     "IDS_ST_BODY_IF_YOU_SELECT_THIS_OPTION_ONLY_USED_MEMORY_SPACE_WILL_BE_ENCRYPTED"
148 #define CONFIRM_DECRYPTION_GUIDE_01     "IDS_ST_BODY_DECRYPT_DEVICE_Q_WARNING_MSG"
149 #define Keystr_Encrypting                               "IDS_ST_BODY_ENCRYPTING_ING"
150 #define Keystr_Decrypting                               "IDS_ST_BODY_DECRYPTING_ING"
151 #define ENCRYPTING_GUIDE_01                     "IDS_ST_BODY_PREPARING_THIS_COULD_TAKE_OVER_10_MINUTES_ING"
152 #define ENCRYPTING_GUIDE_02                     "IDS_ST_BODY_WAIT_WHILE_DEVICE_IS_ENCRYPTED_PDP_COMPLETE"
153 #define DECRYPTING_GUIDE_02                     "IDS_ST_BODY_WAIT_WHILE_DEVICE_IS_DECRYPTED_PDP_COMPLETE"
154 #define Keystr_EncryptDevice                            "IDS_ST_HEADER_ENCRYPT_DEVICE"
155 #define Keystr_DecryptDevice                            "IDS_ST_BODY_DECRYPT_DEVICE"
156 #endif
157
158 #define USELESS_SIM_CARD                                "Not useful SIM card"
159 #define KeyStr_Security_Waiting_Sim             "IDS_ST_BODY_WAITING_FOR_RESPONSE_FROM_SIM_CARD_ING"
160 #define Keystr_ScreenLockType                   "IDS_ST_BODY_SCREEN_LOCK_TYPE"
161 #define Keystr_LockScreenOptions                        "IDS_ST_BODY_LOCK_SCREEN_OPTIONS"
162 #define Keystr_Swipe                                            "IDS_ST_MBODY_SWIPE"
163 #define Keystr_FaceAndVoice                             "IDS_ST_BODY_FACE_AND_VOICE"
164
165 #if SUPPORT_SECURITY_FIREWALL
166 #define Keystr_Firewall                         "IDS_ST_BODY_FIREWALL"
167 #define Keystr_BlockIP                          "IDS_ST_BODY_BLOCK_IP"
168 #define Keystr_BlockedIPList                    "IDS_ST_BODY_BLOCKED_IP_LIST"
169 #define Keystr_BlockedIPDesc                    "IDS_ST_BODY_USER_CAN_BLOCK_A_SPECIFIC_IP_ADDRESS_MSG"
170 #define Keystr_BlockURL                         "IDS_ST_BODY_BLOCK_URL"
171 #define Keystr_BlockedURLList           "IDS_ST_BODY_BLOCKED_URL_LIST"
172 #define Keystr_BlockedURLDesc           "IDS_ST_BODY_USER_CAN_BLOCK_A_SPECIFIC_URL_MSG"
173 #define Keystr_BlockPort                                "IDS_ST_BODY_BLOCK_PORT"
174 #define Keystr_BlockedPortList          "IDS_ST_BODY_BLOCKED_PORT_LIST"
175 #define Keystr_BlockedPortDesc          "IDS_ST_BODY_USER_CAN_BLOCK_A_SPECIFIC_PORT_MSG"
176 #define Keystr_BlockedNetworkType       "IDS_ST_BODY_NETWORK_TYPE"
177 #define Keystr_BlockedProtocolType      "IDS_ST_BODY_PROTOCOL_TYPE"
178
179 #define Keystr_AddIP                                    "IDS_ST_HEADER_ADD_IP"
180 #define Keystr_AddURL                           "IDS_ST_HEADER_ADD_URL"
181 #define Keystr_AddPort                          "IDS_ST_HEADER_ADD_PORT"
182 #define Keystr_IP                                       "IDS_WIFI_BODY_IP"
183 #define Keystr_URL                                      "IDS_ST_BODY_URL"
184 #define Keystr_Port                                     "IDS_ST_HEADER_PORT"
185
186 #define KeyStr_IP_removed                       "IDS_ST_POP_IP_ADDRESS_REMOVED"
187 #define KeyStr_Port_removed                     "IDS_ST_POP_PORT_REMOVED"
188 #define KeyStr_Ports_removed            "IDS_ST_POP_PORTS_REMOVED"
189 #define KeyStr_URL_removed                      "IDS_ST_POP_URL_REMOVED"
190 #define KeyStr_URLs_removed             "IDS_ST_POP_URLS_REMOVED"
191 #endif
192 #define Keystr_Security_Engine      "IDS_ST_BODY_SECURITY_ENGINE"
193 #define Keystr_Security_Engine_Default "IDS_ST_BODY_ANTIVIRUS_SOFTWARE_ABB"
194 #define Keystr_Security_Engine_Type_None "IDS_ST_BODY_NONE"
195 #define Keystr_Security_Engine_Desc      "IDS_ST_BODY_PROTECT_YOUR_DEVICE_FROM_HARMFUL_VIRUSES_AND_MALWARE"
196 #define Keystr_Firewall_dimm_desc "IDS_IM_POP_THIS_FEATURE_IS_NOT_AVAILABLE_WHILE_FLIGHT_MODE_IS_ON"
197
198 typedef struct _SettingSecurityUG SettingSecurityUG;
199
200 struct _security_item {
201         int pw_type_num;
202         char *pw_type_string;
203         int (*passwd_handler)(SettingSecurityUG *ad, void *data);
204 };
205
206 #if SUPPORT_SECURITY_FIREWALL
207 typedef enum {
208     SETTING_SEC_FIREWALL_BLOCK_IP,
209     SETTING_SEC_FIREWALL_BLOCK_URL,
210     SETTING_SEC_FIREWALL_BLOCK_PORT,
211     SETTING_SEC_FIREWALL_BLOCK_3G,
212     SETTING_SEC_FIREWALL_BLOCK_WIFI,
213     SETTING_SEC_FIREWALL_BLOCK_TCP,
214     SETTING_SEC_FIREWALL_BLOCK_UDP,
215     SETTING_SEC_FIREWALL_BLOCK_MAX
216 } setting_sec_firewall_blcok_type;
217
218 typedef enum {
219     SETTING_SEC_FIREWALL_NETWORK_BLOCK_ALLOW_ALL = 0,
220     SETTING_SEC_FIREWALL_NETWORK_BLOCK_WIFI,
221     SETTING_SEC_FIREWALL_NETWORK_BLOCK_3G,
222     SETTING_SEC_FIREWALL_NETWORK_BLOCK_ALL,
223     SETTING_SEC_FIREWALL_NETWORK_BLOCK_MAX
224 } setting_sec_firewall_network_block_type;
225
226 typedef enum {
227     SETTING_SEC_FIREWALL_PROTOCOL_BLOCK_ALLOW_ALL  = 0,
228     SETTING_SEC_FIREWALL_PROTOCOL_BLOCK_TCP,
229     SETTING_SEC_FIREWALL_PROTOCOL_BLOCK_UDP,
230     SETTING_SEC_FIREWALL_PROTOCOL_BLOCK_ALL,
231     SETTING_SEC_FIREWALL_PROTOCOL_BLOCK_MAX
232 } setting_sec_firewall_protocol_block_type;
233
234 typedef struct _bs firewall_db;
235 typedef struct _bsl firewall_db_list;
236
237 struct _bs {
238         int _magic;
239         int id;
240         /*char * ip; */
241         char ip[256];
242         /*char url[256]; */
243         /*char port[256]; */
244 };
245
246 struct _bsl {
247         struct _bs firewall_db;
248         struct _bsl *prev;
249         struct _bsl *next;
250 };
251
252 typedef struct _commandList {
253         /*char ** arg_list ; */
254         char *command;
255         struct _commandList *next;
256 } COMMAND;
257
258 COMMAND *g_ipHead, *g_ipTail;
259 COMMAND *g_urlHead, *g_urlTail;
260 COMMAND *g_portHead, *g_portTail;
261
262
263 #endif
264 #define MAX_VOICE_TIME 4
265 #define MAX_SEC_PROFILE_NUM 100
266
267
268 enum {
269     SETTING_SEC_VIEWTYPE_MAIN = 0,
270     SETTING_SEC_VIEWTYPE_ENCRYPTION,
271     SETTING_SEC_VIEWTYPE_LOCKTYPE,
272     SETTING_SEC_VIEWTYPE_UPDATE,
273     SETTING_SEC_VIEWTYPE_MAX
274 };
275
276 /**
277  * Setting Security UG context
278  * all UG function has void* as an agument. this is casted back to SettingSecurityUG
279  * and the functions access app context.
280  */
281 struct _SettingSecurityUG {
282         ui_gadget_h ug;
283         ui_gadget_h ug_loading;
284         TapiHandle *handle;
285         TelSimFacilityStatus_t sim_status;
286         TelSimFacilityStatus_t pin1_status;
287         TelSimFacilityStatus_t pin2_status;/*it indicates fdn status too */
288         unsigned int enter_tapi_async_cb_flag;
289
290         /* add more variables here (move your appdata to here) */
291         Evas *evas;
292         Evas_Object *win_main_layout;
293         Evas_Object *win_get;
294         Evas_Object *notify;
295         Evas_Object *video_ly;
296         Evas_Object *video_ly_show_face_btn;
297         Evas_Object *video_ly_content_face;
298         Ecore_Timer *update_timer;
299         Evas_Object *image[MAX_VOICE_TIME];
300         int processed_img_num;
301         Evas_Object *record_genlist;
302         Elm_Object_Item *screen_lock_main_item;
303         char *selected_lock_type;
304         recorder_h recorder_handle;
305
306         int viewtype;
307
308         /*to export lock type UG */
309         setting_view *view_to_load;
310         Evas_Object *save_popup;
311
312         Evas_Object *ly_guild;
313         Evas_Object *ly_main;
314         Evas_Object *navi_bar;
315         Evas_Object *sim_popup;
316         ui_gadget_h ug_passwd;
317         ui_gadget_h ug_mmc_encryption;
318         ui_gadget_h ug_mt;
319         ui_gadget_h ug_firewall;
320         ui_gadget_h ug_locktype;
321
322         Evas_Object *genlist;
323         Evas_Object *sec_genlist;
324         Evas_Object *pop_manual_update;
325         Evas_Object *pop_progress;
326         Evas_Object *pop_auto_update_on;
327         Evas_Object *pop_auto_update_off;
328
329 #if SUPPORT_SECURITY_FIREWALL
330         Elm_Object_Item         *navi_it;
331         Evas_Object *view_layout;
332         Evas_Object *scroller;
333         Evas_Object *content;
334         Evas_Object *focus_timer;
335         int list_cnt;
336         char *interface_name;
337         connection_h connection;
338         connection_profile_h profile;
339 #endif
340         Setting_GenGroupItem_Data *data_phone_lk;
341         Setting_GenGroupItem_Data *data_mb;
342         Setting_GenGroupItem_Data *data_sim_lk;
343         Setting_GenGroupItem_Data *data_pin_lk;
344         Setting_GenGroupItem_Data *data_parental_md;
345         /*Setting_GenGroupItem_Data *data_simple_pw; */
346         Setting_GenGroupItem_Data *data_change_pin1;
347         Setting_GenGroupItem_Data *data_change_pin2;
348         Setting_GenGroupItem_Data *data_sim_settings;
349         /* for simple password */
350
351         Setting_GenGroupItem_Data *data_cng_pw;
352 #if SUPPORT_ENCRYPTION
353         Setting_GenGroupItem_Data *data_device_enc;
354         Setting_GenGroupItem_Data *data_mmc_enc;
355         Setting_GenGroupItem_Data *data_enc_btn;
356         Setting_GenGroupItem_Data *data_confirm_enc_btn;
357         int cur_enc_mode; /* 0: unencrypted, 1: encrypted */
358         Ecore_Event_Handler *event_handler;
359         Evas_Object *enc_progressbar;
360         Evas_Object *enc_layout;
361         Evas_Object *enc_genlist;
362         Evas_Object *sub_layout;
363         Evas_Object *scroller_lable;
364         Evas_Object *enc_scroller;
365         Evas_Object *popup_sd_card_encryption;
366         Evas_Object *popup_device_encryption;
367 #endif
368         Elm_Genlist_Item_Class itc_1text;
369         Elm_Genlist_Item_Class itc_bg_1icon;
370         Elm_Genlist_Item_Class itc_1text_1icon;
371         Elm_Genlist_Item_Class itc_2text_2;
372         Elm_Genlist_Item_Class itc_1icon;
373
374         Elm_Genlist_Item_Class itc_group_item;
375         Elm_Genlist_Item_Class itc_2text_3_parent;
376
377
378 #if SUPPORT_FDN
379         Setting_GenGroupItem_Data *data_fdn;
380         Evas_Object *chk_fdn;
381 #endif
382
383         setting_sec_pw_type pw_type;
384 #if SUPPORT_SECURITY_FIREWALL
385         Elm_Object_Item *firewall_separator;
386         setting_sec_firewall_blcok_type firewall_block_type;
387 #endif
388
389         Evas_Object *sl_scroller;
390         ui_gadget_h ug_lockscreen;
391
392         Setting_GenGroupItem_Data *data_set_screenlock_btn;
393
394 #if SUPPORT_SECURITY_FIREWALL
395         firewall_db *fdb;
396         Evas_Object *blocked_list;
397         Setting_Done_List_Data data_block_list;
398         Setting_GenGroupItem_Data *data_security_firewall;
399         Setting_GenGroupItem_Data *data_firewall_disable_desc;
400         Setting_GenGroupItem_Data *data_security_engine;
401         Setting_GenGroupItem_Data *data_security_update;
402         Setting_GenGroupItem_Data *data_block_ip;
403         Setting_GenGroupItem_Data *data_blocked_ip_list;
404         Setting_GenGroupItem_Data *data_blocked_ip_des;
405         Setting_GenGroupItem_Data *data_block_url;
406         Setting_GenGroupItem_Data *data_blocked_url_list;
407         Setting_GenGroupItem_Data *data_blocked_url_des;
408         Setting_GenGroupItem_Data *data_block_port;
409         Setting_GenGroupItem_Data *data_blocked_port_list;
410         Setting_GenGroupItem_Data *data_blocked_port_des;
411         Setting_GenGroupItem_Data *data_block_network_type;
412         Setting_GenGroupItem_Data *data_block_protocol_type;
413         Setting_GenGroupItem_Data *data_security_keypad;
414         Setting_GenGroupItem_Data *ip_list;
415         Setting_GenGroupItem_Data *url_list;
416         Setting_GenGroupItem_Data *port_list;
417 #endif
418
419         Setting_GenGroupItem_Data *data_security_update_bt;
420         Setting_GenGroupItem_Data *data_security_update_chk;
421         Setting_GenGroupItem_Data *data_security_wifi_update_chk;
422         char *caller;
423         char *input_pwd;
424
425         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 */
426         Ecore_Timer *update_view_timer;
427         Ecore_Timer *get_security_list_timer;
428
429         Ecore_Timer *remove_sim_popup_timer;
430         Ecore_Timer *tapi_async_cb_check_timer;
431         /*for Security engine */
432         GList *secrity_engine_list;
433
434         bool ug_removed;
435         bool pin2_blocked_flag;
436         bool samsung_account_is_running;
437
438         struct mmc_contents mmc_content; /* Handle exception of SD card encryption */
439 };
440
441 extern setting_view setting_view_security_main;
442 #if SUPPORT_ENCRYPTION
443 extern setting_view setting_view_security_encryption;
444 extern setting_view setting_view_security_confirm_encryption;
445 #endif
446 /*extern setting_view setting_view_security_enc_processing; */
447 /*extern setting_view setting_view_security_locktype; */
448 extern setting_view setting_view_security_sim_settings;
449
450 #if SUPPORT_SECURITY_FIREWALL
451 /*extern setting_view setting_view_security_firewall; */
452 /*extern setting_view setting_view_security_blocked_list; */
453 /*extern setting_view setting_view_security_firewall_keypad; */
454 /*extern setting_view setting_view_security_delete_block_list; */
455 #endif
456
457 extern setting_view setting_view_security_update;
458
459 SettingSecurityUG *g_ad;        /* for tapi callback */
460
461 /*char *get_screen_lock_type_str(void * priv); */
462 void setting_security_result_password_ug_cb(ui_gadget_h ug,
463                                             app_control_h service, void *priv);
464 void setting_security_sim_get_facility_cb(TapiHandle *handle, int result, void *data, void *user_data);
465 void setting_security_pin_get_facility_cb(TapiHandle *handle, int result, void *data, void *user_data);
466 void setting_security_pin2_get_lock_info_cb(TapiHandle *handle, int result, void *data, void *user_data);
467
468 gboolean setting_security_create_password_sg(void *data);
469
470 void setting_security_destroy_password_ug_cb(ui_gadget_h ug,
471                                              void *priv);
472 void setting_security_layout_passwd_ug_cb(ui_gadget_h ug,
473                                           enum ug_mode mode, void *priv);
474
475 gboolean setting_security_create_lockscreen_options_sg(void *data);
476 gboolean setting_security_create_mmc_encryption_sg(void *data);
477 gboolean setting_security_create_firewall_sg(void *data);
478
479 #endif
480
481 #if SUPPORT_SECURITY_FIREWALL
482 int setting_security_system_command(const char *command, const char *commandex);
483 \
484 int setting_security_firewall_reset();
485 #endif