class CUri8 : public CBase |
Dependencies : CBase, TUriC8. 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 8-bit descriptors.
Public Member Functions | |
---|---|
~CUri8() | |
IMPORT_C CUri8 * | CreateFileUriL(const TDesC &, TUint) |
IMPORT_C CUri8 * | CreatePrivateFileUriL(const TDesC &, TDriveNumber, TInt) |
IMPORT_C CUri8 * | NewL(const TUriC8 &) |
IMPORT_C CUri8 * | NewL() |
IMPORT_C CUri8 * | NewLC(const TUriC8 &) |
IMPORT_C CUri8 * | NewLC() |
IMPORT_C void | RemoveComponentL(TUriComponent) |
IMPORT_C CUri8 * | ResolveL(const TUriC8 &, const TUriC8 &) |
IMPORT_C void | SetComponentL(const TDesC8 &, TUriComponent) |
IMPORT_C const TUriC8 & | Uri() |
Private Member Functions | |
---|---|
CUri8(const TUriC8 &) | |
void | ConstructL() |
void | FormUriL() |
void | InitializeFileUriComponentsL(const TDesC &, TDriveNumber, TUint) |
Private Attributes | |
---|---|
TUriC8 | iUri |
HBufC8 * | iUriBuf |
CUri8 | ( | const TUriC8 & | aNewUri | ) | [private] |
Constructor. First phase of two-phase construction method. Does non-allocating construction.
const TUriC8 & 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 CUri8 * | 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 CUri8 * | 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 CUri8 * | NewL | ( | const TUriC8 & | 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 TUriC8 & aUri | A reference to a parsed uri object. |
IMPORT_C CUri8 * | NewL | ( | ) | [static] |
Static factory constructor. Uses two phase construction and leaves nothing on the CleanupStack. Creates a uri object which is empty.
IMPORT_C CUri8 * | NewLC | ( | const TUriC8 & | 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 TUriC8 & aUri | A reference to a parsed uri object. |
IMPORT_C CUri8 * | 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 CUri8 * | ResolveL | ( | const TUriC8 & | aBaseUri, |
const TUriC8 & | aRefUri | |||
) | [static] |
Static factory constructor. This creates a CUri8 object that is an absolute uri resulting from a reference uri being resolved against a base uri.
Ownership of created CUri8 object is transferred to the caller.
IMPORT_C void | SetComponentL | ( | const TDesC8 & | aData, |
TUriComponent | aComponent | |||
) |
Intended Usage : 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 TDesC8 & 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 TUriC8 & | Uri | ( | ) | const |
Provides a reference to the parsed uri. Allows access to the non-modifying API for TUriC8.
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.