mirror-chatterino2/src/singletons/Toasts.hpp
pajlada 9a8b85e338
Twitch API: v5 to Helix migration (#1560)
There's a document in src/providers/twitch/api which describes how we interact with the Twitch API.
Keeping this up to date might be a healthy way for us to ensure we keep using the right APIs for the right job.
2020-03-14 12:13:57 +01:00

34 lines
775 B
C++

#pragma once
#include "Application.hpp"
#include "common/Singleton.hpp"
namespace chatterino {
enum class Platform : uint8_t;
enum class ToastReaction {
OpenInBrowser = 0,
OpenInPlayer = 1,
OpenInStreamlink = 2,
DontOpen = 3
};
class Toasts final : public Singleton
{
public:
void sendChannelNotification(const QString &channelName, Platform p);
static QString findStringFromReaction(const ToastReaction &reaction);
static QString findStringFromReaction(
const pajlada::Settings::Setting<int> &reaction);
static std::map<ToastReaction, QString> reactionToString;
static bool isEnabled();
private:
#ifdef Q_OS_WIN
void sendWindowsNotification(const QString &channelName, Platform p);
#endif
};
} // namespace chatterino