Revise Tizen::Io doxygen
[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 that is notified about events related to the installation of a target package.
41  * The events include the installation result and the installation progress information.
42  * Generally, applications such as the Tizen Store use this listener in a package installation step.
43  * @see PackageManager::InstallPackage()
44  */
45 class _OSP_EXPORT_ IPackageInstallationResponseListener
46         : virtual public Tizen::Base::Runtime::IEventListener
47 {
48 public:
49         /**
50         * This polymorphic destructor should be overridden if required. @n
51         * This way, the destructors of the derived classes are called when the destructor of this interface is called.
52         *
53         * @since        2.0
54         *
55         */
56         virtual ~IPackageInstallationResponseListener(void) {}
57
58         /**
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.
61         *
62         * @since        2.0
63         *
64         * @param[in]    packageId                               The package ID
65         * @param[in]    installationResult              The installation result
66         *
67         */
68         virtual void OnPackageInstallationResponseReceived(const PackageId& packageId, PackageInstallationResult installationResult) = 0;
69
70         /**
71         * Called when a package installation is in progress.
72         *
73         * @since        2.0
74         *
75         * @param[in]    packageId                       The package ID
76         * @param[in]    progress                        The progress of the installation in percentage
77         *
78         */
79         virtual void OnPackageInstallationInProgressResponseReceived(const PackageId& packageId, int progress) = 0;
80
81
82 protected:
83         //
84         // This method is for internal use only.
85         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
86         //
87         // This method is reserved and may change its name at any time without prior notice.
88         //
89         // @since       2.0
90         //
91         virtual void IPackageInstallationResponseListener_Reserved1(void) {}
92
93         //
94         // This method is for internal use only.
95         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
96         //
97         // This method is reserved and may change its name at any time without prior notice.
98         //
99         // @since       2.0
100         //
101         virtual void IPackageInstallationResponseListener_Reserved2(void) {}
102
103         //
104         // This method is for internal use only.
105         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
106         //
107         // This method is reserved and may change its name at any time without prior notice.
108         //
109         // @since       2.0
110         //
111         virtual void IPackageInstallationResponseListener_Reserved3(void) {}
112
113 }; // IPackageInstallationResponseListener
114
115 } } } // Tizen::App::Package
116
117 #endif // _FAPP_PKG_IPACKAGE_INSTALLATION_RESPONSE_LISTENER_H_