Merge "[2.2.1] Apply reviewed header file (Base to Collection)" into tizen_2.2
[platform/framework/native/appfw.git] / inc / FAppPkgPackageAppInfo.h
1 //
2 // Copyright (c) 2012 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        FAppPkgPackageAppInfo.h
19  * @brief       This is the header file for the %PackageAppInfo class.
20  *
21  * This header file contains the declarations of the %PackageAppInfo class.
22  */
23
24 #ifndef _FAPP_PKG_PACKAGE_APP_INFO_H_
25 #define _FAPP_PKG_PACKAGE_APP_INFO_H_
26
27 #include <FBase.h>
28 #include <FAppTypes.h>
29 #include <FAppPkgPackageManager.h>
30
31 namespace Tizen { namespace Graphics
32 {
33 class Bitmap;
34 } }
35
36 namespace Tizen { namespace App { namespace Package
37 {
38
39 /**
40  * @class               PackageAppInfo
41  * @brief               This class represents the information of an application in a package.
42  *
43  * @since       2.0
44  *
45  * @final               This class is not intended for extension.
46  *
47  * The %PackageAppInfo class provides the information of an application in a package.
48  *
49  */
50 class _OSP_EXPORT_ PackageAppInfo
51         : public Tizen::Base::Object
52 {
53 public:
54         /**
55          * This destructor overrides Tizen::Base::Object::~Object().
56          *
57          * @since       2.0
58          */
59         virtual ~PackageAppInfo(void);
60
61         /**
62          * Gets the application ID.
63          *
64          * @since       2.0
65          *
66          * @return      The application ID
67          */
68         AppId GetAppId(void) const;
69
70         /**
71          * Gets the name of an application.
72          *
73          * @since       2.0
74          *
75          * @return      The name of the application
76          */
77         Tizen::Base::String GetAppName(void) const;
78
79         /**
80          * Gets the display name of an application.
81          *
82          * @since       2.0
83          *
84          * @return      The display name of the application
85          */
86         Tizen::Base::String GetAppDisplayName(void) const;
87
88         /**
89         * Gets the menu icon path of an application.
90         *
91         * @since         2.1
92         *
93         * @return        The menu icon path of the application, @n
94         *                else an empty string is returned if there is no value
95         */
96         Tizen::Base::String GetAppMenuIconPath(void) const;
97
98         /**
99         * Gets the setting icon path of an application.
100         *
101         * @since         2.1
102         *
103         * @return        The setting icon path of the application, @n
104         *                        else an empty string is returned if there is no value
105         */
106         Tizen::Base::String GetAppSettingIconPath(void) const;
107
108         /**
109         * Gets the notification icon path of an application.
110         *
111         * @since         2.1
112         *
113         * @return        The notification icon path of the application, @n
114         *                else an empty string is returned if there is no value
115         */
116         Tizen::Base::String GetAppNotificationIconPath(void) const;
117
118         /**
119         * Gets the menu icon of an application.
120         *
121         * @since        2.1
122         *
123         * @return       A pointer to the menu icon of the application, @n
124         *               else @c null if it fails
125         * @exception    E_SUCCESS                     The method is successful.
126         * @exception    E_FILE_NOT_FOUND              The menu icon does not exist.
127         * @exception    E_UNSUPPORTED_FORMAT          The image file format is not supported.
128         * @remarks      The specific error code can be accessed using the GetLastResult() method.
129         */
130         Tizen::Graphics::Bitmap* GetAppMenuIconN(void) const;
131
132         /**
133         * Gets the metadata list of an application.
134         *
135         * @since         2.1
136         *
137         * @return       A pointer to the map of the key(Tizen::Base::String) and value(%Tizen::Base::String) pairs of the metadata, @n
138         *               else @c null if it fails
139         * @exception    E_SUCCESS                     The method is successful.
140         * @exception    E_SYSTEM                      The method cannot proceed due to a severe system error.
141         * @remarks
142         *                       - The specific error code can be accessed using the GetLastResult() method.
143         *                       - An application can use the metadata to set the app-wide information.
144         */
145         Tizen::Base::Collection::IMap* GetAppMetadataListN(void) const;
146
147         /**
148          * Gets the category list of an application.
149          *
150          * @since       2.0
151          *
152          * @return              A pointer to the list of the Tizen::Base::String instances, @n
153          *                              else @c null if it fails
154          * @exception   E_SUCCESS                       The method is successful.
155          * @exception   E_SYSTEM                        The method cannot proceed due to a severe system error.
156          * @remarks             The specific error code can be accessed using the GetLastResult() method.
157          */
158         Tizen::Base::Collection::IList* GetAppCategoryListN(void) const;
159
160         /**
161          * Checks if an application is visible on the menu.
162          *
163          * @since       2.0
164          *
165          * @return      @c true if the application is visible on the menu, @n
166          *                      else @c false
167          * @remarks If the return value is @c false, it is not recommended to display the application on the menu.
168          */
169         bool IsMenuIconVisible(void) const;
170
171         /**
172          * Checks if an application is the main application of the package.
173          *
174          * @since       2.0
175          *
176          * @return      @c true if the application is the main application of the package, @n
177          *                      else @c false
178          */
179         bool IsMainApp(void) const;
180         
181 private:
182         /**
183          * This is the default constructor for this class. This default constructor is intentionally
184  declared as private so that only the platform can create an instance.
185          */
186         PackageAppInfo(void);
187
188         /**
189          * The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
190          */
191         PackageAppInfo(const PackageAppInfo& rhs);
192
193         /**
194          * The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
195          */
196         PackageAppInfo& operator =(const PackageAppInfo& rhs);
197
198 private:
199         class _PackageAppInfoImpl* __pPackageAppInfoImpl;
200
201         friend class _PackageAppInfoImpl;
202         friend class _PackageInfoImpl;
203         friend class _PackageManagerImpl;
204         friend class _PackageParser;
205         friend class _PackageManagerServer;
206
207 }; // PackageAppInfo
208
209 } } } // Tizen::App::Package
210
211 #endif // _FAPP_PKG_PACKAGE_APP_INFO_H_