class CUri16 : public CBase |
Dependencies : CBase, TUriC16. Comments : Provides 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 parsed uri information. It is owning. It uses 16-bit descriptors.
Public Member Functions | |
---|---|
~CUri16() | |
IMPORT_C CUri16 * | CreateFileUriL(const TDesC &, TUint) |
IMPORT_C CUri16 * | CreatePrivateFileUriL(const TDesC &, TDriveNumber, TInt) |
IMPORT_C CUri16 * | NewL(const TUriC16 &) |
IMPORT_C CUri16 * | NewL() |
IMPORT_C CUri16 * | NewLC(const TUriC16 &) |
IMPORT_C CUri16 * | NewLC() |
IMPORT_C void | RemoveComponentL(TUriComponent) |
IMPORT_C CUri16 * | ResolveL(const TUriC16 &, const TUriC16 &) |
IMPORT_C void | SetComponentL(const TDesC16 &, TUriComponent) |
IMPORT_C const TUriC16 & | Uri() |
Private Member Functions | |
---|---|
CUri16(const TUriC16 &) | |
void | ConstructL() |
void | FormUriL() |
void | InitializeFileUriComponentsL(const TDesC &, TDriveNumber, TUint) |
Private Attributes | |
---|---|
TUriC16 | iUri |
HBufC16 * | iUriBuf |
CUri16 | ( | const TUriC16 & | aNewUri | ) | [private] |
Constructor. First phase of two-phase construction method. Does non-allocating construction.
const TUriC16 & aNewUri | The parsed uri component information from which to create the uri. |
void | ConstructL | ( | ) | [private] |
Second phase of two-phase construction method. Does any allocations required to fully construct the object.
IMPORT_C CUri16 * | CreateFileUriL | ( | const TDesC & | aFullFileName, |
TUint | aFlags = 0 | |||
) | [static] |
Allocates and constructs a file URI object for a specified file.
If the file exists on a fixed drive, then the file URI takes the form: 'file://<drive-letter>/<filepath including filename>'.
If the file exists on a removable media drive, then the file URI takes the form: 'file://ext-media/<filepath including filename>'.
IMPORT_C CUri16 * | CreatePrivateFileUriL | ( | const TDesC & | aRelativeFileName, |
TDriveNumber | aDrive, | |||
TInt | aFlags = 0 | |||
) | [static] |
Allocates and constructs a file URI object for a file that is private to the application.
If the file exists on a fixed drive, then the file URI takes the form 'file://private/<drive-letter>/<filepath including filename>'.
If the file exists on a removable media drive, then the file URI takes the form 'file://private/ext-media/<filepath including filename>'.
const TDesC & aRelativeFileName | A reference to the filename relative to the application's private directory. |
TDriveNumber aDrive | Drive number, if the private file stored on fixed drive, otherwise not used This is a TDriveNumber value |
TInt aFlags = 0 | A flag to indicate if the file exists on a fixed drive or removable media drive. This is a TFileUriFlags value. |
void | FormUriL | ( | ) | [private] |
Forms the uri from the parsed uri information. A copy of the parsed uri is created. The parsed uri is changed to refer to the copy.
void | InitializeFileUriComponentsL | ( | const TDesC & | aFileName, |
TDriveNumber | aDrive, | |||
TUint | aFlags | |||
) | [private] |
Initializes the file URI components (scheme, empty hostname and path).
It uses GenerateFileUriPathL() to generate a file Uri path using the filename and drive.
const TDesC & aFileName | A reference to a filename |
TDriveNumber aDrive | A drive number. This is a TFileUriFlags value. |
TUint aFlags | A flag to indicate if the file exists on a fixed drive or removable media drive. This is a TFileUriFlags value. |
IMPORT_C CUri16 * | NewL | ( | const TUriC16 & | aUri | ) | [static] |
Static factory constructor. Uses two phase construction and leaves nothing on the CleanupStack. Creates a uri object which is a copy of the input parameter aUri.
const TUriC16 & aUri | A reference to a parsed uri object. |
IMPORT_C CUri16 * | NewL | ( | ) | [static] |
Static factory constructor. Uses two phase construction and leaves nothing on the CleanupStack. Creates a uri object which is empty.
IMPORT_C CUri16 * | NewLC | ( | const TUriC16 & | aUri | ) | [static] |
Static factory constructor. Uses two phase construction and leaves a pointer to created object on the CleanupStack. Creates a uri object which is a copy of the input parameter aUri.
const TUriC16 & aUri | A reference to a parsed uri object. |
IMPORT_C CUri16 * | NewLC | ( | ) | [static] |
Static factory constructor. Uses two phase construction and leaves a pointer to created object on the CleanupStack. Creates a uri object which is empty.
IMPORT_C void | RemoveComponentL | ( | TUriComponent | aComponent | ) |
Removes the specified component from the uri. If the component does not exist then this function does nothing.
If host is removed, then userinfo and port components will also be removed.
TUriComponent aComponent | An enum specifying the component to be removed. |
IMPORT_C CUri16 * | ResolveL | ( | const TUriC16 & | aBaseUri, |
const TUriC16 & | aRefUri | |||
) | [static] |
Static factory constructor. This creates a CUri16 object that is an absolute uri resulting from a reference uri being resolved against a base uri.
Ownership of created CUri16 object is transferred to caller.
IMPORT_C void | SetComponentL | ( | const TDesC16 & | aData, |
TUriComponent | aComponent | |||
) |
Sets the specified component in the uri. The component is set to the value given in the argument aData. If the specified component already exists then it is replaced with the new value.
The userinfo and port components can only be set if the host component is present. Setting these components without a host component present will have no effect on the uri.
const TDesC16 & aData | A descriptor pointer to the new value for the uri component. |
TUriComponent aComponent | An enum specifying the component to be set. |
IMPORT_C const TUriC16 & | Uri | ( | ) | const |
Provides a reference to the parsed uri. Allows access to the non-modifying API for TUriC16.
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.