Correct typos in doxygen comments
[platform/framework/native/appfw.git] / inc / FAppPkgIPackageInstallationEventListener.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        FAppPkgIPackageInstallationEventListener.h
19  * @brief       This is the header file for the %IPackageInstallationEventListener interface.
20  *
21  * This header file contains the declarations of the %IPackageInstallationEventListener interface.
22  */
23
24 #ifndef _FAPP_PKG_IPACKAGE_INSTALLATION_EVENT_LISTENER_H_
25 #define _FAPP_PKG_IPACKAGE_INSTALLATION_EVENT_LISTENER_H_
26
27 #include <FAppPkgPackageManager.h>
28 #include <FBaseRtIEventListener.h>
29
30 namespace Tizen { namespace App { namespace Package
31 {
32 /**
33  * @enum                PackageInstallationResult
34  *
35  * Defines the result of package installation.
36  *
37  * @since       2.0
38  */
39 enum PackageInstallationResult
40 {
41         PACKAGE_INSTALLATION_RESULT_SUCCESS = 0,                                /**< Success */
42         PACKAGE_INSTALLATION_RESULT_INVALID_PACKAGE,                    /**< An invalid package */
43         PACKAGE_INSTALLATION_RESULT_STORAGE_FULL,                               /**< The installation target storage is full. */
44 };
45
46 /**
47 * @interface    IPackageInstallationEventListener
48 * @brief                This interface defines a listener for a package installation and uninstallation.
49 *
50 * @since        2.0
51 *
52 * The %IPackageInstallationEventListener interface defines a listener that is notified for events related to installation or uninstallation of packages on a device.
53 * The events include installation completion, uninstallation completion, and installation progress.
54 * This listener is registered with the PackageManager::AddPackageInstallationEventListener() method and unregistered with the PackageManager::RemovePackageInstallationEventListener() method.
55 * Generally, this listener is used in system applications such as application service that utilizes packages' (un)installation information in a system.
56 */
57 class _OSP_EXPORT_ IPackageInstallationEventListener
58         : virtual public Tizen::Base::Runtime::IEventListener
59 {
60 public:
61         /**
62          * This polymorphic destructor should be overridden if required.
63          * This way, the destructors of the derived classes are called when the destructor of this interface is called.
64          *
65          * @since       2.0
66          */
67         virtual ~IPackageInstallationEventListener(void) {}
68
69         /**
70          * Called when a package installation is completed. @n
71          * The value of @c installationResult is @c PACKAGE_INSTALLATION_RESULT_SUCCESS if the installation is successful.
72          *
73          * @since       2.0
74          *
75          * @param[in]   packageId                               The package ID
76          * @param[in]   installationResult              The installation result
77          */
78         virtual void OnPackageInstallationCompleted(const PackageId& packageId, PackageInstallationResult installationResult) = 0;
79
80         /**
81          * Called when a package uninstallation is completed. @n
82          * The value of @c uninstallationResult is @c true if the uninstallation is successful, else @c false.
83          *
84          * @since       2.0
85          *
86          * @param[in]   packageId                       The package ID
87          * @param[in]   uninstallationResult            Set to @c true if the uninstallation is successful, @n
88          *                                                                                      else @c false
89          */
90         virtual void OnPackageUninstallationCompleted(const PackageId& packageId, bool uninstallationResult) = 0;
91
92         /**
93          * Called when a package installation is in progress.
94          *
95          * @since       2.0
96          *
97          * @param[in]   packageId                       The package ID
98          * @param[in]   progress                The progress of an installation in percentage
99          */
100         virtual void OnPackageInstallationInProgress(const PackageId& packageId, int progress) = 0;
101
102
103 protected:
104         //
105         // This method is for internal use only.
106         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
107         //
108         // This method is reserved and may change its name at any time without prior notice.
109         //
110         // @since       2.0
111         //
112         virtual void IPackageInstallationEventListener_Reserved1(void) {}
113
114         //
115         // This method is for internal use only.
116         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
117         //
118         // This method is reserved and may change its name at any time without prior notice.
119         //
120         // @since       2.0
121         //
122         virtual void IPackageInstallationEventListener_Reserved2(void) {}
123
124         //
125         // This method is for internal use only.
126         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
127         //
128         // This method is reserved and may change its name at any time without prior notice.
129         //
130         // @since       2.0
131         //
132         virtual void IPackageInstallationEventListener_Reserved3(void) {}
133
134 }; // IPackageInstallationEventListener
135
136 } } } // Tizen::App::Package
137
138 #endif // _FAPP_PKG_IPACKAGE_INSTALLATION_EVENT_LISTENER_H_