2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 * @file IAccountManager.cpp
20 * @author Lukasz Marek (l.marek@samsung.com)
24 #include "IAccountManager.h"
25 #include <Commons/ThreadPool.h>
30 IAccountManager::IAccountManager() :
31 WrtDeviceApis::Commons::EventRequestReceiver< IEventGetAccountServices >(WrtDeviceApis::Commons::ThreadEnum::ACCOUNT_THREAD),
32 WrtDeviceApis::Commons::EventRequestReceiver< IEventAddAccount >(WrtDeviceApis::Commons::ThreadEnum::ACCOUNT_THREAD),
33 WrtDeviceApis::Commons::EventRequestReceiver< IEventDeleteAccount >(WrtDeviceApis::Commons::ThreadEnum::ACCOUNT_THREAD),
34 WrtDeviceApis::Commons::EventRequestReceiver<IEventFindAccounts>(WrtDeviceApis::Commons::ThreadEnum::ACCOUNT_THREAD),
35 WrtDeviceApis::Commons::EventRequestReceiver<IEventUpdateAccount>(WrtDeviceApis::Commons::ThreadEnum::ACCOUNT_THREAD),
36 WrtDeviceApis::Commons::EventRequestReceiver<IEventGetAccountById>(WrtDeviceApis::Commons::ThreadEnum::ACCOUNT_THREAD),
37 WrtDeviceApis::Commons::EventRequestReceiver<IEventGetServiceTypeById>(WrtDeviceApis::Commons::ThreadEnum::ACCOUNT_THREAD),
38 WrtDeviceApis::Commons::EventRequestReceiver<IEventGetProviderById>(WrtDeviceApis::Commons::ThreadEnum::ACCOUNT_THREAD),
39 WrtDeviceApis::Commons::EventRequestReceiver<IEventFindProviders>(WrtDeviceApis::Commons::ThreadEnum::ACCOUNT_THREAD),
40 WrtDeviceApis::Commons::EventRequestReceiver< IEventFindServiceTypes>(WrtDeviceApis::Commons::ThreadEnum::ACCOUNT_THREAD)
45 IAccountManager::~IAccountManager()
51 void IAccountManager::getAccountServices(const IEventGetAccountServicesPtr &event)
54 WrtDeviceApis::Commons::EventRequestReceiver<IEventGetAccountServices>::PostRequest(event);
57 void IAccountManager::addAccount(const IEventAddAccountPtr &event)
60 WrtDeviceApis::Commons::EventRequestReceiver<IEventAddAccount>::PostRequest(event);
63 void IAccountManager::deleteAccount(const IEventDeleteAccountPtr &event)
66 WrtDeviceApis::Commons::EventRequestReceiver<IEventDeleteAccount>::PostRequest(event);
69 void IAccountManager::findAccounts(const IEventFindAccountsPtr &event)
72 WrtDeviceApis::Commons::EventRequestReceiver<IEventFindAccounts>::PostRequest(event);
75 void IAccountManager::findServiceTypes(const IEventFindServiceTypesPtr &event){
77 WrtDeviceApis::Commons::EventRequestReceiver<IEventFindServiceTypes>::PostRequest(event);
81 void IAccountManager::updateAccount(const IEventUpdateAccountPtr &event)
84 WrtDeviceApis::Commons::EventRequestReceiver<IEventUpdateAccount>::PostRequest(event);
87 void IAccountManager::getAccountById(const IEventGetAccountByIdPtr &event)
90 WrtDeviceApis::Commons::EventRequestReceiver<IEventGetAccountById>::PostRequest(event);
93 void IAccountManager::getServiceTypeById(const IEventGetServiceTypeByIdPtr &event)
96 WrtDeviceApis::Commons::EventRequestReceiver<IEventGetServiceTypeById>::PostRequest(event);
99 void IAccountManager::getProviderById(const IEventGetProviderByIdPtr &event)
102 WrtDeviceApis::Commons::EventRequestReceiver<IEventGetProviderById>::PostRequest(event);
105 void IAccountManager::FindProviders(const IEventFindProvidersPtr &event)
108 WrtDeviceApis::Commons::EventRequestReceiver<IEventFindProviders>::PostRequest(event);