Implement seperated server-so model
[platform/framework/native/appfw.git] / src / server / inc / FSec_PrivilegeManagerServer.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2013 Samsung Electronics Co., Ltd.
4 //
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
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0
10 //
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.
16 //
17
18 /**
19  * @file        FSec_PrivilegeManagerServer.h
20  * @brief       This is the header file for the _PrivilegeManagerServer.
21  * This header file contains the declarations of the _PrivilegeManagerServer.
22  */
23
24 #ifndef _FSEC_INTERNAL_PRIVILEGE_MANAGER_SERVER_H_
25 #define _FSEC_INTERNAL_PRIVILEGE_MANAGER_SERVER_H_
26
27 #include <FOspConfig.h>
28
29 #include "FSec_AccessControlTypes.h"
30
31 namespace Tizen { namespace Base { namespace Collection
32 {
33 class IList;
34 }}}
35
36 namespace Tizen { namespace Base
37 {
38 class String;
39 }}
40
41 class PrivilegeService;
42
43 namespace Tizen { namespace Security
44 {
45
46 /**
47  * @class       _PrivilegeManagerServer
48  * @brief       This class provides a way to manage the privilege information.
49  * @since       2.1
50  *
51  * This class provides a way to manage the privilege information for privilege service.
52  *
53  */
54
55 class _OSP_EXPORT_ _PrivilegeManagerServer
56 {
57
58 private:
59
60         _PrivilegeManagerServer(void);
61         virtual ~_PrivilegeManagerServer(void);
62
63         static result RetrievePrivilege(const Tizen::App::AppId& appId, Tizen::Base::String* pEncryptedBitwise, Tizen::Base::String* pHmac, Tizen::Base::Collection::ArrayList*& pPrivilegeList);
64         static result GenerateVisibilityString(Tizen::App::AppId appId, Tizen::Base::String* pEncryptedVisibility, Tizen::Base::String* pHmac);
65         static result GetEncryptedVisibility(int visibility, Tizen::Base::String& encryptedVisibility);
66         static result GetChecksum(Tizen::App::AppId appId, int visibility, Tizen::Base::String& checksum);
67
68 private:
69
70         friend class ::PrivilegeService;
71
72 };  // _PrivilegeManagerServer
73
74 }} // Tizen::Security
75
76 #endif // _FSEC_INTERNAL_PRIVILEGE_MANAGER_SERVER_H_