2 // Open Service Platform
3 // Copyright (c) 2013 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.
19 * @file FSecPrivacyInfo.h
20 * @brief This is the header file for the %PrivacyInfo class.
22 * This header file contains the declarations of the %PrivacyInfo class.
25 #ifndef _FSEC_PRIVACY_INFO_H_
26 #define _FSEC_PRIVACY_INFO_H_
28 #include <FBaseObject.h>
30 namespace Tizen { namespace Security
35 * @brief This class represents the privacy information.
39 * @final This class is not intended for extension.
41 * The %PrivacyInfo class represents the privacy information.
42 * %PrivacyInfo provides methods to retrieve the name and description of privilege.
45 class _OSP_EXPORT_ PrivacyInfo
46 : public Tizen::Base::Object
52 * The object is not fully constructed after this constructor is called. @n
53 * For full construction, the Construct() method must be called right after calling this constructor.
57 * @remarks After creating an instance of this class, the Construct() method must be called explicitly to initialize this instance.
62 * This destructor overrides Tizen::Base::Object::~Object().
67 virtual ~PrivacyInfo(void);
70 * Initializes this instance of %PrivacyInfo with the specified parameters.
74 * @return An error code
75 * @param[in] privacyId The privacy ID
76 * @param[in] enable Set to @c true to enable the privacy setting, @n
78 * @exception E_SUCCESS The method is successful.
79 * @exception E_INVALID_ARG The specified @c privacyId is invalid or the @c privacyId is not exist.
82 result Construct(const Tizen::Base::String& privacyId, bool enable = false);
89 * @return The privacy ID.
92 Tizen::Base::String GetId(void) const;
95 * Checks whether the privacy setting is enabled.
99 * @return @c true if the privacy setting is enabled, @n
103 bool IsEnabled(void) const;
106 * Enables or disables the privacy setting.
110 * @param[in] enable A Boolean value indicating whether the privacy setting is enabled.
114 void SetEnabled(bool enable);
117 * Gets the localized display name of privacy.
121 * @return The display name of privacy, else an empty string is returned if there is no value.
124 Tizen::Base::String GetDisplayName(void) const;
127 * Gets the localized description of privacy.
131 * @return The description of privacy, else an empty string is returned if there is no value.
134 Tizen::Base::String GetDescription(void) const;
139 // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
141 // @param[in] rhs An instance of %PrivacyInfo
143 PrivacyInfo(const PrivacyInfo& rhs);
146 // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
148 // @param[in] rhs An instance of %PrivacyInfo
150 PrivacyInfo& operator =(const PrivacyInfo& rhs);
154 class _PrivacyInfoImpl* __pImpl;
155 friend class _PrivacyInfoImpl;
159 } } // Tizen::Security
161 #endif // _FSEC_PRIVACY_INFO_H_