ADTF  3.18.2
cUrl::cAuthority

Subclass representing and handling the authority subset as part of cUrl. More...

Classes

struct  sAuthority
 

Public Member Functions

 cAuthority (const cString &strAuthority=cString::Empty)
 Constructor of the authority subset of any URL. More...
 
 ~cAuthority ()
 Destructor.
 
tResult Validate (const cString &strAuthority)
 Validation method for the authority subset. More...
 
A_UTILS_NS::cString GetUser () const
 Retrieves the username if set. More...
 
A_UTILS_NS::cString GetPassword () const
 Retrieves the password if set. More...
 
A_UTILS_NS::cString GetHost () const
 Retrieves the host bit of the given URL. More...
 
tBool IsValidIPv4 () const
 The Host is a valid 1Pv4 adress.
 
tUInt16 GetPort () const
 Retrieves the host port of the given URL is applicable. More...
 
tBool IsValid () const
 Checks for the authority's validity. More...
 
A_UTILS_NS::cString AsString () const
 Getter method to retrieve the raw query string. More...
 

Private Attributes

A_UTILS_NS::cString m_strAuthority
 < The raw, unparsed authority string More...
 
tBool m_bIsValid
 Working data representing the individual parts of any URL's authority subset.
 
struct A_UTILS_NS::cUrl::cAuthority::sAuthority m_sAuthority
 

Detailed Description

Subclass representing and handling the authority subset as part of cUrl.

Parameters
strAuthorityThe authority subset of any given URL
Note
The authority subset includes user authentication (optional) and the host that is referred to by cUrl (mandatory)in the style of
'user:password@host:port'
where the password and the user can be omitted. If the host is not specified through a IPvX address but any other authority identifier (e.g. SHM Key) the port can be omitted.

Definition at line 126 of file url.h.

Constructor & Destructor Documentation

◆ cAuthority()

cAuthority ( const cString strAuthority = cString::Empty)

Constructor of the authority subset of any URL.

Parameters
strAuthoritythe authority part of a particular URL

Member Function Documentation

◆ AsString()

A_UTILS_NS::cString AsString ( ) const

Getter method to retrieve the raw query string.

Returns
Raw query data.

◆ GetHost()

A_UTILS_NS::cString GetHost ( ) const

Retrieves the host bit of the given URL.

Returns
The host address without port; cString::Empty if authority subset is invalid.

◆ GetPassword()

A_UTILS_NS::cString GetPassword ( ) const

Retrieves the password if set.

Returns
The password if any. Otherwise cString::Empty

◆ GetPort()

tUInt16 GetPort ( ) const

Retrieves the host port of the given URL is applicable.

Returns
The host port; 0 if authority subset is invalid or not applicable

◆ GetUser()

A_UTILS_NS::cString GetUser ( ) const

Retrieves the username if set.

Returns
The username if any. Otherwise cString::Empty

◆ IsValid()

tBool IsValid ( ) const

Checks for the authority's validity.

Return values
tFalseif authority subset is invalid or has not yet been validated.
tTrueif the authority subset is valid and the values could be extracted successfully.

◆ Validate()

tResult Validate ( const cString strAuthority)

Validation method for the authority subset.

Parameters
strAuthorityThe (mandatory) authority bit of particular URL if not already given through the constructor
Return values
ERR_NOERRORA valid authority has been given.
ERR_INVALID_ARGThe authority is syntactically invalid or incomplete

Member Data Documentation

◆ m_strAuthority

A_UTILS_NS::cString m_strAuthority
private

< The raw, unparsed authority string

Boolean flag used to determine if the url subset has already been verified

Definition at line 199 of file url.h.