2 // Copyright (c) 2013 Samsung Electronics Co., Ltd.
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
8 // http://www.apache.org/licenses/LICENSE-2.0
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.
18 * @file FSecPrivacyInfo.h
19 * @brief This is the header file for the %PrivacyInfo class.
21 * This header file contains the declarations of the %PrivacyInfo class.
24 #ifndef _FSEC_PRIVACY_INFO_H_
25 #define _FSEC_PRIVACY_INFO_H_
27 #include <FBaseObject.h>
29 namespace Tizen { namespace Security
34 * @brief This class represents the privacy information.
38 * @final This class is not intended for extension.
40 * The %PrivacyInfo class represents the privacy information.
41 * This class provides methods to retrieve the name and description of privilege.
44 class _OSP_EXPORT_ PrivacyInfo
45 : public Tizen::Base::Object
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.
59 * This destructor overrides Tizen::Base::Object::~Object().
64 virtual ~PrivacyInfo(void);
67 * Initializes this instance of %PrivacyInfo with the specified parameters.
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
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.
79 result Construct(const Tizen::Base::String& privacyId, bool enable = false);
86 * @return The privacy ID
89 Tizen::Base::String GetId(void) const;
92 * Checks whether the privacy setting is enabled.
96 * @return @c true if the privacy setting is enabled, @n
100 bool IsEnabled(void) const;
103 * Enables or disables the privacy setting.
107 * @param[in] enable A Boolean value indicating whether the privacy setting is enabled
111 void SetEnabled(bool enable);
114 * Gets a localized display name of privacy.
118 * @return The display name of privacy, @n
119 * else an empty string is returned if there is no value
122 Tizen::Base::String GetDisplayName(void) const;
125 * Gets a localized description of privacy.
129 * @return The description of privacy, @n
130 * else an empty string is returned if there is no value
133 Tizen::Base::String GetDescription(void) const;
138 // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
140 // @param[in] rhs An instance of %PrivacyInfo
142 PrivacyInfo(const PrivacyInfo& rhs);
145 // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
147 // @param[in] rhs An instance of %PrivacyInfo
149 PrivacyInfo& operator =(const PrivacyInfo& rhs);
153 class _PrivacyInfoImpl* __pImpl;
154 friend class _PrivacyInfoImpl;
158 } } // Tizen::Security
160 #endif // _FSEC_PRIVACY_INFO_H_