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;
18 notification_get_list(NOTIFICATION_TYPE_NOTI, -1, ¬ification_list);
19 if (notification_list) {
20 get_list = notification_list_get_head(notification_list);
21 noti = notification_list_get_data(get_list);
22 while(get_list != NULL) {
23 notification_get_id(noti, &group_id, &priv_id);
24 notification_get_pkgname(noti, &pkgname);
26 notification_get_application(noti, &pkgname);
29 notification_get_text(noti, NOTIFICATION_TEXT_TYPE_EVENT_COUNT, &str_count);
33 count = atoi(str_count);
35 notification_get_title(noti, &title, NULL);
36 notification_get_text(noti, NOTIFICATION_TEXT_TYPE_CONTENT, &content);
39 fprintf(stdout, "NOTIFICATION: %s - %s - %s - %i - %i\n", pkgname, title, content, count, num);
41 get_list = notification_list_get_next(get_list);
42 noti = notification_list_get_data(get_list);
46 if (notification_list != NULL) {
47 notification_free_list(notification_list);
48 notification_list = NULL;
53 main(int argc, char **argv)
56 fprintf(stderr, "ERROR: Cannot init Ecore!\n");
60 notification_resister_changed_cb(__noti_changed_cb, NULL);
61 ecore_main_loop_begin();