7288d006ad2d86deb22e40e129957b1acd55cfa0
[platform/framework/native/appfw.git] / inc / FAppPkgIPackageInstallationResponseListener.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        FAppPkgIPackageInstallationResponseListener.h
19  * @brief       This is the header file for the %IPackageInstallationResponseListener interface.
20  *
21  * This header file contains the declarations of the %IPackageInstallationResponseListener interface.
22  *
23  */
24 #ifndef _FAPP_PKG_IPACKAGE_INSTALLATION_RESPONSE_LISTENER_H_
25 #define _FAPP_PKG_IPACKAGE_INSTALLATION_RESPONSE_LISTENER_H_
26
27 #include <FAppPkgPackageManager.h>
28 #include <FAppPkgIPackageInstallationEventListener.h>
29 #include <FBaseRtIEventListener.h>
30
31 namespace Tizen { namespace App { namespace Package
32 {
33
34 /**
35  * @interface   IPackageInstallationResponseListener
36  * @brief               This interface defines a listener for the asynchronous package installation operation.
37  *
38  * @since       2.0
39  *
40  * The %IPackageInstallationResponseListener interface defines a listener for the asynchronous package installation operation.
41  *
42  */
43 class _OSP_EXPORT_ IPackageInstallationResponseListener
44         : virtual public Tizen::Base::Runtime::IEventListener
45 {
46 public:
47         /**
48      * This polymorphic destructor should be overridden if required.
49      * This way, the destructors of the derived classes are called when the destructor of this interface is called.
50      *
51      * @since   2.0
52      *
53      */
54         virtual ~IPackageInstallationResponseListener(void) {}
55
56         /**
57      * Called when a package installation is completed. @n
58          * The value of @c installationResult is @c PACKAGE_INSTALLATION_RESULT_SUCCESS if the installation is successful.
59      *
60      * @since   2.0
61      *
62      * @param[in]       packageId                       The package ID
63      * @param[in]       installationResult              The installation result
64      *
65      */
66         virtual void OnPackageInstallationResponseReceived(const PackageId& packageId, PackageInstallationResult installationResult) = 0;
67
68         /**
69      * Called when a package installation is in progress.
70      *
71      * @since   2.0
72      *
73      * @param[in]       packageId                       The package ID
74      * @param[in]       progress                The progress of an installation in percentage
75      *
76      */
77         virtual void OnPackageInstallationInProgressResponseReceived(const PackageId& packageId, int progress) = 0;
78
79
80 protected:
81         //
82         // This method is for internal use only.
83         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
84         //
85         // This method is reserved and may change its name at any time without prior notice.
86         //
87         // @since       2.0
88         //
89         virtual void IPackageInstallationResponseListener_Reserved1(void) {}
90
91         //
92         // This method is for internal use only.
93         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
94         //
95         // This method is reserved and may change its name at any time without prior notice.
96         //
97         // @since       2.0
98         //
99         virtual void IPackageInstallationResponseListener_Reserved2(void) {}
100
101         //
102         // This method is for internal use only.
103         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
104         //
105         // This method is reserved and may change its name at any time without prior notice.
106         //
107         // @since       2.0
108         //
109         virtual void IPackageInstallationResponseListener_Reserved3(void) {}
110
111 }; // IPackageInstallationResponseListener
112
113 } } } // Tizen::App::Package
114
115 #endif // _FAPP_PKG_IPACKAGE_INSTALLATION_RESPONSE_LISTENER_H_