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

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

class TokenPool {
  private:
    TokenPool() = default;
    TokenPool(const TokenPool &) = delete;
    TokenPool(TokenPool &&) = delete;
    TokenPool &operator=(const TokenPool &) = delete;
    TokenPool &operator=(TokenPool &&) = delete;
    static std::queue<Token> mTokenContainer;

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