The validity of components within a URI can checked using
TUriParser8::Validate()
.
_LIT8(KUri,"http://web.intra/Dev/Sysdoc/devlib.htm");
TUriParser8* parser;
TInt result = parser->Validate(); //validate the parsed URI
TUriParser8::Validate()
returns:
KErrNone
, if the URI is shown as valid
KUriUtilsErrInvalidUri
, if the URI is shown as invalid
KErrNotSupported
, if the URI cannot be shown as valid.
This function validates only SIP and SIPS scheme components.
To check if the scheme is valid, call
TUriC8::IsSchemeValid()
. If scheme is not found in the
URI, the return value indicates an invalid scheme.