Enlightenment CVS committal Author : englebass Project : e17 Module : libs/e_dbus
Dir : e17/libs/e_dbus/src/lib/notification Modified Files: E_Notification_Daemon.h E_Notify.h client.c daemon.c notification.c Log Message: EAPI =================================================================== RCS file: /cvs/e/e17/libs/e_dbus/src/lib/notification/E_Notification_Daemon.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- E_Notification_Daemon.h 29 Oct 2007 02:20:48 -0000 1.1 +++ E_Notification_Daemon.h 4 Nov 2007 07:51:37 -0000 1.2 @@ -35,26 +35,29 @@ }; /* daemon */ -E_Notification_Daemon *e_notification_daemon_add(const char *name, const char *vendor); -void e_notification_daemon_free(E_Notification_Daemon *d); +EAPI E_Notification_Daemon *e_notification_daemon_add(const char *name, const char *vendor); +EAPI void e_notification_daemon_free(E_Notification_Daemon *d); +/* TODO void e_notification_daemon_close(E_Notification_Daemon *d, E_Notification *n, unsigned int reason); void e_notification_daemon_action_invoke(E_Notification_Daemon *d, E_Notification *n, const char *action_id); +*/ -void e_notification_daemon_data_set(E_Notification_Daemon *daemon, void *data); -void *e_notification_daemon_data_get(E_Notification_Daemon *daemon); +EAPI void e_notification_daemon_data_set(E_Notification_Daemon *daemon, void *data); +EAPI void *e_notification_daemon_data_get(E_Notification_Daemon *daemon); -void e_notification_daemon_callback_notify_set(E_Notification_Daemon *daemon, E_Notification_Daemon_Callback_Notify func); -void e_notification_daemon_callback_close_notification_set(E_Notification_Daemon *daemon, E_Notification_Daemon_Callback_Close_Notification func); +EAPI void e_notification_daemon_callback_notify_set(E_Notification_Daemon *daemon, E_Notification_Daemon_Callback_Notify func); +EAPI void e_notification_daemon_callback_close_notification_set(E_Notification_Daemon *daemon, E_Notification_Daemon_Callback_Close_Notification func); - -void e_notification_daemon_signal_notification_closed(E_Notification_Daemon *daemon, unsigned int id, E_Notification_Closed_Reason reason); -void e_notification_daemon_signal_action_invoked(E_Notification_Daemon *daemon, unsigned int notification_id, const char *action_id); +EAPI void e_notification_daemon_signal_notification_closed(E_Notification_Daemon *daemon, unsigned int id, E_Notification_Closed_Reason reason); +EAPI void e_notification_daemon_signal_action_invoked(E_Notification_Daemon *daemon, unsigned int notification_id, const char *action_id); /***** gui *****/ +/* TODO E_Notification_View *e_notification_view_add(E_Notification_Daemon *d, E_Notification *n); void e_notification_view_close(E_Notification_View *nv); Evas_Object * e_notification_view_icon_get(Evas *evas, E_Notification *n); +*/ #endif =================================================================== RCS file: /cvs/e/e17/libs/e_dbus/src/lib/notification/E_Notify.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- E_Notify.h 29 Oct 2007 02:20:48 -0000 1.1 +++ E_Notify.h 4 Nov 2007 07:51:37 -0000 1.2 @@ -85,81 +85,74 @@ char *action_id; }; -/* client events */ -extern int E_NOTIFICATION_EVENT_CLOSED; -extern int E_NOTIFICATION_EVENT_ACTION_INVOKED; - - -int e_notification_init(); -int e_notification_shutdown(); +EAPI int e_notification_init(); +EAPI int e_notification_shutdown(); /* client */ -void e_notification_send(E_Notification *n, E_DBus_Callback_Func func, void *data); -void e_notification_get_capabilities(E_DBus_Callback_Func func, void *data); -void e_notification_get_server_information(E_DBus_Callback_Func func, void *data); +EAPI void e_notification_send(E_Notification *n, E_DBus_Callback_Func func, void *data); +EAPI void e_notification_get_capabilities(E_DBus_Callback_Func func, void *data); +EAPI void e_notification_get_server_information(E_DBus_Callback_Func func, void *data); /* Notifications */ -E_Notification *e_notification_new(); -void e_notification_ref(E_Notification *n); -void e_notification_unref(E_Notification *n); -void e_notification_free(E_Notification *n); - -E_Notification *e_notification_full_new(const char *app_name, - unsigned int replaces_id, - const char *app_icon, - const char *summary, - const char *body, - int expire_timeout); +EAPI E_Notification *e_notification_new(); +EAPI void e_notification_ref(E_Notification *n); +EAPI void e_notification_unref(E_Notification *n); +EAPI void e_notification_free(E_Notification *n); + +EAPI E_Notification *e_notification_full_new(const char *app_name, + unsigned int replaces_id, + const char *app_icon, + const char *summary, + const char *body, + int expire_timeout); /* notification mutators */ -void e_notification_id_set(E_Notification *note, unsigned int id); -void e_notification_app_name_set(E_Notification *n, const char *app_name); -void e_notification_app_icon_set(E_Notification *n, const char *app_icon); -void e_notification_summary_set(E_Notification *n, const char *summary); -void e_notification_body_set(E_Notification *n, const char *body); -void e_notification_replaces_id_set(E_Notification *n, int replaces_id); -void e_notification_timeout_set(E_Notification *n, int timeout); -void e_notification_closed_set(E_Notification *note, unsigned char closed); +EAPI void e_notification_id_set(E_Notification *note, unsigned int id); +EAPI void e_notification_app_name_set(E_Notification *n, const char *app_name); +EAPI void e_notification_app_icon_set(E_Notification *n, const char *app_icon); +EAPI void e_notification_summary_set(E_Notification *n, const char *summary); +EAPI void e_notification_body_set(E_Notification *n, const char *body); +EAPI void e_notification_replaces_id_set(E_Notification *n, int replaces_id); +EAPI void e_notification_timeout_set(E_Notification *n, int timeout); +EAPI void e_notification_closed_set(E_Notification *note, unsigned char closed); /* notification accessors */ -unsigned int e_notification_id_get(E_Notification *note); -const char *e_notification_app_name_get(E_Notification *n); -const char *e_notification_app_icon_get(E_Notification *n); -const char *e_notification_summary_get(E_Notification *n); -const char *e_notification_body_get(E_Notification *n); -int e_notification_replaces_id_get(E_Notification *note); -int e_notification_timeout_get(E_Notification *note); -unsigned char e_notification_closed_get(E_Notification *note); +EAPI unsigned int e_notification_id_get(E_Notification *note); +EAPI const char *e_notification_app_name_get(E_Notification *n); +EAPI const char *e_notification_app_icon_get(E_Notification *n); +EAPI const char *e_notification_summary_get(E_Notification *n); +EAPI const char *e_notification_body_get(E_Notification *n); +EAPI int e_notification_replaces_id_get(E_Notification *note); +EAPI int e_notification_timeout_get(E_Notification *note); +EAPI unsigned char e_notification_closed_get(E_Notification *note); /* actions */ -void e_notification_action_add(E_Notification *n, const char *action_id, const char *action_name); -Ecore_List *e_notification_actions_get(E_Notification *n); +EAPI void e_notification_action_add(E_Notification *n, const char *action_id, const char *action_name); +EAPI Ecore_List *e_notification_actions_get(E_Notification *n); /* hint mutators */ -void e_notification_hint_urgency_set(E_Notification *n, char urgency); -void e_notification_hint_category_set(E_Notification *n, const char *category); -void e_notification_hint_desktop_set(E_Notification *n, const char *desktop); -void e_notification_hint_sound_file_set(E_Notification *n, const char *sound_file); -void e_notification_hint_suppress_sound_set(E_Notification *n, char suppress_sound); -void e_notification_hint_xy_set(E_Notification *n, int x, int y); -void e_notification_hint_image_data_set(E_Notification *n, E_Notification_Image *image); +EAPI void e_notification_hint_urgency_set(E_Notification *n, char urgency); +EAPI void e_notification_hint_category_set(E_Notification *n, const char *category); +EAPI void e_notification_hint_desktop_set(E_Notification *n, const char *desktop); +EAPI void e_notification_hint_sound_file_set(E_Notification *n, const char *sound_file); +EAPI void e_notification_hint_suppress_sound_set(E_Notification *n, char suppress_sound); +EAPI void e_notification_hint_xy_set(E_Notification *n, int x, int y); +EAPI void e_notification_hint_image_data_set(E_Notification *n, E_Notification_Image *image); /* hint accessors */ -char e_notification_hint_urgency_get(E_Notification *n); -const char *e_notification_hint_category_get(E_Notification *n); -const char *e_notification_hint_desktop_get(E_Notification *n); -const char *e_notification_hint_sound_file_get(E_Notification *n); -char e_notification_hint_suppress_sound_get(E_Notification *n); -void e_notification_hint_x_get(E_Notification *n, int *x, int *y); -E_Notification_Image *e_notification_hint_image_data_get(E_Notification *n); +EAPI char e_notification_hint_urgency_get(E_Notification *n); +EAPI const char *e_notification_hint_category_get(E_Notification *n); +EAPI const char *e_notification_hint_desktop_get(E_Notification *n); +EAPI const char *e_notification_hint_sound_file_get(E_Notification *n); +EAPI char e_notification_hint_suppress_sound_get(E_Notification *n); +EAPI int e_notification_hint_xy_get(E_Notification *n, int *x, int *y); +EAPI E_Notification_Image *e_notification_hint_image_data_get(E_Notification *n); /* image hint */ -E_Notification_Image *e_notification_image_new(); -void e_notification_image_free(E_Notification_Image *img); -Evas_Object *e_notification_image_object_add(Evas *evas, E_Notification_Image *img); - -void e_notification_send(E_Notification *n, E_DBus_Callback_Func func, void *data); +EAPI E_Notification_Image *e_notification_image_new(); +EAPI void e_notification_image_free(E_Notification_Image *img); +EAPI Evas_Object *e_notification_image_object_add(Evas *evas, E_Notification_Image *img); #endif =================================================================== RCS file: /cvs/e/e17/libs/e_dbus/src/lib/notification/client.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- client.c 29 Oct 2007 02:20:48 -0000 1.1 +++ client.c 4 Nov 2007 07:51:37 -0000 1.2 @@ -3,7 +3,7 @@ static E_DBus_Connection *client_conn; static int init_count = 0; -int +EAPI int e_notification_init(void) { if (init_count) return ++init_count; @@ -19,7 +19,7 @@ return ++init_count; } -int +EAPI int e_notification_shutdown(void) { if (--init_count) return init_count; @@ -30,7 +30,7 @@ } /**** client api ****/ -void +EAPI void e_notification_send(E_Notification *n, E_DBus_Callback_Func func, void *data) { DBusMessage *msg; @@ -40,7 +40,7 @@ dbus_message_unref(msg); } -void +EAPI void e_notification_get_capabilities(E_DBus_Callback_Func func, void *data) { DBusMessage *msg; @@ -50,7 +50,7 @@ dbus_message_unref(msg); } -void +EAPI void e_notification_get_server_information(E_DBus_Callback_Func func, void *data) { DBusMessage *msg; =================================================================== RCS file: /cvs/e/e17/libs/e_dbus/src/lib/notification/daemon.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- daemon.c 29 Oct 2007 02:20:48 -0000 1.1 +++ daemon.c 4 Nov 2007 07:51:37 -0000 1.2 @@ -62,7 +62,7 @@ /**** daemon api ****/ -E_Notification_Daemon * +EAPI E_Notification_Daemon * e_notification_daemon_add(const char *name, const char *vendor) { E_Notification_Daemon *daemon; @@ -91,7 +91,7 @@ return daemon; } -void +EAPI void e_notification_daemon_free(E_Notification_Daemon *daemon) { if (daemon->obj) e_dbus_object_free(daemon->obj); @@ -103,25 +103,25 @@ e_dbus_shutdown(); } -void +EAPI void e_notification_daemon_data_set(E_Notification_Daemon *daemon, void *data) { daemon->data = data; } -void * +EAPI void * e_notification_daemon_data_get(E_Notification_Daemon *daemon) { return daemon->data; } -void +EAPI void e_notification_daemon_callback_notify_set(E_Notification_Daemon *daemon, E_Notification_Daemon_Callback_Notify func) { daemon->func.notify = func; } -void +EAPI void e_notification_daemon_callback_close_notification_set(E_Notification_Daemon *daemon, E_Notification_Daemon_Callback_Close_Notification func) { daemon->func.close_notification = func; @@ -192,7 +192,7 @@ } -void +EAPI void e_notification_daemon_signal_notification_closed(E_Notification_Daemon *daemon, unsigned int id, E_Notification_Closed_Reason reason) { DBusMessage *msg = e_notify_marshal_notification_closed_signal(id, reason); @@ -202,7 +202,7 @@ dbus_message_unref(msg); } -void +EAPI void e_notification_daemon_signal_action_invoked(E_Notification_Daemon *daemon, unsigned int notification_id, const char *action_id) { DBusMessage *msg = e_notify_marshal_action_invoked_signal(notification_id, action_id); =================================================================== RCS file: /cvs/e/e17/libs/e_dbus/src/lib/notification/notification.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- notification.c 29 Oct 2007 02:20:48 -0000 1.1 +++ notification.c 4 Nov 2007 07:51:37 -0000 1.2 @@ -12,7 +12,7 @@ /* (con|de)structor */ -E_Notification * +EAPI E_Notification * e_notification_full_new(const char *app_name, unsigned int replaces_id, const char *app_icon, const char *summary, const char *body, int expire_timeout) { E_Notification *n; @@ -31,7 +31,7 @@ return n; } -E_Notification * +EAPI E_Notification * e_notification_new() { E_Notification *n; @@ -42,19 +42,19 @@ return n; } -void +EAPI void e_notification_ref(E_Notification *n) { n->refcount++; } -void +EAPI void e_notification_unref(E_Notification *n) { if (--n->refcount == 0) e_notification_free(n); } -void +EAPI void e_notification_free(E_Notification *n) { if (!n) return; @@ -74,41 +74,41 @@ } /* mutators */ -void +EAPI void e_notification_id_set(E_Notification *note, unsigned int id) { note->id = id; } -void +EAPI void e_notification_app_name_set(E_Notification *note, const char *app_name) { if (note->app_name) free(note->app_name); if (app_name) note->app_name = strdup(app_name); } -void +EAPI void e_notification_app_icon_set(E_Notification *note, const char *app_icon) { if (note->app_icon) free(note->app_icon); if (app_icon) note->app_icon = strdup(app_icon); } -void +EAPI void e_notification_summary_set(E_Notification *note, const char *summary) { if (note->summary) free(note->summary); if (summary) note->summary = strdup(summary); } -void +EAPI void e_notification_body_set(E_Notification *note, const char *body) { if (note->body) free(note->body); if (body) note->body = strdup(body); } -void +EAPI void e_notification_action_add(E_Notification *n, const char *action_id, const char *action_name) { E_Notification_Action *a; @@ -121,19 +121,19 @@ } -void +EAPI void e_notification_replaces_id_set(E_Notification *note, int replaces_id) { note->replaces_id = replaces_id; } -void +EAPI void e_notification_timeout_set(E_Notification *note, int timeout) { note->expire_timeout = timeout; } -void +EAPI void e_notification_closed_set(E_Notification *note, unsigned char closed) { note->closed = closed; @@ -141,55 +141,55 @@ /* accessors */ -unsigned int +EAPI unsigned int e_notification_id_get(E_Notification *note) { return note->id; } -const char * +EAPI const char * e_notification_app_name_get(E_Notification *note) { return note->app_name; } -const char * +EAPI const char * e_notification_app_icon_get(E_Notification *note) { return note->app_icon; } -const char * +EAPI const char * e_notification_summary_get(E_Notification *note) { return note->summary; } -const char * +EAPI const char * e_notification_body_get(E_Notification *note) { return note->body; } -Ecore_List * +EAPI Ecore_List * e_notification_actions_get(E_Notification *note) { return note->actions; } -int +EAPI int e_notification_replaces_id_get(E_Notification *note) { return note->replaces_id; } -int +EAPI int e_notification_timeout_get(E_Notification *note) { return note->expire_timeout; } -unsigned char +EAPI unsigned char e_notification_closed_get(E_Notification *note) { return note->closed; @@ -230,14 +230,14 @@ /********* hints *******/ -void +EAPI void e_notification_hint_urgency_set(E_Notification *n, char urgency) { n->hints.urgency = urgency; n->hint_flags |= E_NOTIFICATION_HINT_URGENCY; } -void +EAPI void e_notification_hint_category_set(E_Notification *n, const char *category) { if (n->hints.category) free(n->hints.category); @@ -245,7 +245,7 @@ n->hint_flags |= E_NOTIFICATION_HINT_CATEGORY; } -void +EAPI void e_notification_hint_desktop_set(E_Notification *n, const char *desktop) { if (n->hints.desktop) free(n->hints.desktop); @@ -253,7 +253,7 @@ n->hint_flags |= E_NOTIFICATION_HINT_DESKTOP; } -void +EAPI void e_notification_hint_sound_file_set(E_Notification *n, const char *sound_file) { if (n->hints.sound_file) free(n->hints.sound_file); @@ -261,14 +261,14 @@ n->hint_flags |= E_NOTIFICATION_HINT_SOUND_FILE; } -void +EAPI void e_notification_hint_suppress_sound_set(E_Notification *n, char suppress_sound) { n->hints.suppress_sound = suppress_sound; n->hint_flags |= E_NOTIFICATION_HINT_SUPPRESS_SOUND; } -void +EAPI void e_notification_hint_xy_set(E_Notification *n, int x, int y) { n->hints.x = x; @@ -276,44 +276,44 @@ n->hint_flags |= E_NOTIFICATION_HINT_XY; } -void +EAPI void e_notification_hint_image_data_set(E_Notification *n, E_Notification_Image *image) { n->hints.image_data = image; } -char +EAPI char e_notification_hint_urgency_get(E_Notification *n) { return (n->hint_flags & E_NOTIFICATION_HINT_URGENCY ? n->hints.urgency : 1); } -const char * +EAPI const char * e_notification_hint_category_get(E_Notification *n) { return n->hints.category; } -const char * +EAPI const char * e_notification_hint_desktop_get(E_Notification *n) { return n->hints.desktop; } -const char * +EAPI const char * e_notification_hint_sound_file_get(E_Notification *n) { return n->hints.sound_file; } -char +EAPI char e_notification_hint_suppress_sound_get(E_Notification *n) { return n->hints.suppress_sound; } -int +EAPI int e_notification_hint_xy_get(E_Notification *n, int *x, int *y) { if (x) *x = n->hints.x; @@ -322,14 +322,14 @@ return (n->hint_flags & E_NOTIFICATION_HINT_XY ? 1 : 0); } -E_Notification_Image * +EAPI E_Notification_Image * e_notification_hint_image_data_get(E_Notification *n) { return n->hints.image_data; } -E_Notification_Image * +EAPI E_Notification_Image * e_notification_image_new() { E_Notification_Image *img; @@ -338,7 +338,7 @@ return img; } -void +EAPI void e_notification_image_free(E_Notification_Image *img) { if (img->data) free(img->data); @@ -346,7 +346,7 @@ } -Evas_Object * +EAPI Evas_Object * e_notification_image_evas_object_add(Evas *evas, E_Notification_Image *img) { #if 0 ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs