1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 08:47:17 +01:00
SqMod/vendor/CPR/include/cpr/accept_encoding.h
Sandu Liviu Catalin 9298065cef Update WIP discord and some vendors.
CPR has features disabled and PCRE is fully disabled until updated to new code.
2023-08-05 21:31:33 +03:00

42 lines
1.2 KiB
C++

#ifndef CPR_ACCEPT_ENCODING_H
#define CPR_ACCEPT_ENCODING_H
#include <curl/curlver.h>
#include <initializer_list>
#include <map>
#include <string>
#include <unordered_set>
namespace cpr {
enum class AcceptEncodingMethods {
identity,
deflate,
zlib,
gzip,
disabled,
};
// NOLINTNEXTLINE(cert-err58-cpp)
static const std::map<AcceptEncodingMethods, std::string> AcceptEncodingMethodsStringMap{{AcceptEncodingMethods::identity, "identity"}, {AcceptEncodingMethods::deflate, "deflate"}, {AcceptEncodingMethods::zlib, "zlib"}, {AcceptEncodingMethods::gzip, "gzip"}, {AcceptEncodingMethods::disabled, "disabled"}};
class AcceptEncoding {
public:
AcceptEncoding() = default;
// NOLINTNEXTLINE(google-explicit-constructor)
AcceptEncoding(const std::initializer_list<AcceptEncodingMethods>& methods);
// NOLINTNEXTLINE(google-explicit-constructor)
AcceptEncoding(const std::initializer_list<std::string>& methods);
[[nodiscard]] bool empty() const noexcept;
[[nodiscard]] const std::string getString() const;
[[nodiscard]] bool disabled() const;
private:
std::unordered_set<std::string> methods_;
};
} // namespace cpr
#endif