refactor: Move Emotes to Application (#5120)

This commit is contained in:
pajlada
2024-01-21 14:20:21 +01:00
committed by GitHub
parent 65d3e73c5d
commit 5628605de4
14 changed files with 152 additions and 72 deletions
+3 -13
View File
@@ -3,10 +3,7 @@
#include "common/Atomic.hpp"
#include "common/Channel.hpp"
#include "common/Singleton.hpp"
#include "providers/bttv/BttvEmotes.hpp"
#include "providers/ffz/FfzEmotes.hpp"
#include "providers/irc/AbstractIrcServer.hpp"
#include "providers/seventv/SeventvEmotes.hpp"
#include <pajlada/signals/signalholder.hpp>
@@ -21,15 +18,15 @@ class Paths;
class TwitchChannel;
class BttvLiveUpdates;
class SeventvEventAPI;
class BttvEmotes;
class FfzEmotes;
class SeventvEmotes;
class ITwitchIrcServer
{
public:
virtual ~ITwitchIrcServer() = default;
virtual const BttvEmotes &getBttvEmotes() const = 0;
virtual const FfzEmotes &getFfzEmotes() const = 0;
virtual const SeventvEmotes &getSeventvEmotes() const = 0;
virtual const IndirectChannel &getWatchingChannel() const = 0;
// Update this interface with TwitchIrcServer methods as needed
@@ -82,9 +79,6 @@ public:
std::unique_ptr<BttvLiveUpdates> bttvLiveUpdates;
std::unique_ptr<SeventvEventAPI> seventvEventAPI;
const BttvEmotes &getBttvEmotes() const override;
const FfzEmotes &getFfzEmotes() const override;
const SeventvEmotes &getSeventvEmotes() const override;
const IndirectChannel &getWatchingChannel() const override;
protected:
@@ -116,10 +110,6 @@ private:
std::chrono::steady_clock::time_point lastErrorTimeSpeed_;
std::chrono::steady_clock::time_point lastErrorTimeAmount_;
BttvEmotes bttv;
FfzEmotes ffz;
SeventvEmotes seventv_;
pajlada::Signals::SignalHolder signalHolder_;
};