Refactor 7TV EventAPI (#4342)
* refactor: remove file prefix * refactor: put eventapi into a namespace * refactor: support multiple conditions * fix: handle ack * docs: add changelog entry * fix: unsubscribe in destructor * fix: naming of parameter * fix: namespaces * chore: casing * fix: missing namespace --------- Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
@@ -10,9 +10,12 @@
|
||||
namespace chatterino {
|
||||
|
||||
class Channel;
|
||||
struct SeventvEventAPIEmoteAddDispatch;
|
||||
struct SeventvEventAPIEmoteUpdateDispatch;
|
||||
struct SeventvEventAPIEmoteRemoveDispatch;
|
||||
|
||||
namespace seventv::eventapi {
|
||||
struct EmoteAddDispatch;
|
||||
struct EmoteUpdateDispatch;
|
||||
struct EmoteRemoveDispatch;
|
||||
} // namespace seventv::eventapi
|
||||
|
||||
// https://github.com/SevenTV/API/blob/a84e884b5590dbb5d91a5c6b3548afabb228f385/data/model/emote-set.model.go#L29-L36
|
||||
enum class SeventvActiveEmoteFlag : int64_t {
|
||||
@@ -86,7 +89,7 @@ public:
|
||||
*/
|
||||
static boost::optional<EmotePtr> addEmote(
|
||||
Atomic<std::shared_ptr<const EmoteMap>> &map,
|
||||
const SeventvEventAPIEmoteAddDispatch &dispatch);
|
||||
const seventv::eventapi::EmoteAddDispatch &dispatch);
|
||||
|
||||
/**
|
||||
* Updates an emote in this `map`.
|
||||
@@ -97,7 +100,7 @@ public:
|
||||
*/
|
||||
static boost::optional<EmotePtr> updateEmote(
|
||||
Atomic<std::shared_ptr<const EmoteMap>> &map,
|
||||
const SeventvEventAPIEmoteUpdateDispatch &dispatch);
|
||||
const seventv::eventapi::EmoteUpdateDispatch &dispatch);
|
||||
|
||||
/**
|
||||
* Removes an emote from this `map`.
|
||||
@@ -108,7 +111,7 @@ public:
|
||||
*/
|
||||
static boost::optional<EmotePtr> removeEmote(
|
||||
Atomic<std::shared_ptr<const EmoteMap>> &map,
|
||||
const SeventvEventAPIEmoteRemoveDispatch &dispatch);
|
||||
const seventv::eventapi::EmoteRemoveDispatch &dispatch);
|
||||
|
||||
/** Fetches an emote-set by its id */
|
||||
static void getEmoteSet(
|
||||
|
||||
Reference in New Issue
Block a user