API published in: S60 3rd Ed FP 1
Link against: contentlistingframework.lib
Required Capabilities
None
#include <mclfitemlistmodel.h>
This model is used to list Content Listing items. These items provide infomation of media files on the device and one item
represents one media file. The model can be manipulated by sorters, post filters and groupers. List Model is created by using
Content Listing Engine.
Usage:
// Create a new List Model instance MCLFItemListModel* listModel = iEngine->CreateListModelLC( *myObserver ); // Append music-type to wanted types array to exclude // all other files than music files from the list model RArray<TCLFMediaType> myMediaTypes; CleanupClosePushL( myMediaTypes ); myMediaTypes.AppendL( ECLFMediaTypeMusic ); // Set wanted types with SetWantedMimeTypesL or/and SetWantedMediaTypesL. // You can add both if you want. listModel->SetWantedMediaTypesL( myMediaTypes.Array() ); CleanupStack::PopAndDestroy( &myMediaTypes ); // Set sorting style (if you want to sort items) listModel->SetSortingStyle( mySortingStyle ); // You can also add post filter, custom sorter and custom grouper to model. // Refresh the List Model. // The model will fetch items from server and use post filter to filter items, // grouping style or custom grouper to group items and finally sort items // with sorting style or custom sorter. listModel->RefreshL(); // You can also refresh the post filter and sorting only. This call does not // fetch items from the server. The model is only filtered and sorted. listModel->RefreshL( ECLFRefreshPostFilter | ECLFRefreshSorting );
Public Member Functions |
|
virtual | ~MCLFItemListModel () |
Destructor. |
|
virtual const MCLFItem & | Item (TInt aIndex) const =0 |
Get Content Listing Framework item from the List Model. |
|
virtual TInt | ItemCount () const =0 |
Get number of items that are in the model. |
|
virtual void | SetSortingStyle (MCLFSortingStyle *aSortingStyle)=0 |
Activate or remove Sorting style. |
|
virtual void | AppendSecondarySortingStyleL (MCLFSortingStyle &aSortingStyle)=0 |
Append a secondary sorting style to the list model. |
|
virtual void | SetCustomSorter (MCLFCustomSorter *aCustomSorter)=0 |
Activate or remove custom sorter. |
|
virtual void | SetGroupingStyle (TCLFGrouping aGrouping)=0 |
Activate a grouping style for the List Model. |
|
virtual void | SetCustomGrouper (MCLFCustomGrouper *aCustomGrouper)=0 |
Activate or remove custom grouper. |
|
virtual void | SetPostFilter (MCLFPostFilter *aPostFilter)=0 |
Activate or remove post filter. |
|
virtual void | SetWantedMimeTypesL (const MDesCArray &aMimeTypes)=0 |
Wanted mime types of media files that will be requested to the model. |
|
virtual void | SetWantedMimeTypesL (TResourceReader &aResource)=0 |
Wanted mime types of media files that will be requested to the model. |
|
virtual void | SetWantedMediaTypesL (const TArray< TInt > &aMediaTypes)=0 |
Wanted media types of media files that will be requested to the model. |
|
virtual void | SetWantedMediaTypesL (TResourceReader &aResource)=0 |
Wanted media types of media files that will be requested to the model. |
|
virtual void | RefreshL ()=0 |
Refresh the model. |
|
virtual void | RefreshL (TInt32 aRefreshType)=0 |
Refresh the model. |
|
virtual void | CancelRefresh ()=0 |
Cancel asynchronous refresh operation. |
|
Destructor. |
|
Append a secondary sorting style to the list model. If an item doesn't have the field defined by primary or any previous secondary sorting style, the items are sorted using the next secondary sorting style. When a sorting style is appended using this method, it becomes the least significant sorting style until a new one is added after it. Items with undefined fields are placed before or after items with defined fields, depending on the undefined field position setting in MCLFSortingStyle.
|
|
Cancel asynchronous refresh operation. |
|
Get Content Listing Framework item from the List Model.
|
|
Get number of items that are in the model.
|
|
Refresh the model. This function is synchronous (blocking). Use parameter(s) to define the type of refresh. See TCLFRefreshTypeFlags for refresh flags.
|
|
Refresh the model.
This function is asynchronous (non-blocking) and MCLFOperationObserver is called when the refresh operation is completed. |
|
Activate or remove custom grouper. See MCLFCustomGrouper for an example implementation of a custom grouper. Custom grouper will overwrite grouping style.
|
|
Activate or remove custom sorter. Custom sorter will overwrite sorting style (if there is a sorting style activated). See MCLFCustomSorter for an example implementation of a custom sorter.
|
|
Activate a grouping style for the List Model. Use ECLFNoGrouping as the grouping style if you want to remove grouping. Default grouping style is ECLFNoGrouping.
|
|
Activate or remove post filter. Post filter removes items from the List Model. See MCLFPostFilter for an example implementation of a post filter.
|
|
Activate or remove Sorting style. Setting a new sorting style will remove all old secondary sorters. Removing the sorting will also remove all secondary sorters too.
|
|
Wanted media types of media files that will be requested to the model. Overwrites old media types if they were set.
|
|
Wanted media types of media files that will be requested to the model. Overwrites old media types if they were set.
|
|
Wanted mime types of media files that will be requested to the model. Overwrites old mime types if they were set.
|
|
Wanted mime types of media files that will be requested to the model. Overwrites old mime types if they were set.
|