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 #include <setting-common-data-type.h>
22 #include <setting-common-data-slp-setting.h>
23 #include <setting-common-draw-widget.h>
25 #include <setting-security-encryption.h>
26 #include <setting-debug.h>
28 static int setting_security_encryption_create(void *cb);
29 static int setting_security_encryption_destroy(void *cb);
30 static int setting_security_encryption_update(void *cb);
31 static int setting_security_encryption_cleanup(void *cb);
33 setting_view setting_view_security_encryption = {
34 .create = setting_security_encryption_create,
35 .destroy = setting_security_encryption_destroy,
36 .update = setting_security_encryption_update,
37 .cleanup = setting_security_encryption_cleanup,
40 /* ***************************************************
44 ****************************************************/
46 static int setting_security_encryption_create(void *cb)
48 retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER);
50 SettingSecurityUG *ad = (SettingSecurityUG *) cb;
52 Evas_Object *scroller;
54 /* add basic layout */
55 char setBtnStr[MAX_DISPLAY_NAME_LEN_ON_UI];
56 snprintf(setBtnStr, sizeof(setBtnStr), "%s",
57 (char *)dgettext("sys_string", "IDS_COM_BODY_BACK"));
59 /* there are 2 titles, Device encryption or Device decryption */
60 setting_push_layout_navi_bar_genlist(ad->win_main_layout,
62 Keystr_DeviceEncryption,
64 setting_security_encryption_click_softkey_back_cb,
68 (void)setting_create_Gendial_field_titleItem(scroller,
70 "IDS_ST_HEADER_SCREEN_SECURITY", NULL);
71 /* To do : Fill this view */
75 setting_view_security_encryption.is_create = 1;
77 return SETTING_RETURN_SUCCESS;
81 static int setting_security_encryption_destroy(void *cb)
84 retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER);
86 SettingSecurityUG *ad = (SettingSecurityUG *) cb;
88 elm_naviframe_item_pop(ad->navi_bar);
90 setting_view_security_encryption.is_create = 0;
92 return SETTING_RETURN_SUCCESS;
95 static int setting_security_encryption_update(void *cb)
98 retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER);
100 return SETTING_RETURN_SUCCESS;
103 static int setting_security_encryption_cleanup(void *cb)
106 retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER);
108 setting_security_encryption_destroy(cb);
110 return SETTING_RETURN_SUCCESS;
113 /* ***************************************************
117 ****************************************************/
119 setting_security_encryption_click_softkey_back_cb(void *data, Evas_Object *obj,
123 retm_if(data == NULL, "[Setting > Security] Data parameter is NULL");
125 SettingSecurityUG *ad = (SettingSecurityUG *) data;
127 setting_view_change(&setting_view_security_encryption, &setting_view_security_main, ad);