|
Squid Web Cache master
|
#include <UriScheme.h>
Public Types | |
| typedef std::vector< SBuf > | LowercaseSchemeNames |
Public Member Functions | |
| UriScheme () | |
| UriScheme (AnyP::ProtocolType const aScheme, const char *img=nullptr) | |
| UriScheme (const AnyP::UriScheme &o) | |
| UriScheme (AnyP::UriScheme &&)=default | |
| ~UriScheme () | |
| AnyP::UriScheme & | operator= (const AnyP::UriScheme &o) |
| AnyP::UriScheme & | operator= (AnyP::UriScheme &&)=default |
| operator AnyP::ProtocolType () const | |
| bool | operator!= (AnyP::ProtocolType const &aProtocol) const |
| SBuf | image () const |
| Port | defaultPort () const |
Static Public Member Functions | |
| static void | Init () |
| initializes down-cased protocol scheme names array | |
| static AnyP::ProtocolType | FindProtocolType (const SBuf &) |
Private Attributes | |
| AnyP::ProtocolType | theScheme_ |
| This is a typecode pointer into the enum/registry of protocols handled. | |
| SBuf | image_ |
| the string representation | |
Static Private Attributes | |
| static LowercaseSchemeNames | LowercaseSchemeNames_ |
This class represents a URI Scheme such as http:// https://, wais://, urn: etc. It does not represent the PROTOCOL that such schemes refer to.
Definition at line 31 of file UriScheme.h.
| typedef std::vector<SBuf> AnyP::UriScheme::LowercaseSchemeNames |
Definition at line 34 of file UriScheme.h.
|
inline |
Definition at line 36 of file UriScheme.h.
| AnyP::UriScheme::UriScheme | ( | AnyP::ProtocolType const | aScheme, |
| const char * | img = nullptr |
||
| ) |
| img | Explicit scheme representation for unknown/none schemes. |
Definition at line 16 of file UriScheme.cc.
References SBuf::at(), image_, LowercaseSchemeNames_, AnyP::PROTO_MAX, AnyP::PROTO_NONE, AnyP::PROTO_UNKNOWN, and theScheme_.
|
inline |
Definition at line 39 of file UriScheme.h.
|
default |
|
inline |
Definition at line 41 of file UriScheme.h.
| AnyP::Port AnyP::UriScheme::defaultPort | ( | ) | const |
Definition at line 71 of file UriScheme.cc.
References AnyP::PROTO_COAP, AnyP::PROTO_COAPS, AnyP::PROTO_FTP, AnyP::PROTO_HTTP, AnyP::PROTO_HTTPS, AnyP::PROTO_WAIS, and AnyP::PROTO_WHOIS.
Referenced by ClientRequestContext::hostHeaderVerify(), and AnyP::Uri::parse().
|
static |
Definition at line 52 of file UriScheme.cc.
References SBuf::isEmpty(), AnyP::PROTO_NONE, AnyP::PROTO_UNKNOWN, and SBuf::toLower().
Referenced by uriParseScheme().
|
inline |
Get a char string representation of the scheme. Does not include the ':' or "://" terminators.
Definition at line 57 of file UriScheme.h.
References image_.
Referenced by Format::Format::assemble(), buildUrlFromHost(), carpSelectParent(), clientHttpConnectionsOpen(), ErrorState::compileLegacyCode(), AnyP::PortCfg::ipV4clone(), AnyP::operator<<(), AnyP::operator<<(), AnyP::Uri::parse(), parsePortSpecification(), prepareAcceleratedURL(), ConnStateData::prepareTlsSwitchingURL(), prepareTransparentURL(), and TestUriScheme::testC_str().
|
static |
Definition at line 38 of file UriScheme.cc.
References AnyP::PROTO_MAX, AnyP::PROTO_NONE, AnyP::ProtocolType_str, and SBuf::toLower().
Referenced by SquidMain().
|
inline |
Definition at line 50 of file UriScheme.h.
References theScheme_.
|
inline |
Definition at line 52 of file UriScheme.h.
References theScheme_.
|
default |
|
inline |
Definition at line 43 of file UriScheme.h.
References image_, and theScheme_.
|
private |
Definition at line 76 of file UriScheme.h.
Referenced by UriScheme(), image(), and operator=().
|
staticprivate |
optimization: stores down-cased protocol scheme names, copied from AnyP::ProtocolType_str
Definition at line 70 of file UriScheme.h.
Referenced by UriScheme().
|
private |
Definition at line 73 of file UriScheme.h.
Referenced by UriScheme(), operator AnyP::ProtocolType(), operator!=(), and operator=().