diff options
author | Max Kellermann <max@duempel.org> | 2010-08-19 11:03:53 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2010-08-19 11:03:53 +0200 |
commit | 625e4755d1c59e537dc122a540d3c21de962c3d1 (patch) | |
tree | fe379227a1888c5ffc48d0f60f747260cb397da2 /src | |
parent | 676739c426fc4a09f2654e64e4799dfe3c88dae3 (diff) | |
download | mpd-625e4755d1c59e537dc122a540d3c21de962c3d1.tar.gz mpd-625e4755d1c59e537dc122a540d3c21de962c3d1.tar.xz mpd-625e4755d1c59e537dc122a540d3c21de962c3d1.zip |
notify: add function notify_clear()
Diffstat (limited to 'src')
-rw-r--r-- | src/notify.c | 7 | ||||
-rw-r--r-- | src/notify.h | 5 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/notify.c b/src/notify.c index 9168867d6..3b45c22b4 100644 --- a/src/notify.c +++ b/src/notify.c @@ -48,3 +48,10 @@ void notify_signal(struct notify *notify) g_cond_signal(notify->cond); g_mutex_unlock(notify->mutex); } + +void notify_clear(struct notify *notify) +{ + g_mutex_lock(notify->mutex); + notify->pending = false; + g_mutex_unlock(notify->mutex); +} diff --git a/src/notify.h b/src/notify.h index c51d34f21..0655bc6b7 100644 --- a/src/notify.h +++ b/src/notify.h @@ -45,4 +45,9 @@ void notify_wait(struct notify *notify); */ void notify_signal(struct notify *notify); +/** + * Clears a pending notification. + */ +void notify_clear(struct notify *notify); + #endif |