2 // Tizen Web Device API
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.
19 #include "IDataSyncManager.h"
20 #include <Commons/ThreadPool.h>
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)
39 IDataSyncManager::~IDataSyncManager()
43 void IDataSyncManager::addProfile(const IEventAddProfilePtr &event)
45 WrtDeviceApis::Commons::EventRequestReceiver<IEventAddProfile>::PostRequest(event);
48 void IDataSyncManager::updateProfile(const IEventUpdateProfilePtr &event)
50 WrtDeviceApis::Commons::EventRequestReceiver<IEventUpdateProfile>::PostRequest(event);
53 void IDataSyncManager::removeProfile(const IEventRemoveProfilePtr &event)
55 WrtDeviceApis::Commons::EventRequestReceiver<IEventRemoveProfile>::PostRequest(event);
58 void IDataSyncManager::getMaxProfilesNum(const IEventGetMaxProfilesNumPtr &event)
60 WrtDeviceApis::Commons::EventRequestReceiver<IEventGetMaxProfilesNum>::PostRequest(event);
63 void IDataSyncManager::getProfilesNum(const IEventGetProfilesNumPtr &event)
65 WrtDeviceApis::Commons::EventRequestReceiver<IEventGetProfilesNum>::PostRequest(event);
68 void IDataSyncManager::getProfile(const IEventGetProfilePtr &event)
70 WrtDeviceApis::Commons::EventRequestReceiver<IEventGetProfile>::PostRequest(event);
73 void IDataSyncManager::getAllProfiles(const IEventGetAllProfilesPtr &event)
75 WrtDeviceApis::Commons::EventRequestReceiver<IEventGetAllProfiles>::PostRequest(event);
78 void IDataSyncManager::startSync(const IEventStartSyncPtr &event)
80 WrtDeviceApis::Commons::EventRequestReceiver<IEventStartSync>::PostRequest(event);
83 void IDataSyncManager::stopSync(const IEventStopSyncPtr &event)
85 WrtDeviceApis::Commons::EventRequestReceiver<IEventStopSync>::PostRequest(event);
88 void IDataSyncManager::getLastSyncStatistics(const IEventGetLastSyncStatisticsPtr &event)
90 WrtDeviceApis::Commons::EventRequestReceiver<IEventGetLastSyncStatistics>::PostRequest(event);