MGlxMediaList Class Reference

class MGlxMediaList

MGlxMediaList

Interface for reading lists of media items

glxmedialists.lib

Constructor & Destructor Documentation

~MGlxMediaList()

~MGlxMediaList()[inline, virtual]

Member Functions Documentation

AddContextL(const MGlxFetchContext *, TInt)

voidAddContextL(const MGlxFetchContext *aContext,
TIntaPriority
)[pure virtual]

Registers a context that affects the behavior of attribute and thumbnail loading.

Parameters

const MGlxFetchContext * aContextcontext to register
TInt aPrioritypriority of the context. The higher the more important.

AddMediaListObserverL(MGlxMediaListObserver *)

voidAddMediaListObserverL(MGlxMediaListObserver *aObserver)[pure virtual]

Add an observer that observes changes to the list. This observer will be informed whenever the items in the list change, more items get added, or items get deleted, or the focus changes.

Parameters

MGlxMediaListObserver * aObserverThe observer

AddStaticItemL(CGlxMedia *, NGlxListDefs::TInsertionPosition)

voidAddStaticItemL(CGlxMedia *aStaticItem,
NGlxListDefs::TInsertionPositionaTargetPosition
)[pure virtual]

Adds a static item and takes ownership Note: In case of a leave, aStaticItem may have been modified. It is assumed that since ownership of the static item is passed, the object is free to be modified.

Parameters

CGlxMedia * aStaticItemStatic item to be added
NGlxListDefs::TInsertionPosition aTargetPositionWhether to be added at beginning or end

CancelCommand()

voidCancelCommand()[pure virtual]

Cancels a command on the collection

CancelPreviousRequests()

voidCancelPreviousRequests()[pure virtual]

Cancel the pending requests

Close()

voidClose()[pure virtual]

Releases a media list interface

Collection()

MMPXCollection &Collection()const [pure virtual]

CommandL(CMPXCommand &)

voidCommandL(CMPXCommand &aCommand)[pure virtual]

Sends a command to the collection

Parameters

CMPXCommand & aCommandMPX command from a command handler

Count(NGlxListDefs::TCountType)

TInt Count(NGlxListDefs::TCountTypeaType = NGlxListDefs::ECountAll)const [pure virtual]

Count of media items in the list

Parameters

NGlxListDefs::TCountType aType = NGlxListDefs::ECountAll

Filter()

CMPXFilter *Filter()const [pure virtual]

Filter on the collection

FocusIndex()

TInt FocusIndex()const [pure virtual]

Current focus position

Id()

TGlxMediaListId Id()const [pure virtual]

Id of this reader interface. The id of each _existing_ reader interface is guaranteed to be unique, but new readers can reuse the ids of deleted ones.

IdSpaceId(TInt)

TGlxIdSpaceId IdSpaceId(TIntaIndex)const [pure virtual]

The Id Space Id of the media list.

Parameters

TInt aIndexindex of the item in the list

Index(const TGlxIdSpaceId &, const TGlxMediaId &)

TInt Index(const TGlxIdSpaceId &aIdSpaceId,
const TGlxMediaId &aId
)const [pure virtual]

Item index by media item id If the item is not within the preload (or visible) range returns KErrNotFound. The item may still exist in the full list. This behavior can be changed, if there is a use case.

Parameters

const TGlxIdSpaceId & aIdSpaceId
const TGlxMediaId & aIdUnique id of the media item

InstanceL(const CMPXCollectionPath &, const TGlxHierarchyId &, CMPXFilter *)

IMPORT_C MGlxMediaList *InstanceL(const CMPXCollectionPath &aPath,
const TGlxHierarchyId &aHierarchyId =  KGlxIdNone ,
CMPXFilter *aFilter = NULL
)[static]

Returns a new/existing media list interface.

Returns an existing instance if and only if the hierarchy id and path are the same. Otherwise a new instance is returned

Filter is only used when a new media list is created, otherwise it is ignored.

The new/existing media list is set as highest priority list

Parameters

const CMPXCollectionPath & aPathPath to the collection
const TGlxHierarchyId & aHierarchyId =  KGlxIdNone Id of the client hierarchy
CMPXFilter * aFilter = NULLFilter on the collection

IsPopulated()

TBool IsPopulated()const [pure virtual]

Returns ETrue if the media list has been populated else EFalse

IsSelected(TInt)

TBool IsSelected(TIntaIndex)const [pure virtual]

Determines if an item has been selected

Parameters

TInt aIndexIndex of the item to be checked for selection

IsStaticItemsEnabled()

TBool IsStaticItemsEnabled()const [pure virtual]

Tests if static items are enabled.

Item(TInt)

const TGlxMedia &Item(TIntaIndex)const [pure virtual]

Media item at index. It is not legal to access items outside the preload (or visible) range.

Parameters

TInt aIndexindex of the item in the list

PathLC(NGlxListDefs::TPathType)

CMPXCollectionPath *PathLC(NGlxListDefs::TPathTypeaType = NGlxListDefs::EPathAllOrSelection)const [pure virtual]

Current path, including selection. Ownership passed to caller.

Parameters

NGlxListDefs::TPathType aType = NGlxListDefs::EPathAllOrSelection

RemoveContext(const MGlxFetchContext *)

voidRemoveContext(const MGlxFetchContext *aContext)[pure virtual]

Removes an existing context

Parameters

const MGlxFetchContext * aContextPointer of the context to be removed

RemoveMediaListObserver(MGlxMediaListObserver *)

voidRemoveMediaListObserver(MGlxMediaListObserver *aObserver)[pure virtual]

Removes a media item list observer from the observer list

Parameters

MGlxMediaListObserver * aObserverThe observer

RemoveStaticItem(const TGlxMediaId &)

voidRemoveStaticItem(const TGlxMediaId &aItemId)[pure virtual]

Remove static item from the list.

Parameters

const TGlxMediaId & aItemIdId of item to remove

ResetFocus()

voidResetFocus()[pure virtual]

Resets the focus to the initial position

SelectedItemIndex(TInt)

TInt SelectedItemIndex(TIntaSelectionIndex)const [pure virtual]

Selected item index from selection

Parameters

TInt aSelectionIndexIndex in selection array

SelectionCount()

TInt SelectionCount()const [pure virtual]

Selection count

SetFilterL(CMPXFilter *)

voidSetFilterL(CMPXFilter *aFilter)[pure virtual]

Sets a filter on the collection. The filter will replace any existing filter applied on the collection. If a client needs an aggregate filter, they will need to obtain the currently applied filter using Filter() and merge the filters

Parameters

CMPXFilter * aFilterMPX filter on the collection. Ownership passed to media list

SetFocusInitialPosition(NGlxListDefs::TFocusInitialPosition)

voidSetFocusInitialPosition(NGlxListDefs::TFocusInitialPositionaFocusInitialPosition)[pure virtual]

Sets the initial focus position, first or last item

Parameters

NGlxListDefs::TFocusInitialPosition aFocusInitialPositioninitial focus on first or last item

SetFocusL(NGlxListDefs::TFocusSetType, TInt)

voidSetFocusL(NGlxListDefs::TFocusSetTypeaType,
TIntaValue
)[pure virtual]

Sets the focus. The implementation of this function is required to call MGlxMediaListObserver::HandleFocusChangedL for all added observers. Calling this function will cause the item window to be updated and potentially properties and thumbnails to be loaded.

Parameters

NGlxListDefs::TFocusSetType aTypewhether the focus change is absolute or relative
TInt aValuevalue of the focus change

SetSelectedL(TInt, TBool)

voidSetSelectedL(TIntaIndex,
TBoolaSelected
)[pure virtual]

Item selection/deselection

Parameters

TInt aIndexIndex of the item to be selected/deselected
TBool aSelectedBoolean to indicate selection/deselection

SetStaticItemsEnabled(TBool)

voidSetStaticItemsEnabled(TBoolaEnabled)[pure virtual]

Enables or disables static items

Parameters

TBool aEnabledtrue if static items should be enabled false if static items should be disabled

SetVisibleWindowIndexL(TInt)

voidSetVisibleWindowIndexL(TIntaIndex)[pure virtual]

Sets the dataWindow position. The implementation of this function is required for the item window to be updated while blocky iterator is used and potentially properties and thumbnails to be loaded.

Parameters

TInt aIndexvalue of the dataWindow change

UnmarkAllL(MGlxMediaList &)

IMPORT_C voidUnmarkAllL(MGlxMediaList &aList)[static]

Unmarks all items in the medialist.

Parameters

MGlxMediaList & aListReference to Medialist items.

VisibleWindowIndex()

TInt VisibleWindowIndex()const [pure virtual]

Current visible dataWindow position