summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2018-01-22 15:13:24 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2018-01-22 15:20:38 -0500
commit83952a1708be0f8dceee7b79f3d9d02a6d1b26b1 (patch)
treec78f6be5cb837487efc5d640384ec9378d0d0853
parent109d7897b050e6b4278f4933a3a1e881e7e4ad03 (diff)
downloadenlightenment-83952a1708be0f8dceee7b79f3d9d02a6d1b26b1.tar.gz
add notification util function for more easily sending notifications
still need some kind of sticky notification for important things
-rw-r--r--src/bin/e_notification.c12
-rw-r--r--src/bin/e_notification.h2
2 files changed, 13 insertions, 1 deletions
diff --git a/src/bin/e_notification.c b/src/bin/e_notification.c
index a004f6ccb3..0dc7b0b53d 100644
--- a/src/bin/e_notification.c
+++ b/src/bin/e_notification.c
@@ -579,3 +579,15 @@ e_notification_client_send(E_Notification_Notify *notify, E_Notification_Client_
return EINA_TRUE;
}
+E_API Eina_Bool
+e_notification_util_send(const char *summary, const char *body)
+{
+ E_Notification_Notify n;
+
+ memset(&n, 0, sizeof(E_Notification_Notify));
+ n.timeout = 3000;
+ n.summary = summary;
+ n.body = body;
+ n.urgency = E_NOTIFICATION_NOTIFY_URGENCY_NORMAL;
+ return e_notification_client_send(&n, NULL, NULL);
+}
diff --git a/src/bin/e_notification.h b/src/bin/e_notification.h
index 8f0bbc3f01..46228982d9 100644
--- a/src/bin/e_notification.h
+++ b/src/bin/e_notification.h
@@ -81,7 +81,7 @@ E_API Evas_Object *e_notification_notify_raw_image_get(E_Notification_Notify *no
//client
typedef void (*E_Notification_Client_Send_Cb)(void *data, unsigned int id);
E_API Eina_Bool e_notification_client_send(E_Notification_Notify *notify, E_Notification_Client_Send_Cb cb, const void *data);
-
+E_API Eina_Bool e_notification_util_send(const char *summary, const char *body);
#endif
#endif