ContentAccess::CVirtualPath Class Reference
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
.
The
GetCombinedUriUniqueId()
function allows it to "flatten" a virtual path into a single URI. The combined virtual path will be the URI concatenated with the UniqueId seperated by the KCafVirtualPathSeparator character taking the format.
<URI><KCafVirtualPathSeparator><UniqueID>
An example of this format is shown below:
// 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();
Note:
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.
Inherits from
-
ContentAccess::CVirtualPath
Constructor & Destructor Documentation
CVirtualPath(const TVirtualPathPtr &)
~CVirtualPath()
~CVirtualPath
|
(
|
)
|
[virtual]
|
Member Functions Documentation
ConstructL()
void
|
ConstructL
|
(
|
)
|
[private]
|
Allow derived classes to call 2nd phase constructor
CreateCombinedUriUniqueIdL(const TDesC &, const TDesC &)
void
|
CreateCombinedUriUniqueIdL
|
(
|
const
TDesC
&
|
aUri,
|
|
const
TDesC
&
|
aUniqueId
|
|
)
|
[private]
|
Used to continue initialisation and setup iCombinedPtr
ExternalizeL(RWriteStream &)
Allows the class to write itself to a stream
GetCombinedUriUniqueId()
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()
InternalizeL(RReadStream &)
NewL(const TVirtualPathPtr &)
NewL(const TDesC &)
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.
Parameters
const
TDesC
& aCombinedUriUniqueId
|
The location of the content object
|
NewL(const TDesC &, const TDesC &)
Create a virtual path object for a specific content object within a file
Parameters
const
TDesC
& aURI
|
The location of the file
|
const
TDesC
& aUniqueId
|
The location of the content within the file
|
URI()
IMPORT_C const
TDesC
&
|
URI
|
(
|
)
|
const
|
The location of the file containing the content object
UniqueId()
IMPORT_C const
TDesC
&
|
UniqueId
|
(
|
)
|
const
|
UniqueId supplied by a CAF Agent to identify the object within the file.
operator const TVirtualPathPtr &()
operator const TVirtualPathPtr &
|
(
|
)
|
const [inline]
|
Member Data Documentation
HBufC * iCombinedUriUniqueId
HBufC
*
|
iCombinedUriUniqueId
|
[private]
|
TPtrC
iCombinedUriUniqueIdPtr
TPtrC
|
iCombinedUriUniqueIdPtr
|
[private]
|
HBufC * iUniqueId
HBufC
*
|
iUniqueId
|
[private]
|
TVirtualPathPtr
iVirtualPathPtr
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.