3 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 * Licensed under the Apache License, Version 2.0 (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
9 * http://www.apache.org/licenses/LICENSE-2.0
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.
18 #ifndef _CALENDAR_SVC_TYPEDEF_H_
19 #define _CALENDAR_SVC_TYPEDEF_H_
23 #include "calendar-svc-provider.h"
25 #define BENCHMARK_YEAR 1900L /**< tm_year's benchmark */
28 CAL_STRUCT_TYPE_SCHEDULE = 0, /**< schedule type */
29 CAL_STRUCT_TYPE_CALENDAR, /**< calendar type */
30 CAL_STRUCT_TYPE_TODO, /**< task type */
31 CAL_STRUCT_TYPE_TIMEZONE,
32 CAL_STRUCT_TYPE_SCHEDULE_LIST,
33 CAL_STRUCT_TYPE_TODO_LIST,
34 CAL_STRUCT_TYPE_UPDATED_LIST,
38 CAL_EVENT_PATICIPANT = 0, /**< CAL_STRUCT_PARTICIPANT */
39 CAL_EVENT_CATEGORY, /**< CAL_STRUCT_CATEFORY */
40 CAL_EVENT_RECURRENCY, /**< CAL_STRUCT_RECURRENCY */
41 CAL_EVENT_DELETE, /**< CAL_STRUCT_DELETE */
42 CAL_EVENT_SYNC_STATUS, /**< CAL_STRUCT_SYNC_STATUS */
43 CAL_EVENT_CALENDAR, /**< CAL_STRUCT_CALENDAR */
50 cal_struct_type event_type;
55 cal_data_type_t v_type;
60 * @enum calendar_type_t
61 * This enumeration defines calendar type.
64 CAL_ALL_CALENDAR = 0, /**< all calendar type */
65 CAL_PHONE_CALENDAR, /**< phone calendar type */
66 CAL_ACTIVESYNC_CALENDAR, /**< activesync calendar type*/
67 CAL_GOOGLE_CALENDAR /**< google calendar type*/
72 * This enumeration defines calendar event type.
75 CALS_SCH_TYPE_NONE = 0, /**< None type */
76 CALS_SCH_TYPE_EVENT, /**< schedule event type */
77 CALS_SCH_TYPE_TODO, /**< task event type */
78 CALS_SCH_TYPE_MAX, /**< max type */
82 * @enum cal_vCal_ver_t
83 * This enumeration defines vCalendar version.
86 CAL_VCAL_VER_1_0 = 0, /**< vCalendar ver 1.0 */
87 CAL_VCAL_VER_2_0, /**< vCalendar ver 2.0 */
88 CAL_VCAL_VER_UNKNOWN /**< vCalendar ver unknown */
92 * @enum cal_priority_t
93 * This enumeration defines priority for todo data.
96 CAL_PRIORITY_LOW, /**< priority low */
97 CAL_PRIORITY_MID, /**< priority middle */
98 CAL_PRIORITY_HIGH /**< priority high */
102 * @enum cal_starting_day_type_t
103 * This enumeration defines starting day.
106 CAL_STARTING_DAY_SUNDAY = 0, /**< starting day is sunday */
107 CAL_STARTING_DAY_MONDAY /**< starting day is monday */
108 } cal_starting_day_type_t;
111 * This structure defines schedule information.
114 int index; /**< Record index */
115 int account_id; /**< Account_id */
116 cals_sch_type cal_type; /**< Calendar event type */
118 char *summary; /**< Summary, appointment, task: subject, birthday:Name */
119 char *description; /**< Description,appointment, task: description, anniversary,holiday:occasion*/
120 char *location; /**< Location */
122 GList *meeting_category; /**< collection of categories */
123 bool all_day_event; /**< All day event flag */
124 struct tm start_date_time; /**< schedule:start time, anniv,holiday,birthday,memo,todo: date */
125 struct tm end_date_time; /**< end time */
127 cal_repeat_term_t repeat_term; /**< Repeat term */
128 int repeat_interval; /**< Interval of repeat term */
129 int repeat_until_type; /**< repeat until type */
130 int repeat_occurrences; /**< occurrences of repeat */
131 struct tm repeat_end_date; /**< End date for repeat */
132 cal_date_type_t sun_moon; /**< Using sun or lunar calendar */
133 cal_starting_day_type_t week_start; /**< Start day of a week */
134 char *week_flag; //[DAY_OF_A_WEEK + 1]; /**< Indicate which day is select in a week */
135 int day_date; /**< 0- for weekday(sun,mon,etc.), 1- for specific day(1,2.. Etc) */
136 struct tm last_modified_time; /**< for PC Sync */
137 bool missed; /**< Miss alarm flag */
138 cals_status_t task_status; /**< current task status */
139 cal_priority_t priority; /**< Priority */
140 int timezone; /**< timezone of task */
141 int file_id; /**< file id for attach or alarm tone*/
142 int contact_id; /**< contact id for birthday in contact list */
143 GList *attendee_list; /**< collection of attendee */
144 int busy_status; /**< ACS, G : Flag of busy or not */
145 int sensitivity; /**< ACS, G : The sensitivity (public, private, confidential). #cal_visibility_type_t*/
146 int meeting_status; /**< ACS, G : The status of the meeting. */
147 char *uid; /**< ACS, G : Unique ID of the meeting item */
148 char *organizer_name; /**< ACS, G : Name of organizer(author) */
149 char *organizer_email; /**< ACS, G : Email of organizer */
150 calendar_type_t calendar_type; /**< ACS, G : Type(all,phone,google) of calendar */
151 char *gcal_id; /**< G : Server id of calendar */
152 char *updated; /**< G : Updated time stamp */
153 int location_type; /**< G : Location type */
154 char *location_summary; /**< G : A simple string value that can be used as a representation of this location */
155 char *etag; /**< G : ETAG of this event */
156 int calendar_id; /**< G : id to map from calendar table */
157 cal_sync_status_t sync_status; /**< G : Indication for event entry whether added/ modified/ deleted */
158 char *edit_uri; /**< G : EditUri for google calendar */
159 char *gevent_id; /**< G : Server id of an event */
160 int dst; /**< dst of event */
161 GList *exception_date_list; /**< exception dates */
162 int original_event_id; /**< original event id for recurrency exception */
169 struct tm created_date_time; /**< created time */
170 struct tm completed_date_time; /**< completed time */
175 * This structure defines exception information of alarm.
178 int alarm_id; /**< Alarm id */
180 cal_alert_type_t alarm_type; /**< Alert type(see 'cal_alert_type_t') */
185 struct tm alarm_time;
187 cal_sch_remind_tick_unit_t remind_tick_unit;
189 char *alarm_tone; /**< Alert Sound File Name */
192 char *alarm_description; /**< Alert description */
198 #endif // _CALENDAR_SVC_TYPEDEF_H_