diff options
author | Kibum Kim <kb0929.kim@samsung.com> | 2012-01-07 00:42:18 +0900 |
---|---|---|
committer | Kibum Kim <kb0929.kim@samsung.com> | 2012-01-07 00:42:18 +0900 |
commit | 11da635c79ea21765a50d28cf81ff6b51dddefa0 (patch) | |
tree | 3a4f7487c498d852459d54e3a302ca0c625b310c /include/calendar_private.h | |
parent | f7d3bd8b3884553bbe42d6ece32974d3e26281ee (diff) | |
download | calendar-11da635c79ea21765a50d28cf81ff6b51dddefa0.tar.gz calendar-11da635c79ea21765a50d28cf81ff6b51dddefa0.tar.bz2 calendar-11da635c79ea21765a50d28cf81ff6b51dddefa0.zip |
Git init
Diffstat (limited to 'include/calendar_private.h')
-rwxr-xr-x | include/calendar_private.h | 169 |
1 files changed, 169 insertions, 0 deletions
diff --git a/include/calendar_private.h b/include/calendar_private.h new file mode 100755 index 0000000..505671c --- /dev/null +++ b/include/calendar_private.h @@ -0,0 +1,169 @@ +/* + * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +#ifndef __TIZEN_SOCIAL_CALENDAR_PRIVATE_H__ +#define __TIZEN_SOCIAL_CALENDAR_PRIVATE_H__ + +#include <calendar.h> +#include <calendar_types.h> +//@20110427-vincent: real API +#include <calendar-svc-provider.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @internal + */ +typedef struct GList calendar_list_s; + +typedef struct { + int event_type; + void* user_data; +} calendar_event_legacy_s; + +typedef struct { + calendar_event_legacy_s* event_legacy; +} calendar_event_s; + +typedef struct +{ + int index; /**< Record index */ + int account_id; /**< Account_id */ + int cal_type; /**< Calendar event type */ + int sch_category; /**< Category of schedule */ + + char* summary; /**< Summary, appointment, task: subject, birthday:Name */ + char* description; /**< Description,appointment, task: description, anniversary,holiday:occasion*/ + char* location; /**< Location */ + GList* meeting_category; /**< collection of categories */ + bool all_day_event; /**< All day event flag */ + struct tm start_date_time; /**< schedule:start time, anniv,holiday,birthday,memo,todo: date */ + struct tm end_date_time; /**< end time */ + struct tm alarm_time; /**< alarm time */ + int remind_tick; /**< Alarms before remindTick */ + int remind_tick_unit; /**< Remind tick unit */ + char* alarm_tone; /**< Alert Sound File Name */ + int alarm_type; /**< Alert type(see 'cal_alert_type_t') */ + int alarm_id; /**< Alarm id */ + int repeat_term; /**< Repeat term */ + int repeat_interval; /**< Interval of repeat term */ + int repeat_occurrences; /**< occurrences of repeat */ + struct tm repeat_end_date; /**< End date for repeat */ + int sun_moon; /**< Using sun or lunar calendar */ + int week_start; /**< Start day of a week */ + char* week_flag;//[DAY_OF_A_WEEK + 1]; /**< Indicate which day is select in a week */ + int day_date; /**< 0- for weekday(sun,mon,etc.), 1- for specific day(1,2.. Etc) */ + struct tm last_modified_time; /**< for PC Sync */ + bool missed; /**< Miss alarm flag */ + int task_status; /**< current task status */ + int priority; /**< Priority */ + int timezone; /**< timezone of task */ + int file_id; /**< file id for attach or alarm tone*/ + int contact_id; /**< contact id for birthday in contact list */ + GList* attendee_list; /**< collection of attendee */ + int busy_status; /**< ACS, G : Flag of busy or not */ + int visibility; /**< ACS, G : The visibility of the task item (normal, presonal, private, confidential). */ + int meeting_status; /**< ACS, G : The status of the meeting. */ + char* uid; /**< ACS, G : Unique ID of the meeting item */ + char* organizer_name; /**< ACS, G : Name of organizer(author) */ + char* organizer_email; /**< ACS, G : Email of organizer */ + int calendar_type; /**< ACS, G : Type(all,phone,google) of calendar */ + char* gcal_id; /**< G : Server id of calendar */ + bool deleted; /**< G : Flag for deleted */ + char* updated; /**< G : Updated time stamp */ + int location_type; /**< G : Location type */ + char* location_summary; /**< G : A simple string value that can be used as a representation of this location */ + char* etag; /**< G : ETAG of this event */ + int calendar_id; /**< G : id to map from calendar table */ + int sync_status; /**< G : Indication for event entry whether added/ modified/ deleted */ + char* edit_uri; /**< G : EditUri for google calendar */ + char* gevent_id; /**< G : Server id of an event */ + int dst; /**< dst of event */ + GList* exception_date_list; /**< exception dates */ + int original_event_id; /**< original event id for recurrency exception */ + double latitude; + double longitude; + char* tz_name; + int is_deleted; +}calendar_schedule_s; + + +typedef struct { + int v_type; + void* user_data; + }calendar_attendee_s; + +typedef struct +{ + int event_id; + char* attendee_name; + char* attendee_email; + int attendee_status; + int attendee_type; + int attendee_ct_index; + int is_deleted; +}_cal_participant_info_t; + + + + +/** + * @internal + * @brief Recurrence frequency between event occurrences. + */ +/* +typedef enum +{ + CALENDAR_RECURRENCE_NONE, // Occurs once + CALENDAR_RECURRENCE_DAILY, // Occurs every day + CALENDAR_RECURRENCE_WEEKLY, // Occurs same day every week + CALENDAR_RECURRENCE_MONTHLY, // Occurs same date every month, like 3rd day of month + CALENDAR_RECURRENCE_YEARLY, // Occurs same date every year like every June 1st + CALENDAR_RECURRENCE_WEEKDAY, // Occurs Mon-Fri every week + CALENDAR_RECURRENCE_MONTHLY_ON_DAY // Occurs on the same type of day every month, like second Tuesday +} calendar_recurrence_frequency_e; +*/ + +GList* _calendar_glist_next_until_not_deleted(GList* list); + +int _calendar_query(calendar_foreach_query_event_cb callback, char* option, const char* string_to_find, void* user_data); + +/** +* Internal Macros +*/ + +#define _calendar_safe_strdup(_srcx_) (NULL != _srcx_) ? strdup(_srcx_):NULL +#define _calendar_safe_free(_srcx_) { if(NULL != _srcx_) free(_srcx_); } + +#define CALENDAR_NULL_ARG_CHECK(arg) do { \ + if(arg == NULL) { \ + LOGE("[%s] CALENDAR_ERROR_INVALID_PARAMETER(0x%08x)", __FUNCTION__, CALENDAR_ERROR_INVALID_PARAMETER); \ + return CALENDAR_ERROR_INVALID_PARAMETER; \ + } \ +}while(0) + + +#ifdef __cplusplus +} +#endif + +#endif //__TIZEN_SOCIAL_CALENDAR_PRIVATE_H__ + + + |