Initialize Tizen 2.3
[framework/osp/security-service.git] / inc / PrivilegeService.h
1 //
2 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
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  * @file                PrivilegeService.h
19  * @brief               This is the header file of the Privilege Manger daemon.
20  */
21
22 #ifndef _PRIVILEGE_SERVICE_H_
23 #define _PRIVILEGE_SERVICE_H_
24
25 #include <FIo_IIpcServerEventListener.h>
26
27 #define OSP_SECURITY_SERVICE    "osp-security-service"
28
29 namespace Tizen { namespace Io
30 {
31         class _IpcServer;
32 }}
33
34 namespace IPC
35 {
36         class Message;
37 }
38
39 namespace Tizen { namespace Base
40 {
41         class String;
42 }}
43
44 namespace Tizen { namespace Base { namespace Collection
45 {
46         template<typename T>
47         class ArrayListT;
48 }}}
49
50 class _OSP_EXPORT_ PrivilegeService
51         : public Tizen::Io::_IIpcServerEventListener
52 {
53
54 public:
55         PrivilegeService(void);
56         ~PrivilegeService(void);
57         result Construct(void);
58
59 public:
60
61         virtual void OnIpcServerStarted(const Tizen::Io::_IpcServer& server);
62         virtual void OnIpcServerStopped(const Tizen::Io::_IpcServer& server);
63         virtual void OnIpcClientConnected(const Tizen::Io::_IpcServer& server, int clientId);
64         virtual void OnIpcClientDisconnected(const Tizen::Io::_IpcServer& server, int clientId);
65         virtual void OnIpcRequestReceived(Tizen::Io::_IpcServer& server, const IPC::Message& message);
66
67         bool RetrievePrivilege(Tizen::Base::String* pEncryptedBitwise, Tizen::Base::String* pHmac, Tizen::Base::Collection::ArrayListT < Tizen::Base::String >* pPrivilegeList, result* pRes);
68         bool RetrieveVisibility(Tizen::Base::String* pEncryptedVisibility, Tizen::Base::String* pHmac, result* pRes);
69
70 private:
71         Tizen::Io::_IpcServer* __pIpcServer;
72 }; // PrivilegeService
73
74 #endif // _PRIVILEGE_SERVICE_H_