2 // Open Service Platform
\r
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
\r
5 // Licensed under the Apache License, Version 2.0 (the License);
\r
6 // you may not use this file except in compliance with the License.
\r
7 // You may obtain a copy of the License at
\r
9 // http://www.apache.org/licenses/LICENSE-2.0
\r
11 // Unless required by applicable law or agreed to in writing, software
\r
12 // distributed under the License is distributed on an "AS IS" BASIS,
\r
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
14 // See the License for the specific language governing permissions and
\r
15 // limitations under the License.
\r
18 * @file FSclCalendarbook.h
\r
19 * @brief This is the header file for the %Calendarbook class.
\r
21 * This header file contains the declarations of the %Calendarbook class.
\r
23 #ifndef _FSCL_CALENDARBOOK_H_
\r
24 #define _FSCL_CALENDARBOOK_H_
\r
26 #include <FBaseObject.h>
\r
27 #include <FBaseDataType.h>
\r
28 #include <FSclTypes.h>
\r
29 #include <FSclCalEvent.h>
\r
30 #include <FSclCalTodo.h>
\r
31 #include <FSclIRecordEventListener.h>
\r
32 #include <FSclIRecordListener.h>
\r
34 namespace Tizen { namespace Base
\r
38 namespace Collection
\r
44 namespace Tizen { namespace Locales
\r
50 namespace Tizen { namespace Social
\r
53 class ICalendarbookEventListener;
\r
55 class CalEventInstance;
\r
56 class CalendarbookFilter;
\r
59 * @class Calendarbook
\r
60 * @brief This class manages the calendar data such as events, to-dos, and calendars.
\r
64 * @final This class is not intended for extension.
\r
66 * The %Calendarbook class manages the calendar data such as events, to-dos, and calendars.
\r
67 * The calendar book is a centralized database that is used by multiple applications to store events and to-do information.
\r
68 * A calendar book represents the methods to read, add, remove, and update the events, to-do lists, and calendars stored in the device.
\r
69 * The users must be notified of changes in the calendar book as multiple applications can share, change, or remove the data.
\r
71 * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/social/calendarbook_namespace.htm">Calendar book</a>.
\r
73 * The following diagram illustrates the relationships between %Calendarbook and related classes.
\r
74 * @image html social_calendarbook_using_the_apis_classdiagram.png
\r
76 * The following example demonstrates how to use the %Calendarbook class to add calendarbook event.
\r
79 #include <FSocial.h>
\r
80 #include <FLocales.h>
\r
82 using namespace Tizen::Social;
\r
83 using namespace Tizen::Base;
\r
84 using namespace Tizen::Locales;
\r
87 MyCalendarbook::AddEventExample(void)
\r
89 result r = E_SUCCESS;
\r
91 DateTime startWallTime;
\r
92 DateTime endWallTime;
\r
93 DateTime startUtcTime;
\r
94 DateTime endUtcTime;
\r
96 // Suppose a user set 2012/7/17 12:00:00 ~ 2012/7/17 14:00:00 in wall time for start/end time
\r
97 startWallTime.SetValue(2012, 7, 17, 12, 0, 0);
\r
98 endWallTime.SetValue(2012, 7, 17, 14, 0, 0);
\r
100 // Gets the system time zone
\r
101 LocaleManager localeManager;
\r
102 localeManager.Construct();
\r
104 TimeZone timeZone = localeManager.GetSystemTimeZone();
\r
106 // Converts the wall time to UTC time before set start and end time of the event
\r
107 startUtcTime = timeZone.WallTimeToUtcTime(startWallTime);
\r
108 endUtcTime = timeZone.WallTimeToUtcTime(endWallTime);
\r
110 // Creates a CalEvent instance
\r
112 newEvent.SetSubject(L"Daily event");
\r
113 newEvent.SetStartAndEndTime(startUtcTime, endUtcTime);
\r
115 Recurrence dailyRecurrence;
\r
116 dailyRecurrence.SetFrequency(FREQ_DAILY);
\r
117 dailyRecurrence.SetCounts(10);
\r
119 newEvent.SetRecurrence(&dailyRecurrence);
\r
121 // Creates a Calendarbook instance
\r
122 Calendarbook* pCalendarbook = new Calendarbook();
\r
123 r = pCalendarbook->Construct();
\r
126 AppLogException("initializing the calendar book has failed");
\r
127 delete pCalendarbook;
\r
132 r = pCalendarbook->AddEvent(newEvent);
\r
135 AppLogException("AddEvent() has failed");
\r
136 delete pCalendarbook;
\r
140 delete pCalendarbook;
\r
145 * The following example demonstrates how to use the %Calendarbook class to update calendarbook event.
\r
148 #include <FSocial.h>
\r
149 #include <FLocales.h>
\r
151 using namespace Tizen::Social;
\r
152 using namespace Tizen::Base;
\r
153 using namespace Tizen::Locales;
\r
156 MyCalendarbook::UpdateEventExample(void)
\r
158 result r = E_SUCCESS;
\r
160 // This specificEventId should have been set as already added event record ID.
\r
161 RecordId specificEventId = 0;
\r
163 DateTime changedStartWallTime;
\r
164 DateTime changedEndWallTime;
\r
165 DateTime changedStartUtcTime;
\r
166 DateTime changedEndUtcTime;
\r
168 // Suppose a user set 2012/7/18 12:00:00 ~ 2012/7/18 14:00:00 in wall time for start/end time.
\r
169 changedStartWallTime.SetValue(2012, 7, 18, 12, 0, 0);
\r
170 changedEndWallTime.SetValue(2012, 7, 18, 14, 0, 0);
\r
172 // Gets the system time zone.
\r
173 LocaleManager localeManager;
\r
174 localeManager.Construct();
\r
176 TimeZone timeZone = localeManager.GetSystemTimeZone();
\r
178 // Converts the wall time to UTC time before set start and end time of the event.
\r
179 changedStartUtcTime = timeZone.WallTimeToUtcTime(changedStartWallTime);
\r
180 changedEndUtcTime = timeZone.WallTimeToUtcTime(changedEndWallTime);
\r
182 // Creates Calendarbook instance.
\r
183 Calendarbook* pCalendarbook = new Calendarbook();
\r
184 r = pCalendarbook->Construct();
\r
187 AppLogException("initializing the calendar book has failed");
\r
188 delete pCalendarbook;
\r
192 // Retrieves CalEvent instance.
\r
193 CalEvent* pEvent = pCalendarbook->GetEventN(specificEventId);
\r
194 if (pEvent == null)
\r
196 AppLogException("Getting the event has failed");
\r
197 delete pCalendarbook;
\r
201 Recurrence recurrence(*pEvent->GetRecurrence());
\r
202 pEvent->SetRecurrence(null);
\r
203 pEvent->SetStartAndEndTime(changedStartUtcTime, changedEndUtcTime);
\r
204 pEvent->SetRecurrence(&recurrence);
\r
206 // Updates the event.
\r
207 r = pCalendarbook->UpdateEvent(*pEvent);
\r
210 AppLogException("UpdateEvent() has failed");
\r
212 delete pCalendarbook;
\r
217 delete pCalendarbook;
\r
222 * The following example demonstrates how to use the %Calendarbook class to retrieve event instance list.
\r
225 #include <FSocial.h>
\r
226 #include <FLocales.h>
\r
228 using namespace Tizen::Social;
\r
229 using namespace Tizen::Base;
\r
230 using namespace Tizen::Locales;
\r
231 using namespace Tizen::Base::Collection;
\r
234 MyCalendarbook::RetrieveEventInstanceExample(void)
\r
236 result r = E_SUCCESS;
\r
238 DateTime startRange;
\r
240 IList* pEventInstanceList = null;
\r
242 DateTime startRangeWallTime;
\r
243 DateTime endRangeWallTime;
\r
244 DateTime startRangeUtcTime;
\r
245 DateTime endRangeUtcTime;
\r
247 // Suppose a user set 2012/7/1 00:00:00 ~ 2012/7/31 23:59:59 in wall time for start/end time.
\r
248 startRangeWallTime.SetValue(2012, 7, 1, 0, 0, 0);
\r
249 endRangeWallTime.SetValue(2012, 7, 31, 23, 59, 59);
\r
251 // Gets the system time zone.
\r
252 LocaleManager localeManager;
\r
253 localeManager.Construct();
\r
255 TimeZone timeZone = localeManager.GetSystemTimeZone();
\r
257 // Converts the wall time to UTC time before set start and end time of the event.
\r
258 startRangeUtcTime = timeZone.WallTimeToUtcTime(startRangeWallTime);
\r
259 endRangeUtcTime = timeZone.WallTimeToUtcTime(endRangeWallTime);
\r
261 // Creates Calendarbook instance.
\r
262 Calendarbook* pCalendarbook = new Calendarbook();
\r
263 r = pCalendarbook->Construct();
\r
266 AppLogException("initializing the calendar book has failed");
\r
267 delete pCalendarbook;
\r
271 // Gets the event instances.
\r
272 CalendarbookFilter filter(CB_FI_TYPE_NON_ALL_DAY_EVENT_INSTANCE);
\r
273 filter.AppendDateTime(FI_CONJ_OP_NONE, EVENT_INST_FI_PR_END_TIME, FI_CMP_OP_GREATER_THAN, startRangeUtcTime);
\r
274 filter.AppendDateTime(FI_CONJ_OP_AND, EVENT_INST_FI_PR_START_TIME, FI_CMP_OP_LESS_THAN, endRangeUtcTime);
\r
276 pEventInstanceList = pCalendarbook->SearchN(filter, EVENT_INST_FI_PR_START_TIME, SORT_ORDER_ASCENDING);
\r
277 if (pEventInstanceList == null)
\r
279 AppLogException("SearchN() is failed");
\r
280 delete pCalendarbook;
\r
284 IEnumerator* pEnum = pEventInstanceList->GetEnumeratorN();
\r
285 while (pEnum->MoveNext() == E_SUCCESS)
\r
287 CalEventInstance* pEventInstance = static_cast<CalEventInstance*>(pEnum->GetCurrent());
\r
289 // Reads the properties of pEventInstance.
\r
294 // Removes the first event instance of the list.
\r
295 CalEventInstance* pExcludingEventInstance = static_cast<CalEventInstance*>(pEventInstanceList->GetAt(0));
\r
296 r = pCalendarbook->RemoveEventInstance(*pExcludingEventInstance);
\r
299 AppLogException("RemoveEventInstance() has failed");
\r
300 pEventInstanceList->RemoveAll(true);
\r
301 delete pEventInstanceList;
\r
302 delete pCalendarbook;
\r
306 pEventInstanceList->RemoveAll(true);
\r
307 delete pEventInstanceList;
\r
308 delete pCalendarbook;
\r
314 class _OSP_EXPORT_ Calendarbook
\r
315 : public Tizen::Base::Object
\r
320 * The object is not fully constructed after this constructor is called. For full construction, @n
\r
321 * the Construct() method must be called right after calling this constructor.
\r
325 Calendarbook(void);
\r
328 * This destructor overrides Tizen::Base::Object::~Object().
\r
332 virtual ~Calendarbook(void);
\r
336 * Initializes this instance of %Calendarbook with the specified event listener.
\r
338 * @brief <i> [Deprecated] </i>
\r
339 * @deprecated This method is deprecated. Instead of using this method, it is recommended to use Construct(ICalendarbookEventListener*).
\r
342 * @return An error code
\r
343 * @param[in] pListener The event listener to register, @n
\r
344 * else @c null if an event listener need not be registered
\r
345 * @exception E_SUCCESS The method is successful.
\r
346 * @exception E_SYSTEM A system error has occurred.
\r
349 result Construct(IRecordEventListener* pListener);
\r
352 * Initializes this instance of %Calendarbook.
\r
356 * @return An error code
\r
357 * @exception E_SUCCESS The method is successful.
\r
358 * @exception E_SYSTEM A system error has occurred.
\r
360 result Construct(void);
\r
363 * Initializes this instance of %Calendarbook with the specified event listener.
\r
367 * @return An error code
\r
368 * @param[in] listener The event listener to register
\r
369 * @exception E_SUCCESS The method is successful.
\r
370 * @exception E_SYSTEM A system error has occurred.
\r
372 result Construct(ICalendarbookEventListener& listener);
\r
375 * Adds an event of the default calendar to the calendar book. @n
\r
376 * After adding the event successfully, the event has a valid record ID.
\r
379 * @privlevel public
\r
380 * @privilege http://tizen.org/privilege/calendar.write
\r
382 * @return An error code
\r
383 * @param[in,out] event The event to add
\r
384 * @exception E_SUCCESS The method is successful.
\r
385 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
\r
386 * @exception E_INVALID_ARG The specified @c event is invalid.
\r
387 * @exception E_STORAGE_FULL The storage is insufficient.
\r
388 * @exception E_SYSTEM A system error has occurred.
\r
390 result AddEvent(CalEvent& event);
\r
393 * Adds an event of the specific calendar to the calendar book. @n
\r
394 * After adding the event successfully, the event has a valid record ID.
\r
397 * @privlevel public
\r
398 * @privilege http://tizen.org/privilege/calendar.write
\r
400 * @return An error code
\r
401 * @param[in,out] event The event to add
\r
402 * @param[in] calendarId The calendar ID
\r
403 * @exception E_SUCCESS The method is successful.
\r
404 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
\r
405 * @exception E_INVALID_ARG Either of the following conditions has occurred: @n
\r
406 * - The specified @c event is invalid. @n
\r
407 * - The specified @c calendarId is invalid. @n
\r
408 * - The specified calendar is created for CALENDAR_ITEM_TYPE_TODO.
\r
409 * @exception E_OBJ_NOT_FOUND The specified calendar is not found.
\r
410 * @exception E_STORAGE_FULL The storage is insufficient.
\r
411 * @exception E_SYSTEM A system error has occurred.
\r
413 result AddEvent(CalEvent& event, RecordId calendarId);
\r
416 * Adds a to-do of the default calendar to the calendar book. @n
\r
417 * After adding the to-do item successfully, the item has a valid record ID.
\r
420 * @privlevel public
\r
421 * @privilege http://tizen.org/privilege/calendar.write
\r
423 * @return An error code
\r
424 * @param[in,out] todo The to-do to add
\r
425 * @exception E_SUCCESS The method is successful.
\r
426 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
\r
427 * @exception E_INVALID_ARG The specified @c todo is invalid.
\r
428 * @exception E_STORAGE_FULL The storage is insufficient.
\r
429 * @exception E_SYSTEM A system error has occurred.
\r
431 result AddTodo(CalTodo& todo);
\r
434 * Adds a to-do of the specific calendar to the calendar book. @n
\r
435 * After adding the to-do item successfully, the item has a valid record ID.
\r
438 * @privlevel public
\r
439 * @privilege http://tizen.org/privilege/calendar.write
\r
441 * @return An error code
\r
442 * @param[in,out] todo The to-do to add
\r
443 * @param[in] calendarId The calendar ID
\r
444 * @exception E_SUCCESS The method is successful.
\r
445 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
\r
446 * @exception E_INVALID_ARG Either of the following conditions has occurred: @n
\r
447 * - The specified @c todo is invalid. @n
\r
448 * - The specified @c calendarId is invalid. @n
\r
449 * - The specified calendar is created for CALENDAR_ITEM_TYPE_EVENT.
\r
450 * @exception E_OBJ_NOT_FOUND The specified calendar is not found.
\r
451 * @exception E_STORAGE_FULL The storage is insufficient.
\r
452 * @exception E_SYSTEM A system error has occurred.
\r
454 result AddTodo(CalTodo& todo, RecordId calendarId);
\r
457 * Removes the specified calendar event from this calendar book. @n
\r
458 * After removing the event successfully, the event has #INVALID_RECORD_ID.
\r
461 * @privlevel public
\r
462 * @privilege http://tizen.org/privilege/calendar.write
\r
464 * @return An error code
\r
465 * @param[in] event The calendar event to remove
\r
466 * @exception E_SUCCESS The method is successful.
\r
467 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
\r
468 * @exception E_INVALID_ARG The specified @c recordId is #INVALID_RECORD_ID.
\r
469 * @exception E_OBJ_NOT_FOUND The specified record is not found.
\r
470 * @exception E_SYSTEM A system error has occurred.
\r
472 result RemoveEvent(CalEvent& event);
\r
475 * Removes the specified calendar event from this calendar book.
\r
478 * @privlevel public
\r
479 * @privilege http://tizen.org/privilege/calendar.write
\r
481 * @return An error code
\r
482 * @param[in] eventId The calendar event ID to remove
\r
483 * @exception E_SUCCESS The method is successful.
\r
484 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
\r
485 * @exception E_INVALID_ARG The specified @c eventId is #INVALID_RECORD_ID.
\r
486 * @exception E_OBJ_NOT_FOUND The specified record is not found.
\r
487 * @exception E_SYSTEM A system error has occurred.
\r
489 result RemoveEvent(RecordId eventId);
\r
492 * Removes the specified CalTodo instance from the calendar book. @n
\r
493 * After removing the to-do item successfully, the item has #INVALID_RECORD_ID.
\r
496 * @privlevel public
\r
497 * @privilege http://tizen.org/privilege/calendar.write
\r
499 * @return An error code
\r
500 * @param[in] todo The CalTodo ID to remove
\r
501 * @exception E_SUCCESS The method is successful.
\r
502 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
\r
503 * @exception E_INVALID_ARG The specified @c recordId is #INVALID_RECORD_ID.
\r
504 * @exception E_OBJ_NOT_FOUND The specified record is not found.
\r
505 * @exception E_SYSTEM A system error has occurred.
\r
507 result RemoveTodo(CalTodo& todo);
\r
510 * Removes the specified CalTodo instance from the calendar book.
\r
513 * @privlevel public
\r
514 * @privilege http://tizen.org/privilege/calendar.write
\r
516 * @return An error code
\r
517 * @param[in] todoId The CalTodo ID to remove
\r
518 * @exception E_SUCCESS The method is successful.
\r
519 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
\r
520 * @exception E_INVALID_ARG The specified input parameter is invalid.
\r
521 * @exception E_OBJ_NOT_FOUND The specified record is not found.
\r
522 * @exception E_SYSTEM A system error has occurred.
\r
524 result RemoveTodo(RecordId todoId);
\r
527 * Updates the specified calendar event to the internal data storage.
\r
530 * @privlevel public
\r
531 * @privilege http://tizen.org/privilege/calendar.write
\r
533 * @return An error code
\r
534 * @param[in] event The CalEvent instance to update
\r
535 * @exception E_SUCCESS The method is successful.
\r
536 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
\r
537 * @exception E_INVALID_ARG Either of the following conditions has occurred: @n
\r
538 * - The specified @c recordId is #INVALID_RECORD_ID. @n
\r
539 * - The specified @c event is not #RECORD_TYPE_EVENT. @n
\r
540 * - The specified @c event is not an entry type instance. @n
\r
541 * - The date of the event is invalid. @n
\r
542 * The valid range of the date can be referenced from GetMaxDateTime() and GetMinDateTime().
\r
543 * @exception E_OBJ_NOT_FOUND The specified record is not found.
\r
544 * @exception E_SYSTEM A system error has occurred.
\r
546 result UpdateEvent(const CalEvent& event);
\r
549 * Updates the specified CalTodo instance on the internal data storage.
\r
552 * @privlevel public
\r
553 * @privilege http://tizen.org/privilege/calendar.write
\r
555 * @return An error code
\r
556 * @param[in] todo The CalTodo instance to update
\r
557 * @exception E_SUCCESS The method is successful.
\r
558 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
\r
559 * @exception E_INVALID_ARG The specified @c recordId is #INVALID_RECORD_ID, or the date of the to-do item is invalid. @n
\r
560 * The valid range of the date can be referenced from GetMaxDateTime() and GetMinDateTime().
\r
561 * @exception E_OBJ_NOT_FOUND The specified record is not found.
\r
562 * @exception E_SYSTEM A system error has occurred.
\r
564 result UpdateTodo(const CalTodo& todo);
\r
567 * Gets the specified event ID that is matched with the RecordId.
\r
570 * @privlevel public
\r
571 * @privilege http://tizen.org/privilege/calendar.read
\r
573 * @return The matched event
\r
574 * @param[in] eventId The event ID to find
\r
575 * @exception E_SUCCESS The method is successful.
\r
576 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
\r
577 * @exception E_INVALID_ARG The specified @c eventId is invalid.
\r
578 * @exception E_OBJ_NOT_FOUND The specified record is not found.
\r
579 * @exception E_SYSTEM A system error has occurred.
\r
580 * @remarks The specific error code can be accessed using the GetLastResult() method.
\r
582 CalEvent* GetEventN(RecordId eventId) const;
\r
585 * Gets the specified to-do after matching it with the specified record ID.
\r
588 * @privlevel public
\r
589 * @privilege http://tizen.org/privilege/calendar.read
\r
591 * @return The matched to-do
\r
592 * @param[in] todoId The ID of the to-do to find
\r
593 * @exception E_SUCCESS The method is successful.
\r
594 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
\r
595 * @exception E_INVALID_ARG The specified @c todoId is invalid.
\r
596 * @exception E_OBJ_NOT_FOUND The specified record is not found.
\r
597 * @exception E_SYSTEM A system error has occurred.
\r
598 * @remarks The specific error code can be accessed using the GetLastResult() method.
\r
601 CalTodo* GetTodoN(RecordId todoId) const;
\r
604 * Gets all the to-do items in the specified time range. @n
\r
605 * To-do items, whose due date is within the retrieving range, is retrieved.
\r
608 * @brief <i> [Compatibility] </i>
\r
612 * @compatibility This method has compatibility issues with OSP compatible applications. @n
\r
613 * For more information, see @ref CompCalendarbookGetTodosNPage "here".
\r
615 * @privlevel public
\r
616 * @privilege http://tizen.org/privilege/calendar.read
\r
618 * @return A list of all the matched CalTodo instances, @n
\r
619 * else an empty list if there is no matched to-do item @n
\r
620 * The items are sorted by due date.
\r
621 * @param[in] start The start of the time range
\r
622 * @param[in] end The end of the time range
\r
623 * @param[in] pageNo The page number of the result list @n
\r
624 * It starts from @c 1.
\r
625 * @param[in] countPerPage The desired maximum count of the result items per page
\r
626 * @param[in] status The to-do status @n
\r
627 * If a specific status is set, the to-dos that have the specified status are returned. @n
\r
628 * The default status value is #TODO_STATUS_ALL, which means all the statuses are returned.
\r
629 * @param[in] priority The to-do priority @n
\r
630 * If a specific priority is set, the to-dos that have the specified priority are returned. @n
\r
631 * The default priority value is #TODO_PRIORITY_ALL that means all the priorities are returned.
\r
632 * @exception E_SUCCESS The method is successful.
\r
633 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
\r
634 * @exception E_INVALID_ARG Either of the following conditions has occurred: @n
\r
635 * - The specified @c pageNo or @c countPerPage is less than @c 1. @n
\r
636 * - The start time is later than the end date. @n
\r
637 * - The start or end time is not in a valid range. @n
\r
638 * The valid range of the date can be referenced from GetMaxDateTime() and GetMinDateTime().
\r
639 * @exception E_SYSTEM A system error has occurred.
\r
640 * @remarks The specific error code can be accessed using the GetLastResult() method.
\r
642 Tizen::Base::Collection::IList* GetTodosN(const Tizen::Base::DateTime& start, const Tizen::Base::DateTime& end, int pageNo, int countPerPage, unsigned long status = TODO_STATUS_ALL,
\r
643 unsigned long priority = TODO_PRIORITY_ALL) const;
\r
647 * @page CompCalendarbookGetTodosNPage Compatibility for GetTodosN()
\r
648 * @section CompCalendarbookGetTodosNPageIssueSection Issues
\r
649 * Implementing this method in OSP compatible applications has the following issues: @n
\r
650 * -# If the start date of a to-do is not in the time range of start/end parameters, @n
\r
651 * the to-do is not retrieved even though the due date is in the time range.
\r
653 * @section CompCalendarbookGetTodosNPageSolutionSection Resolutions
\r
654 * This issue has been resolved in Tizen. @n
\r
655 * -# The to-do will be retrieved if the due date is in the range of start/end parameters.
\r
660 * Gets the total number of to-do items in the specified time range. @n
\r
661 * To-do items, whose due date is within the retrieving range, is counted.
\r
664 * @brief <i> [Compatibility] </i>
\r
668 * @compatibility This method has compatibility issues with OSP compatible applications. @n
\r
669 * For more information, see @ref CompCalendarbookGetTodoCountPage "here".
\r
671 * @privlevel public
\r
672 * @privilege http://tizen.org/privilege/calendar.read
\r
674 * @return The total number of to-dos, @n
\r
675 * else @c -1 if an exception occurs
\r
676 * @param[in] start The start of the time range
\r
677 * @param[in] end The end of the time range
\r
678 * @param[in] status The to-do status @n
\r
679 * If a specific status is set, the to-dos that have the specified status are returned. @n
\r
680 * The default status value is #TODO_STATUS_ALL, which means all the statuses are returned.
\r
681 * @param[in] priority The to-do priority @n
\r
682 * If a specific priority is set, the to-dos that have the specified priority are returned. @n
\r
683 * The default priority value is #TODO_PRIORITY_ALL that means all the priorities are returned.
\r
684 * @exception E_SUCCESS The method is successful.
\r
685 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
\r
686 * @exception E_INVALID_ARG Either of the following conditions has occurred: @n
\r
687 * - The start time is later than the end date. @n
\r
688 * - The start or end time is not in a valid range. @n
\r
689 * The valid range of the date can be referenced from GetMaxDateTime() and GetMinDateTime().
\r
690 * @exception E_SYSTEM A system error has occurred.
\r
691 * @remarks The specific error code can be accessed using the GetLastResult() method.
\r
693 int GetTodoCount(const Tizen::Base::DateTime& start, const Tizen::Base::DateTime& end, unsigned long status = TODO_STATUS_ALL, unsigned long priority = TODO_PRIORITY_ALL) const;
\r
697 * @page CompCalendarbookGetTodoCountPage Compatibility for GetTodoCount()
\r
698 * @section CompCalendarbookGetTodoCountPageIssueSection Issues
\r
699 * Implementing this method in OSP compatible applications has the following issues: @n
\r
700 * -# If the start date of a to-do is not in the time range of start/end parameters, @n
\r
701 * the to-do is not counted even though the due date is in the time range.
\r
703 * @section CompCalendarbookGetTodoCountPageSolutionSection Resolutions
\r
704 * This issue has been resolved in Tizen. @n
\r
705 * -# The to-do will be counted if the due date is in the range of start/end parameters.
\r
711 * Gets the CalEvent instances that are within the specified time range. @n
\r
712 * The all day events are retrieved by their start and end dates in the local time zone, while all other events are retrieved by their
\r
713 * start and end times in Coordinated Universal Time (UTC).
\r
715 * @brief <i> [Deprecated] </i>
\r
716 * @deprecated This method is deprecated. Instead of using this method, it is recommended to use GetInstancesOfAllDayEventsN() or GetInstancesOfNonAllDayEventsN().
\r
718 * @privlevel public
\r
719 * @privilege http://tizen.org/privilege/calendar.read
\r
721 * @return A list containing all of the matched CalEvent instances, @n
\r
722 * else an empty list if there are no matched instances or @c null if an exception occurs @n
\r
723 * The results are listed in the following order: all day events, and other events. @n
\r
724 * The results with the same property of all day event are ordered by their start time.
\r
725 * @param[in] start The start of the time range
\r
726 * @param[in] end The end of the time range
\r
727 * @param[in] timeZone The time zone of the specified start and end times
\r
728 * @param[in] pageNo The page number of the result list @n
\r
729 * It starts from @c 1.
\r
730 * @param[in] countPerPage The desired maximum count of the result items per page
\r
731 * @param[in] category The event category @n
\r
732 * If a specific category is set, the events that have the specified category are returned. @n
\r
733 * The default category value is #EVENT_CATEGORY_ALL, which means all the categories are returned.
\r
734 * @exception E_SUCCESS The method is successful.
\r
735 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
\r
736 * @exception E_INVALID_ARG Either of the following conditions has occurred: @n
\r
737 * - The specified @c pageNo or @c countPerPage is less than @c 1. @n
\r
738 * - The specified @c category is invalid. @n
\r
739 * - The start time is later than the end date. @n
\r
740 * - The start or end time is not in a valid range. @n
\r
741 * The valid range of the date can be referenced from GetMaxDateTime() and GetMinDateTime().
\r
742 * @exception E_SYSTEM A system error has occurred.
\r
743 * @remarks The specific error code can be accessed using the GetLastResult() method.
\r
746 Tizen::Base::Collection::IList* GetEventInstancesN(const Tizen::Base::DateTime& start, const Tizen::Base::DateTime& end,
\r
747 const Tizen::Locales::TimeZone& timeZone, int pageNo, int countPerPage,
\r
748 unsigned long category = EVENT_CATEGORY_ALL) const;
\r
752 * Gets the CalEvent instances that are within the specified time range. @n
\r
753 * The all day events are retrieved by their start and end dates in the local time zone, while all other events are retrieved by their
\r
754 * start and end times in Coordinated Universal Time (UTC).
\r
756 * Although GetEventInstancesN() retrieves the data synchronously, this method returns data asynchronously using
\r
757 * RecordListener::OnEventInstancesReceivedN(). @n
\r
758 * It is highly recommended to use the asynchronous method because getting the event instances may take a long time.
\r
760 * @brief <i> [Deprecated] </i>
\r
761 * @deprecated This method is deprecated. Instead of using this method, it is recommended to use GetInstancesOfAllDayEventsN() or GetInstancesOfNonAllDayEventsN().
\r
763 * @privlevel public
\r
764 * @privilege http://tizen.org/privilege/calendar.read
\r
766 * @return An error code
\r
767 * @param[in] start The start of the time range
\r
768 * @param[in] end The end of the time range
\r
769 * @param[in] timeZone The time zone of the specified start and end times
\r
770 * @param[in] pageNo The page number of the result list @n
\r
771 * It starts from @c 1.
\r
772 * @param[in] countPerPage The desired maximum count of the result items per page
\r
773 * @param[in] category The event category @n
\r
774 * If a specific category is set, the events that have the specified @c category are returned. @n
\r
775 * The default category value is #EVENT_CATEGORY_ALL, which means all the categories are returned.
\r
776 * @param[out] reqId The ID of the request
\r
777 * @param[in] listener The listener for receiving the responses of the request
\r
778 * @exception E_SUCCESS The method is successful.
\r
779 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
\r
780 * @exception E_INVALID_ARG Either of the following conditions has occurred: @n
\r
781 * - The specified @c pageNo or @c countPerPage is less than @c 1. @n
\r
782 * - The specified @c category is invalid. @n
\r
783 * - The start time is later than the end date. @n
\r
784 * - The start or end time is not in a valid range. @n
\r
785 * The valid range of the date can be referenced from GetMaxDateTime() and GetMinDateTime().
\r
786 * @exception E_SYSTEM A system error has occurred.
\r
787 * @remarks IRecordListener::OnRecordsReceivedN(), Calendarbook::GetEventInstancesN()
\r
790 result GetEventInstances(const Tizen::Base::DateTime& start, const Tizen::Base::DateTime& end,
\r
791 const Tizen::Locales::TimeZone& timeZone, int pageNo, int countPerPage, unsigned long category,
\r
793 const IRecordListener& listener) const;
\r
799 * @privlevel public
\r
800 * @privilege http://tizen.org/privilege/calendar.read
\r
802 * @return A list containing all the CalEvent instances, @n
\r
803 * else an empty list if there are no events or @c null if an exception occurs @n
\r
804 * The results are listed in the order of their event ID.
\r
805 * @exception E_SUCCESS The method is successful.
\r
806 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
\r
807 * @exception E_SYSTEM A system error has occurred.
\r
808 * @remarks The specific error code can be accessed using the GetLastResult() method.
\r
809 * @remarks There is a high probability for an occurrence of an out-of-memory exception. If possible, check whether the exception is
\r
810 * E_OUT_OF_MEMORY or not. For more information on how to handle the out-of-memory exception, refer
\r
811 * <a href="../org.tizen.native.appprogramming/html/basics_tizen_programming/exception_check.htm">here</a>.
\r
813 Tizen::Base::Collection::IList* GetAllEventsN(void) const;
\r
819 * @privlevel public
\r
820 * @privilege http://tizen.org/privilege/calendar.read
\r
822 * @return A list containing all the CalTodo instances, @n
\r
823 * else an empty list if there are no to-dos or @c null if an exception occurs @n
\r
824 * The results are listed in the order of their to-do ID.
\r
825 * @exception E_SUCCESS The method is successful.
\r
826 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
\r
827 * @exception E_SYSTEM The method cannot proceed due to a severe system error.
\r
828 * @remarks The specific error code can be accessed using the GetLastResult() method.
\r
829 * @remarks There is a high probability for an occurrence of an out-of-memory exception. If possible, check whether the exception is
\r
830 * E_OUT_OF_MEMORY or not. For more information on how to handle the out-of-memory exception, refer
\r
831 * <a href="../org.tizen.native.appprogramming/html/basics_tizen_programming/exception_check.htm">here</a>.
\r
833 Tizen::Base::Collection::IList* GetAllTodosN(void) const;
\r
836 * Gets all calendars.
\r
839 * @privlevel public
\r
840 * @privilege http://tizen.org/privilege/calendar.read
\r
842 * @return A list containing all the Calendar instances, @n
\r
843 * else an empty list if there are no calendars or @c null if an exception occurs @n
\r
844 * The results are listed in the order of their calendar ID.
\r
845 * @exception E_SUCCESS The method is successful.
\r
846 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
\r
847 * @exception E_SYSTEM The method cannot proceed due to a severe system error.
\r
848 * @remarks The specific error code can be accessed using the GetLastResult() method.
\r
849 * @remarks There is a high probability for an occurrence of an out-of-memory exception. If possible, check whether the exception is
\r
850 * E_OUT_OF_MEMORY or not. For more information on how to handle the out-of-memory exception, refer
\r
851 * <a href="../org.tizen.native.appprogramming/html/basics_tizen_programming/exception_check.htm">here</a>.
\r
853 Tizen::Base::Collection::IList* GetAllCalendarsN(void) const;
\r
856 * Gets information of all the changed events since the version.
\r
859 * @privlevel public
\r
860 * @privilege http://tizen.org/privilege/calendar.read
\r
862 * @return A list containing the CalEventChangeInfo instances, @n
\r
863 * else an empty list if there are no events or @c null if an exception occurs @n
\r
864 * The results are listed in the order of their version.
\r
865 * @param[in] version The version
\r
866 * @param[out] latestVersion The latest change version among the changed events
\r
867 * @exception E_SUCCESS The method is successful.
\r
868 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
\r
869 * @exception E_INVALID_ARG The specified @c version is invalid.
\r
870 * @exception E_SYSTEM A system error has occurred.
\r
871 * @remarks The specific error code can be accessed using the GetLastResult() method.
\r
872 * @remarks There is a high probability for an occurrence of an out-of-memory exception. If possible, check whether the exception is
\r
873 * E_OUT_OF_MEMORY or not. For more information on how to handle the out-of-memory exception, refer
\r
874 * <a href="../org.tizen.native.appprogramming/html/basics_tizen_programming/exception_check.htm">here</a>.
\r
876 Tizen::Base::Collection::IList* GetChangedEventsAfterN(int version, int& latestVersion) const;
\r
879 * Gets information of all the changed to-dos since the version.
\r
882 * @privlevel public
\r
883 * @privilege http://tizen.org/privilege/calendar.read
\r
885 * @return A list containing the CalTodoChangeInfo instances, @n
\r
886 * else an empty list if there are no to-dos or @c null if an exception occurs @n
\r
887 * The results are listed in the order of their version.
\r
888 * @param[in] version The version
\r
889 * @param[out] latestVersion The latest change version among the changed to-dos
\r
890 * @exception E_SUCCESS The method is successful.
\r
891 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
\r
892 * @exception E_INVALID_ARG The specified @c version is invalid.
\r
893 * @exception E_SYSTEM A system error has occurred.
\r
894 * @remarks The specific error code can be accessed using the GetLastResult() method.
\r
895 * @remarks There is a high probability for an occurrence of an out-of-memory exception. If possible, check whether the exception is
\r
896 * E_OUT_OF_MEMORY or not. For more information on how to handle the out-of-memory exception, refer
\r
897 * <a href="../org.tizen.native.appprogramming/html/basics_tizen_programming/exception_check.htm">here</a>.
\r
899 Tizen::Base::Collection::IList* GetChangedTodosAfterN(int version, int& latestVersion) const;
\r
902 * Adds a calendar. @n
\r
903 * After adding the calendar to the database successfully, the calendar has a valid calendar ID.
\r
906 * @privlevel public
\r
907 * @privilege http://tizen.org/privilege/calendar.write
\r
909 * @return An error code
\r
910 * @param[in,out] calendar The calendar to add
\r
911 * @exception E_SUCCESS The method is successful.
\r
912 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
\r
913 * @exception E_INVALID_ARG The record ID of the calendar is not #INVALID_RECORD_ID.
\r
914 * @exception E_STORAGE_FULL The storage is insufficient.
\r
915 * @exception E_SYSTEM A system error has occurred.
\r
917 result AddCalendar(Calendar& calendar);
\r
920 * Adds a calendar that is associated with the specified account. @n
\r
921 * After adding the calendar to the database successfully, the calendar has a valid calendar ID.
\r
924 * @privlevel public
\r
925 * @privilege http://tizen.org/privilege/calendar.write
\r
927 * @return An error code
\r
928 * @param[in,out] calendar The calendar to add
\r
929 * @param[in] accountId The account Id
\r
930 * @exception E_SUCCESS The method is successful.
\r
931 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
\r
932 * @exception E_INVALID_ARG Either of the following conditions has occurred: @n
\r
933 * - The record ID of the calendar is not #INVALID_RECORD_ID. @n
\r
934 * - The specified @c accountId is invalid.
\r
935 * @exception E_OBJ_NOT_FOUND The specified account is not found.
\r
936 * @exception E_STORAGE_FULL The storage is insufficient.
\r
937 * @exception E_SYSTEM A system error has occurred.
\r
939 result AddCalendar(Calendar& calendar, AccountId accountId);
\r
942 * Removes the specified calendar.
\r
945 * @privlevel public
\r
946 * @privilege http://tizen.org/privilege/calendar.write
\r
948 * @return An error code
\r
949 * @param[in] calendarId The calendar ID to remove
\r
950 * @exception E_SUCCESS The method is successful.
\r
951 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
\r
952 * @exception E_INVALID_ARG The specified @c calendarId is invalid, or
\r
953 * the calendar represents default calendar.
\r
954 * @exception E_OBJ_NOT_FOUND The specified calendar is not found.
\r
955 * @exception E_SYSTEM A system error has occurred.
\r
957 result RemoveCalendar(RecordId calendarId);
\r
960 * Updates the specified calendar.
\r
963 * @privlevel public
\r
964 * @privilege http://tizen.org/privilege/calendar.write
\r
966 * @return An error code
\r
967 * @param[in] calendar The Calendar instance to update
\r
968 * @exception E_SUCCESS The method is successful.
\r
969 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
\r
970 * @exception E_INVALID_ARG The calendar's recordId is #INVALID_RECORD_ID, or
\r
971 * the calendar represents default calendar.
\r
972 * @exception E_OBJ_NOT_FOUND The specified calendar is not found.
\r
973 * @exception E_SYSTEM A system error has occurred.
\r
975 result UpdateCalendar(const Calendar& calendar);
\r
978 * Gets the calendar with the specified calendar ID.
\r
981 * @privlevel public
\r
982 * @privilege http://tizen.org/privilege/calendar.read
\r
984 * @return The matched calendar, @n
\r
985 * else @c null if an exception occurs
\r
986 * @param[in] calendarId The calendar ID
\r
987 * @exception E_SUCCESS The method is successful.
\r
988 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
\r
989 * @exception E_INVALID_ARG The specified @c calendarId is invalid.
\r
990 * @exception E_OBJ_NOT_FOUND The specified calendar is not found.
\r
991 * @exception E_SYSTEM A system error has occurred.
\r
992 * @remarks The specific error code can be accessed using the GetLastResult() method.
\r
994 Calendar* GetCalendarN(RecordId calendarId) const;
\r
997 * Removes an instance of the recurring event. @n
\r
998 * If the event instance has been removed successfully, its start date is added as an exception date to the recurrence of its original event.
\r
1001 * @privlevel public
\r
1002 * @privilege http://tizen.org/privilege/calendar.write
\r
1004 * @return An error code
\r
1005 * @param[in] eventInstance The event instance to remove @n
\r
1006 * The @c eventInstance must be an instance of the recurring event.
\r
1007 * @exception E_SUCCESS The method is successful.
\r
1008 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
\r
1009 * @exception E_INVALID_ARG The instance is invalid.
\r
1010 * @exception E_OBJ_NOT_FOUND The instance is not found.
\r
1011 * @exception E_SYSTEM A system error has occurred.
\r
1012 * @remarks The instance's start time is added to the recurrence of original event as exception date.
\r
1014 result RemoveEventInstance(const CalEventInstance& eventInstance);
\r
1017 * Gets the latest version of calendarbook.
\r
1020 * @privlevel public
\r
1021 * @privilege http://tizen.org/privilege/calendar.read
\r
1023 * @return The latest version
\r
1024 * @exception E_SUCCESS The method is successful.
\r
1025 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
\r
1026 * @exception E_SYSTEM A system error has occurred.
\r
1027 * @remarks The specific error code can be accessed using the GetLastResult() method.
\r
1029 int GetLatestVersion(void) const;
\r
1032 * Searches items of the calendarbook with the filter. @n
\r
1033 * The filter specifies the item type and condition for searching.
\r
1034 * The searched results are ordered by the @c propertySortedBy and @c sortOrder.
\r
1035 * If the @c offset is M and the @c maxCount are N, then the first M items are omitted from the result set returned by the searching operation and the next N items are returned.
\r
1038 * @privlevel public
\r
1039 * @privilege http://tizen.org/privilege/calendar.read
\r
1041 * @return A list of searched results (the list of CalEvent, CalTodo, Calendar, or CalEventInstance), @n
\r
1042 * else an empty list if there is no searched result or @c null if an exception occurs
\r
1043 * @param[in] filter The filter that specifies the search condition @n If the filter is empty, all items that are specified by the type of this filter will be searched.
\r
1044 * @param[in] propertySortedBy The property for sorting @n The searched results are ordered by the values of this property.
\r
1045 * @param[in] sortOrder The order for sorting
\r
1046 * @param[in] offset The offset of the searched results @n If this value is @c 0, it will be ignored.
\r
1047 * @param[in] maxCount The maximum count of the searched results @n If this value is @c 0, it will be ignored.
\r
1048 * @exception E_SUCCESS The method is successful.
\r
1049 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
\r
1050 * @exception E_INVALID_ARG The specified @c offset or @c maxCount is less than 0, or the @c propertySortedBy is not an element of the enumerator that corresponds with the type of the specified @c filter.
\r
1051 * @exception E_SYSTEM The method cannot proceed due to a severe system error.
\r
1052 * @remarks The specific error code can be accessed using the GetLastResult() method.
\r
1053 * @remarks There is a high probability for an occurrence of an out-of-memory exception. If possible, check whether the exception is
\r
1054 * E_OUT_OF_MEMORY or not. For more information on how to handle the out-of-memory exception, refer
\r
1055 * <a href="../org.tizen.native.appprogramming/html/basics_tizen_programming/exception_check.htm">here</a>.
\r
1056 * @see EventFilterProperty
\r
1057 * @see TodoFilterProperty
\r
1058 * @see CalendarFilterProperty
\r
1059 * @see EventInstanceFilterProperty
\r
1061 Tizen::Base::Collection::IList* SearchN(const CalendarbookFilter& filter, unsigned long propertySortedBy = 0, Tizen::Base::SortOrder sortOrder = Tizen::Base::SORT_ORDER_NONE,
\r
1062 int offset = 0, int maxCount = 0) const;
\r
1065 * Gets the matched item count of the search results with the filter. @n
\r
1066 * The filter specifies the item type and condition for searching.
\r
1069 * @privlevel public
\r
1070 * @privilege http://tizen.org/privilege/calendar.read
\r
1072 * @return The count of the searched results
\r
1073 * @param[in] filter The filter that specifies the search condition @n If the filter is empty, all items that are specified by the type of this filter will be searched.
\r
1074 * @exception E_SUCCESS The method is successful.
\r
1075 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
\r
1076 * @exception E_SYSTEM The method cannot proceed due to a severe system error.
\r
1077 * @remarks The specific error code can be accessed using the GetLastResult() method.
\r
1079 int GetMatchedItemCount(const CalendarbookFilter& filter) const;
\r
1082 * Parses the events from specific vCalendar file. @n
\r
1083 * This method supports to parse for vCalendar version 1.0 and 2.0 (iCalendar).
\r
1087 * @return A list containing the CalEvent instances, @n
\r
1088 * else an empty list if there are no events or @c null if an exception occurs
\r
1089 * @param[in] vCalFilePath The path of the vCalendar file
\r
1090 * @exception E_SUCCESS The method is successful.
\r
1091 * @exception E_INVALID_ARG The specified @c vCalFilePath is invalid.
\r
1092 * @exception E_ILLEGAL_ACCESS Access is denied due to insufficient permission.
\r
1093 * @exception E_FILE_NOT_FOUND The specified vCalendar file is not found.
\r
1094 * @exception E_SYSTEM The method cannot proceed due to a severe system error.
\r
1095 * @remarks The specific error code can be accessed using the GetLastResult() method.
\r
1096 * @remarks There is a high probability for an occurrence of an out-of-memory exception. If possible, check whether the exception is
\r
1097 * E_OUT_OF_MEMORY or not. For more information on how to handle the out-of-memory exception, refer
\r
1098 * <a href="../org.tizen.native.appprogramming/html/basics_tizen_programming/exception_check.htm">here</a>.
\r
1100 static Tizen::Base::Collection::IList* ParseEventsFromVcalendarN(const Tizen::Base::String& vCalFilePath);
\r
1103 * Parses the to-dos from specific vCalendar file. @n
\r
1104 * This method supports to parse for vCalendar version 1.0 and 2.0 (iCalendar).
\r
1108 * @return A list containing the CalTodo instances, @n
\r
1109 * else an empty list if there are no to-dos or @c null if an exception occurs
\r
1110 * @param[in] vCalFilePath The path of the vCalendar file
\r
1111 * @exception E_SUCCESS The method is successful.
\r
1112 * @exception E_INVALID_ARG The specified @c vCalFilePath is invalid.
\r
1113 * @exception E_ILLEGAL_ACCESS Access is denied due to insufficient permission.
\r
1114 * @exception E_FILE_NOT_FOUND The specified vCalendar file is not found.
\r
1115 * @exception E_SYSTEM The method cannot proceed due to a severe system error.
\r
1116 * @remarks The specific error code can be accessed using the GetLastResult() method.
\r
1117 * @remarks There is a high probability for an occurrence of an out-of-memory exception. If possible, check whether the exception is
\r
1118 * E_OUT_OF_MEMORY or not. For more information on how to handle the out-of-memory exception, refer
\r
1119 * <a href="../org.tizen.native.appprogramming/html/basics_tizen_programming/exception_check.htm">here</a>.
\r
1121 static Tizen::Base::Collection::IList* ParseTodosFromVcalendarN(const Tizen::Base::String& vCalFilePath);
\r
1124 * Exports the events to vCalendar 2.0 (iCalendar) file.
\r
1128 * @return An error code
\r
1129 * @param[in] eventList The event list to export @n The list should contain CalEvent instances.
\r
1130 * @param[in] vCalFilePath The vCalendar file path
\r
1131 * @exception E_SUCCESS The method is successful.
\r
1132 * @exception E_INVALID_ARG The specified @c eventList is invalid or
\r
1133 * the specified @c vCalFilePath is invalid.
\r
1134 * @exception E_ILLEGAL_ACCESS Access of vCalFilePath is denied due to insufficient permission.
\r
1135 * @exception E_FILE_ALREADY_EXIST The vCalendar file already exists.
\r
1136 * @exception E_STORAGE_FULL The disk space is full.
\r
1137 * @exception E_SYSTEM The method cannot proceed due to a severe system error.
\r
1139 static result ExportEventsToVcalendar(const Tizen::Base::Collection::IList& eventList, const Tizen::Base::String& vCalFilePath);
\r
1142 * Exports the to-dos to vCalendar 2.0 (iCalendar) file.
\r
1146 * @return An error code
\r
1147 * @param[in] todoList The to-do list to export @n The list should contain CalTodo instances.
\r
1148 * @param[in] vCalFilePath The vCalendar file path
\r
1149 * @exception E_SUCCESS The method is successful.
\r
1150 * @exception E_INVALID_ARG The specified @c todoList is invalid or
\r
1151 * the specified @c vCalFilePath is invalid.
\r
1152 * @exception E_ILLEGAL_ACCESS Access of vCalFilePath is denied due to insufficient permission.
\r
1153 * @exception E_FILE_ALREADY_EXIST The vCalendar file already exists.
\r
1154 * @exception E_STORAGE_FULL The disk space is full.
\r
1155 * @exception E_SYSTEM The method cannot proceed due to a severe system error.
\r
1157 static result ExportTodosToVcalendar(const Tizen::Base::Collection::IList& todoList, const Tizen::Base::String& vCalFilePath);
\r
1160 * Gets the maximum allowable date and time in the calendarbook (that is, "December 31 2100 23:59:59").
\r
1164 * @return An instance of Tizen::Base::DateTime
\r
1166 static Tizen::Base::DateTime GetMaxDateTime(void);
\r
1169 * Gets the minimum allowable date and time in the calendarbook (that is, "January 1 1900 00:00:00").
\r
1173 * @return An instance of Tizen::Base::DateTime
\r
1175 static Tizen::Base::DateTime GetMinDateTime(void);
\r
1179 * The implementation of this copy constructor is intentionally blank and declared as private @n
\r
1180 * to prohibit copying of objects.
\r
1184 Calendarbook(const Calendarbook& rhs);
\r
1187 * The implementation of this copy assignment operator is intentionally blank and declared as private @n
\r
1188 * to prohibit copying of objects.
\r
1192 Calendarbook& operator =(const Calendarbook& rhs);
\r
1195 friend class _CalendarbookImpl;
\r
1196 class _CalendarbookImpl* __pCalendarbookImpl;
\r
1197 }; // Calendarbook
\r
1199 }} // Tizen::Social
\r
1202 #endif // _FSCL_CALENDARBOOK_H_
\r