Initialize Tizen 2.3
[apps/home/settings.git] / setting-reset / include / setting-reset.h
1 /*
2  * setting
3  * Copyright (c) 2012 Samsung Electronics Co., Ltd.
4  *
5  * Licensed under the Flora License, Version 1.1 (the License);
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *     http://floralicense.org/license/
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an AS IS BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 #ifndef __SETTING_RESET_H__
18 #define __SETTING_RESET_H__
19
20 #include <stdio.h>
21 #include <Elementary.h>
22
23 #include <glib-object.h>
24
25 #include <Ecore_IMF.h>
26
27 #include <setting-common-draw-widget.h>
28 #include <setting-common-view.h>
29
30 #define RESET_RESULT_STR "IDS_ST_POP_RESETTING_ING"
31 #define RESET_SUCESS_STR "IDS_COM_POP_SUCCESS"
32 #define LOAD_LIB_FAILED_STR "Exception"//"Load LIB failed"
33 #define UNDEFINE_STR "Undefined" //"Resetting undefined"
34
35 #define RESET_FAILED_STR "IDS_COM_POP_FAILED"//"Reset failed"
36 #define VCONF_RESET_FAILED_STR "IDS_COM_POP_FAILED"//"vconf set failed"
37
38 #define ADN_STR " and "
39 #define CLOSEING_STR " had been reseted just now, Setting will be closed"
40
41 //#define RESET_ALL "Reset all"
42 #define RESET_ALL "IDS_ST_BODY_RESET_ALL"
43
44 //#define RESET_ALL_DESC "IDS_ST_BODY_ALL_SETTINGS_WILL_REVERT_TO_DEFAULT_VALUES"
45 #define RESET_ALL_DESC "IDS_ST_BODY_AFTER_RESETTING_PHONE_WILL_RESTART_AUTOMATICALLY"
46
47 #define RESET_SETTINGS_STR      "IDS_ST_BODY_BACKUP_AND_RESET"  //"Reset settings"
48 #define SIM_CARD_PROFILE_SETTINGS_STR "IDS_ST_MBODY_SIM_CARD_PROFILE_SETTINGS"  //"SIM card profile sttings"
49 #define FACTORY_RESET_STR       "IDS_ST_MBODY_FACTORY_RESET"    //"Factory reset"
50
51 #define SIMPLY_SUPPORT_ALL_RESET 0
52 #define SUPPORT_RESET_DETAILS 1
53 #define SUPPORT_SIM_CARD_PROFILE 0
54 #define SUPPORT_FACTORY_RESET 1
55 #define SUPPORT_RESET_OLD 0
56
57 typedef struct _SettingResetUG SettingResetUG;
58
59 /**
60  * Setting Reset UG context
61  * all UG function has void* as an agument. this is casted back to SettingResetUG
62  * and the functions access app context.
63  */
64 struct _SettingResetUG {
65         ui_gadget_h ug;
66         ui_gadget_h ug_loading;
67
68         /* add more variables here (move your appdata to here) */
69         Evas *evas;
70         Evas_Object *win_main_layout;   /*  window_layout */
71         Evas_Object *win_get;   /*  win_main */
72         Evas_Object *ly_main;
73         Evas_Object *notify;
74         Evas_Object *old_notify;
75         Evas_Object *ask_popup;
76         Evas_Object *pop_progress;
77         Evas_Object *view_layout;
78         Evas_Object *navi_bar;
79         Evas_Object *controllbar;
80         Evas_Object *reset_list;
81         Evas_Object *main_scroller;
82
83         Evas_Object *pop_factory_reset;
84
85         Setting_Done_List_Data list_data;
86         Ecore_Animator *animator;
87         Ecore_Idler *reset_all_idler;
88         int gl_index;
89         Elm_Genlist_Item_Class itc_1text;
90         Elm_Genlist_Item_Class itc_1icon;
91 #if SUPPORT_RESET_DETAILS
92         Elm_Genlist_Item_Class itc_dlg_1text;
93         Elm_Genlist_Item_Class itc_seperator;
94         Evas_Object *ly_reset;
95         Evas_Object *pop;
96 #endif
97         Evas_Object *pop_btn;
98 };
99
100 extern setting_view setting_view_reset_main;
101 extern setting_view setting_view_reset_settings;
102
103 int setting_reset_flight_mode();
104 int setting_reset_rotation_lock(void);
105 void setting_reset_result_popup_resp_cb(void *data, Evas_Object *obj, void *event_info);
106 void setting_reset_result_popup_update(void *data);
107 void setting_reset_special_process(void *data);
108
109 #endif                          /* __SETTING_RESET_H__ */