apply FSL(Flora Software License)
[apps/home/libug-worldclock-efl.git] / include / worldclock_types.h
1 /*
2   * Copyright 2012  Samsung Electronics Co., Ltd
3   * 
4   * Licensed under the Flora License, Version 1.0 (the "License");
5   * you may not use this file except in compliance with the License.
6   * You may obtain a copy of the License at
7   * 
8   *     http://www.tizenopensource.org/license
9   * 
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16
17 #ifndef __DEF_WORLDCLOCK_TYPES_H__
18 #define __DEF_WORLDCLOCK_TYPES_H__
19
20 #include <Elementary.h>
21 #include "worldclock_const.h"
22
23 typedef void (*Wcl_Return_Cb) (void *, Eina_Bool);
24 typedef int (*Wcl_Ctrlbar_Visible_Set) (Eina_Bool);
25
26 typedef enum {
27         WCL_CALLER_IS_APP_IT_SELF = 0,
28         WCL_CALLER_IS_SHARED_LIBRARY,
29         WCL_CALLER_IS_UI_GADGET,
30
31         WCL_CALLER_IS_UNKNOW,
32 } Wcl_Caller;
33
34 typedef enum {
35         WCL_SORT_BY_NAME = 0,
36         WCL_SORT_BY_TIMEZONE,
37
38         WCL_UNKNOW_SORT_TYPE,
39 } Wcl_Addlist_Sort_Type;
40
41 typedef enum {
42         WCL_SELECT_IN_UNSELECTED = 0,
43         WCL_SELECT_IN_ALL,
44         WCL_SELECT_IF_HAS_TZPATH,
45
46         WCL_SELECTION_UNKNOW_FLAG,
47 } Wcl_Selection_Flag;
48
49 typedef enum {
50         WCL_SEARCH_BY_ALL_KEYWORDS = 0,
51         WCL_SEARCH_BY_CITY_NAME,
52         WCL_SEARCH_BY_COUNTRY_NAME,
53         WCL_SEARCH_BY_TIMEZONE,
54
55         WCL_UNKNOWN_SEARCH_TYPE,
56 } Wcl_Search_Type;
57
58 typedef enum {
59         WCL_DST_OFF = -1,
60         WCL_DST_AUTO = 0,
61         WCL_DST_1_HOUR,
62         WCL_DST_2_HOURS,
63
64         WCL_DST_TYPES_COUNT,
65
66         WCL_DST_UNKNOWN_TYPE,
67 } Wcl_DST_Type;
68
69 typedef struct _cs {            /* city set */
70         int index;              /* record index in db */
71         char city[CITY_BUF_SIZE];       /* city name */
72         char country[COUNTRY_BUF_SIZE]; /* country name */
73         char timezone[TIMEZONE_BUF_SIZE];       /* timezone */
74         int dst_type;           /* dst type */
75         int dst_enabled;        /* dst disable flag */
76         int selected;           /* selected or not */
77         int sequence;           /* sequence number in mainlist */
78         char tz_path[TZPATH_BUF_SIZE];  /* TZ path of city */
79
80         int dst;                /* dst value */
81         volatile time_t now_time;       /* the current time of city */
82 } Wcl_CitySet;
83
84 #endif                          // __DEF_WORLDCLOCK_TYPES_H__