Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <cchfcontentloader.h>
Link against: chf.lib
This item is not part of the S60 5th Edition SDK

Class CCHFContentLoader

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

Members

Defined in CCHFContentLoader:

Inherited from CBase:


Construction and destruction


NewL(const TDesC8 &,MCHFContentLoaderObserver &,CCHFSession &,MCHFParent &,const TRect &)

IMPORT_C static 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

CCHFContentLoader *

Leave codes

KErrNoMemory

Other

Leaves if a data supplier cannot be found


NewL(RFile &,MCHFContentLoaderObserver &,CCHFSession &,MCHFParent &,const TRect &)

IMPORT_C static 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

CCHFContentLoader *

Leave codes

KErrNoMemory

Other

Leaves if a data supplier cannot be found


NewL(RFile &,MCHFContentLoaderObserver &,CCHFSession &,MCHFParent &,const TRect &,ContentAccess::TIntent)

IMPORT_C static 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

CCHFContentLoader *

Leave codes

KErrNoMemory

Other

Leaves if a data supplier cannot be found


~CCHFContentLoader()

IMPORT_C ~CCHFContentLoader();

Description

Destructor

[Top]


Member functions


ReceivedCompleteL(TInt)

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.


DSRunError(TInt)

private: virtual TInt DSRunError(TInt aError);

Description

Called to report error conditions.

This is usually under circumstances where CCHFContentLoader::ReceivedCompleteL(TInt) is inappropriate because of being a leave method. The same condition of use as CCHFContentLoader::ReceivedCompleteL(TInt) 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.