Software and Services, Portable Libraries
2019.Mar.01
A library for managing digital certificates
|
A basic implementation an a generic URI. More...
#include </home/doug/src/SoftwareAndServices/libSaSRfcBasic/Uri.hpp>
Classes | |
class | Header |
Each one holds one header Value. More... | |
class | NameValuePair |
Each one holds one name and value. More... | |
class | Parameter |
Each one holds one Parameter value. More... | |
Public Types | |
enum | Uri_t { Other_t, Cap_t, Cid_t, File_t, Ftp_t, Gopher_t, Http_t, Https_t, Ldap_t, MailTo_t, Mid_t, News_t, Nntp_t, Prosperp_t, Telnet_t, Wais_t, WebCal_t, WebDav_t, CalDav_t, Sql_t, LotusCal_t, MicrosoftCal_t, OracleCal_t, Sip_t, Sips_t, URI_LAST } |
The currently known URI types. More... | |
Public Member Functions | |
Uri () | |
Uri Constructor. More... | |
virtual | ~Uri () |
Uri Destructor. More... | |
void | AddHeader (const char *TheName, const char *TheValue) |
Add a new header to the URI. More... | |
void | AddParameter (const char *TheName, const char *TheValue) |
Add a new parameter to the URI. More... | |
virtual InstanceCount_t | decInstance () const |
Decrement the instance. More... | |
const Header * | GetHeader (unsigned long nTh) const |
Get the nTh Header and value object. More... | |
const Header * | GetHeader (const char *TheName) const |
Get the Header with the name TheName. More... | |
virtual InstanceCount_t | getInstance () const |
const Parameter * | GetParameter (unsigned long nTh) const |
Get the nTh Parameter and value object. More... | |
const Parameter * | GetParameter (const char *TheName) const |
Get the Parameter with the name TheName. More... | |
const char * | GetPassword () const |
short | GetPort () const |
const char * | GetScheme () const |
const char * | GetSchemeSpecific () const |
Uri_t | GetSchemeType () const |
const char * | GetServer () const |
const char * | GetUri () const |
const char * | GetUser () const |
size_t | HeaderCount () const |
virtual InstanceCount_t | incInstance () const |
Increment the instance. More... | |
bool | IsUri (const char *IsSuppotedUri) const |
void | operator delete (void *ToFree) |
bool | operator!= (const Uri *Other) const |
Uri != compare operator. More... | |
bool | operator!= (const Uri &Other) const |
Uri != compare operator. More... | |
bool | operator!= (const char *Other) const |
Uri != compare operator. More... | |
bool | operator== (const Uri *Other) const |
Uri == compare operator. More... | |
bool | operator== (const Uri &Other) const |
Uri == compare operator. More... | |
bool | operator== (const char *Other) const |
Uri == compare operator. More... | |
size_t | ParameterCount () const |
bool | Parse (const char *aString) |
Parse a string into a Uri. More... | |
void | SetPassword (const char *pw) |
Set the password part of the schema. More... | |
void | SetPort (const int port) |
Set the port number to use. More... | |
void | SetScheme (const char *type) |
Manually set the scheme (example http, ftp, file, ...). More... | |
void | SetSchemeSpecific (const char *value) |
Set the schema specific part of the Uri. More... | |
void | SetSchemeType (const Uri_t type, const char *otherType=NULL) |
Set the schema type. More... | |
void | SetServer (const char *server) |
Set the server name of the Uri. More... | |
void | SetUser (const char *user) |
Set the username part of the schema. More... | |
virtual bool | Sprint (string *Results) const |
Convert the contents of this Uri to a std::string. More... | |
virtual bool | Sprint (String &Results) const |
Convert the contents of this Uri to a std::string. More... | |
bool | Sprint (char *resultString, const size_t resultStringMaxSize) const |
Store the Uri into the named string. More... | |
Static Public Attributes | |
static const char * | URICalDav_s |
static const char * | URICap_s |
static const char * | URICid_s |
static const char * | URIFile_s |
static const char * | URIFtp_s |
static const char * | URIGopher_s |
static const char * | URIHttp_s |
static const char * | URIHttps_s |
static const char * | URILdap_s |
static const char * | URILotusCal_s |
static const char * | URIMailTo_s |
static const char * | URIMicrosoftCal_s |
static const char * | URIMid_s |
static const char * | URINews_s |
static const char * | URINntp_s |
static const char * | URIOracleCal_s |
static const char * | URIProsperp_s |
static const char * | URISip_s |
static const char * | URISips_s |
static const char * | URISql_s |
static const char * | URITelnet_s |
static const char * | UriTokenTable [40] |
A list of strings representing schemas. More... | |
static const char * | URIWais_s |
static const char * | URIWebCal_s |
static const char * | URIWebDav_s |
A basic implementation an a generic URI.
sip:user:password@host:port;uri-parameters?headers
The currently known URI types.
SoftwareAndServices::Library::RfcBasic::Uri::Uri | ( | ) |
Uri Constructor.
|
virtual |
Uri Destructor.
void SoftwareAndServices::Library::RfcBasic::Uri::AddHeader | ( | const char * | TheName, |
const char * | TheValue | ||
) |
void SoftwareAndServices::Library::RfcBasic::Uri::AddParameter | ( | const char * | TheName, |
const char * | TheValue | ||
) |
|
inlinevirtualinherited |
Decrement the instance.
Definition at line 129 of file instance.hpp.
const Header* SoftwareAndServices::Library::RfcBasic::Uri::GetHeader | ( | unsigned long | nTh | ) | const |
const Header* SoftwareAndServices::Library::RfcBasic::Uri::GetHeader | ( | const char * | TheName | ) | const |
|
inlinevirtualinherited |
Definition at line 118 of file instance.hpp.
const Parameter* SoftwareAndServices::Library::RfcBasic::Uri::GetParameter | ( | unsigned long | nTh | ) | const |
const Parameter* SoftwareAndServices::Library::RfcBasic::Uri::GetParameter | ( | const char * | TheName | ) | const |
const char* SoftwareAndServices::Library::RfcBasic::Uri::GetPassword | ( | ) | const |
short SoftwareAndServices::Library::RfcBasic::Uri::GetPort | ( | ) | const |
For known Uri_t types, a zero returned means use the default port.
const char* SoftwareAndServices::Library::RfcBasic::Uri::GetScheme | ( | ) | const |
const char* SoftwareAndServices::Library::RfcBasic::Uri::GetSchemeSpecific | ( | ) | const |
Uri_t SoftwareAndServices::Library::RfcBasic::Uri::GetSchemeType | ( | ) | const |
const char* SoftwareAndServices::Library::RfcBasic::Uri::GetServer | ( | ) | const |
const char* SoftwareAndServices::Library::RfcBasic::Uri::GetUri | ( | ) | const |
const char* SoftwareAndServices::Library::RfcBasic::Uri::GetUser | ( | ) | const |
size_t SoftwareAndServices::Library::RfcBasic::Uri::HeaderCount | ( | ) | const |
|
inlinevirtualinherited |
Increment the instance.
Definition at line 109 of file instance.hpp.
bool SoftwareAndServices::Library::RfcBasic::Uri::IsUri | ( | const char * | IsSuppotedUri | ) | const |
IsSuppotedUri | A string with an URI value. |
bool SoftwareAndServices::Library::RfcBasic::Uri::operator!= | ( | const Uri * | Other | ) | const |
bool SoftwareAndServices::Library::RfcBasic::Uri::operator!= | ( | const Uri & | Other | ) | const |
bool SoftwareAndServices::Library::RfcBasic::Uri::operator!= | ( | const char * | Other | ) | const |
bool SoftwareAndServices::Library::RfcBasic::Uri::operator== | ( | const Uri * | Other | ) | const |
bool SoftwareAndServices::Library::RfcBasic::Uri::operator== | ( | const Uri & | Other | ) | const |
bool SoftwareAndServices::Library::RfcBasic::Uri::operator== | ( | const char * | Other | ) | const |
size_t SoftwareAndServices::Library::RfcBasic::Uri::ParameterCount | ( | ) | const |
bool SoftwareAndServices::Library::RfcBasic::Uri::Parse | ( | const char * | aString | ) |
void SoftwareAndServices::Library::RfcBasic::Uri::SetPassword | ( | const char * | pw | ) |
Set the password part of the schema.
pw | The password of the schema value. |
void SoftwareAndServices::Library::RfcBasic::Uri::SetPort | ( | const int | port | ) |
Set the port number to use.
port | The port number to use, zero means use the default for the schema. |
void SoftwareAndServices::Library::RfcBasic::Uri::SetScheme | ( | const char * | type | ) |
Manually set the scheme (example http, ftp, file, ...).
type | A manually set scheme, will be internally converted to a Uri_t if possible. |
void SoftwareAndServices::Library::RfcBasic::Uri::SetSchemeSpecific | ( | const char * | value | ) |
Set the schema specific part of the Uri.
value | The schema specific type value. |
void SoftwareAndServices::Library::RfcBasic::Uri::SetSchemeType | ( | const Uri_t | type, |
const char * | otherType = NULL |
||
) |
Set the schema type.
type | An enumerated Uri_t. Ignored if otherType is supplied. |
otherType | Only supply when not specified in Uri_t. |
void SoftwareAndServices::Library::RfcBasic::Uri::SetServer | ( | const char * | server | ) |
Set the server name of the Uri.
server | The server as a hostname or IP address. |
void SoftwareAndServices::Library::RfcBasic::Uri::SetUser | ( | const char * | user | ) |
Set the username part of the schema.
user | The username of the schema value. |
|
virtual |
|
virtual |
bool SoftwareAndServices::Library::RfcBasic::Uri::Sprint | ( | char * | resultString, |
const size_t | resultStringMaxSize | ||
) | const |
Store the Uri into the named string.
resultString | Where to put the results. |
resultStringMaxSize | Put no more (including the terminating NIL bite into resultString. |
|
static |