sync with tizen_2.0
[platform/framework/native/appfw.git] / inc / FAppIAppCheckPointEventListener.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  * @file                        FAppIAppCheckPointEventListener.h
20  * @brief                       This is the header file for the %IAppCheckpointEventListener interface.
21  *
22  * This header file contains the declarations of the %IAppCheckpointEventListener interface. @n
23  * If a checkpoint event is generated, a method of this interface is called.
24  */
25
26 #ifndef _FAPP_IAPP_CHECK_POINT_EVENT_LISTENER_H_
27 #define _FAPP_IAPP_CHECK_POINT_EVENT_LISTENER_H_
28
29 #include <FBaseRtIEventListener.h>
30
31 namespace Tizen { namespace App
32 {
33
34 class AppRegistry;
35
36 /**
37  * @interface IAppCheckpointEventListener
38  * @brief       This interface defines the listener for the checkpoint event.
39  *
40  * @since       2.0
41  *
42  * The %IAppCheckpointEventListener interface is used for receiving the checkpoint event.
43  * The event is fired when the system is about to terminate an application due to, for example, low memory or when another application
44  *  is being launched.
45  * @n
46  * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/basics_tizen_programming/tizen_app_model/multitasking_in_tizen.htm">Multitasking in Tizen</a>.
47  *
48  */
49 class _OSP_EXPORT_ IAppCheckpointEventListener
50         : virtual public Tizen::Base::Runtime::IEventListener
51 {
52 public:
53         /**
54          * This polymorphic destructor should be overridden if required.
55          * This way, the destructors of the derived classes are called when the destructor of this interface is called.
56          *
57          * @since       2.0
58          */
59         virtual ~IAppCheckpointEventListener(void) {}
60
61         /**
62          * Called when a checkpoint event occurs.
63          *
64          * @since                       2.0
65          * @param[in]   appRegistry      The application registry
66          */
67         virtual void OnAppCheckpointing(AppRegistry& appRegistry) = 0;
68
69 protected:
70         //
71         // This method is for internal use only.
72         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
73         //
74         // @since           2.0
75         //
76         virtual void IAppCheckpointEventListener_Reserved1(void) {}
77
78         //
79         // This method is for internal use only.
80         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
81         //
82         // @since           2.0
83         //
84         virtual void IAppCheckpointEventListener_Reserved2(void) {}
85
86         //
87         // This method is for internal use only.
88         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
89         //
90         // @since           2.0
91         //
92         virtual void IAppCheckpointEventListener_Reserved3(void) {}
93
94 }; // IAppCheckpointEventListener
95
96 } } // Tizen::App
97
98 #endif  //_FAPP_IAPP_CHECK_POINT_EVENT_LISTENER_H_