f35a9dfdc2f99c09cddc4bc3d20c9a1e54823f90
[profile/ivi/wrt-plugins-tizen.git] / src / platform / API / Account / IAccountManager.h
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 /**
19  * @file        IAccountManager.h
20  * @author      Lukasz Marek (l.marek@samsung.com)
21  * @version     0.1
22  */
23
24 #ifndef _ABSTRACT_LAYER_IACCOUNT_MANAGER_H_
25 #define _ABSTRACT_LAYER_IACCOUNT_MANAGER_H_
26
27 #include "IAccountService.h"
28 #include "IEventGetAccountServices.h"
29 #include "IEventFindServiceTypes.h"
30 #include <dpl/shared_ptr.h>
31
32 namespace TizenApis {
33 namespace Api {
34 namespace Account{
35
36 class IAccountManager : public WrtDeviceApis::Commons::EventRequestReceiver< IEventGetAccountServices >,
37         public WrtDeviceApis::Commons::EventRequestReceiver< IEventAddAccount > ,
38         public WrtDeviceApis::Commons::EventRequestReceiver< IEventDeleteAccount >,
39         public WrtDeviceApis::Commons::EventRequestReceiver< IEventFindAccounts >,
40         public WrtDeviceApis::Commons::EventRequestReceiver< IEventUpdateAccount >,
41         public WrtDeviceApis::Commons::EventRequestReceiver< IEventGetAccountById >,
42         public WrtDeviceApis::Commons::EventRequestReceiver< IEventGetServiceTypeById >,
43         public WrtDeviceApis::Commons::EventRequestReceiver< IEventGetProviderById >,
44         public WrtDeviceApis::Commons::EventRequestReceiver< IEventFindProviders >,
45         public WrtDeviceApis::Commons::EventRequestReceiver< IEventFindServiceTypes >
46 {
47   public:
48         IAccountManager();
49
50         virtual ~IAccountManager();
51
52         virtual void getAccountServices(const IEventGetAccountServicesPtr &event);
53
54         virtual void addAccount(const IEventAddAccountPtr &event);
55
56         virtual void deleteAccount(const IEventDeleteAccountPtr &event);
57
58         virtual void findAccounts(const IEventFindAccountsPtr &event);
59
60         virtual void findServiceTypes(const IEventFindServiceTypesPtr &event);
61
62         virtual void updateAccount(const IEventUpdateAccountPtr &event);
63
64         virtual void getAccountById(const IEventGetAccountByIdPtr &event);
65
66         virtual void getServiceTypeById(const IEventGetServiceTypeByIdPtr &event);
67
68         virtual void getProviderById(const IEventGetProviderByIdPtr &event);
69
70         virtual void FindProviders(const IEventFindProvidersPtr &event);
71
72
73   protected:
74         virtual void OnRequestReceived(const IEventGetAccountServicesPtr &event) = 0;
75
76         virtual void OnRequestReceived(const IEventAddAccountPtr &event) = 0;
77
78         virtual void OnRequestReceived(const IEventDeleteAccountPtr &event) = 0;
79
80         virtual void OnRequestReceived(const IEventFindAccountsPtr &event) = 0;
81
82         virtual void OnRequestReceived(const IEventUpdateAccountPtr &event) = 0;
83
84         virtual void OnRequestReceived(const IEventGetAccountByIdPtr &event) = 0;
85
86         virtual void OnRequestReceived(const IEventGetServiceTypeByIdPtr &event) = 0;
87
88         virtual void OnRequestReceived(const IEventGetProviderByIdPtr &event) = 0;
89
90         virtual void OnRequestReceived(const IEventFindProvidersPtr &event) = 0;
91
92         virtual void OnRequestReceived(const IEventFindServiceTypesPtr &event) = 0;
93
94 };
95
96 typedef DPL::SharedPtr<IAccountManager> IAccountManagerPtr;
97
98 }
99 }
100 }
101
102 #endif /* _ABSTRACT_LAYER_IACCOUNT_MANAGER_H_ */