sync with tizen_2.0
[platform/framework/native/appfw.git] / inc / FAppPkgIPackageInstallationResponseListener.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
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
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0
10 //
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.
16 //
17
18 /**
19  * @if VISPARTNER-OPERATOR
20  * @file        FAppPkgIPackageInstallationResponseListener.h
21  * @brief       This is the header file for the %IPackageInstallationResponseListener interface.
22  *
23  * This header file contains the declarations of the %IPackageInstallationResponseListener interface.
24  *
25  * @endif
26  */
27 #ifndef _FAPP_PKG_IPACKAGE_INSTALLATION_RESPONSE_LISTENER_H_
28 #define _FAPP_PKG_IPACKAGE_INSTALLATION_RESPONSE_LISTENER_H_
29
30 #include <FAppPkgPackageManager.h>
31 #include <FAppPkgIPackageInstallationEventListener.h>
32 #include <FBaseRtIEventListener.h>
33
34 namespace Tizen { namespace App { namespace Package
35 {
36
37 /**
38  * @if VISPARTNER-OPERATOR
39  * @interface   IPackageInstallationResponseListener
40  * @brief               This interface defines a listener for the asynchronous package installation operation.
41  *
42  * @since       2.0
43  * @visibility  partner-operator
44  *
45  * The %IPackageInstallationResponseListener interface defines a listener for the asynchronous package installation operation.
46  *
47  * @endif
48  */
49 class _OSP_EXPORT_ IPackageInstallationResponseListener
50         : virtual public Tizen::Base::Runtime::IEventListener
51 {
52 public:
53         /**
54      * @if VISPARTNER-OPERATOR
55      * This polymorphic destructor should be overridden if required.
56      * This way, the destructors of the derived classes are called when the destructor of this interface is called.
57      *
58      * @since   2.0
59      * @visibility  partner-operator\r
60      *\r
61      * @endif
62      */
63         virtual ~IPackageInstallationResponseListener(void) {}
64
65         /**
66      * @if VISPARTNER-OPERATOR
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.
69      *
70      * @since   2.0
71      * @visibility  partner-operator
72      *
73      * @param[in]       packageId                       The package ID
74      * @param[in]       installationResult              The installation result
75      *\r
76      * @endif
77      */
78         virtual void OnPackageInstallationResponseReceived(const PackageId& packageId, PackageInstallationResult installationResult) = 0;
79
80         /**
81      * @if VISPARTNER-OPERATOR
82      * Called when a package installation is in progress.
83      *
84      * @since   2.0
85      * @visibility  partner-operator
86      *
87      * @param[in]       packageId                       The package ID
88      * @param[in]       progress                The progress of an installation in percentage
89      *\r
90      * @endif
91      */
92         virtual void OnPackageInstallationInProgressResponseReceived(const PackageId& packageId, int progress) = 0;
93
94
95 protected:
96         //
97         // This method is for internal use only.
98         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
99         //
100         // The following methods are reserved and the name of the methods can be changed at any time without prior notice.
101         //
102         // @since       2.0
103         //
104         virtual void IPackageInstallationResponseListener_Reserved1(void) {}
105
106         //
107         // This method is for internal use only.
108         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
109         //
110         // The following methods are reserved and the name of the methods can be changed at any time without prior notice.
111         //
112         // @since       2.0
113         //
114         virtual void IPackageInstallationResponseListener_Reserved2(void) {}
115
116         //
117         // This method is for internal use only.
118         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
119         //
120         // The following methods are reserved and the name of the methods can be changed at any time without prior notice.
121         //
122         // @since       2.0
123         //
124         virtual void IPackageInstallationResponseListener_Reserved3(void) {}
125
126 }; // IPackageInstallationResponseListener
127
128 } } } // Tizen::App::Package
129
130 #endif // _FAPP_PKG_IPACKAGE_INSTALLATION_RESPONSE_LISTENER_H_