2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
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
9 // http://www.apache.org/licenses/LICENSE-2.0
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.
20 * @file FSecAccessController.h
21 * @brief This is the header file for the %AccessController class.
23 * This header file contains the declarations of the %AccessController class.
27 #ifndef _FSEC_ACCESS_CONTROLLER_H_
28 #define _FSEC_ACCESS_CONTROLLER_H_
30 #include <FOspConfig.h>
32 namespace Tizen { namespace Security
37 * @class AccessController
38 * @brief This class provides a way to check the privilege and visibility of privileged API.
42 * The %AccessController class provides a way to check the privilege and visibility of privileged API.
45 class _OSP_EXPORT_ AccessController
53 * Checks whether the application has a privilege and a visibility to invoke the privileged API.
57 * @return An error code
58 * @param[in] privilege A value of enumerator of the specified @c privilege
59 * @exception E_SUCCESS The method is successful and the request is granted.
60 * @exception E_DATA_NOT_FOUND The privilege information does not exist.
61 * @exception E_OUT_OF_MEMORY The memory is insufficient.
62 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
63 * @exception E_SYSTEM An unexpected system error has occurred.
66 static result CheckPrivilege(int privilege);
71 * This default constructor is intentionally declared as private because this class cannot be constructed.
73 AccessController(void);
76 * This destructor is intentionally declared as private because this class cannot be constructed.
78 ~AccessController(void);
81 * The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
83 AccessController(const AccessController& rhs);
86 * The implementation of this copy assignment operator is intentionally blank and delcared as private to prohibit copying of objects.
88 AccessController& operator =(const AccessController& rhs);
90 static void Initialize(void);
92 }; // AccessController
96 #endif // _FSEC_ACCESS_CONTROLLER_H_