diff options
Diffstat (limited to 'include/Notification.hpp')
-rw-r--r-- | include/Notification.hpp | 22 |
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 |