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)

void AddContextL ( const MGlxFetchContext * aContext,
TInt aPriority
) [pure virtual]

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

Parameters

const MGlxFetchContext * aContext context to register
TInt aPriority priority of the context. The higher the more important.

AddMediaListObserverL(MGlxMediaListObserver *)

void AddMediaListObserverL ( 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 * aObserver The observer

AddStaticItemL(CGlxMedia *, NGlxListDefs::TInsertionPosition)

void AddStaticItemL ( CGlxMedia * aStaticItem,
NGlxListDefs::TInsertionPosition aTargetPosition
) [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 * aStaticItem Static item to be added
NGlxListDefs::TInsertionPosition aTargetPosition Whether to be added at beginning or end

CancelCommand()

void CancelCommand ( ) [pure virtual]

Cancels a command on the collection

CancelPreviousRequests()

void CancelPreviousRequests ( ) [pure virtual]

Cancel the pending requests

Close()

void Close ( ) [pure virtual]

Releases a media list interface

Collection()

MMPXCollection & Collection ( ) const [pure virtual]

CommandL(CMPXCommand &)

void CommandL ( CMPXCommand & aCommand ) [pure virtual]

Sends a command to the collection

Parameters

CMPXCommand & aCommand MPX command from a command handler

Count(NGlxListDefs::TCountType)

TInt Count ( NGlxListDefs::TCountType aType = 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 ( TInt aIndex ) const [pure virtual]

The Id Space Id of the media list.

Parameters

TInt aIndex index 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 & aId Unique 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 & aPath Path to the collection
const TGlxHierarchyId & aHierarchyId =  KGlxIdNone Id of the client hierarchy
CMPXFilter * aFilter = NULL Filter on the collection

IsPopulated()

TBool IsPopulated ( ) const [pure virtual]

Returns ETrue if the media list has been populated else EFalse

IsSelected(TInt)

TBool IsSelected ( TInt aIndex ) const [pure virtual]

Determines if an item has been selected

Parameters

TInt aIndex Index 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 ( TInt aIndex ) const [pure virtual]

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

Parameters

TInt aIndex index of the item in the list

PathLC(NGlxListDefs::TPathType)

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

Current path, including selection. Ownership passed to caller.

Parameters

NGlxListDefs::TPathType aType = NGlxListDefs::EPathAllOrSelection

RemoveContext(const MGlxFetchContext *)

void RemoveContext ( const MGlxFetchContext * aContext ) [pure virtual]

Removes an existing context

Parameters

const MGlxFetchContext * aContext Pointer of the context to be removed

RemoveMediaListObserver(MGlxMediaListObserver *)

void RemoveMediaListObserver ( MGlxMediaListObserver * aObserver ) [pure virtual]

Removes a media item list observer from the observer list

Parameters

MGlxMediaListObserver * aObserver The observer

RemoveStaticItem(const TGlxMediaId &)

void RemoveStaticItem ( const TGlxMediaId & aItemId ) [pure virtual]

Remove static item from the list.

Parameters

const TGlxMediaId & aItemId Id of item to remove

ResetFocus()

void ResetFocus ( ) [pure virtual]

Resets the focus to the initial position

SelectedItemIndex(TInt)

TInt SelectedItemIndex ( TInt aSelectionIndex ) const [pure virtual]

Selected item index from selection

Parameters

TInt aSelectionIndex Index in selection array

SelectionCount()

TInt SelectionCount ( ) const [pure virtual]

Selection count

SetFilterL(CMPXFilter *)

void SetFilterL ( 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 * aFilter MPX filter on the collection. Ownership passed to media list

SetFocusInitialPosition(NGlxListDefs::TFocusInitialPosition)

void SetFocusInitialPosition ( NGlxListDefs::TFocusInitialPosition aFocusInitialPosition ) [pure virtual]

Sets the initial focus position, first or last item

Parameters

NGlxListDefs::TFocusInitialPosition aFocusInitialPosition initial focus on first or last item

SetFocusL(NGlxListDefs::TFocusSetType, TInt)

void SetFocusL ( NGlxListDefs::TFocusSetType aType,
TInt aValue
) [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 aType whether the focus change is absolute or relative
TInt aValue value of the focus change

SetSelectedL(TInt, TBool)

void SetSelectedL ( TInt aIndex,
TBool aSelected
) [pure virtual]

Item selection/deselection

Parameters

TInt aIndex Index of the item to be selected/deselected
TBool aSelected Boolean to indicate selection/deselection

SetStaticItemsEnabled(TBool)

void SetStaticItemsEnabled ( TBool aEnabled ) [pure virtual]

Enables or disables static items

Parameters

TBool aEnabled true if static items should be enabled false if static items should be disabled

SetVisibleWindowIndexL(TInt)

void SetVisibleWindowIndexL ( TInt aIndex ) [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 aIndex value of the dataWindow change

UnmarkAllL(MGlxMediaList &)

IMPORT_C void UnmarkAllL ( MGlxMediaList & aList ) [static]

Unmarks all items in the medialist.

Parameters

MGlxMediaList & aList Reference to Medialist items.

VisibleWindowIndex()

TInt VisibleWindowIndex ( ) const [pure virtual]

Current visible dataWindow position