Loading...
Searching...
No Matches
scheme.h
Go to the documentation of this file.
#ifndef ADA_SCHEME_H
#define ADA_SCHEME_H
#include "ada/common_defs.h"
#include <string>
namespace ada::scheme {
enum type : uint8_t {
HTTP = 0,
NOT_SPECIAL = 1,
HTTPS = 2,
WS = 3,
FTP = 4,
WSS = 5,
FILE = 6
};
ada_really_inline constexpr bool is_special(std::string_view scheme);
constexpr uint16_t get_special_port(std::string_view scheme) noexcept;
constexpr uint16_t get_special_port(ada::scheme::type type) noexcept;
constexpr ada::scheme::type get_scheme_type(std::string_view scheme) noexcept;
} // namespace ada::scheme
#endif // ADA_SCHEME_H
common_defs.h
Cross-platform compiler macros and common definitions.
ada_really_inline
#define ada_really_inline
Definition common_defs.h:85
ada::scheme
URL scheme utilities and constants.
Definition scheme-inl.h:10
ada::scheme::get_scheme_type
constexpr ada::scheme::type get_scheme_type(std::string_view scheme) noexcept
Definition scheme-inl.h:107
ada::scheme::type
type
Enumeration of URL scheme types.
Definition scheme.h:41
ada::scheme::FTP
@ FTP
Definition scheme.h:46
ada::scheme::WS
@ WS
Definition scheme.h:45
ada::scheme::HTTP
@ HTTP
Definition scheme.h:42
ada::scheme::FILE
@ FILE
Definition scheme.h:48
ada::scheme::NOT_SPECIAL
@ NOT_SPECIAL
Definition scheme.h:43
ada::scheme::WSS
@ WSS
Definition scheme.h:47
ada::scheme::HTTPS
@ HTTPS
Definition scheme.h:44
ada::scheme::get_special_port
constexpr uint16_t get_special_port(std::string_view scheme) noexcept
Definition scheme-inl.h:90