lib/notification/E_Notification_Daemon.h
Go to the documentation of this file.
00001 #ifndef E_NOTIFICATION_DAEMON_H 00002 #define E_NOTIFICATION_DAEMON_H 00003 00004 #define E_NOTIFICATION_DAEMON_VERSION "0.9" 00005 #define E_NOTIFICATION_DAEMON_SUPPORTS_SPEC_VERSION "1.2" 00006 #include <E_Notify.h> 00007 00008 #ifdef EAPI 00009 #undef EAPI 00010 #endif 00011 #ifdef _MSC_VER 00012 # ifdef BUILDING_DLL 00013 # define EAPI __declspec(dllexport) 00014 # else 00015 # define EAPI __declspec(dllimport) 00016 # endif 00017 #else 00018 # ifdef __GNUC__ 00019 # if __GNUC__ >= 4 00020 # define EAPI __attribute__ ((visibility("default"))) 00021 # else 00022 # define EAPI 00023 # endif 00024 # else 00025 # define EAPI 00026 # endif 00027 #endif 00028 00029 00030 typedef struct E_Notification_Daemon E_Notification_Daemon; 00031 00032 /* daemon callbacks */ 00033 typedef int (*E_Notification_Daemon_Callback_Notify) (E_Notification_Daemon *daemon, E_Notification *notification); 00034 typedef void (*E_Notification_Daemon_Callback_Close_Notification) (E_Notification_Daemon *daemon, unsigned int notification_id); 00035 00036 /* gui */ 00037 typedef struct E_Notification_View E_Notification_View; 00038 00039 struct E_Notification_Daemon 00040 { 00041 E_DBus_Connection *conn; 00042 E_DBus_Interface *iface; 00043 E_DBus_Object *obj; 00044 00045 char *name; 00046 char *vendor; 00047 00048 struct 00049 { 00050 E_Notification_Daemon_Callback_Notify notify; 00051 E_Notification_Daemon_Callback_Close_Notification close_notification; 00052 } func; 00053 void *data; 00054 00055 int state; 00056 }; 00057 00058 #ifdef __cplusplus 00059 extern "C" { 00060 #endif 00061 00062 EAPI int e_notification_daemon_init(void); 00063 EAPI int e_notification_daemon_shutdown(void); 00064 00065 /* daemon */ 00066 EAPI E_Notification_Daemon *e_notification_daemon_add(const char *name, const char *vendor); 00067 EAPI void e_notification_daemon_free(E_Notification_Daemon *d); 00068 /* TODO 00069 void e_notification_daemon_close(E_Notification_Daemon *d, 00070 E_Notification *n, unsigned int reason); 00071 void e_notification_daemon_action_invoke(E_Notification_Daemon *d, 00072 E_Notification *n, const char *action_id); 00073 */ 00074 00075 EAPI void e_notification_daemon_data_set(E_Notification_Daemon *daemon, void *data); 00076 EAPI void *e_notification_daemon_data_get(E_Notification_Daemon *daemon); 00077 00078 EAPI void e_notification_daemon_callback_notify_set(E_Notification_Daemon *daemon, E_Notification_Daemon_Callback_Notify func); 00079 EAPI void e_notification_daemon_callback_close_notification_set(E_Notification_Daemon *daemon, E_Notification_Daemon_Callback_Close_Notification func); 00080 00081 EAPI void e_notification_daemon_signal_notification_closed(E_Notification_Daemon *daemon, unsigned int id, E_Notification_Closed_Reason reason); 00082 EAPI void e_notification_daemon_signal_action_invoked(E_Notification_Daemon *daemon, unsigned int notification_id, const char *action_id); 00083 00084 /***** gui *****/ 00085 /* TODO 00086 E_Notification_View *e_notification_view_add(E_Notification_Daemon *d, E_Notification *n); 00087 void e_notification_view_close(E_Notification_View *nv); 00088 Evas_Object * e_notification_view_icon_get(Evas *evas, E_Notification *n); 00089 */ 00090 00091 #ifdef __cplusplus 00092 } 00093 #endif 00094 00095 #endif