Change indentation from tab to spaces
[platform/core/uifw/capi-ui-sticker.git] / receiver / src / main.cpp
1 #include "main.h"
2 #include "ft.h"
3 #include "log.h"
4 #include <app_common.h>
5 #include <service_app.h>
6
7 static bool app_create(void *data)
8 {
9     /* Hook to take necessary actions before main event loop starts
10        Initialize UI resources and application's data
11        If this function returns true, the main loop of application starts
12        If this function returns false, the application is terminated */
13
14     initialize_sap();
15
16     return true;
17 }
18
19 static void app_control(app_control_h app_control, void *data)
20 {
21     /* Handle the launch request. */
22 }
23
24 static void app_terminate(void *data)
25 {
26     /* Release all resources. */
27     deinitialize_sap();
28 }
29
30 int main(int argc, char *argv[])
31 {
32     int ret = 0;
33
34     service_app_lifecycle_callback_s event_callback;
35     memset(&event_callback, 0x0, sizeof(service_app_lifecycle_callback_s));
36
37     event_callback.create = (service_app_create_cb)app_create;
38     event_callback.terminate = (service_app_terminate_cb)app_terminate;
39     event_callback.app_control = (service_app_control_cb)app_control;
40
41     ret = service_app_main(argc, argv, &event_callback, NULL);
42     if (ret != APP_ERROR_NONE) {
43         LOGE("app_main() is failed. err = %d", ret);
44     }
45     return ret;
46 }