2 Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
3 PROPRIETARY/CONFIDENTIAL
4 This software is the confidential and proprietary information of
5 SAMSUNG ELECTRONICS ("Confidential Information"). You agree and acknowledge that
6 this software is owned by Samsung and you
7 shall not disclose such Confidential Information and shall
8 use it only in accordance with the terms of the license agreement
9 you entered into with SAMSUNG ELECTRONICS. SAMSUNG make no
10 representations or warranties about the suitability
11 of the software, either express or implied, including but not
12 limited to the implied warranties of merchantability, fitness for
13 a particular purpose, or non-infringement.
14 SAMSUNG shall not be liable for any damages suffered by licensee arising out of or
15 related to this software.
23 /* ecore-glib integration */
29 /* call real create callback*/
34 /* call real resume callback*/
36 printf("=================================\n");
37 printf("resumed - %d\n", times++);
38 printf("=================================\n");
41 static Eina_Bool send_result(void *data)
47 aul_create_result_bundle(kb, &res_b);
51 aul_send_service_result(res_b);
59 static void prt_bundle(const char *key, const char *value, void *d)
61 printf("bundle - key: %s, value: %s\n", key, value);
64 int do_start(void *data)
73 printf("=================================\n");
74 printf("start callback with glib - %d\n", times++);
75 printf("=================================\n");
77 tmp = bundle_get_val(kb, AUL_K_STARTTIME);
79 sscanf(tmp, "%ld/%ld", &tv.tv_sec, &tv.tv_usec);
80 gettimeofday(&cur, NULL);
81 timersub(&cur, &tv, &res);
82 printf("=================================\n");
83 printf("launched time = %ld sec %ld msec\n", res.tv_sec,
85 printf("=================================\n");
87 bundle_del(kb, AUL_K_STARTTIME);
89 bundle_iterate(kb, prt_bundle, NULL);
91 ecore_timer_add(5, send_result, bundle_dup(kb));
96 static int aul_handler(aul_type type, bundle *kb, void *data)
116 int app_dead_handler(int pid, void *data)
118 printf("===> %s : %d\n", __FUNCTION__, pid);
122 __attribute__ ((visibility("default")))
123 int main(int argc, char **argv)
129 if (aul_launch_init(aul_handler, NULL) < 0)
130 printf("error aul_init\n");
131 if (aul_launch_argv_handler(argc, argv) < 0)
132 printf("error argv\n");
134 aul_listen_app_dead_signal(app_dead_handler, NULL);
137 printf("child test\n");
141 ecore_main_loop_begin();
145 /* vi: set ts=8 sts=8 sw=8: */
149 /* vi: set ts=8 sts=8 sw=8: */