aboutsummaryrefslogtreecommitdiff
path: root/include/Notification.hpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-09-21 03:49:17 +0200
committerdec05eba <dec05eba@protonmail.com>2020-09-21 03:49:17 +0200
commit40e0f8f5d8c3e480f01a2d71b6a493247adcb77f (patch)
treeccc3c0a7c82be8f5dbe86dfc712cce3da7e2ad59 /include/Notification.hpp
parent5c72463c029804c85479d2c4426397d932c88ee1 (diff)
Initial matrix support
Diffstat (limited to 'include/Notification.hpp')
-rw-r--r--include/Notification.hpp22
1 files changed, 2 insertions, 20 deletions
diff --git a/include/Notification.hpp b/include/Notification.hpp
index 4f7fcc2..0e40f42 100644
--- a/include/Notification.hpp
+++ b/include/Notification.hpp
@@ -1,7 +1,5 @@
#pragma once
-#include "Program.h"
-#include <assert.h>
#include <string>
namespace QuickMedia {
@@ -11,22 +9,6 @@ namespace QuickMedia {
CRITICAL
};
- static const char* urgency_string(Urgency urgency) {
- switch(urgency) {
- case Urgency::LOW:
- return "low";
- case Urgency::NORMAL:
- return "normal";
- case Urgency::CRITICAL:
- return "critical";
- }
- assert(false);
- return nullptr;
- }
-
- static void show_notification(const std::string &title, const std::string &description, Urgency urgency = Urgency::NORMAL) {
- const char *args[] = { "notify-send", "-u", urgency_string(urgency), "--", title.c_str(), description.c_str(), nullptr };
- exec_program_async(args, nullptr);
- fprintf(stderr, "Notification: title: %s, description: %s\n", title.c_str(), description.c_str());
- }
+ const char* urgency_string(Urgency urgency);
+ void show_notification(const std::string &title, const std::string &description, Urgency urgency = Urgency::NORMAL);
} \ No newline at end of file