CMPXCollectionOpenUtility Class Reference

class CMPXCollectionOpenUtility : public CBase

CMPXCollectionOpenUtility

Incremental OpenL() utility to open data in chunks

mpxcollectionutility.lib

Inherits from

  • CMPXCollectionOpenUtility
Public Member Functions
~CMPXCollectionOpenUtility()
IMPORT_C CMPXCollectionOpenUtility *NewL(MMPXCollectionObserver *, TUid)
IMPORT_C CMPXCollectionPath *PathL()
IMPORT_C voidSetDelay(TInt)
IMPORT_C voidSetDirection(TDirection)
IMPORT_C voidStartL(TArray< TMPXAttribute >, TInt, TInt, TDirection, TMPXAttribute)
IMPORT_C voidStartL(const CMPXCollectionPath &, TArray< TMPXAttribute >, TInt, TInt, TDirection, TMPXAttribute)
IMPORT_C voidStop()
Protected Member Functions
voidHandleCollectionMediaL(const CMPXMedia &, TInt)
voidHandleCollectionMessage(CMPXMessage *, TInt)
voidHandleCommandComplete(CMPXCommand *, TInt)
voidHandleOpenL(const CMPXMedia &, TInt, TBool, TInt)
voidHandleOpenL(const CMPXCollectionPlaylist &, TInt)
Private Member Functions
CMPXCollectionOpenUtility(MMPXCollectionObserver *, TUid)
TInt Callback(TAny *)
voidConstructL()
voidDoCompactTaskListL(const CMPXMedia &)
voidDoFetchCountL()
voidDoFetchItemsL()
voidDoHandleCollectionMessageL(const CMPXMessage &)
voidDoHandleCommandCompleteL(CMPXCommand &, TInt)
voidDoHandleCountL(const CMPXMedia &, TInt, TInt)
voidDoHandleFetchItemsL(const CMPXMedia &, TInt, TInt)
voidDoSelectIndexL()
voidDoSetupChunksL(TInt)
voidDoSortAscend(TBool)
voidDoSortDescend(TBool)
voidDoSortNormalL(TBool)
voidHandleCallbackL()
voidRunNext()
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
enumTDirection { EFetchNormal, EFetchUp, EFetchDown }
Private Member Enumerations
enumTFetchingStep { EFetchPath, EFetchCount, EFetchItems, EFetchCommand, EFetchNone }
Private Attributes
MMPXCollectionUtility *iCollection
CMPXMediaArray *iData
TInt iFetchDelay
TDirection iFetchDirection
TMPXOpenDataBlockiFetchInfo
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,
TUidaMode
)[private]

Constructor.

Since
S60 5.0

Parameters

MMPXCollectionObserver * aObsobserver
TUid aModemode 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()

voidConstructL()[private]

2nd phase constructor.

Since
S60 5.0

DoCompactTaskListL(const CMPXMedia &)

voidDoCompactTaskListL(const CMPXMedia &aMedia)[private]

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

Since
S60 5.0

Parameters

const CMPXMedia & aMediamedia containing the fetched sections

DoFetchCountL()

voidDoFetchCountL()[private]

Fetch Count step.

Since
S60 5.0

DoFetchItemsL()

voidDoFetchItemsL()[private]

Fetch items step.

Since
S60 5.0

DoHandleCollectionMessageL(const CMPXMessage &)

voidDoHandleCollectionMessageL(const CMPXMessage &aMsg)[private]

Handle collection messages.

Since
S60 5.0

Parameters

const CMPXMessage & aMsgCMPXMessage to handle

DoHandleCommandCompleteL(CMPXCommand &, TInt)

voidDoHandleCommandCompleteL(CMPXCommand &aCommandResult,
TIntaError
)[private]

Handle command complete.

Since
S60 5.0

Parameters

CMPXCommand & aCommandResult
TInt aErrorany errors

DoHandleCountL(const CMPXMedia &, TInt, TInt)

voidDoHandleCountL(const CMPXMedia &aMedia,
TIntaIndex,
TIntaError
)[private]

Handle completion of count step.

Since
S60 5.0

Parameters

const CMPXMedia & aMediamedia returned from the collection
TInt aIndexitem focus from the collection
TInt aErrorerror of the operation

DoHandleFetchItemsL(const CMPXMedia &, TInt, TInt)

voidDoHandleFetchItemsL(const CMPXMedia &aMedia,
TIntaIndex,
TIntaError
)[private]

Handle completion of fetch item step.

Since
S60 5.0
leave
IfNull

Parameters

const CMPXMedia & aMediamedia returned from the collection
TInt aIndexitem focus from the collection
TInt aErrorerror of the operation

DoSelectIndexL()

voidDoSelectIndexL()[private]

Send a command to the collection to update selection index.

Since
S60 5.0

DoSetupChunksL(TInt)

voidDoSetupChunksL(TIntaCount)[private]

Setup the chunks.

Since
S60 5.0

Parameters

TInt aCounttotal number of items

DoSortAscend(TBool)

voidDoSortAscend(TBoolaSkipFirst = EFalse)[private]

Sort ascending.

Since
S60 5.0

Parameters

TBool aSkipFirst = EFalsedo not order the first item

DoSortDescend(TBool)

voidDoSortDescend(TBoolaSkipFirst = EFalse)[private]

Sort decending do not order the first item.

Since
S60 5.0

Parameters

TBool aSkipFirst = EFalsedo not order the first item

DoSortNormalL(TBool)

voidDoSortNormalL(TBoolaSkipFirst = EFalse)[private]

Sort normal.

Since
S60 5.0

Parameters

TBool aSkipFirst = EFalsedo not order the first item

HandleCallbackL()

voidHandleCallbackL()[private]

Handle callback from the timer.

Since
S60 5.0

HandleCollectionMediaL(const CMPXMedia &, TInt)

voidHandleCollectionMediaL(const CMPXMedia &aMedia,
TIntaError
)[protected]

From MMPXCollectionObserver

Since
S60 5.0

Parameters

const CMPXMedia & aMedia
TInt aError

HandleCollectionMessage(CMPXMessage *, TInt)

voidHandleCollectionMessage(CMPXMessage *aMsg,
TIntaErr
)[protected]

From MMPXCollectionObserver

Since
S60 5.0

Parameters

CMPXMessage * aMsg
TInt aErr

HandleCommandComplete(CMPXCommand *, TInt)

voidHandleCommandComplete(CMPXCommand *aCommandResult,
TIntaError
)[protected]

From MMPXCollectionObserver

Since
S60 5.0

Parameters

CMPXCommand * aCommandResult
TInt aError

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

voidHandleOpenL(const CMPXMedia &aEntries,
TIntaIndex,
TBoolaComplete,
TIntaError
)[protected]

From MMPXCollectionObserver

Since
S60 5.0

Parameters

const CMPXMedia & aEntries
TInt aIndex
TBool aComplete
TInt aError

HandleOpenL(const CMPXCollectionPlaylist &, TInt)

voidHandleOpenL(const CMPXCollectionPlaylist &aPlaylist,
TIntaError
)[protected]

From MMPXCollectionObserver

Since
S60 5.0

Parameters

const CMPXCollectionPlaylist & aPlaylist
TInt aError

NewL(MMPXCollectionObserver *, TUid)

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

Two phased constructor.

Since
S60 5.0

Parameters

MMPXCollectionObserver * aObsobserver
TUid aMode =  KMcModeDefault mode of the utility

PathL()

IMPORT_C CMPXCollectionPath *PathL()

Returns a copy of the collection path.

Since
S60 5.0

RunNext()

voidRunNext()[private]

Run the next step.

Since
S60 5.0

SetDelay(TInt)

IMPORT_C voidSetDelay(TIntaDelay)

Set the fetching delay in between subsequent fetches.

Since
S60 5.0

Parameters

TInt aDelaydelay in microseconds, default is 0

SetDirection(TDirection)

IMPORT_C voidSetDirection(TDirectionaDirection)

Set the fetching direction.

Since
S60 5.0

Parameters

TDirection aDirectiona direction to start fetching from

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

IMPORT_C voidStartL(TArray< TMPXAttribute >aAttrs,
TIntaChunkSize,
TIntaOffset = 0,
TDirectionaDirection = EFetchNormal,
TMPXAttributeaKeyAttribute =  KMPXMediaNullAttribute
)

Start the incremental read operation.

Since
S60 5.0

Parameters

TArray< TMPXAttribute > aAttrsarray of attributes
TInt aChunkSizesize of each chunk to fetch
TInt aOffset = 0offset to start fetching from
TDirection aDirection = EFetchNormalfetching 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 voidStartL(const CMPXCollectionPath &aPath,
TArray< TMPXAttribute >aAttrs,
TIntaChunkSize,
TIntaOffset = 0,
TDirectionaDirection = EFetchNormal,
TMPXAttributeaKeyAttribute =  KMPXMediaNullAttribute
)

Start the incremental read operation.

Since
S60 5.0

Parameters

const CMPXCollectionPath & aPathpath to have to open to
TArray< TMPXAttribute > aAttrsarray of attributes
TInt aChunkSizesize of each chunk to fetch
TInt aOffset = 0offset to start fetching from
TDirection aDirection = EFetchNormalfetching direction, normal, up or down
TMPXAttribute aKeyAttribute =  KMPXMediaNullAttribute key attribute to speed up open operation

Stop()

IMPORT_C voidStop()

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

TMPXOpenDataBlockiFetchInfo[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]