diff options
author | Kazumasa Mitsunari <kazumasa_mitsunari_za@mail.toyota.co.jp> | 2016-07-22 10:32:11 +0900 |
---|---|---|
committer | Kazumasa Mitsunari <kazumasa_mitsunari_za@mail.toyota.co.jp> | 2016-07-22 11:01:55 +0900 |
commit | 6fc9f9f085ab68f89ba6b22465fbdfc5411d41ba (patch) | |
tree | 40ee5391beebd06518c674c9ef1858c65026ceb4 /meta-application-manager/recipes-examples/amhelloworld/files/amhelloworld.c | |
parent | 9cf56692db97b90e0fcb795f761430438bd0ad29 (diff) |
First version of ported tizen application manager
Change-Id: I46735869fe8113be58348d575e01734e498d2de2
Signed-off-by: Kazumasa Mitsunari <kazumasa_mitsunari_za@mail.toyota.co.jp>
Diffstat (limited to 'meta-application-manager/recipes-examples/amhelloworld/files/amhelloworld.c')
-rw-r--r-- | meta-application-manager/recipes-examples/amhelloworld/files/amhelloworld.c | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/meta-application-manager/recipes-examples/amhelloworld/files/amhelloworld.c b/meta-application-manager/recipes-examples/amhelloworld/files/amhelloworld.c new file mode 100644 index 0000000..d473c37 --- /dev/null +++ b/meta-application-manager/recipes-examples/amhelloworld/files/amhelloworld.c @@ -0,0 +1,55 @@ +// taken from https://wiki.tizen.org/wiki/IVI/Tizen-Core-development-EFL + +#include <stdio.h> + +#include <appcore-efl.h> +#include "amhelloworld.h" + + +static int app_create(void *data) { + // appcore measure time example + printf("from AUL to %s(): %d msec\n", __func__,appcore_measure_time_from("APP_START_TIME")); + + appcore_measure_start(); + return 0; +} + +static int app_terminate(void *data) { // terminate callback + printf("from AUL to %s(): %d msec\n", __func__,appcore_measure_time_from("APP_START_TIME")); + + return 0; +} + +static int app_pause(void *data) { // pause callback + printf("from AUL to %s(): %d msec\n", __func__,appcore_measure_time_from("APP_START_TIME")); + return 0; +} + +static int app_resume(void *data) { // resume callback + printf("from AUL to %s(): %d msec\n", __func__,appcore_measure_time_from("APP_START_TIME")); + return 0; +} + +static int app_reset(bundle *b, void *data) { // reset callback + // appcore measure time example + printf("from AUL to %s(): %d msec\n", __func__,appcore_measure_time_from("APP_START_TIME")); + printf("from create to %s(): %d msec\n", __func__,appcore_measure_time()); + + return 0; +} + +int main(int argc, char *argv[]) { + struct appcore_ops ops = { // fill the appcore_ops with callback functions + .create = app_create, + .terminate = app_terminate, + .pause = app_pause, + .resume = app_resume, + .reset = app_reset, + }; + + // appcore measure time example + printf("from AUL to %s(): %d msec\n", __func__,appcore_measure_time_from("APP_START_TIME")); + + return appcore_efl_main(PACKAGE, &argc, &argv, &ops); // start mainloop +} + |