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