2 // Open Service Platform
3 // Copyright (c) 2012 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 FAppPkgIPackageInstallationEventListener.h
20 * @brief This is the header file for the %IPackageInstallationEventListener interface.
22 * This header file contains the declarations of the %IPackageInstallationEventListener interface.
25 #ifndef _FAPP_PKG_IPACKAGE_INSTALLATION_EVENT_LISTENER_H_
26 #define _FAPP_PKG_IPACKAGE_INSTALLATION_EVENT_LISTENER_H_
28 #include <FAppPkgPackageManager.h>
29 #include <FBaseRtIEventListener.h>
31 namespace Tizen { namespace App { namespace Package
34 * @enum PackageInstallationResult
36 * Defines the result of package installation.
40 enum PackageInstallationResult
42 PACKAGE_INSTALLATION_RESULT_SUCCESS = 0, /**< Success */
43 PACKAGE_INSTALLATION_RESULT_INVALID_PACKAGE, /**< An invalid package */
44 PACKAGE_INSTALLATION_RESULT_STORAGE_FULL, /**< The installation target storage is full. */
48 * @interface IPackageInstallationEventListener
49 * @brief This interface defines a listener for a package installation and uninstallation.
53 * The %IPackageInstallationEventListener interface defines a listener for a package installation and uninstallation.
55 class _OSP_EXPORT_ IPackageInstallationEventListener
56 : virtual public Tizen::Base::Runtime::IEventListener
60 * This polymorphic destructor should be overridden if required.
61 * This way, the destructors of the derived classes are called when the destructor of this interface is called.
65 virtual ~IPackageInstallationEventListener(void) {}
68 * Called when a package installation is completed. @n
69 * The value of @c installationResult is @c PACKAGE_INSTALLATION_RESULT_SUCCESS if the installation is successful.
73 * @param[in] packageId The package ID
74 * @param[in] installationResult The installation result
76 virtual void OnPackageInstallationCompleted(const PackageId& packageId, PackageInstallationResult installationResult) = 0;
79 * Called when a package uninstallation is completed. @n
80 * The value of @c uninstallationResult is @c true if the uninstallation is successful, else @c false.
84 * @param[in] packageId The package ID
85 * @param[in] uninstallationResult Set to @c true if the uninstallation is successful, @n
88 virtual void OnPackageUninstallationCompleted(const PackageId& packageId, bool uninstallationResult) = 0;
91 * Called when a package installation is in progress.
95 * @param[in] packageId The package ID
96 * @param[in] progress The progress of an installation in percentage
98 virtual void OnPackageInstallationInProgress(const PackageId& packageId, int progress) = 0;
103 // This method is for internal use only.
104 // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
106 // This method is reserved and may change its name at any time without prior notice.
110 virtual void IPackageInstallationEventListener_Reserved1(void) {}
113 // This method is for internal use only.
114 // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
116 // This method is reserved and may change its name at any time without prior notice.
120 virtual void IPackageInstallationEventListener_Reserved2(void) {}
123 // This method is for internal use only.
124 // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
126 // This method is reserved and may change its name at any time without prior notice.
130 virtual void IPackageInstallationEventListener_Reserved3(void) {}
132 }; // IPackageInstallationEventListener
134 } } } // Tizen::App::Package
136 #endif // _FAPP_PKG_IPACKAGE_INSTALLATION_EVENT_LISTENER_H_