#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  More... | |
| static AnyP::ProtocolType | FindProtocolType (const SBuf &) | 
| Private Attributes | |
| AnyP::ProtocolType | theScheme_ | 
| This is a typecode pointer into the enum/registry of protocols handled.  More... | |
| SBuf | image_ | 
| the string representation  More... | |
| Static Private Attributes | |
| static LowercaseSchemeNames | LowercaseSchemeNames_ | 
Detailed Description
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.
Member Typedef Documentation
◆ LowercaseSchemeNames
Definition at line 34 of file UriScheme.h.
Constructor & Destructor Documentation
◆ UriScheme() [1/4]
| 
 | inline | 
Definition at line 36 of file UriScheme.h.
◆ UriScheme() [2/4]
| AnyP::UriScheme::UriScheme | ( | AnyP::ProtocolType const | aScheme, | 
| const char * | img = nullptr | ||
| ) | 
- Parameters
- 
  img Explicit scheme representation for unknown/none schemes. 
Definition at line 16 of file UriScheme.cc.
References image_, LowercaseSchemeNames_, AnyP::PROTO_MAX, AnyP::PROTO_NONE, AnyP::PROTO_UNKNOWN, and theScheme_.
◆ UriScheme() [3/4]
| 
 | inline | 
Definition at line 39 of file UriScheme.h.
◆ UriScheme() [4/4]
| 
 | default | 
◆ ~UriScheme()
| 
 | inline | 
Definition at line 41 of file UriScheme.h.
Member Function Documentation
◆ defaultPort()
| 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().
◆ FindProtocolType()
| 
 | static | 
- Returns
- ProtocolType for the given scheme name or PROTO_UNKNOWN
Definition at line 52 of file UriScheme.cc.
References Acl::Init(), SBuf::isEmpty(), AnyP::PROTO_NONE, AnyP::PROTO_UNKNOWN, and SBuf::toLower().
Referenced by uriParseScheme().
◆ image()
| 
 | 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::Uri::parse(), parsePortSpecification(), prepareAcceleratedURL(), ConnStateData::prepareTlsSwitchingURL(), prepareTransparentURL(), and TestUriScheme::testC_str().
◆ Init()
| 
 | 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().
◆ operator AnyP::ProtocolType()
| 
 | inline | 
Definition at line 50 of file UriScheme.h.
References theScheme_.
◆ operator!=()
| 
 | inline | 
Definition at line 52 of file UriScheme.h.
References theScheme_.
◆ operator=() [1/2]
| 
 | default | 
◆ operator=() [2/2]
| 
 | inline | 
Definition at line 43 of file UriScheme.h.
References image_, and theScheme_.
Member Data Documentation
◆ image_
| 
 | private | 
Definition at line 76 of file UriScheme.h.
Referenced by image(), operator=(), and UriScheme().
◆ LowercaseSchemeNames_
| 
 | staticprivate | 
optimization: stores down-cased protocol scheme names, copied from AnyP::ProtocolType_str
Definition at line 70 of file UriScheme.h.
Referenced by UriScheme().
◆ theScheme_
| 
 | private | 
Definition at line 73 of file UriScheme.h.
Referenced by operator AnyP::ProtocolType(), operator!=(), operator=(), and UriScheme().
The documentation for this class was generated from the following files:
- src/anyp/UriScheme.h
- src/anyp/UriScheme.cc
Introduction
- About Squid
- Why Squid?
- Squid Developers
- How to Donate
- How to Help Out
- Getting Squid
- Squid Source Packages
- Squid Deployment Case-Studies
- Squid Software Foundation
Documentation
- Quick Setup
- Configuration:
- FAQ and Wiki
- Guide Books:
- Non-English
- More...
Support
- Security Advisories
- Bugzilla Database
- Mailing lists
- Contacting us
- Commercial services
- Project Sponsors
- Squid-based products
