2 // Open Service Platform
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 * @file FSclCalendarbook.cpp
19 * @brief This is the implementation for Calendarbook class.
21 * This file contains definitions of @e Calendarbook class.
25 #include <FSclCalendarbook.h>
26 #include <FBaseSysLog.h>
27 #include <FSec_AccessController.h>
28 #include "FScl_CalEventImpl.h"
29 #include "FScl_CalTodoImpl.h"
30 #include "FScl_CalendarbookImpl.h"
32 using namespace Tizen::Base;
33 using namespace Tizen::Base::Collection;
34 using namespace Tizen::Security;
36 namespace Tizen { namespace Social
39 Calendarbook::Calendarbook(void)
40 : __pCalendarbookImpl(null)
44 Calendarbook::~Calendarbook(void)
46 delete __pCalendarbookImpl;
50 Calendarbook::Construct(void)
52 SysAssertf(__pCalendarbookImpl == null,
53 "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
56 _CalendarbookImpl* pCalendarbookImpl = null;
58 pCalendarbookImpl = new (std::nothrow) _CalendarbookImpl();
59 SysTryReturnResult(NID_SCL, pCalendarbookImpl != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
61 r = pCalendarbookImpl->Construct();
62 SysTryCatch(NID_SCL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
64 __pCalendarbookImpl = pCalendarbookImpl;
69 delete pCalendarbookImpl;
75 Calendarbook::Construct(IRecordEventListener* pListener)
77 SysAssertf(__pCalendarbookImpl == null,
78 "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
81 _CalendarbookImpl* pCalendarbookImpl = null;
83 pCalendarbookImpl = new (std::nothrow) _CalendarbookImpl();
84 SysTryReturnResult(NID_SCL, pCalendarbookImpl != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
86 r = pCalendarbookImpl->Construct(pListener);
87 SysTryCatch(NID_SCL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
89 __pCalendarbookImpl = pCalendarbookImpl;
94 delete pCalendarbookImpl;
100 Calendarbook::Construct(ICalendarbookEventListener& listener)
102 SysAssertf(__pCalendarbookImpl == null,
103 "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
105 result r = E_SUCCESS;
106 _CalendarbookImpl* pCalendarbookImpl = null;
108 pCalendarbookImpl = new (std::nothrow) _CalendarbookImpl();
109 SysTryReturnResult(NID_SCL, pCalendarbookImpl != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
111 r = pCalendarbookImpl->Construct(listener);
112 SysTryCatch(NID_SCL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
114 __pCalendarbookImpl = pCalendarbookImpl;
119 delete pCalendarbookImpl;
125 Calendarbook::AddEvent(CalEvent& event)
127 SysTryReturnResult(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CALENDAR_WRITE) == E_SUCCESS,
128 E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
129 SysAssertf(__pCalendarbookImpl != null,
130 "Not yet constructed. Construct() should be called before use.");
132 result r = __pCalendarbookImpl->AddEvent(event);
133 SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
139 Calendarbook::AddEvent(CalEvent& event, RecordId calendarId)
141 SysTryReturnResult(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CALENDAR_WRITE) == E_SUCCESS,
142 E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
143 SysAssertf(__pCalendarbookImpl != null,
144 "Not yet constructed. Construct() should be called before use.");
146 result r = __pCalendarbookImpl->AddEvent(event, calendarId);
147 SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
153 Calendarbook::AddTodo(CalTodo& todo)
155 SysTryReturnResult(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CALENDAR_WRITE) == E_SUCCESS,
156 E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
157 SysAssertf(__pCalendarbookImpl != null,
158 "Not yet constructed. Construct() should be called before use.");
160 result r = __pCalendarbookImpl->AddTodo(todo);
161 SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
167 Calendarbook::AddTodo(CalTodo& todo, RecordId calendarId)
169 SysTryReturnResult(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CALENDAR_WRITE) == E_SUCCESS,
170 E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
171 SysAssertf(__pCalendarbookImpl != null,
172 "Not yet constructed. Construct() should be called before use.");
174 result r = __pCalendarbookImpl->AddTodo(todo, calendarId);
175 SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
181 Calendarbook::RemoveEvent(CalEvent& event)
183 SysTryReturnResult(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CALENDAR_WRITE) == E_SUCCESS,
184 E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
185 SysAssertf(__pCalendarbookImpl != null,
186 "Not yet constructed. Construct() should be called before use.");
188 result r = __pCalendarbookImpl->RemoveEvent(event);
189 SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
195 Calendarbook::RemoveEvent(RecordId eventId)
197 SysTryReturnResult(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CALENDAR_WRITE) == E_SUCCESS,
198 E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
199 SysAssertf(__pCalendarbookImpl != null,
200 "Not yet constructed. Construct() should be called before use.");
202 result r = __pCalendarbookImpl->RemoveEvent(eventId);
203 SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
209 Calendarbook::RemoveTodo(CalTodo& todo)
211 SysTryReturnResult(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CALENDAR_WRITE) == E_SUCCESS,
212 E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
213 SysAssertf(__pCalendarbookImpl != null,
214 "Not yet constructed. Construct() should be called before use.");
216 result r = __pCalendarbookImpl->RemoveTodo(todo);
217 SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
223 Calendarbook::RemoveTodo(RecordId todoId)
225 SysTryReturnResult(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CALENDAR_WRITE) == E_SUCCESS,
226 E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
227 SysAssertf(__pCalendarbookImpl != null,
228 "Not yet constructed. Construct() should be called before use.");
230 result r = __pCalendarbookImpl->RemoveTodo(todoId);
231 SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
237 Calendarbook::UpdateEvent(const CalEvent& event)
239 SysTryReturnResult(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CALENDAR_WRITE) == E_SUCCESS,
240 E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
241 SysAssertf(__pCalendarbookImpl != null,
242 "Not yet constructed. Construct() should be called before use.");
244 result r = __pCalendarbookImpl->UpdateEvent(event);
245 SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
251 Calendarbook::UpdateTodo(const CalTodo& todo)
253 SysTryReturnResult(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CALENDAR_WRITE) == E_SUCCESS,
254 E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
255 SysAssertf(__pCalendarbookImpl != null,
256 "Not yet constructed. Construct() should be called before use.");
258 result r = __pCalendarbookImpl->UpdateTodo(todo);
259 SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
265 Calendarbook::GetEventN(RecordId eventId) const
267 SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CALENDAR_READ) == E_SUCCESS, null,
268 E_PRIVILEGE_DENIED, "[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method.");
269 SysAssertf(__pCalendarbookImpl != null,
270 "Not yet constructed. Construct() should be called before use.");
272 CalEvent* pEvent = __pCalendarbookImpl->GetEventN(eventId);
273 result r = GetLastResult();
274 SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
280 Calendarbook::GetTodoN(RecordId todoId) const
282 SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CALENDAR_READ) == E_SUCCESS, null,
283 E_PRIVILEGE_DENIED, "[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method.");
284 SysAssertf(__pCalendarbookImpl != null,
285 "Not yet constructed. Construct() should be called before use.");
287 CalTodo* pTodo = __pCalendarbookImpl->GetTodoN(todoId);
288 result r = GetLastResult();
289 SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
295 Calendarbook::GetTodosN(const DateTime& start, const DateTime& end, int pageNo, int countPerPage, unsigned long status,
296 unsigned long priority) const
298 SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CALENDAR_READ) == E_SUCCESS, null,
299 E_PRIVILEGE_DENIED, "[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method.");
300 SysAssertf(__pCalendarbookImpl != null,
301 "Not yet constructed. Construct() should be called before use.");
303 IList* pList = __pCalendarbookImpl->GetTodosN(start, end, pageNo, countPerPage, status, priority);
304 result r = GetLastResult();
305 SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
311 Calendarbook::GetTodoCount(const DateTime& start, const DateTime& end, unsigned long status, unsigned long priority) const
313 SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CALENDAR_READ) == E_SUCCESS, _INVALID_COUNT,
314 E_PRIVILEGE_DENIED, "[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method.");
315 SysAssertf(__pCalendarbookImpl != null,
316 "Not yet constructed. Construct() should be called before use.");
318 int count = __pCalendarbookImpl->GetTodoCount(start, end, status, priority);
319 result r = GetLastResult();
320 SysTryReturn(NID_SCL, r == E_SUCCESS, _INVALID_COUNT, r, "[%s] Propagating.", GetErrorMessage(r));
326 Calendarbook::GetEventInstancesN(const DateTime& start, const DateTime& end,
327 const Tizen::Locales::TimeZone& timeZone, int pageNo, int countPerPage,
328 unsigned long category) const
330 SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CALENDAR_READ) == E_SUCCESS, null,
331 E_PRIVILEGE_DENIED, "[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method.");
332 SysAssertf(__pCalendarbookImpl != null,
333 "Not yet constructed. Construct() should be called before use.");
334 IList* pList = __pCalendarbookImpl->GetEventInstancesN(start, end, timeZone, pageNo, countPerPage, category);
335 result r = GetLastResult();
336 SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
342 Calendarbook::GetEventInstances(const DateTime& start, const DateTime& end,
343 const Tizen::Locales::TimeZone& timeZone, int pageNo, int countPerPage, unsigned long category,
345 const IRecordListener& listener) const
347 SysTryReturnResult(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CALENDAR_READ) == E_SUCCESS,
348 E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
349 SysAssertf(__pCalendarbookImpl != null,
350 "Not yet constructed. Construct() should be called before use.");
352 result r = __pCalendarbookImpl->GetEventInstances(start, end, timeZone, pageNo, countPerPage, category, reqId, listener);
353 SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
359 Calendarbook::GetAllEventsN(void) const
361 SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CALENDAR_READ) == E_SUCCESS, null,
362 E_PRIVILEGE_DENIED, "[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method.");
363 SysAssertf(__pCalendarbookImpl != null,
364 "Not yet constructed. Construct() should be called before use.");
366 IList* pList = __pCalendarbookImpl->GetAllEventsN();
367 result r = GetLastResult();
368 SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
374 Calendarbook::GetAllTodosN(void) const
376 SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CALENDAR_READ) == E_SUCCESS, null,
377 E_PRIVILEGE_DENIED, "[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method.");
378 SysAssertf(__pCalendarbookImpl != null,
379 "Not yet constructed. Construct() should be called before use.");
381 IList* pList = __pCalendarbookImpl->GetAllTodosN();
382 result r = GetLastResult();
383 SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
389 Calendarbook::GetAllCalendarsN(void) const
391 SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CALENDAR_READ) == E_SUCCESS, null,
392 E_PRIVILEGE_DENIED, "[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method.");
393 SysAssertf(__pCalendarbookImpl != null,
394 "Not yet constructed. Construct() should be called before use.");
396 IList* pList = __pCalendarbookImpl->GetAllCalendarsN();
397 result r = GetLastResult();
398 SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
404 Calendarbook::GetChangedEventsAfterN(int version, int& latestVersion) const
406 SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CALENDAR_READ) == E_SUCCESS, null,
407 E_PRIVILEGE_DENIED, "[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method.");
408 SysAssertf(__pCalendarbookImpl != null,
409 "Not yet constructed. Construct() should be called before use.");
411 IList* pList = __pCalendarbookImpl->GetChangedEventsAfterN(version, latestVersion);
412 result r = GetLastResult();
413 SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
419 Calendarbook::GetChangedTodosAfterN(int version, int& latestVersion) const
421 SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CALENDAR_READ) == E_SUCCESS, null,
422 E_PRIVILEGE_DENIED, "[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method.");
423 SysAssertf(__pCalendarbookImpl != null,
424 "Not yet constructed. Construct() should be called before use.");
426 IList* pList = __pCalendarbookImpl->GetChangedTodosAfterN(version, latestVersion);
427 result r = GetLastResult();
428 SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
434 Calendarbook::AddCalendar(Calendar& calendar)
436 SysTryReturnResult(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CALENDAR_WRITE) == E_SUCCESS,
437 E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
438 SysAssertf(__pCalendarbookImpl != null,
439 "Not yet constructed. Construct() should be called before use.");
441 result r = __pCalendarbookImpl->AddCalendar(calendar);
442 SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
448 Calendarbook::AddCalendar(Calendar& calendar, AccountId accountId)
450 SysTryReturnResult(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CALENDAR_WRITE) == E_SUCCESS,
451 E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
452 SysAssertf(__pCalendarbookImpl != null,
453 "Not yet constructed. Construct() should be called before use.");
455 result r = __pCalendarbookImpl->AddCalendar(calendar, accountId);
456 SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
462 Calendarbook::RemoveCalendar(RecordId calendarId)
464 SysTryReturnResult(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CALENDAR_WRITE) == E_SUCCESS,
465 E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
466 SysAssertf(__pCalendarbookImpl != null,
467 "Not yet constructed. Construct() should be called before use.");
469 result r = __pCalendarbookImpl->RemoveCalendar(calendarId);
470 SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
476 Calendarbook::UpdateCalendar(const Calendar& calendar)
478 SysTryReturnResult(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CALENDAR_WRITE) == E_SUCCESS,
479 E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
480 SysAssertf(__pCalendarbookImpl != null,
481 "Not yet constructed. Construct() should be called before use.");
483 result r = __pCalendarbookImpl->UpdateCalendar(calendar);
484 SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
490 Calendarbook::GetCalendarN(RecordId calendarId) const
492 SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CALENDAR_READ) == E_SUCCESS, null,
493 E_PRIVILEGE_DENIED, "[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method.");
494 SysAssertf(__pCalendarbookImpl != null,
495 "Not yet constructed. Construct() should be called before use.");
497 Calendar* pCalendar = __pCalendarbookImpl->GetCalendarN(calendarId);
498 result r = GetLastResult();
499 SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
505 Calendarbook::RemoveEventInstance(const CalEventInstance& eventInstance)
507 SysTryReturnResult(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CALENDAR_WRITE) == E_SUCCESS,
508 E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
509 SysAssertf(__pCalendarbookImpl != null,
510 "Not yet constructed. Construct() should be called before use.");
512 result r = __pCalendarbookImpl->RemoveEventInstance(eventInstance);
513 SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
519 Calendarbook::UpdateEventInstance(const CalEventInstance& eventInstance, CalEvent& event)
521 SysTryReturnResult(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CALENDAR_WRITE) == E_SUCCESS,
522 E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
523 SysAssertf(__pCalendarbookImpl != null,
524 "Not yet constructed. Construct() should be called before use.");
526 result r = __pCalendarbookImpl->UpdateEventInstance(eventInstance, event);
527 SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
533 Calendarbook::GetLatestVersion(void) const
535 SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CALENDAR_READ) == E_SUCCESS, null,
536 E_PRIVILEGE_DENIED, "[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method.");
537 SysAssertf(__pCalendarbookImpl != null,
538 "Not yet constructed. Construct() should be called before use.");
540 int version = __pCalendarbookImpl->GetLatestVersion();
541 result r = GetLastResult();
542 SysTryReturn(NID_SCL, r == E_SUCCESS, _INVALID_VERSION, r, "[%s] Propagating.", GetErrorMessage(r));
548 Calendarbook::SearchN(const CalendarbookFilter& filter, unsigned long propertySortedBy, SortOrder sortOrder, int offset, int maxCount) const
550 SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CALENDAR_READ) == E_SUCCESS, null,
551 E_PRIVILEGE_DENIED, "[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method.");
552 SysAssertf(__pCalendarbookImpl != null,
553 "Not yet constructed. Construct() should be called before use.");
555 IList* pList = __pCalendarbookImpl->SearchN(filter, propertySortedBy, sortOrder, offset, maxCount);
556 result r = GetLastResult();
557 SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
563 Calendarbook::GetMatchedItemCount(const CalendarbookFilter& filter) const
565 SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CALENDAR_READ) == E_SUCCESS, null,
566 E_PRIVILEGE_DENIED, "[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method.");
567 SysAssertf(__pCalendarbookImpl != null,
568 "Not yet constructed. Construct() should be called before use.");
570 int count = __pCalendarbookImpl->GetMatchedItemCount(filter);
571 result r = GetLastResult();
572 SysTryReturn(NID_SCL, r == E_SUCCESS, _INVALID_VERSION, r, "[%s] Propagating.", GetErrorMessage(r));
578 Calendarbook::ParseEventsFromVcalendarN(const String& vCalFilePath)
580 IList* pList = _CalendarbookImpl::ParseEventsFromVcalendarN(vCalFilePath);
581 result r = GetLastResult();
582 SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
588 Calendarbook::ParseTodosFromVcalendarN(const String& vCalFilePath)
590 IList* pList = _CalendarbookImpl::ParseTodosFromVcalendarN(vCalFilePath);
591 result r = GetLastResult();
592 SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
598 Calendarbook::ExportEventsToVcalendar(const IList& eventList, const String& vCalFilePath)
600 result r = _CalendarbookImpl::ExportEventsToVcalendar(eventList, vCalFilePath);
601 SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
607 Calendarbook::ExportTodosToVcalendar(const IList& todoList, const String& vCalFilePath)
609 result r = _CalendarbookImpl::ExportTodosToVcalendar(todoList, vCalFilePath);
610 SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
616 Calendarbook::GetMaxDateTime(void)
618 return _CalendarbookImpl::GetMaxDateTime();
621 Calendarbook::GetMinDateTime(void)
623 return _CalendarbookImpl::GetMinDateTime();