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