Ada 3.1.0
Fast spec-compliant URL parser
Loading...
Searching...
No Matches
scheme.h
Go to the documentation of this file.
1
5#ifndef ADA_SCHEME_H
6#define ADA_SCHEME_H
7
8#include "ada/common_defs.h"
9
10#include <string>
11
16namespace ada::scheme {
17
28enum type : uint8_t {
29 HTTP = 0,
31 HTTPS = 2,
32 WS = 3,
33 FTP = 4,
34 WSS = 5,
35 FILE = 6
36};
37
48ada_really_inline constexpr bool is_special(std::string_view scheme);
49
60constexpr uint16_t get_special_port(std::string_view scheme) noexcept;
61
66constexpr uint16_t get_special_port(ada::scheme::type type) noexcept;
71constexpr ada::scheme::type get_scheme_type(std::string_view scheme) noexcept;
72
73} // namespace ada::scheme
74
75#endif // ADA_SCHEME_H
Common definitions for cross-platform compiler support.
#define ada_really_inline
Definition common_defs.h:81
Includes the scheme declarations.
Definition scheme-inl.h:10
constexpr ada::scheme::type get_scheme_type(std::string_view scheme) noexcept
Definition scheme-inl.h:72
@ NOT_SPECIAL
Definition scheme.h:30
constexpr uint16_t get_special_port(std::string_view scheme) noexcept
Definition scheme-inl.h:57