97149f57035f90361139c09566735de3521c41e3
[platform/framework/native/appfw.git] / inc / FSecPrivilegeInfo.h
1 //
2 // Copyright (c) 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        FSecPrivilegeInfo.h
19  * @brief       This is the header file for the %PrivilegeInfo class.
20  *
21  * This header file contains the declarations of the %PrivilegeInfo class.
22  */
23
24 #ifndef _FSEC_PRIVILEGE_INFO_H_
25 #define _FSEC_PRIVILEGE_INFO_H_
26  
27 #include <FBaseObject.h>
28  
29 namespace Tizen { namespace Security
30 {
31
32 class _PrivilegeInfoImpl;
33
34 /**
35 * @class        PrivilegeInfo
36 * @brief        This class represents the privilege information.
37 *
38 * @since        2.1
39 *
40 * @final        This class is not intended for extension.
41 *
42 * The %PrivilegeInfo class represents the privilege information.
43 * %PrivilegeInfo provides methods to retrieve the name and description of privilege.
44 *
45 */
46
47 class _OSP_EXPORT_ PrivilegeInfo
48         : public Tizen::Base::Object
49 {
50 public:
51
52         /**
53          * The object is not fully constructed after this constructor is called. @n
54          * For full construction, the Construct() method must be called right after calling this constructor.
55          *
56          * @since       2.1
57          *
58          * @remarks  After creating an instance of this class, the Construct() method must be called explicitly to initialize this instance.
59          */
60         PrivilegeInfo(void);
61
62         /**
63          * This destructor overrides Tizen::Base::Object::~Object().
64          *
65          * @since 2.1
66          *
67          */
68         virtual ~PrivilegeInfo(void);
69
70         /**
71          * Initializes this instance of %PrivilegeInfo with the specified parameters.
72          *
73          * @since         2.1
74          *
75          * @return       An error code
76          * @param[in]   privilegeId                The privilege ID
77          * @exception   E_SUCCESS               The method is successful.
78          * @exception   E_INVALID_ARG          The specified @c privilegeId is invalid.
79          *
80          */
81         result Construct(const Tizen::Base::String& privilegeId);
82
83         /**
84          * Gets a privilege ID.
85          *
86          * @since              2.1
87          *
88          * @return            The privilege ID.
89          *
90          */
91         Tizen::Base::String GetId(void) const;
92
93         /**
94          * Gets the localized display name of privilege.
95          *
96          * @since              2.1
97          *
98          * @return            The display name of privilege, else an empty string is returned if there is no value.
99          *
100          */
101         Tizen::Base::String GetDisplayName(void) const;
102
103         /**
104          * Gets the localized description of privilege.
105          *
106          * @since              2.1
107          *
108          * @return            The description of privilege, else an empty string is returned if there is no value.
109          *
110          */
111         Tizen::Base::String GetDescription(void) const;
112
113 private:
114
115         //
116         // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
117         //
118         // @param[in]   rhs         An instance of %PrivilegeInfo
119         //
120         PrivilegeInfo(const PrivilegeInfo& rhs);
121
122         //
123         // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
124         //
125         // @param[in]   rhs An instance of %PrivilegeInfo
126         //
127         PrivilegeInfo& operator =(const PrivilegeInfo& rhs);
128
129 private:
130
131         class _PrivilegeInfoImpl * __pImpl;
132         friend class _PrivilegeInfoImpl;
133
134 }; // PrivilegeInfo
135
136 } } // Tizen::Security::PrivilegeInfo
137
138 #endif // _FSEC_PRIVILEGE_INFO_H_