sync with tizen_2.0
[platform/framework/native/appfw.git] / inc / FSysIScreenEventListener.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        FSysIScreenEventListener.h
20  * @brief       This is the header file of the %IScreenEventListener interface.
21  *
22  * This header file contains the declarations of the %IScreenEventListener interface.
23  */
24
25 #ifndef _FSYS_ISCREEN_EVENT_LISTENER_H_
26 #define _FSYS_ISCREEN_EVENT_LISTENER_H_
27
28 #include <FBaseResult.h>
29 #include <FBaseRtIEventListener.h>
30
31 namespace Tizen { namespace System
32 {
33
34 /**
35  * @interface   IScreenEventListener
36  * @brief       This interface is the listener of the screen event.
37  *
38  * @since       2.0
39  *
40  * The %IScreenEventListener interface must be registered and implemented by an application to receive screen events from the system.
41  *
42  */
43 class _OSP_EXPORT_ IScreenEventListener
44         : public virtual Tizen::Base::Runtime::IEventListener
45 {
46 public:
47         /**
48          * Called when the screen turns on. @n
49          * Gets the released resources or resumes the operations that were paused or stopped in OnScreenOff().
50          *
51          * @since 2.0
52          */
53         virtual void OnScreenOn(void) = 0;
54
55         /**
56          * Called when the screen turns off. @n
57          * Unless there is a strong reason to do otherwise, release resources (such as 3D, media, and sensors) to allow the device to enter the sleep mode to save the battery.
58          *Invoking a lengthy asynchronous method within this listener method can be risky, because it is not guaranteed to invoke a callback before the device enters the sleep mode.
59          *Similarly, do not perform lengthy operations in this listener method. All operations must be quick ones.
60          *
61         *@since 2.0
62          */
63         virtual void OnScreenOff(void) = 0;
64
65 protected:
66         //
67         // This method is for internal use only.
68         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
69         //
70         // @since 2.0
71         virtual void OnIScreenEventListener_Reserved1(void) {}
72
73         //
74         // This method is for internal use only.
75         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
76         //
77         // @since 2.0
78         virtual void OnIScreenEventListener_Reserved2(void) {}
79
80         //
81         // This method is for internal use only.
82         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
83         //
84         // @since 2.0
85         virtual void OnIScreenEventListener_Reserved3(void) {}
86
87 }; // IScreenEventListener
88
89 } } // Tizen::System
90
91 #endif // _FSYS_ISCREEN_EVENT_LISTENER_H_