Ada
4.1.1
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 <cstdint>
17
#include <string>
18
#include <string_view>
19
27
namespace
ada::scheme
{
28
43
enum
type
: uint8_t {
44
HTTP
= 0,
45
NOT_SPECIAL
= 1,
46
HTTPS
= 2,
47
WS
= 3,
48
FTP
= 4,
49
WSS
= 5,
50
FILE
= 6
51
};
52
59
ada_really_inline
constexpr
bool
is_special(std::string_view
scheme
);
60
67
constexpr
uint16_t
get_special_port
(std::string_view
scheme
)
noexcept
;
68
75
constexpr
uint16_t
get_special_port
(
ada::scheme::type
type
)
noexcept
;
76
82
constexpr
ada::scheme::type
get_scheme_type
(std::string_view
scheme
)
noexcept
;
83
84
}
// namespace ada::scheme
85
86
#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:14
ada::scheme::get_scheme_type
constexpr ada::scheme::type get_scheme_type(std::string_view scheme) noexcept
Definition
scheme-inl.h:111
ada::scheme::type
type
Enumeration of URL scheme types.
Definition
scheme.h:43
ada::scheme::FTP
@ FTP
Definition
scheme.h:48
ada::scheme::WS
@ WS
Definition
scheme.h:47
ada::scheme::HTTP
@ HTTP
Definition
scheme.h:44
ada::scheme::FILE
@ FILE
Definition
scheme.h:50
ada::scheme::NOT_SPECIAL
@ NOT_SPECIAL
Definition
scheme.h:45
ada::scheme::WSS
@ WSS
Definition
scheme.h:49
ada::scheme::HTTPS
@ HTTPS
Definition
scheme.h:46
ada::scheme::get_special_port
constexpr uint16_t get_special_port(std::string_view scheme) noexcept
Definition
scheme-inl.h:94