merge from master
[platform/framework/native/appwidget-service.git] / inc / OspAppWidgetService.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 // All rights reserved.
5 //
6 // This software contains confidential and proprietary information
7 // of Samsung Electronics Co., Ltd.
8 // The user of this software agrees not to disclose, disseminate or copy such
9 // Confidential Information and shall use the software only in accordance with
10 // the terms of the license agreement the user entered into with Samsung.
11 //
12
13 /**
14  * @file        OspAppWidgetService.h
15  * @brief       This is the header file for the OspAppWidgetService class.
16  *
17  * This header file contains the declarations of the OspAppWidgetService class.
18  */
19
20 #ifndef _OSP_APPWIDGET_SERVICE_H_
21 #define _OSP_APPWIDGET_SERVICE_H_
22
23 #include <FApp.h>
24 #include <FBase.h>
25 #include <FSystem.h>
26
27 /**
28  * [OspAppWidgetService] ServiceApp must inherit from ServiceApp class
29  * which provides basic features necessary to define an ServiceApp.
30  */
31 class OspAppWidgetService
32         : public Tizen::App::ServiceApp
33 {
34 public:
35
36         /**
37          * [OspAppWidgetService] ServiceApp must have a factory method that creates an instance of itself.
38          */
39         static Tizen::App::ServiceApp* CreateInstance(void);
40
41 public:
42
43         OspAppWidgetService();
44         ~OspAppWidgetService();
45
46 public:
47
48         // Called when the ServiceApp is initializing.
49         bool OnAppInitializing(Tizen::App::AppRegistry& appRegistry);
50
51         // Called when the ServiceApp initializing is finished.
52         bool OnAppInitialized(void); 
53
54         // Called when the ServiceApp is requested to terminate.
55         bool OnAppWillTerminate(void);
56
57         // Called when the ServiceApp is terminating.
58         bool OnAppTerminating(Tizen::App::AppRegistry& appRegistry, bool forcedTermination = false);
59
60         // Called when the system memory is not sufficient to run the ServiceApp any further.
61         void OnLowMemory(void);
62
63         // Called when the battery level changes.
64         void OnBatteryLevelChanged(Tizen::System::BatteryLevel batteryLevel);
65
66 };
67
68 #endif // _$(baseName_upper)_H_