summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-10-04 19:48:09 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-10-04 19:48:09 (GMT)
commitbb31d6f3a20e8989e182fa78b1bf2edaa2156dea (patch)
tree35be6fa1ea67e12985e2b852b9a04977b6f0a00a /SwifTools/Notifier/Notifier.h
parent537afef23b0f5da31c0cd38597a13773d79f77d4 (diff)
downloadswift-bb31d6f3a20e8989e182fa78b1bf2edaa2156dea.zip
swift-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.h16
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;
};
}