Archived
1
0
This repository has been archived on 2024-10-17. You can view files and clone it, but cannot push or open issues or pull requests.
winamp/Src/external_dependencies/cpr/include/cpr/accept_encoding.h
2024-09-24 14:54:57 +02:00

37 lines
905 B
C++

#ifndef CPR_ACCEPT_ENCODING_H
#define CPR_ACCEPT_ENCODING_H
#include <curl/curlver.h>
#include <initializer_list>
#include <map>
#include <string>
#include <vector>
namespace cpr {
enum class AcceptEncodingMethods {
identity,
deflate,
zlib,
gzip,
};
static const std::map<AcceptEncodingMethods, std::string> AcceptEncodingMethodsStringMap{{AcceptEncodingMethods::identity, "identity"}, {AcceptEncodingMethods::deflate, "deflate"}, {AcceptEncodingMethods::zlib, "zlib"}, {AcceptEncodingMethods::gzip, "gzip"}};
class AcceptEncoding {
public:
AcceptEncoding() = default;
AcceptEncoding(const std::initializer_list<AcceptEncodingMethods>& methods);
AcceptEncoding(const std::initializer_list<std::string>& methods);
bool empty() const noexcept;
const std::string getString() const;
private:
std::vector<std::string> methods_;
};
} // namespace cpr
#endif