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