sync with tizen_2.0
[platform/framework/native/appfw.git] / src / app / inc / FApp_IAppImpl.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        FApp_IAppImpl.h
20  * @brief       This is the header file for the _IAppImpl class.
21  *
22  * This file contains the declarations of _IAppImpl.
23  */
24
25 #ifndef _FAPP_INTERNAL_IAPP_IMPL_H_
26 #define _FAPP_INTERNAL_IAPP_IMPL_H_
27
28 #include <app.h>
29
30 namespace Tizen { namespace App
31 {
32
33 class _IAppImpl
34 {
35 public:
36         virtual ~_IAppImpl(void) {}
37
38         /**
39          * Called when the application is started
40          *
41          * @since 2.1
42          * @return      @c true if the method is successful, @n
43          *              else @c false
44          * @param[in]   user_data       The user data passed from the callback registration function
45          * @remarks     This is a system dependent callback function
46          */
47         virtual bool OnCreate(void) = 0;
48
49         /**
50          * Called when the application's state changes to INITIALIZING
51          *
52          * @since 2.1
53          * @return      @c true if the method is successful, @n
54          *                      else @c false
55          */
56         virtual bool OnAppInitializing(void) = 0;
57
58         /**
59          * Called when the application's INITIALIZING state is finished
60          *
61          * @since 2.1
62          * @return      @c true if the method is successful, @n
63          *                      else @c false
64          */
65         virtual bool OnAppInitialized(void) = 0;
66
67         /**
68          * Called when other application send the launch request to the application
69          *
70          * @since 2.1
71          * @param[in]   service The handle to the service
72          * @param[in]   initial initial launch
73          * @param[in]   user_data       The user data passed from the callback registration function
74          * @remarks     This is a system dependent callback function
75          */
76         virtual void OnService(service_s* service, bool initial) = 0;
77
78         /**
79          * Called when the application is completely obscured by another application and becomes invisible
80          *
81          * @since 2.1
82          * @param[in]   user_data       The user data passed from the callback registration function
83          * @remarks     This is a system dependent callback function
84          */
85         virtual void OnPause(void) = 0;
86
87         /**
88          * Called when the application becomes visible
89          *
90          * @since 2.1
91          * @param[in]   user_data       The user data passed from the callback registration function
92          * @remarks     This is a system dependent callback function
93          */
94         virtual void OnResume(void) = 0;
95
96         /**
97          * Called once after the main loop of application exits
98          *
99          * @since 2.1
100          * @param[in]   user_data       The user data passed from the callback registration function
101          * @remarks     This is a system dependent callback function
102          */
103         virtual void OnTerminate(void) = 0;
104
105         /**
106          * Called when an orintation event occurs.
107          *
108          * @since 2.1
109          * @param[in]   orientation     The information about the orientation event
110          */
111         virtual void OnDeviceOrientationChanged(app_device_orientation_e orientation) = 0;
112
113         /**
114          * Called when the internal window handle is required.
115          *
116          * @since 2.1
117          */
118         virtual long OnWindowHandleRequest(void) = 0;
119 };
120
121
122 } } // Tizen::App
123
124 #endif // _FAPP_INTERNAL_IAPP_IMPL_H_