ApResolve.h 498 B

12345678910111213141516171819202122232425262728
  1. #pragma once
  2. #include <memory>
  3. #include <string>
  4. #include "HTTPClient.h"
  5. #ifdef BELL_ONLY_CJSON
  6. #include "cJSON.h"
  7. #else
  8. #include "nlohmann/json.hpp"
  9. #endif
  10. namespace cspot {
  11. class ApResolve {
  12. private:
  13. std::string apOverride;
  14. public:
  15. ApResolve(std::string apOverride);
  16. /**
  17. * @brief Connects to spotify's servers and returns first valid ap address
  18. *
  19. * @return std::string Address in form of url:port
  20. */
  21. std::string fetchFirstApAddress();
  22. };
  23. } // namespace cspot