TUriC16 Class Reference
Dependencies : TUriComponent. Comments : Provides non-modifying functionality on the components of a uri object as defined in RFC2396. There are 5 components; scheme, authority, path, query and fragment.
The object holds descriptor pointers to the parsed uri components and a descriptor pointer to the uri. It is non-owning. It uses 16-bit descriptors.
The functionality provided by this API allows the uri components to be extracted from the parsed uri, checked for their presence in the uri and be compared with those in another
TUriC16 object. Deprecated in 9.1
- Since
- 6.0
Constructor & Destructor Documentation
TUriC16()
IMPORT_C | TUriC16 | ( | ) | [protected] |
Constructor.
- Since
- 6.0
Deprecated in 9.1
Member Functions Documentation
Compare(const TUriC16 &, TUriComponent)
Compares the specified component against the one in the uri passed in.
- Since
- 6.0
Deprecated in 9.1
Parameters
const TUriC16 & aUri | The uri to compare components against. |
TUriComponent aComponent | The enum specifying the component to compare. |
DisplayFormL(TUriComponent)
Create a new HBufC descriptor containing the desired component or the full URI. Deprecated in 9.1 - provided for compatibility
Parameters
TUriComponent aComponent = EUriComplete | The component to convert into Unicode (EUriScheme - EUriFragment), or the full URI (EUriComplete -- the default). |
Equivalent(const TUriC16 &)
Deprecated in 9.1 -- provided for compatibility
Compares the given URI to determine if it is equivalent to this URI. It is possible for URIs declared NOT equivalent by this method to be equvalent to a level not checked by this method.
Parameters
const TUriC16 & aUri | Contains URI to compare |
EquivalentL(const TDesC16 &)
Deprecated in 9.1
Compares the given URI to determine if it is equivalent to this URI. It is possible for URIs declared NOT equivalent by this method to be equvalent to a level not checked by this method.
Parameters
const TDesC16 & aUri | Contains URI to compare |
Extract(TUriComponent)
Retrieves the specified component in the uri.
- Since
- 6.0
Deprecated in 9.1
GetFileNameL()
IMPORT_C HBufC * | GetFileNameL | ( | ) | const |
Generates a fully-qualified filename from a file URI object.
The form of the returned filename depends on the file location, as follows:
public file on a fixed drive:
file://c/path/to/file/name.ext -> c:\path\to\file\name.ext
-
public file on removable media drive: The fully-qualified filename is resolved by finding the first drive on which the file exists. If the file does not exist, this will Leave with KErrNotFound
file://ext-media/path/to/file/name.ext -> f:\path\to\file\name.ext
(where f: is the first drive found containing "\path\to\file\name.ext")
The returned file name is not guaranteed to exist except where specified above.
Be warned that this method may be slow when resolving special paths (like "/ext-media")
-
leave
- KErrNotSupported URI does not specify a local file
-
leave
- KErrNotFound If the URI indicates the file is on removable media and the file does not exist on any.
- Since
- 9.1
- Pre-condition
- Object is fully constructed.
GetFileNameL(TUriFileName)
This creates a file name from the URI, changing the network path separator (/) to the local file system path separator (\).
If called with EUriFileNamePath, this will generate a file name containing the path relative to the drive. Any parameters in the URI are stripped off:
http://www.foo.com/dir/file/name.ext;param1;param2 -> \dir\file\name.ext
If called with EUriFileNameTail, this will generate a just the name, with no directories or drive. Any parameters in the URI are stripped off:
http://www.foo.com/dir/file/name.ext;param1;param2 -> name.ext
EUriFileNamePath and EUriFileNameTail can be used for any hierarchical URI (http, ftp, file) and may have unexpected behaviour when called on any other type of URI.
If called with EUriFileNameFull, this will convert the URI into a fully-qualified filename. this is only valid for file URIs and will Leave if called on any other type of URI. The form of the returned filename is described in GetFileNameL with no arguments.
-
leave
- KErrNotSupported The URI scheme cannot be converted into the desired type
- Since
- 9.1
- Pre-condition
- Object is fully constructed.
Parameters
TUriFileName aType | specifies what part of the filename is to be converted. The default is (EUriFileNameFull). |
IsPresent(TUriComponent)
Indicates whether the specified component is present in the uri.
- Since
- 6.0
Deprecated in 9.1
IsSchemeValid()
IMPORT_C TBool | IsSchemeValid | ( | ) | const |
Checks to see if the scheme is valid. If there is no scheme then the return value indicates an invalid scheme (EFalse).
- Since
- 6.0
Deprecated in 9.1
Reset()
Resets the descriptor pointers for the uri components and the uri.
- Since
- 6.0
- Post-condition
- All uri component information is removed and the uri descriptor is set to NULL.
UriDes()
IMPORT_C const TDesC16 & | UriDes | ( | ) | const |
Retrieves the descriptor for the entire uri.
- Since
- 6.0
Deprecated in 9.1
UriWithoutFragment(TPtrC16 &)
IMPORT_C void | UriWithoutFragment | ( | TPtrC16 & | aUriNoFrag | ) | const |
Retrieves the uri without the fragment component.
- Since
- 6.0
Deprecated in 9.1
Parameters
TPtrC16 & aUriNoFrag | An output parameter which is set the non-reference version of the uri. |
Validate()
IMPORT_C TInt | Validate | ( | ) | const |
Deprecated in 9.1 -- provided for compatibility
Ensures that all components of the URI are valid. If the method returns KUriUtilsErrInvalidUri then one or more components are not valid. It is possible for URIs declared valid by this method to be, on detailed inspection, invalid.
ValidateL()
TInt
| ValidateL | ( | ) | const [private] |
Deprecated in 9.1
Ensures that all components of the URI are valid. If the method returns KUriUtilsErrInvalidUri then one or more components are not valid. It is possible for URIs declared valid by this method to be, on detailed inspection, invalid.
Member Data Documentation
TPtrC16
iComponent
The array of descriptor pointers to the uri components.
TPtrC16
iUriDes
The descriptor pointer to the uri.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.