tizen 2.3 release
[apps/home/settings.git] / setting-reset / include / setting-reset.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_RESET_H__
22 #define __SETTING_RESET_H__
23
24 #include <stdio.h>
25 //#include <Elementary.h>
26
27 #include <glib-object.h>
28
29 #include <Ecore_IMF.h>
30
31 #include <setting-common-draw-widget.h>
32 #include <setting-common-view.h>
33
34 #define RESET_RESULT_STR "IDS_ST_HEADER_RESET_RESULTS"
35
36 #define RESET_SUCESS_STR "IDS_COM_POP_SUCCESS"
37 #define LOAD_LIB_FAILED_STR "Exception"//"Load LIB failed"
38 #define UNDEFINE_STR "IDS_MSGF_POP_UNSUPPORTED" //"Resetting undefined"
39 #define RESET_FAILED_STR "IDS_COM_POP_FAILED"//"Reset failed"
40 #define VCONF_RESET_FAILED_STR "IDS_COM_POP_FAILED"//"vconf set failed"
41 #define RESET_ALL "IDS_ST_BODY_RESET_ALL"
42 #define RESET_ALL_DESC "IDS_ST_BODY_AFTER_RESETTING_PHONE_WILL_RESTART_AUTOMATICALLY"
43 #define RESET_SETTINGS_STR      "IDS_ST_BODY_RESET_SETTINGS"    //"Reset settings"
44 #define SIM_CARD_PROFILE_SETTINGS_STR "IDS_ST_MBODY_SIM_CARD_PROFILE_SETTINGS"  //"SIM card profile sttings"
45 #define FACTORY_RESET_STR       "IDS_ST_MBODY_FACTORY_RESET"    //"Factory reset"
46
47 #define SIMPLY_SUPPORT_ALL_RESET 0
48 #define SUPPORT_RESET_DETAILS 1
49 #define SUPPORT_FACTORY_RESET 1
50 #define SUPPORT_RESET_OLD 0
51
52 typedef struct _SettingResetUG SettingResetUG;
53
54 /**
55  * Setting Reset UG context
56  * all UG function has void* as an agument. this is casted back to SettingResetUG
57  * and the functions access app context.
58  */
59 struct _SettingResetUG {
60         ui_gadget_h ug;
61         ui_gadget_h ug_loading;
62
63         /* add more variables here (move your appdata to here) */
64         Evas *evas;
65         Evas_Object *win_main_layout;   /*  window_layout */
66         Evas_Object *win_get;   /*  win_main */
67         Evas_Object *ly_main;
68         Evas_Object *notify;
69         Evas_Object *old_notify;
70         Evas_Object *ask_popup;
71         Evas_Object *pop_progress;
72         Evas_Object *view_layout;
73         Evas_Object *navi_bar;
74         Evas_Object *controllbar;
75         Evas_Object *reset_list;
76         Evas_Object *main_scroller;
77         Evas_Object *genlist;
78         Evas_Object *reset_sub_view;
79         Evas_Object *reset_process;
80         Evas_Object *pop_factory_reset;
81
82         Setting_Done_List_Data list_data;
83         Ecore_Animator *animator;
84         Ecore_Idler *reset_all_idler;
85         int gl_index;
86         int selected_index;
87         int selected_num;
88         bool reset_item_finish;
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         Evas_Object *ly_reset;
94         Evas_Object *pop;
95 #endif
96 };
97
98 extern setting_view setting_view_reset_main;
99 extern setting_view setting_view_reset_settings;
100
101 int setting_reset_flight_mode();
102 int setting_reset_rotation_lock(void);
103 void setting_reset_result_popup_resp_cb(void *data, Evas_Object *obj, void *event_info);
104 void setting_reset_result_popup_update(void *data);
105 void setting_reset_special_process(void *data);
106
107 #endif                          /* __SETTING_RESET_H__ */