Merge "packaging: spec cleanup" into tizen
[apps/core/preloaded/settings.git] / setting-time / include / setting-time.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_TIME_H__
18 #define __SETTING_TIME_H__
19
20 #include <stdio.h>
21 #include <time.h>
22 #include <sys/ioctl.h>
23 #include <linux/rtc.h>
24 #include <fcntl.h>
25 #include <unistd.h>
26 #include <Elementary.h>
27
28 #include <glib-object.h>
29
30 #include <setting-common-draw-widget.h>
31 #include <setting-common-view.h>
32 #define ERR_BIGGER_THAN_2037 "Cannot Set the year bigger than 2037"
33 #define AUTO_TIME_UPDATE_ON  "Automatic time update is ON!"
34 #define SETTING_TIME_AUTO_UPDATE_DESC  "IDS_ST_BODY_USE_TIME_PROVIDED_BY_NETWORK"
35 #define NOT_SUPPORT_AUTO_UPDATE_DESC "The SIM Card being used doesn't support automatically updating time" //need multi-language support.
36
37 #define SETTING_DATAUSAGE_MDM_RESTRICTS_STR "Security policy restricts use of data usage"
38
39 typedef struct _SettingTimeUG SettingTimeUG;
40
41 /**
42  * Setting Time UG context
43  * all UG function has void* as an agument. this is casted back to SettingTimeUG
44  * and the functions access app context.
45  */
46 struct _SettingTimeUG {
47
48         ui_gadget_h ug; /**< ug struct itself */
49
50         /* add more variables here (move your appdata to here) */
51         int noti_fd;
52
53         service_h bundle_data; /**< when loading this UG, bundle is stored */
54         Evas *evas;
55         Evas_Object *win_main_layout;
56         Evas_Object *win_get;
57         Evas_Object *ly_main;
58
59         ui_gadget_h ug_loading;
60
61         Evas_Object *navi_bar;
62         Evas_Object *scrl_main;
63         char *caller;
64
65         Ecore_Timer *update_timer;
66         Evas_Object *pop_progress;
67         Evas_Object *pop;
68         Eina_Bool is_datefield_selected;
69
70         /*  UI   */
71         Setting_GenGroupItem_Data *data_auto;
72         Setting_GenGroupItem_Data *data_tz;
73         Setting_GenGroupItem_Data *data_dst;
74         Setting_GenGroupItem_Data *data_time;
75         Setting_GenGroupItem_Data *data_time_fmt;
76         Setting_GenGroupItem_Data *data_date_fmt;
77         Setting_GenGroupItem_Data *data_firstday_week_fmt;
78
79         Evas_Object *chk_dst;
80         Evas_Object *chk_auto;
81
82         Elm_Genlist_Item_Class itc_2text_2;
83         Elm_Genlist_Item_Class itc_2text_arrow;
84         Elm_Genlist_Item_Class itc_1text_1icon;
85         Elm_Genlist_Item_Class itc_seperator;
86         Elm_Genlist_Item_Class itc_layout;
87         Elm_Genlist_Item_Class itc_2text_3_parent;
88         Elm_Genlist_Item_Class itc_1icon_1text_sub;
89
90         Ecore_Idler *update_timezone_idler;
91         Ecore_Idler *refresh_time_idler;
92 };
93
94 extern setting_view setting_view_time_main;
95
96 #endif                          /* __SETTING_TIME_H__ */