Skip to content

Commit

Permalink
NotifyCloseReason -> NotificationCloseReason.
Browse files Browse the repository at this point in the history
  • Loading branch information
mgorny committed Aug 29, 2011
1 parent 666ecc5 commit 04f2510
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion doc/libtinynotify-sections.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ notification_set_body
</SECTION>
<SECTION>
<FILE>NotifyEvent</FILE>
NotifyCloseReason
NotificationCloseReason
NOTIFICATION_CLOSED_BY_DISCONNECT
NOTIFICATION_CLOSED_BY_CALLER
NOTIFICATION_CLOSED_BY_EXPIRATION
Expand Down
16 changes: 8 additions & 8 deletions lib/tinynotify.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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);
}

Expand Down
14 changes: 7 additions & 7 deletions lib/tinynotify.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -596,31 +596,31 @@ 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
*
* 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
*
* 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
*
* 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
Expand All @@ -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
Expand Down

0 comments on commit 04f2510

Please sign in to comment.