MCLFItemListModel Class Reference
List Model for Content Listing Framework. 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 );
ContentListingFramework.lib
- Since
- S60 3.1
Private Member Functions |
---|
MCLFItemListModelExt * | Extension() |
Constructor & Destructor Documentation
~MCLFItemListModel()
~MCLFItemListModel | ( | ) | [inline, virtual] |
Member Functions Documentation
AppendSecondarySortingStyleL(MCLFSortingStyle &)
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.
- Since
- S60 3.1
CancelRefresh()
void | CancelRefresh | ( | ) | [pure virtual] |
Cancel asynchronous refresh operation.
- Since
- S60 3.1
Extension()
MCLFItemListModelExt * | Extension | ( | ) | [private, inline, virtual] |
This member is internal and not intended for use.
Item(TInt)
Get Content Listing Framework item from the List Model.
- Since
- S60 3.1
- Pre-condition
- aIndex >= 0 && aIndex < ItemCount()
Parameters
TInt aIndex | Index of the item |
ItemCount()
TInt
| ItemCount | ( | ) | const [pure virtual] |
Get number of items that are in the model.
- Since
- S60 3.1
RefreshL()
void | RefreshL | ( | ) | [pure virtual] |
Refresh the model. This function is asynchronous (non-blocking) and
MCLFOperationObserver is called when the refresh operation is completed. Operations in refresh are executed in the following order: 1. Model gets wanted items from server. Use SetWantedMediaTypesL and/or SetWantedMimeTypesL to define wanted items. 2. Model uses post filter to filter items. 3. Model groups items if grouping is selected. 4. Model sorting items.
- Since
- S60 3.1
RefreshL(TInt32)
void | RefreshL | ( | TInt32 | aRefreshType | ) | [pure virtual] |
Refresh the model. This function is synchronous (blocking). Use parameter(s) to define the type of refresh. See TCLFRefreshTypeFlags for refresh flags.
- Since
- S60 3.1
Parameters
TInt32 aRefreshType | Flag(s) to use for refreshing. |
SetCustomGrouper(MCLFCustomGrouper *)
Activate or remove custom grouper. See
MCLFCustomGrouper for an example implementation of a custom grouper. Custom grouper will overwrite grouping style.
- Since
- S60 3.1
Parameters
MCLFCustomGrouper * aCustomGrouper | Custom grouper to activate, if pointer is NULL then then grouping style is used |
SetCustomSorter(MCLFCustomSorter *)
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.
- Since
- S60 3.1
Parameters
MCLFCustomSorter * aCustomSorter | Custom sorter to activate. If the pointer is NULL, sorting style is used (if there is one activated) |
SetGroupingStyle(TCLFGrouping)
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.
- Since
- S60 3.1
SetPostFilter(MCLFPostFilter *)
Activate or remove post filter. Post filter removes items from the List Model. See
MCLFPostFilter for an example implementation of a post filter.
- Since
- S60 3.1
Parameters
MCLFPostFilter * aPostFilter | Post filter to activate, if pointer is NULL then active post filter will be removed. |
SetSortingStyle(MCLFSortingStyle *)
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.
- Since
- S60 3.1
Parameters
MCLFSortingStyle * aSortingStyle | Sorting style to activate, if the pointer is NULL then sorting styles are removed |
SetWantedMediaTypesL(const TArray< TInt > &)
void | SetWantedMediaTypesL | ( | const TArray< TInt > & | aMediaTypes | ) | [pure virtual] |
Wanted media types of media files that will be requested to the model. Overwrites old media types if they were set.
- Since
- S60 3.1
Parameters
const TArray< TInt > & aMediaTypes | List of wanted media types |
SetWantedMediaTypesL(TResourceReader &)
Wanted media types of media files that will be requested to the model. Overwrites old media types if they were set.
- Since
- S60 3.1
Parameters
TResourceReader & aResource | Resource reader to media type list resource. Use resource struct CLF_MEDIA_TYPE_ARRAY |
SetWantedMimeTypesL(const MDesCArray &)
void | SetWantedMimeTypesL | ( | const MDesCArray & | aMimeTypes | ) | [pure virtual] |
Wanted mime types of media files that will be requested to the model. Overwrites old mime types if they were set.
- Since
- S60 3.1
Parameters
const MDesCArray & aMimeTypes | List of wanted mime types. Mime types can contain wildcard characters "*" and "?", where "*" matches zero or more consecutive occurrences of any character and "?" matches a single occurrence of any character |
SetWantedMimeTypesL(TResourceReader &)
Wanted mime types of media files that will be requested to the model. Overwrites old mime types if they were set.
- Since
- S60 3.1
Parameters
TResourceReader & aResource | Resource reader to mime type list resource. Use resource struct CLF_MIME_TYPE_ARRAY. |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.