Ada 2.8.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 <array>
11#include <optional>
12#include <string>
13
18namespace ada::scheme {
19
30enum type : uint8_t {
31 HTTP = 0,
33 HTTPS = 2,
34 WS = 3,
35 FTP = 4,
36 WSS = 5,
37 FILE = 6
38};
39
50ada_really_inline constexpr bool is_special(std::string_view scheme);
51
62constexpr uint16_t get_special_port(std::string_view scheme) noexcept;
63
68constexpr uint16_t get_special_port(ada::scheme::type type) noexcept;
73constexpr ada::scheme::type get_scheme_type(std::string_view scheme) noexcept;
74
75} // namespace ada::scheme
76
77#endif // ADA_SCHEME_H
Common definitions for cross-platform compiler support.
#define ada_really_inline
Definition common_defs.h:84
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:32
constexpr uint16_t get_special_port(std::string_view scheme) noexcept
Definition scheme-inl.h:57