summaryrefslogtreecommitdiff
path: root/battleNetApi/include/tokenPool.hpp
blob: 6f5dffc04e359c6429f289c2f6ad92d9bf607cf3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#pragma once

#include <queue>
#include <token.hpp>

static std::queue<Token> mTokenContainer;

class TokenPool {
  private:
    TokenPool() = delete;
    TokenPool(const TokenPool &) = delete;
    TokenPool(TokenPool &&) = delete;
    TokenPool &operator=(const TokenPool &) = delete;
    TokenPool &operator=(TokenPool &&) = delete;

  public:
    static void fillTokenSource(const std::string &iJsonPath);
    static std::optional<std::string> unusedToken();
};