diff options
Diffstat (limited to 'notify.h')
-rw-r--r-- | notify.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/notify.h b/notify.h new file mode 100644 index 0000000..03f6775 --- /dev/null +++ b/notify.h @@ -0,0 +1,38 @@ +#pragma once + +#include <stdio.h> + +enum NotificationType { + NOTIFY_VOLUME, + NOTIFY_BALANCE, + NOTIFY_UNMUTE, + NOTIFY_MUTE, +}; + +class Notifier { + public: + virtual ~Notifier() {} + + virtual void Notify(enum NotificationType type, long value, bool mute) = 0; + + protected: + bool initialized_; +}; + +class CommandLineNotifier : public Notifier { + public: + virtual ~CommandLineNotifier() {} + + virtual void Notify(enum NotificationType type, long value, bool) { + switch (type) { + case NOTIFY_VOLUME: + case NOTIFY_BALANCE: + case NOTIFY_UNMUTE: + case NOTIFY_MUTE: + printf("%ld\n", value); + break; + } + } +}; + +// vim: set et ts=2 sw=2: |