diff --git a/doc/libtinynotify-sections.txt b/doc/libtinynotify-sections.txt index 646b030..445a923 100644 --- a/doc/libtinynotify-sections.txt +++ b/doc/libtinynotify-sections.txt @@ -49,7 +49,7 @@ notification_set_body
NotifyEvent -NotifyCloseReason +NotificationCloseReason NOTIFICATION_CLOSED_BY_DISCONNECT NOTIFICATION_CLOSED_BY_CALLER NOTIFICATION_CLOSED_BY_EXPIRATION diff --git a/lib/tinynotify.c b/lib/tinynotify.c index 5c8bb64..b678a6b 100644 --- a/lib/tinynotify.c +++ b/lib/tinynotify.c @@ -148,7 +148,7 @@ NotifyError notify_session_connect(NotifySession s) { return notify_session_set_error(s, NOTIFY_ERROR_NO_ERROR); } -static void _emit_closed(NotifySession s, Notification n, NotifyCloseReason reason) { +static void _emit_closed(NotifySession s, Notification n, NotificationCloseReason reason) { struct _notification_list **prev; if (n->close_callback) @@ -188,7 +188,7 @@ static void _notify_session_handle_message(DBusMessage *msg, NotifySession s) { for (nl = s->notifications; nl; nl = nl->next) { if (nl->n->message_id == id) { - NotifyCloseReason r; + NotificationCloseReason r; switch (reason) { case 1: @@ -602,15 +602,15 @@ void notification_set_body(Notification n, const char* body) { _property_assign_str(&n->body, body); } -const NotifyCloseReason NOTIFICATION_CLOSED_BY_DISCONNECT = 'D'; -const NotifyCloseReason NOTIFICATION_CLOSED_BY_EXPIRATION = 'E'; -const NotifyCloseReason NOTIFICATION_CLOSED_BY_USER = 'U'; -const NotifyCloseReason NOTIFICATION_CLOSED_BY_CALLER = 'C'; +const NotificationCloseReason NOTIFICATION_CLOSED_BY_DISCONNECT = 'D'; +const NotificationCloseReason NOTIFICATION_CLOSED_BY_EXPIRATION = 'E'; +const NotificationCloseReason NOTIFICATION_CLOSED_BY_USER = 'U'; +const NotificationCloseReason NOTIFICATION_CLOSED_BY_CALLER = 'C'; -static void _notification_noop_on_close(Notification n, NotifyCloseReason r, void* user_data) { +static void _notification_noop_on_close(Notification n, NotificationCloseReason r, void* user_data) { } -static void _notification_free_on_close(Notification n, NotifyCloseReason r, void* user_data) { +static void _notification_free_on_close(Notification n, NotificationCloseReason r, void* user_data) { notification_free(n); } diff --git a/lib/tinynotify.h b/lib/tinynotify.h index d8fcb31..707fcee 100644 --- a/lib/tinynotify.h +++ b/lib/tinynotify.h @@ -578,12 +578,12 @@ void notification_set_body(Notification notification, const char* body); */ /** - * NotifyCloseReason + * NotificationCloseReason * * A reason for which the notification was closed. */ -typedef unsigned char NotifyCloseReason; +typedef unsigned char NotificationCloseReason; /** * NOTIFICATION_CLOSED_BY_DISCONNECT @@ -596,7 +596,7 @@ typedef unsigned char NotifyCloseReason; * the connection was interrupted. The notification may still be open, or be * long gone (if daemon failed to send the signal). */ -extern const NotifyCloseReason NOTIFICATION_CLOSED_BY_DISCONNECT; +extern const NotificationCloseReason NOTIFICATION_CLOSED_BY_DISCONNECT; /** * NOTIFICATION_CLOSED_BY_EXPIRATION @@ -604,7 +604,7 @@ extern const NotifyCloseReason NOTIFICATION_CLOSED_BY_DISCONNECT; * A constant passed to #NotificationCloseCallback when the notification was * closed because of the expiration timeout. */ -extern const NotifyCloseReason NOTIFICATION_CLOSED_BY_EXPIRATION; +extern const NotificationCloseReason NOTIFICATION_CLOSED_BY_EXPIRATION; /** * NOTIFICATION_CLOSED_BY_USER @@ -612,7 +612,7 @@ extern const NotifyCloseReason NOTIFICATION_CLOSED_BY_EXPIRATION; * A constant passed to #NotificationCloseCallback when the notification was * closed because of the user action. */ -extern const NotifyCloseReason NOTIFICATION_CLOSED_BY_USER; +extern const NotificationCloseReason NOTIFICATION_CLOSED_BY_USER; /** * NOTIFICATION_CLOSED_BY_CALLER @@ -620,7 +620,7 @@ extern const NotifyCloseReason NOTIFICATION_CLOSED_BY_USER; * A constant passed to #NotificationCloseCallback when the notification was * closed by a call to notification_close(). */ -extern const NotifyCloseReason NOTIFICATION_CLOSED_BY_CALLER; +extern const NotificationCloseReason NOTIFICATION_CLOSED_BY_CALLER; /** * NotificationCloseCallback @@ -640,7 +640,7 @@ extern const NotifyCloseReason NOTIFICATION_CLOSED_BY_CALLER; * in this section. If it does so, one should assume the reason is unknown. */ typedef void (*NotificationCloseCallback)(Notification notification, - NotifyCloseReason close_reason, void* user_data); + NotificationCloseReason close_reason, void* user_data); /** * NOTIFICATION_NOOP_ON_CLOSE