Location:
cchfcontentloader.h
Link against: chf.lib
class CCHFContentLoader : public CBase, public MCHFDataSupplierObserver;
Description
Encapsulates the loading of a content handler.
CCHFContentLoader creates a data supplier for a given URI, runs the data supplier until the first block of data is available,
and then tries to find a content handler that matches the content type of the data.
A callback interface MCHFContentLoaderObserver is used to inform the client when a content handler has been found or if an error has occured. After this point the content
loader is automatically destroyed and any pointers to it are invalid.
Derivation
CCHFContentLoader - Encapsulates the loading of a content handler
Members
Defined in CCHFContentLoader:
DSRunError(), NewL(), NewL(), NewL(), ReceivedCompleteL(), ~CCHFContentLoader()
Inherited from CBase:
Delete(),
Extension_(),
operator new()
Inherited from MCHFDataSupplierObserver:
MCHFDataSupplierObserver_Reserved_1(),
MCHFDataSupplierObserver_Reserved_2(),
MCHFDataSupplierObserver_Reserved_3(),
MCHFDataSupplierObserver_Reserved_4()
static IMPORT_C CCHFContentLoader *NewL(const TDesC8 &aUri, MCHFContentLoaderObserver &aObserver, CCHFSession &aCHFSession,
MCHFParent &aParent, const TRect &aRenderingWindow);
Description
Creates a new CCHFContentLoader
Parameters
const TDesC8 &aUri |
The location of the content to be loaded
|
MCHFContentLoaderObserver &aObserver |
The client of the loader. This is informed when a content handler has been created or an error has occured
|
CCHFSession &aCHFSession |
The CHF session that is passed onto the content handler when it is created
|
MCHFParent &aParent |
The parent of the content handler that will be created
|
const TRect &aRenderingWindow |
The inital size of the content handler rendering window that is passed to it when it is created
|
|
Return value
Leave codes
KErrNoMemory |
|
Other |
Leaves if a data supplier cannot be found
|
|
static IMPORT_C CCHFContentLoader *NewL(RFile &aFile, MCHFContentLoaderObserver &aObserver, CCHFSession &aCHFSession, MCHFParent
&aParent, const TRect &aRenderingWindow);
Description
Creates a new CCHFContentLoader
Parameters
RFile &aFile |
The file containing the content to be loaded
|
MCHFContentLoaderObserver &aObserver |
The client of the loader. This is informed when a content handler has been created or an error has occured
|
CCHFSession &aCHFSession |
The CHF session that is passed onto the content handler when it is created
|
MCHFParent &aParent |
The parent of the content handler that will be created
|
const TRect &aRenderingWindow |
The inital size of the content handler rendering window that is passed to it when it is created
|
|
Return value
Leave codes
KErrNoMemory |
|
Other |
Leaves if a data supplier cannot be found
|
|
static IMPORT_C CCHFContentLoader *NewL(RFile &aFile, MCHFContentLoaderObserver &aObserver, CCHFSession &aCHFSession, MCHFParent
&aParent, const TRect &aRenderingWindow, ContentAccess::TIntent aContentAccessIntent);
Description
Creates a new CCHFContentLoader
Parameters
RFile &aFile |
The file containing the content to be loaded
|
MCHFContentLoaderObserver &aObserver |
The client of the loader. This is informed when a content handler has been created or an error has occured
|
CCHFSession &aCHFSession |
The CHF session that is passed onto the content handler when it is created
|
MCHFParent &aParent |
The parent of the content handler that will be created
|
const TRect &aRenderingWindow |
The inital size of the content handler rendering window that is passed to it when it is created
|
ContentAccess::TIntent aContentAccessIntent |
The DRM intent.
|
|
Return value
Leave codes
KErrNoMemory |
|
Other |
Leaves if a data supplier cannot be found
|
|
IMPORT_C ~CCHFContentLoader();
Description
Destructor
private: virtual void ReceivedCompleteL(TInt aCompleteCode);
Description
Called to report data supplier status.
It is usually called when the data supplier acquires a chunk of data or an error condition is encountered in the process.
This method MUST only be used to report back on an asynchronous activity.
Parameters
TInt aCompleteCode |
KErrNone or any system error code.
|
|
private: virtual TInt DSRunError(TInt aError);
Description
Called to report error conditions.
This is usually under circumstances where ReceivedCompleteL() is inappropriate because of being a leave method. The same condition of use as ReceivedCompleteL() applies.
Parameters
TInt aError |
Any system error code
|
|
Return value
TInt
|
KErrNone as acknowledgement of having dealt with the error condition, otherwise an error code. Note that a return other than
KErrNone could cause a panic.
|
|