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 FAppPkgIPackageInstallationResponseListener.h
19 * @brief This is the header file for the %IPackageInstallationResponseListener interface.
21 * This header file contains the declarations of the %IPackageInstallationResponseListener interface.
24 #ifndef _FAPP_PKG_IPACKAGE_INSTALLATION_RESPONSE_LISTENER_H_
25 #define _FAPP_PKG_IPACKAGE_INSTALLATION_RESPONSE_LISTENER_H_
27 #include <FAppPkgPackageManager.h>
28 #include <FAppPkgIPackageInstallationEventListener.h>
29 #include <FBaseRtIEventListener.h>
31 namespace Tizen { namespace App { namespace Package
35 * @interface IPackageInstallationResponseListener
36 * @brief This interface defines a listener for the asynchronous package installation operation.
40 * The %IPackageInstallationResponseListener interface defines a listener that is notified for events related to installation of a target package.
41 * The events include installation result and installation progress information.
42 * Generally, applications such as %Tizen Store use this listener in a package installation step.
43 * @see PackageManager::InstallPackage()
45 class _OSP_EXPORT_ IPackageInstallationResponseListener
46 : virtual public Tizen::Base::Runtime::IEventListener
50 * This polymorphic destructor should be overridden if required.
51 * This way, the destructors of the derived classes are called when the destructor of this interface is called.
56 virtual ~IPackageInstallationResponseListener(void) {}
59 * Called when a package installation is completed. @n
60 * The value of @c installationResult is @c PACKAGE_INSTALLATION_RESULT_SUCCESS if the installation is successful.
64 * @param[in] packageId The package ID
65 * @param[in] installationResult The installation result
68 virtual void OnPackageInstallationResponseReceived(const PackageId& packageId, PackageInstallationResult installationResult) = 0;
71 * Called when a package installation is in progress.
75 * @param[in] packageId The package ID
76 * @param[in] progress The progress of an installation in percentage
79 virtual void OnPackageInstallationInProgressResponseReceived(const PackageId& packageId, int progress) = 0;
84 // This method is for internal use only.
85 // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
87 // This method is reserved and may change its name at any time without prior notice.
91 virtual void IPackageInstallationResponseListener_Reserved1(void) {}
94 // This method is for internal use only.
95 // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
97 // This method is reserved and may change its name at any time without prior notice.
101 virtual void IPackageInstallationResponseListener_Reserved2(void) {}
104 // This method is for internal use only.
105 // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
107 // This method is reserved and may change its name at any time without prior notice.
111 virtual void IPackageInstallationResponseListener_Reserved3(void) {}
113 }; // IPackageInstallationResponseListener
115 } } } // Tizen::App::Package
117 #endif // _FAPP_PKG_IPACKAGE_INSTALLATION_RESPONSE_LISTENER_H_