Beta merge 2
[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 "IEventFindServices.h"
31 #include "IEventGetServiceByName.h"
32 #include "IEventGetServiceById.h"
33 #include <dpl/shared_ptr.h>
34
35 namespace TizenApis {
36 namespace Api {
37 namespace Account{
38
39 class IAccountManager :
40         public WrtDeviceApis::Commons::EventRequestReceiver< IEventAddAccount > ,
41         public WrtDeviceApis::Commons::EventRequestReceiver< IEventDeleteAccount >,
42         public WrtDeviceApis::Commons::EventRequestReceiver< IEventFindAccounts >,
43         public WrtDeviceApis::Commons::EventRequestReceiver< IEventUpdateAccount >,
44         public WrtDeviceApis::Commons::EventRequestReceiver< IEventGetAccountById >,
45         public WrtDeviceApis::Commons::EventRequestReceiver< IEventGetServiceTypeById >,
46         public WrtDeviceApis::Commons::EventRequestReceiver< IEventGetProviderById >,
47         public WrtDeviceApis::Commons::EventRequestReceiver< IEventFindProviders >,
48         public WrtDeviceApis::Commons::EventRequestReceiver< IEventFindServiceTypes >,
49         public WrtDeviceApis::Commons::EventRequestReceiver< IEventFindServices >,
50         public WrtDeviceApis::Commons::EventRequestReceiver< IEventGetServiceByName >,
51         public WrtDeviceApis::Commons::EventRequestReceiver< IEventGetServiceById >
52 {
53   public:
54         IAccountManager();
55
56         virtual ~IAccountManager();
57
58 //      virtual void getAccountServices(const IEventGetAccountServicesPtr &event);
59
60         virtual void addAccount(const IEventAddAccountPtr &event);
61
62         virtual void deleteAccount(const IEventDeleteAccountPtr &event);
63
64         virtual void findAccounts(const IEventFindAccountsPtr &event);
65
66         virtual void findServices(const IEventFindServicesPtr &event);
67
68         virtual void findServiceTypes(const IEventFindServiceTypesPtr &event);
69
70         virtual void updateAccount(const IEventUpdateAccountPtr &event);
71
72         virtual void getAccountById(const IEventGetAccountByIdPtr &event);
73
74         virtual void getServiceTypeById(const IEventGetServiceTypeByIdPtr &event);
75
76         virtual void getServiceByName(const IEventGetServiceByNamePtr &event);
77         virtual void getServiceById(const IEventGetServiceByIdPtr &event);
78
79         virtual void getProviderById(const IEventGetProviderByIdPtr &event);
80
81         virtual void FindProviders(const IEventFindProvidersPtr &event);
82
83
84   protected:
85 //      virtual void OnRequestReceived(const IEventGetAccountServicesPtr &event) = 0;
86
87         virtual void OnRequestReceived(const IEventAddAccountPtr &event) = 0;
88
89         virtual void OnRequestReceived(const IEventDeleteAccountPtr &event) = 0;
90
91         virtual void OnRequestReceived(const IEventFindAccountsPtr &event) = 0;
92
93         virtual void OnRequestReceived(const IEventUpdateAccountPtr &event) = 0;
94
95         virtual void OnRequestReceived(const IEventGetAccountByIdPtr &event) = 0;
96
97         virtual void OnRequestReceived(const IEventGetServiceTypeByIdPtr &event) = 0;
98
99         virtual void OnRequestReceived(const IEventGetProviderByIdPtr &event) = 0;
100
101         virtual void OnRequestReceived(const IEventFindProvidersPtr &event) = 0;
102
103         virtual void OnRequestReceived(const IEventFindServiceTypesPtr &event) = 0;
104
105         virtual void OnRequestReceived(const IEventFindServicesPtr &event) = 0;
106
107         virtual void OnRequestReceived(const IEventGetServiceByNamePtr &event) = 0;
108
109         virtual void OnRequestReceived(const IEventGetServiceByIdPtr &event) = 0;
110
111 };
112
113 typedef DPL::SharedPtr<IAccountManager> IAccountManagerPtr;
114
115 }
116 }
117 }
118
119 #endif /* _ABSTRACT_LAYER_IACCOUNT_MANAGER_H_ */