diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-10-04 19:48:09 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-10-04 19:48:09 (GMT) |
commit | bb31d6f3a20e8989e182fa78b1bf2edaa2156dea (patch) | |
tree | 35be6fa1ea67e12985e2b852b9a04977b6f0a00a /SwifTools/Notifier/Notifier.h | |
parent | 537afef23b0f5da31c0cd38597a13773d79f77d4 (diff) | |
download | swift-contrib-bb31d6f3a20e8989e182fa78b1bf2edaa2156dea.zip swift-contrib-bb31d6f3a20e8989e182fa78b1bf2edaa2156dea.tar.bz2 |
Disable the notifier when going to DND.
Resolves: #572
Diffstat (limited to 'SwifTools/Notifier/Notifier.h')
-rw-r--r-- | SwifTools/Notifier/Notifier.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/SwifTools/Notifier/Notifier.h b/SwifTools/Notifier/Notifier.h index f1a89ef..dab6e90 100644 --- a/SwifTools/Notifier/Notifier.h +++ b/SwifTools/Notifier/Notifier.h @@ -14,6 +14,7 @@ namespace Swift { class Notifier { public: + Notifier(); virtual ~Notifier(); enum Type { ContactAvailable, ContactUnavailable, ContactStatusChange, IncomingMessage, SystemMessage }; @@ -26,11 +27,26 @@ namespace Swift { const String& subject, const String& description, const boost::filesystem::path& picture, + boost::function<void()> callback); + + void setEnabled(bool b) { + enabled = b; + } + + private: + virtual void doShowMessage( + Type type, + const String& subject, + const String& description, + const boost::filesystem::path& picture, boost::function<void()> callback) = 0; protected: String typeToString(Type type); static std::vector<Type> getAllTypes(); static std::vector<Type> getDefaultTypes(); + + private: + bool enabled; }; } |