ADTF
|
Class for general URL representation, handling and verification against the IETF-STD66. More...
Classes | |
class | cAuthority |
Subclass representing and handling the authority subset as part of cUrl. More... | |
class | cQuery |
Subclass representing and handling the query subset as part of cUrl. More... | |
Public Member Functions | |
cUrl (const cString &strUrl) | |
Constructor. More... | |
cUrl () | |
Default constructor. More... | |
~cUrl () | |
Destructor. | |
tResult | Validate (const cString &strUrl) |
Validation of the URL object. More... | |
tBool | IsValid () const |
Checks for the URL's validity. More... | |
tURIComponents | GetComponents () const |
Getter method to read the components of the currently abstracted URL. More... | |
A_UTILS_NS::cString | GetScheme () const |
Getter method to read the scheme bit of the URL object. More... | |
cAuthority | GetAuthority () const |
Getter method to read the authority bit of the URL object. More... | |
A_UTILS_NS::cString | GetPath () const |
Getter method to read the path bit of the URL object. More... | |
cQuery | GetQuery () const |
Getter method to read the query bit of the URL object. More... | |
A_UTILS_NS::cString | GetFragment () const |
Getter method to read the fragment bit of the URL object. More... | |
A_UTILS_NS::cString | AsString () const |
Exports the URL back as string. More... | |
Private Attributes | |
tURIComponents | m_sComponents |
< Working data representing the individual parts of any full URL's More... | |
tBool | m_bIsValidURL |
The URL as string representation. | |
A_UTILS_NS::cString | m_strFullUriString |
Class for general URL representation, handling and verification against the IETF-STD66.
The URL class simplifies the access to the values of any URL, passed as cString. It has to fulfill the following scheme pattern:
This class aims to handle any URL complying to STD66. However, for reasons of backwards compatibility, the proprietary syntax of the URLs introduced in earlier utils pattern is supported as well.
STD-66 URLs might bear the following structure:
Interpretation of the individual parts, however, depend on upper application layers linking against the A_UTILS library.
In contrast to STD-66 URLs, proprietary URLs with following scheme are supported
Usage: After construction you should call function cUrl::IsValid() to determine the URL's validity. If it is found to be valid, cUrl::cQuery and cUrl::cAuthority along with the Getter methods can be used to extract the required URL parts and subsets.
Constructor.
strUrl | The full URL that shall be abstracted and validated. |
cUrl | ( | ) |
Default constructor.
A_UTILS_NS::cString AsString | ( | ) | const |
Exports the URL back as string.
cAuthority GetAuthority | ( | ) | const |
Getter method to read the authority bit of the URL object.
tURIComponents GetComponents | ( | ) | const |
Getter method to read the components of the currently abstracted URL.
A_UTILS_NS::cString GetFragment | ( | ) | const |
Getter method to read the fragment bit of the URL object.
A_UTILS_NS::cString GetPath | ( | ) | const |
Getter method to read the path bit of the URL object.
cQuery GetQuery | ( | ) | const |
Getter method to read the query bit of the URL object.
A_UTILS_NS::cString GetScheme | ( | ) | const |
Getter method to read the scheme bit of the URL object.
tBool IsValid | ( | ) | const |
Checks for the URL's validity.
tFalse | if the URL or any of it's subsets are invalid or have not yet been validated. |
tTrue | if the URL is valid and it's values could be extracted successfully. |
Validation of the URL object.
If given url is valid it will be also set for current object.
strUrl | The URL string to set and validate. |
ERR_NOERROR | A valid URL has been given and it's subset have successfully been read |
ERR_INVALID_ARG | The URL is syntactically invalid or incomplete |
|
private |