2018-08-11 12:47:03 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "Application.hpp"
|
|
|
|
#include "common/Singleton.hpp"
|
|
|
|
|
2018-08-12 15:29:40 +02:00
|
|
|
//#include <mutex>
|
2018-08-11 12:47:03 +02:00
|
|
|
|
|
|
|
namespace chatterino {
|
|
|
|
|
2018-08-12 18:54:32 +02:00
|
|
|
enum class Platform : uint8_t;
|
|
|
|
|
2018-08-11 12:47:03 +02:00
|
|
|
class Toasts final : public Singleton
|
|
|
|
{
|
|
|
|
public:
|
2018-08-12 18:54:32 +02:00
|
|
|
void sendChannelNotification(const QString &channelName, Platform p);
|
2018-08-12 15:29:40 +02:00
|
|
|
/*
|
2018-08-11 12:47:03 +02:00
|
|
|
Toasts();
|
|
|
|
virtual void initialize(Settings &settings, Paths &paths) override final;
|
2018-08-12 15:29:40 +02:00
|
|
|
*/
|
2018-08-12 18:54:32 +02:00
|
|
|
static bool isEnabled();
|
2018-08-11 16:11:51 +02:00
|
|
|
|
|
|
|
private:
|
2018-08-12 18:54:32 +02:00
|
|
|
void sendWindowsNotification(const QString &channelName, Platform p);
|
2018-08-12 15:29:40 +02:00
|
|
|
/*
|
2018-08-11 12:47:03 +02:00
|
|
|
void updateLiveChannels(const QString &channelName);
|
|
|
|
void removeFromLiveChannels(const QString &channelName);
|
|
|
|
|
|
|
|
bool wasChannelLive(const QString &channelName);
|
2018-08-11 16:11:51 +02:00
|
|
|
|
|
|
|
void shouldChannelBeNotified(const QString &channelName);
|
2018-08-11 12:47:03 +02:00
|
|
|
void sendChannelNotification(const QString &channelName);
|
2018-08-11 16:11:51 +02:00
|
|
|
void sendWindowsNotification(const QString &channelName);
|
2018-08-11 12:47:03 +02:00
|
|
|
std::vector<QString> liveChannels;
|
|
|
|
std::mutex mutex_;
|
2018-08-12 15:29:40 +02:00
|
|
|
*/
|
2018-08-11 12:47:03 +02:00
|
|
|
};
|
|
|
|
} // namespace chatterino
|