52f6069359e87aeea1321b2c0e3cd98c47bb9fe7
[platform/framework/native/appwidget-service.git] / inc / OspAppWidgetService.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Flora License, Version 1.1 (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://floralicense.org/license/
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        OspAppWidgetService.h
20  * @brief       This is the header file for the OspAppWidgetService class.
21  *
22  * This header file contains the declarations of the OspAppWidgetService class.
23  */
24
25 #ifndef _OSP_APPWIDGET_SERVICE_H_
26 #define _OSP_APPWIDGET_SERVICE_H_
27
28 #include <FApp.h>
29 #include <FBase.h>
30 #include <FSystem.h>
31
32 /**
33  * [OspAppWidgetService] ServiceApp must inherit from ServiceApp class
34  * which provides basic features necessary to define an ServiceApp.
35  */
36 class OspAppWidgetService
37         : public Tizen::App::ServiceApp
38 {
39 public:
40
41         /**
42          * [OspAppWidgetService] ServiceApp must have a factory method that creates an instance of itself.
43          */
44         static Tizen::App::ServiceApp* CreateInstance(void);
45
46 public:
47
48         OspAppWidgetService();
49         ~OspAppWidgetService();
50
51 public:
52
53         // Called when the ServiceApp is initializing.
54         bool OnAppInitializing(Tizen::App::AppRegistry& appRegistry);
55
56         // Called when the ServiceApp initializing is finished.
57         bool OnAppInitialized(void); 
58
59         // Called when the ServiceApp is requested to terminate.
60         bool OnAppWillTerminate(void);
61
62         // Called when the ServiceApp is terminating.
63         bool OnAppTerminating(Tizen::App::AppRegistry& appRegistry, bool forcedTermination = false);
64
65         // Called when the system memory is not sufficient to run the ServiceApp any further.
66         void OnLowMemory(void);
67
68         // Called when the battery level changes.
69         void OnBatteryLevelChanged(Tizen::System::BatteryLevel batteryLevel);
70
71 };
72
73 #endif // _$(baseName_upper)_H_