2 #include <notification.h>
5 static void __noti_changed_cb(void *data, notification_type_e type)
7 notification_h noti = NULL;
8 notification_list_h notification_list = NULL;
9 notification_list_h get_list = NULL;
10 int count = 0, group_id = 0, priv_id = 0, show_noti = 0, num = 1;
13 char *str_count = NULL;
17 notification_get_list(NOTIFICATION_TYPE_NOTI, -1, ¬ification_list);
18 if (notification_list) {
19 get_list = notification_list_get_head(notification_list);
20 noti = notification_list_get_data(get_list);
21 while(get_list != NULL) {
22 notification_get_id(noti, &group_id, &priv_id);
23 notification_get_pkgname(noti, &pkgname);
25 notification_get_application(noti, &pkgname);
28 notification_get_text(noti, NOTIFICATION_TEXT_TYPE_EVENT_COUNT, &str_count);
32 count = atoi(str_count);
34 notification_get_title(noti, &title, NULL);
36 fprintf(stdout, "NOTIFICATION: %s - %s - %i - %i\n", pkgname, title, count, num);
38 get_list = notification_list_get_next(get_list);
39 noti = notification_list_get_data(get_list);
43 if (notification_list != NULL) {
44 notification_free_list(notification_list);
45 notification_list = NULL;
50 main(int argc, char **argv)
53 fprintf(stderr, "ERROR: Cannot init Ecore!\n");
57 notification_resister_changed_cb(__noti_changed_cb, NULL);
58 ecore_main_loop_begin();