2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
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
8 // http://www.apache.org/licenses/LICENSE-2.0
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.
18 * @file FAppPkgIPackageInstallationEventListener.h
19 * @brief This is the header file for the %IPackageInstallationEventListener interface.
21 * This header file contains the declarations of the %IPackageInstallationEventListener interface.
24 #ifndef _FAPP_PKG_IPACKAGE_INSTALLATION_EVENT_LISTENER_H_
25 #define _FAPP_PKG_IPACKAGE_INSTALLATION_EVENT_LISTENER_H_
27 #include <FAppPkgPackageManager.h>
28 #include <FBaseRtIEventListener.h>
30 namespace Tizen { namespace App { namespace Package
33 * @enum PackageInstallationResult
35 * Defines the result of package installation.
39 enum PackageInstallationResult
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. */
47 * @interface IPackageInstallationEventListener
48 * @brief This interface defines a listener for a package installation and uninstallation.
52 * The %IPackageInstallationEventListener interface defines a listener for a package installation and uninstallation.
54 class _OSP_EXPORT_ IPackageInstallationEventListener
55 : virtual public Tizen::Base::Runtime::IEventListener
59 * This polymorphic destructor should be overridden if required.
60 * This way, the destructors of the derived classes are called when the destructor of this interface is called.
64 virtual ~IPackageInstallationEventListener(void) {}
67 * Called when a package installation is completed. @n
68 * The value of @c installationResult is @c PACKAGE_INSTALLATION_RESULT_SUCCESS if the installation is successful.
72 * @param[in] packageId The package ID
73 * @param[in] installationResult The installation result
75 virtual void OnPackageInstallationCompleted(const PackageId& packageId, PackageInstallationResult installationResult) = 0;
78 * Called when a package uninstallation is completed. @n
79 * The value of @c uninstallationResult is @c true if the uninstallation is successful, else @c false.
83 * @param[in] packageId The package ID
84 * @param[in] uninstallationResult Set to @c true if the uninstallation is successful, @n
87 virtual void OnPackageUninstallationCompleted(const PackageId& packageId, bool uninstallationResult) = 0;
90 * Called when a package installation is in progress.
94 * @param[in] packageId The package ID
95 * @param[in] progress The progress of an installation in percentage
97 virtual void OnPackageInstallationInProgress(const PackageId& packageId, int progress) = 0;
102 // This method is for internal use only.
103 // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
105 // This method is reserved and may change its name at any time without prior notice.
109 virtual void IPackageInstallationEventListener_Reserved1(void) {}
112 // This method is for internal use only.
113 // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
115 // This method is reserved and may change its name at any time without prior notice.
119 virtual void IPackageInstallationEventListener_Reserved2(void) {}
122 // This method is for internal use only.
123 // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
125 // This method is reserved and may change its name at any time without prior notice.
129 virtual void IPackageInstallationEventListener_Reserved3(void) {}
131 }; // IPackageInstallationEventListener
133 } } } // Tizen::App::Package
135 #endif // _FAPP_PKG_IPACKAGE_INSTALLATION_EVENT_LISTENER_H_