CMPXCollectionOpenUtility Class Reference

class CMPXCollectionOpenUtility : public CBase

CMPXCollectionOpenUtility

Incremental OpenL() utility to open data in chunks

mpxcollectionutility.lib

Inherits from

Public Member Functions
~CMPXCollectionOpenUtility ()
IMPORT_C CMPXCollectionOpenUtility * NewL (MMPXCollectionObserver *, TUid )
IMPORT_C CMPXCollectionPath * PathL ()
IMPORT_C void SetDelay ( TInt )
IMPORT_C void SetDirection ( TDirection )
IMPORT_C void StartL ( TArray < TMPXAttribute >, TInt , TInt , TDirection , TMPXAttribute )
IMPORT_C void StartL (const CMPXCollectionPath &, TArray < TMPXAttribute >, TInt , TInt , TDirection , TMPXAttribute )
IMPORT_C void Stop ()
Protected Member Functions
void HandleCollectionMediaL (const CMPXMedia &, TInt )
void HandleCollectionMessage ( CMPXMessage *, TInt )
void HandleCommandComplete ( CMPXCommand *, TInt )
void HandleOpenL (const CMPXMedia &, TInt , TBool , TInt )
void HandleOpenL (const CMPXCollectionPlaylist &, TInt )
Private Member Functions
CMPXCollectionOpenUtility (MMPXCollectionObserver *, TUid )
TInt Callback ( TAny *)
void ConstructL ()
void DoCompactTaskListL (const CMPXMedia &)
void DoFetchCountL ()
void DoFetchItemsL ()
void DoHandleCollectionMessageL (const CMPXMessage &)
void DoHandleCommandCompleteL ( CMPXCommand &, TInt )
void DoHandleCountL (const CMPXMedia &, TInt , TInt )
void DoHandleFetchItemsL (const CMPXMedia &, TInt , TInt )
void DoSelectIndexL ()
void DoSetupChunksL ( TInt )
void DoSortAscend ( TBool )
void DoSortDescend ( TBool )
void DoSortNormalL ( TBool )
void HandleCallbackL ()
void RunNext ()
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Public Member Enumerations
enum TDirection { EFetchNormal , EFetchUp , EFetchDown }
Private Member Enumerations
enum TFetchingStep { EFetchPath , EFetchCount , EFetchItems , EFetchCommand , EFetchNone }
Private Attributes
MMPXCollectionUtility * iCollection
CMPXMediaArray * iData
TInt iFetchDelay
TDirection iFetchDirection
TMPXOpenDataBlock iFetchInfo
TFetchingStep iFetchStep
TBool iFirstOpen
RArray < TMPXOpenDataBlock > iIncrementalChunks
TMPXAttribute iKeyAttribute
CMPXMedia * iMedia
TUid iMode
MMPXCollectionObserver * iObs
CMPXCollectionPath * iPath
TBool iSelecting
CPeriodic * iTimer

Constructor & Destructor Documentation

CMPXCollectionOpenUtility(MMPXCollectionObserver *, TUid)

CMPXCollectionOpenUtility ( MMPXCollectionObserver * aObs,
TUid aMode
) [private]

Constructor.

Since
S60 5.0

Parameters

MMPXCollectionObserver * aObs observer
TUid aMode mode of the utility

~CMPXCollectionOpenUtility()

~CMPXCollectionOpenUtility ( ) [virtual]

virtual destructor.

Since
S60 5.0

Member Functions Documentation

Callback(TAny *)

TInt Callback ( TAny * aAny ) [private, static]

Callback function for the periodic timer.

Since
S60 5.0

Parameters

TAny * aAny

ConstructL()

void ConstructL ( ) [private]

2nd phase constructor.

Since
S60 5.0

DoCompactTaskListL(const CMPXMedia &)

void DoCompactTaskListL ( const CMPXMedia & aMedia ) [private]

Compact the task list given partial results may have been fetched.

Since
S60 5.0

Parameters

const CMPXMedia & aMedia media containing the fetched sections

DoFetchCountL()

void DoFetchCountL ( ) [private]

Fetch Count step.

Since
S60 5.0

DoFetchItemsL()

void DoFetchItemsL ( ) [private]

Fetch items step.

Since
S60 5.0

DoHandleCollectionMessageL(const CMPXMessage &)

void DoHandleCollectionMessageL ( const CMPXMessage & aMsg ) [private]

Handle collection messages.

Since
S60 5.0

Parameters

const CMPXMessage & aMsg CMPXMessage to handle

DoHandleCommandCompleteL(CMPXCommand &, TInt)

void DoHandleCommandCompleteL ( CMPXCommand & aCommandResult,
TInt aError
) [private]

Handle command complete.

Since
S60 5.0

Parameters

CMPXCommand & aCommandResult
TInt aError any errors

DoHandleCountL(const CMPXMedia &, TInt, TInt)

void DoHandleCountL ( const CMPXMedia & aMedia,
TInt aIndex,
TInt aError
) [private]

Handle completion of count step.

Since
S60 5.0

Parameters

const CMPXMedia & aMedia media returned from the collection
TInt aIndex item focus from the collection
TInt aError error of the operation

DoHandleFetchItemsL(const CMPXMedia &, TInt, TInt)

void DoHandleFetchItemsL ( const CMPXMedia & aMedia,
TInt aIndex,
TInt aError
) [private]

Handle completion of fetch item step.

Since
S60 5.0
leave
IfNull

Parameters

const CMPXMedia & aMedia media returned from the collection
TInt aIndex item focus from the collection
TInt aError error of the operation

DoSelectIndexL()

void DoSelectIndexL ( ) [private]

Send a command to the collection to update selection index.

Since
S60 5.0

DoSetupChunksL(TInt)

void DoSetupChunksL ( TInt aCount ) [private]

Setup the chunks.

Since
S60 5.0

Parameters

TInt aCount total number of items

DoSortAscend(TBool)

void DoSortAscend ( TBool aSkipFirst = EFalse ) [private]

Sort ascending.

Since
S60 5.0

Parameters

TBool aSkipFirst = EFalse do not order the first item

DoSortDescend(TBool)

void DoSortDescend ( TBool aSkipFirst = EFalse ) [private]

Sort decending do not order the first item.

Since
S60 5.0

Parameters

TBool aSkipFirst = EFalse do not order the first item

DoSortNormalL(TBool)

void DoSortNormalL ( TBool aSkipFirst = EFalse ) [private]

Sort normal.

Since
S60 5.0

Parameters

TBool aSkipFirst = EFalse do not order the first item

HandleCallbackL()

void HandleCallbackL ( ) [private]

Handle callback from the timer.

Since
S60 5.0

HandleCollectionMediaL(const CMPXMedia &, TInt)

void HandleCollectionMediaL ( const CMPXMedia & aMedia,
TInt aError
) [protected]

From MMPXCollectionObserver

Since
S60 5.0

Parameters

const CMPXMedia & aMedia
TInt aError

HandleCollectionMessage(CMPXMessage *, TInt)

void HandleCollectionMessage ( CMPXMessage * aMsg,
TInt aErr
) [protected]

From MMPXCollectionObserver

Since
S60 5.0

Parameters

CMPXMessage * aMsg
TInt aErr

HandleCommandComplete(CMPXCommand *, TInt)

void HandleCommandComplete ( CMPXCommand * aCommandResult,
TInt aError
) [protected]

From MMPXCollectionObserver

Since
S60 5.0

Parameters

CMPXCommand * aCommandResult
TInt aError

HandleOpenL(const CMPXMedia &, TInt, TBool, TInt)

void HandleOpenL ( const CMPXMedia & aEntries,
TInt aIndex,
TBool aComplete,
TInt aError
) [protected]

From MMPXCollectionObserver

Since
S60 5.0

Parameters

const CMPXMedia & aEntries
TInt aIndex
TBool aComplete
TInt aError

HandleOpenL(const CMPXCollectionPlaylist &, TInt)

void HandleOpenL ( const CMPXCollectionPlaylist & aPlaylist,
TInt aError
) [protected]

From MMPXCollectionObserver

Since
S60 5.0

Parameters

const CMPXCollectionPlaylist & aPlaylist
TInt aError

NewL(MMPXCollectionObserver *, TUid)

IMPORT_C CMPXCollectionOpenUtility * NewL ( MMPXCollectionObserver * aObs,
TUid aMode =  KMcModeDefault
) [static]

Two phased constructor.

Since
S60 5.0

Parameters

MMPXCollectionObserver * aObs observer
TUid aMode =  KMcModeDefault mode of the utility

PathL()

IMPORT_C CMPXCollectionPath * PathL ( )

Returns a copy of the collection path.

Since
S60 5.0

RunNext()

void RunNext ( ) [private]

Run the next step.

Since
S60 5.0

SetDelay(TInt)

IMPORT_C void SetDelay ( TInt aDelay )

Set the fetching delay in between subsequent fetches.

Since
S60 5.0

Parameters

TInt aDelay delay in microseconds, default is 0

SetDirection(TDirection)

IMPORT_C void SetDirection ( TDirection aDirection )

Set the fetching direction.

Since
S60 5.0

Parameters

TDirection aDirection a direction to start fetching from

StartL(TArray< TMPXAttribute >, TInt, TInt, TDirection, TMPXAttribute)

IMPORT_C void StartL ( TArray < TMPXAttribute > aAttrs,
TInt aChunkSize,
TInt aOffset = 0,
TDirection aDirection = EFetchNormal,
TMPXAttribute aKeyAttribute =  KMPXMediaNullAttribute
)

Start the incremental read operation.

Since
S60 5.0

Parameters

TArray < TMPXAttribute > aAttrs array of attributes
TInt aChunkSize size of each chunk to fetch
TInt aOffset = 0 offset to start fetching from
TDirection aDirection = EFetchNormal fetching direction, normal, up or down
TMPXAttribute aKeyAttribute =  KMPXMediaNullAttribute key attribute to speed up open operation

StartL(const CMPXCollectionPath &, TArray< TMPXAttribute >, TInt, TInt, TDirection, TMPXAttribute)

IMPORT_C void StartL ( const CMPXCollectionPath & aPath,
TArray < TMPXAttribute > aAttrs,
TInt aChunkSize,
TInt aOffset = 0,
TDirection aDirection = EFetchNormal,
TMPXAttribute aKeyAttribute =  KMPXMediaNullAttribute
)

Start the incremental read operation.

Since
S60 5.0

Parameters

const CMPXCollectionPath & aPath path to have to open to
TArray < TMPXAttribute > aAttrs array of attributes
TInt aChunkSize size of each chunk to fetch
TInt aOffset = 0 offset to start fetching from
TDirection aDirection = EFetchNormal fetching direction, normal, up or down
TMPXAttribute aKeyAttribute =  KMPXMediaNullAttribute key attribute to speed up open operation

Stop()

IMPORT_C void Stop ( )

Cancel the incremental reading procedure.

Since
S60 5.0

Member Enumerations Documentation

Enum TDirection

Direction of the fetch

Enumerators

EFetchNormal
EFetchUp
EFetchDown

Enum TFetchingStep

Enum fo rthe different states of this object

Enumerators

EFetchPath
EFetchCount
EFetchItems
EFetchCommand
EFetchNone

Member Data Documentation

MMPXCollectionUtility * iCollection

MMPXCollectionUtility * iCollection [private]

CMPXMediaArray * iData

CMPXMediaArray * iData [private]

TInt iFetchDelay

TInt iFetchDelay [private]

TDirection iFetchDirection

TDirection iFetchDirection [private]

TMPXOpenDataBlock iFetchInfo

TMPXOpenDataBlock iFetchInfo [private]

TFetchingStep iFetchStep

TFetchingStep iFetchStep [private]

TBool iFirstOpen

TBool iFirstOpen [private]

RArray< TMPXOpenDataBlock > iIncrementalChunks

RArray < TMPXOpenDataBlock > iIncrementalChunks [private]

TMPXAttribute iKeyAttribute

TMPXAttribute iKeyAttribute [private]

CMPXMedia * iMedia

CMPXMedia * iMedia [private]

TUid iMode

TUid iMode [private]

MMPXCollectionObserver * iObs

MMPXCollectionObserver * iObs [private]

CMPXCollectionPath * iPath

CMPXCollectionPath * iPath [private]

TBool iSelecting

TBool iSelecting [private]

CPeriodic * iTimer

CPeriodic * iTimer [private]