tizen 2.3.1 release
[framework/web/mobile/wrt-plugins-tizen.git] / src / DataSync / IDataSyncManager.cpp
1 //
2 // Tizen Web Device API
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
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
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
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.
16 //
17
18
19 #include "IDataSyncManager.h"
20 #include <Commons/ThreadPool.h>
21
22 namespace DeviceAPI {
23 namespace DataSync {
24
25 IDataSyncManager::IDataSyncManager() :
26     WrtDeviceApis::Commons::EventRequestReceiver< IEventAddProfile >(WrtDeviceApis::Commons::ThreadEnum::NULL_THREAD),
27     WrtDeviceApis::Commons::EventRequestReceiver< IEventUpdateProfile >(WrtDeviceApis::Commons::ThreadEnum::NULL_THREAD),
28     WrtDeviceApis::Commons::EventRequestReceiver< IEventRemoveProfile >(WrtDeviceApis::Commons::ThreadEnum::NULL_THREAD),
29     WrtDeviceApis::Commons::EventRequestReceiver< IEventGetMaxProfilesNum >(WrtDeviceApis::Commons::ThreadEnum::NULL_THREAD),
30     WrtDeviceApis::Commons::EventRequestReceiver< IEventGetProfilesNum >(WrtDeviceApis::Commons::ThreadEnum::NULL_THREAD),
31     WrtDeviceApis::Commons::EventRequestReceiver< IEventGetProfile >(WrtDeviceApis::Commons::ThreadEnum::NULL_THREAD),
32     WrtDeviceApis::Commons::EventRequestReceiver< IEventGetAllProfiles >(WrtDeviceApis::Commons::ThreadEnum::NULL_THREAD),
33     WrtDeviceApis::Commons::EventRequestReceiver< IEventStartSync >(WrtDeviceApis::Commons::ThreadEnum::NULL_THREAD),
34     WrtDeviceApis::Commons::EventRequestReceiver< IEventStopSync >(WrtDeviceApis::Commons::ThreadEnum::NULL_THREAD),
35     WrtDeviceApis::Commons::EventRequestReceiver< IEventGetLastSyncStatistics >(WrtDeviceApis::Commons::ThreadEnum::NULL_THREAD)
36 {
37 }
38
39 IDataSyncManager::~IDataSyncManager()
40 {
41 }
42
43 void IDataSyncManager::addProfile(const IEventAddProfilePtr &event)
44 {
45     WrtDeviceApis::Commons::EventRequestReceiver<IEventAddProfile>::PostRequest(event);
46 }
47
48 void IDataSyncManager::updateProfile(const IEventUpdateProfilePtr &event)
49 {
50     WrtDeviceApis::Commons::EventRequestReceiver<IEventUpdateProfile>::PostRequest(event);
51 }
52
53 void IDataSyncManager::removeProfile(const IEventRemoveProfilePtr &event)
54 {
55     WrtDeviceApis::Commons::EventRequestReceiver<IEventRemoveProfile>::PostRequest(event);
56 }
57
58 void IDataSyncManager::getMaxProfilesNum(const IEventGetMaxProfilesNumPtr &event)
59 {
60     WrtDeviceApis::Commons::EventRequestReceiver<IEventGetMaxProfilesNum>::PostRequest(event);
61 }
62
63 void IDataSyncManager::getProfilesNum(const IEventGetProfilesNumPtr &event)
64 {
65     WrtDeviceApis::Commons::EventRequestReceiver<IEventGetProfilesNum>::PostRequest(event);
66 }
67
68 void IDataSyncManager::getProfile(const IEventGetProfilePtr &event)
69 {
70     WrtDeviceApis::Commons::EventRequestReceiver<IEventGetProfile>::PostRequest(event);
71 }
72
73 void IDataSyncManager::getAllProfiles(const IEventGetAllProfilesPtr &event)
74 {
75     WrtDeviceApis::Commons::EventRequestReceiver<IEventGetAllProfiles>::PostRequest(event);
76 }
77
78 void IDataSyncManager::startSync(const IEventStartSyncPtr &event)
79 {
80     WrtDeviceApis::Commons::EventRequestReceiver<IEventStartSync>::PostRequest(event);
81 }
82
83 void IDataSyncManager::stopSync(const IEventStopSyncPtr &event)
84 {
85     WrtDeviceApis::Commons::EventRequestReceiver<IEventStopSync>::PostRequest(event);
86 }
87
88 void IDataSyncManager::getLastSyncStatistics(const IEventGetLastSyncStatisticsPtr &event)
89 {
90     WrtDeviceApis::Commons::EventRequestReceiver<IEventGetLastSyncStatistics>::PostRequest(event);
91 }
92
93 }
94 }