Ada
3.4.3
Fast spec-compliant URL parser
Toggle main menu visibility
Loading...
Searching...
No Matches
scheme.h
Go to the documentation of this file.
1
11
#ifndef ADA_SCHEME_H
12
#define ADA_SCHEME_H
13
14
#include "
ada/common_defs.h
"
15
16
#include <string>
17
25
namespace
ada::scheme
{
26
41
enum
type
: uint8_t {
42
HTTP
= 0,
43
NOT_SPECIAL
= 1,
44
HTTPS
= 2,
45
WS
= 3,
46
FTP
= 4,
47
WSS
= 5,
48
FILE
= 6
49
};
50
57
ada_really_inline
constexpr
bool
is_special(std::string_view
scheme
);
58
65
constexpr
uint16_t
get_special_port
(std::string_view
scheme
)
noexcept
;
66
73
constexpr
uint16_t
get_special_port
(
ada::scheme::type
type
)
noexcept
;
74
80
constexpr
ada::scheme::type
get_scheme_type
(std::string_view
scheme
)
noexcept
;
81
82
}
// namespace ada::scheme
83
84
#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:72
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:57