Merge "GetPackageAppInfoListN() is added with package, app filter." into tizen_2.1
[platform/framework/native/appfw.git] / src / security / inc / FSec_PrivacyInfoImpl.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2013 Samsung Electronics Co., Ltd.
4 //
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
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0
10 //
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.
16 //
17  
18 /**
19 * @file    FSec_PrivacyInfoImpl.h
20 * @brief  This is the header file for the %_PrivacyInfoImpl class.
21 *
22 * This header file contains the declarations of the %_PrivacyInfoImpl class.
23 */
24  
25 #ifndef _FSEC_INTERNAL_PRIVACY_INFO_H_
26 #define _FSEC_INTERNAL_PRIVACY_INFO_H_
27  
28 #include <FBaseObject.h>
29  
30 namespace Tizen { namespace Security
31 {
32  
33 /**
34 * @class               _PrivacyInfoImpl
35 * @brief               This class represents the privacy information.
36 *
37 * @since 2.1
38 *
39 * @final This class is not intended for extension.
40 *
41 * The %_PrivacyInfoImpl class represents the privacy information.
42 * %_PrivacyInfoImpl provides methods to retrieve the name and description of privilege.
43 */
44  
45 class _OSP_EXPORT_ _PrivacyInfoImpl
46                          : public Tizen::Base::Object
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          * @remarks  After creating an instance of this class, the Construct() method must be called explicitly to initialize this instance.
57          */
58         _PrivacyInfoImpl(void);
59  
60         /**
61          * This destructor overrides Tizen::Base::Object::~Object().
62          *
63          * @since 2.1
64          *
65          */
66         virtual ~_PrivacyInfoImpl(void);
67  
68         /**
69          * Initializes this instance of %_PrivacyInfoImpl with the specified parameters.
70          *
71          * @since             2.1
72          *
73          * @return           An error code
74          * @param[in]       privacyId                  The privacy ID
75          * @param[in]       enable                      Set to @c true to enable the privacy setting, @n
76          *                                                    else @c false
77          * @exception       E_SUCCESS                The method is successful.
78          * @exception      E_INVALID_ARG          The specified @c privacyId is invalid or the @c privacyId is not exist.
79          *
80          */
81         result Construct(const Tizen::Base::String& privacyId, bool enable = false);
82  
83         /**
84          * Gets a privacy ID.
85          *
86          * @since              2.1
87          *
88          * @return            The privacy ID.
89          *
90          */
91         Tizen::Base::String GetId(void) const;
92  
93         /**
94          * Checks whether the privacy setting is enabled.
95          *
96          * @since       2.1
97          *
98          * @return      @c true if the privacy setting is enabled, @n
99          *                 else @c false
100          * @see         SetEnabled()
101          */
102         bool IsEnabled(void) const;
103  
104         /**
105          * Enables or disables the privacy setting.
106          *
107          * @since       2.1
108          *
109          * @param[in]   enable                  A Boolean value indicating whether the privacy setting is enabled.
110          * @see          IsEnabled()
111          *
112          */
113         void SetEnabled(bool enable);
114  
115         /**
116          * Gets the localized display name of privacy.
117          *
118          * @since              2.1
119          *
120          * @return             The display name of privacy, 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, else an empty string is returned if there is no value.
131          *
132          */
133         Tizen::Base::String GetDescription(void) const;
134  
135 private:
136  
137         //
138         // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
139         //
140         // @param[in]   rhs         An instance of %_PrivacyInfoImpl
141         //
142         _PrivacyInfoImpl(const _PrivacyInfoImpl& rhs);
143  
144         //
145         // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
146         //
147         // @param[in]   rhs          An instance of %_PrivacyInfoImpl
148         //
149         _PrivacyInfoImpl& operator =(const _PrivacyInfoImpl& rhs);
150
151 private:
152         Tizen::Base::String __privacyId;
153         bool __enabled;
154 }; // _PrivacyInfoImpl
155  
156 } } // Tizen::Security
157  
158 #endif // _FSEC_INTERNAL_PRIVACY_INFO_H_
159