diff options
| author | ilotterytea <iltsu@alright.party> | 2024-05-03 23:26:52 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2024-05-03 23:26:52 +0500 |
| commit | 1924b6751a29f8b528d09412bd1e1e74f4d30c27 (patch) | |
| tree | ceaeb5a4806ba217e09fde395589065fd48aa2b4 /src/stream.hpp | |
| parent | d5a08922b8f22e4494fca0e28252f4b769649d64 (diff) | |
feat: stream listener client
Diffstat (limited to 'src/stream.hpp')
| -rw-r--r-- | src/stream.hpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/stream.hpp b/src/stream.hpp new file mode 100644 index 0000000..ba71a6a --- /dev/null +++ b/src/stream.hpp @@ -0,0 +1,30 @@ +#pragma once + +#include <set> +#include <vector> + +#include "api/twitch/helix_client.hpp" + +namespace bot::stream { + class StreamListenerClient { + public: + StreamListenerClient(const api::twitch::HelixClient &helix_client) + : helix_client(helix_client){}; + ~StreamListenerClient() = default; + + void run_thread(); + + void listen_channel(const int &id); + void unlisten_channel(const int &id); + + private: + void run(); + void check(); + + const api::twitch::HelixClient &helix_client; + + std::vector<int> ids; + + std::set<int> online_ids; + }; +} |
