class ContentAccess::CVirtualPath : public CBase |
A virtual path describes the location of the file (URI) and the location of a content object within that file (Unique Id).
The URI must conform to the standard defined in RFC2396, found at http://www.ietf.org/.
CVirtualPath makes a copy of the URI and UniqueId used to identify a particular content object within a file.
The TVirtualPathPtr cast operator allows the CVirtualPath object to be used with CAF functions requiring a TVirtualPathPtr.
<URI><KCafVirtualPathSeparator><UniqueID>
// Create a CVirtualPath object to point to OBJECT1 inside file.dcf CVirtualPath *path = CVirtualPath::NewL(_L("C:\\directory\file.dcf"), _L("OBJECT1")); // convert the URI and unique ID into a single URI. TVirtualPathPtr aPath = path->GetCombinedUriUniqueId();
If a URI is supplied which contains multiple KCafVirtualPathSeparator characters the rightmost KCafVirtualPathSeparator character will be taken as marking the end of the URI and the start of the UniqueId. When multiple KCafVirtualPathSeparator characters are present, under certain situations this will result in an invalid URI and UniqueId being created for the virtual path and can lead to an undefined failure.
Public Member Functions | |
---|---|
~CVirtualPath() | |
IMPORT_C void | ExternalizeL(RWriteStream &) |
IMPORT_C const TDesC & | GetCombinedUriUniqueId() |
IMPORT_C CVirtualPath * | NewL(const TVirtualPathPtr &) |
IMPORT_C CVirtualPath * | NewL(const TDesC &) |
IMPORT_C CVirtualPath * | NewL(const TDesC &, const TDesC &) |
IMPORT_C CVirtualPath * | NewL(RReadStream &) |
IMPORT_C const TDesC & | URI() |
IMPORT_C const TDesC & | UniqueId() |
operator const TVirtualPathPtr &() |
Private Member Functions | |
---|---|
CVirtualPath(const TVirtualPathPtr &) | |
void | ConstructL() |
void | CreateCombinedUriUniqueIdL(const TDesC &, const TDesC &) |
void | InternalizeL(RReadStream &) |
Private Attributes | |
---|---|
HBufC * | iCombinedUriUniqueId |
TPtrC | iCombinedUriUniqueIdPtr |
HBufC * | iURI |
HBufC * | iUniqueId |
TVirtualPathPtr | iVirtualPathPtr |
CVirtualPath | ( | const TVirtualPathPtr & | aPtr | ) | [private] |
const TVirtualPathPtr & aPtr |
void | CreateCombinedUriUniqueIdL | ( | const TDesC & | aUri, |
const TDesC & | aUniqueId | |||
) | [private] |
Used to continue initialisation and setup iCombinedPtr
IMPORT_C void | ExternalizeL | ( | RWriteStream & | aStream | ) | const |
Allows the class to write itself to a stream
RWriteStream & aStream | The stream to write to |
IMPORT_C const TDesC & | GetCombinedUriUniqueId | ( | ) |
Convert the CVirtualPath to a single URI representing a particular content object. The URI and UniqueId will be separated by a KCafVirtualPathSeparator() A descriptor contaning the URI and UniqueId concatenated together
void | InternalizeL | ( | RReadStream & | aStream | ) | [private] |
RReadStream & aStream |
IMPORT_C CVirtualPath * | NewL | ( | const TVirtualPathPtr & | aPtr | ) | [static] |
Create a CVirtualPath object from a TVirtualPathPtr a new CVirtualPath object
const TVirtualPathPtr & aPtr | The location of the content object |
IMPORT_C CVirtualPath * | NewL | ( | const TDesC & | aCombinedUriUniqueId | ) | [static] |
Create a virtual path object from a combined Uri and UniqueId
This constructs a CVirtual path from a single descriptor.
Note that the descriptor here may be just a URI or it could be a URI concatenated with the file's UniqueId. If it is a concatenated URI and UniqueId the URI and UniqueId will be seperated by the KCasfVirtualPathSeparator character. For more information see above. a new CVirtualPath object
const TDesC & aCombinedUriUniqueId | The location of the content object |
IMPORT_C CVirtualPath * | NewL | ( | const TDesC & | aURI, |
const TDesC & | aUniqueId | |||
) | [static] |
Create a virtual path object for a specific content object within a file a new CVirtualPath object
IMPORT_C CVirtualPath * | NewL | ( | RReadStream & | aStream | ) | [static] |
Construct and read a CVirtualPath object from a stream
RReadStream & aStream | The stream to read frin |
IMPORT_C const TDesC & | URI | ( | ) | const |
The location of the file containing the content object The location of the file
IMPORT_C const TDesC & | UniqueId | ( | ) | const |
UniqueId supplied by a CAF Agent to identify the object within the file. The uniqueId of the object within the file
operator const TVirtualPathPtr & | ( | ) | const [inline] |
Cast operator allowing the CVirtualPath to be used as a TVirtualPathPtr a TVirtualPathPtr with the same value as this object