summaryrefslogtreecommitdiff
path: root/src/stream.hpp
blob: ba71a6aec9c74ed27136c24477b5162a179f3fe1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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;
  };
}