Beta merge 2
[profile/ivi/wrt-plugins-tizen.git] / src / platform / API / Calendar / ICalendar.cpp
1 /*
2  * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
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
18 #include "ICalendar.h"
19 #include <Commons/ThreadPool.h>
20
21 namespace TizenApis {
22 namespace Api {
23 namespace Calendar {
24
25 ICalendar::ICalendar() :
26     WrtDeviceApis::Commons::EventRequestReceiver<IEventAddEvent>(WrtDeviceApis::Commons::ThreadEnum::CALENDAR_THREAD),
27     WrtDeviceApis::Commons::EventRequestReceiver<IEventAddEvents>(WrtDeviceApis::Commons::ThreadEnum::CALENDAR_THREAD),
28     WrtDeviceApis::Commons::EventRequestReceiver<IEventDeleteEvent>(WrtDeviceApis::Commons::ThreadEnum::CALENDAR_THREAD),
29     WrtDeviceApis::Commons::EventRequestReceiver<IEventDeleteEvents>(WrtDeviceApis::Commons::ThreadEnum::CALENDAR_THREAD),
30     WrtDeviceApis::Commons::EventRequestReceiver<IEventUpdateEvent>(WrtDeviceApis::Commons::ThreadEnum::CALENDAR_THREAD),
31     WrtDeviceApis::Commons::EventRequestReceiver<IEventUpdateEvents>(WrtDeviceApis::Commons::ThreadEnum::CALENDAR_THREAD),
32     WrtDeviceApis::Commons::EventRequestReceiver<IEventFindEvents>(WrtDeviceApis::Commons::ThreadEnum::CALENDAR_THREAD),
33     WrtDeviceApis::Commons::EventRequestReceiver<IEventCreateEvent>(WrtDeviceApis::Commons::ThreadEnum::CALENDAR_THREAD),
34     WrtDeviceApis::Commons::EventRequestReceiver<IEventCreateEventFromString>(WrtDeviceApis::Commons::ThreadEnum::CALENDAR_THREAD),
35     WrtDeviceApis::Commons::EventRequestReceiver<IEventExportEventToString>(WrtDeviceApis::Commons::ThreadEnum::CALENDAR_THREAD),
36     WrtDeviceApis::Commons::EventRequestReceiver<IEventWatchChanges>(WrtDeviceApis::Commons::ThreadEnum::CALENDAR_THREAD),
37     WrtDeviceApis::Commons::EventRequestReceiver<IEventClearWatch>(WrtDeviceApis::Commons::ThreadEnum::CALENDAR_THREAD),
38     WrtDeviceApis::Commons::EventRequestReceiver<IEventExpandEventRecurrence>(WrtDeviceApis::Commons::ThreadEnum::CALENDAR_THREAD),
39     WrtDeviceApis::Commons::EventRequestReceiver<IEventGet>(WrtDeviceApis::Commons::ThreadEnum::CALENDAR_THREAD),
40     m_accountId(0),
41     m_type(CalendarEvent::EVENT_TYPE)
42 {
43 }
44
45 ICalendar::~ICalendar()
46 {
47 }
48
49 void ICalendar::createEvent(IEventCreateEventPtr &event)
50 {
51     WrtDeviceApis::Commons::EventRequestReceiver<IEventCreateEvent>::PostRequest(event);
52 }
53
54 void ICalendar::addEvent(IEventAddEventPtr &event)
55 {
56     WrtDeviceApis::Commons::EventRequestReceiver<IEventAddEvent>::PostRequest(event);
57 }
58
59 void ICalendar::addEvents(IEventAddEventsPtr &events)
60 {
61     WrtDeviceApis::Commons::EventRequestReceiver<IEventAddEvents>::PostRequest(events);
62 }
63
64 void ICalendar::updateEvent(IEventUpdateEventPtr &event)
65 {
66     WrtDeviceApis::Commons::EventRequestReceiver<IEventUpdateEvent>::PostRequest(event);
67 }
68
69 void ICalendar::updateEvents(IEventUpdateEventsPtr &events)
70 {
71     WrtDeviceApis::Commons::EventRequestReceiver<IEventUpdateEvents>::PostRequest(events);
72 }
73
74 void ICalendar::deleteEvent(IEventDeleteEventPtr &event)
75 {
76     WrtDeviceApis::Commons::EventRequestReceiver<IEventDeleteEvent>::PostRequest(event);
77 }
78
79 void ICalendar::deleteEvents(IEventDeleteEventsPtr &events)
80 {
81     WrtDeviceApis::Commons::EventRequestReceiver<IEventDeleteEvents>::PostRequest(events);
82 }
83
84 void ICalendar::findEvents(IEventFindEventsPtr &event)
85 {
86     WrtDeviceApis::Commons::EventRequestReceiver<IEventFindEvents>::PostRequest(event);
87 }
88
89 void ICalendar::createEventFromString(IEventCreateEventFromStringPtr &event)
90 {
91     WrtDeviceApis::Commons::EventRequestReceiver<IEventCreateEventFromString>::PostRequest(event);
92 }
93
94 void ICalendar::exportEventToString(IEventExportEventToStringPtr &event)
95 {
96     WrtDeviceApis::Commons::EventRequestReceiver<IEventExportEventToString>::PostRequest(event);
97 }
98
99 void ICalendar::watchChanges(IEventWatchChangesPtr &event)
100 {
101     WrtDeviceApis::Commons::EventRequestReceiver<IEventWatchChanges>::PostRequest(event);
102 }
103
104 void ICalendar::clearWatch(IEventClearWatchPtr &event)
105 {
106     WrtDeviceApis::Commons::EventRequestReceiver<IEventClearWatch>::PostRequest(event);
107 }
108
109 void ICalendar::expandEventRecurrence(IEventExpandEventRecurrencePtr &event)
110 {
111     WrtDeviceApis::Commons::EventRequestReceiver<IEventExpandEventRecurrence>::PostRequest(event);
112 }
113
114 void ICalendar::get(IEventGetPtr &event)
115 {
116     WrtDeviceApis::Commons::EventRequestReceiver<IEventGet>::PostRequest(event);
117 }
118
119 }
120 }
121 }