#pragma once #include #include #include #include #include #include #include #include #include #if defined(_MSC_VER) # pragma warning(push) # pragma warning(disable : 4702) #endif #if defined(_MSC_VER) # pragma warning(pop) #endif namespace scwx::provider { /** * @brief Warnings Provider */ class IemApiProvider { public: explicit IemApiProvider(); ~IemApiProvider(); IemApiProvider(const IemApiProvider&) = delete; IemApiProvider& operator=(const IemApiProvider&) = delete; IemApiProvider(IemApiProvider&&) noexcept; IemApiProvider& operator=(IemApiProvider&&) noexcept; static boost::outcome_v2::result> ListTextProducts(std::chrono::sys_days date, std::optional cccc = {}, std::optional pil = {}); template requires std::same_as, std::chrono::sys_days> && std::same_as, std::string_view> && std::same_as, std::string_view> static boost::outcome_v2::result> ListTextProducts(DateRange dates, CcccRange ccccs, PilRange pils); template requires std::same_as, std::string> static std::vector> LoadTextProducts(const Range& textProducts); private: class Impl; std::unique_ptr p; static boost::outcome_v2::result> ProcessTextProductLists(std::vector& asyncResponses); static std::vector> ProcessTextProductFiles( std::vector>& asyncResponses); static const std::shared_ptr logger_; static const std::string kBaseUrl_; static const std::string kListNwsTextProductsEndpoint_; static const std::string kNwsTextProductEndpoint_; }; } // namespace scwx::provider