CFLDFileListModel Class Reference
class CFLDFileListModel : public CBase
|
This class implements a model of a file list. The class is inherited from MDesCArray, so it can be used directly as a model for a listbox.
Constructor & Destructor Documentation
CFLDFileListModel()
CFLDFileListModel
|
(
|
)
|
[private]
|
~CFLDFileListModel()
~CFLDFileListModel
|
(
|
)
|
[virtual]
|
Member Functions Documentation
AddDirectoryL(const TDesC &)
TInt
|
AddDirectoryL
|
(
|
const
TDesC
&
|
aDirectory
|
)
|
[private]
|
Adds directory into iDirectoryPaths
Parameters
const
TDesC
& aDirectory
|
Directory to be scanned
|
AddExclusiveMediaTypeL(const TInt32)
void
|
AddExclusiveMediaTypeL
|
(
|
const
TInt32
|
aMediaType
|
)
|
|
Adds a new media type into blocking list.
Parameters
const
TInt32
aMediaType
|
The blocked media type (see TCLFMediaType enumeration inside CFLContentListing.hrh)
|
AddExclusiveMimeTypeL(const TDesC &)
void
|
AddExclusiveMimeTypeL
|
(
|
const
TDesC
&
|
aMimeType
|
)
|
|
Adds a new MIME type into blocking list.
Parameters
const
TDesC
& aMimeType
|
The blocked MIME type
|
AddRomDirectoryL(const TDesC &)
TInt
|
AddRomDirectoryL
|
(
|
const
TDesC
&
|
aDirectory
|
)
|
[private]
|
Adds directory into iRomDirectoryPaths
Parameters
const
TDesC
& aDirectory
|
Directory to be scanned
|
CheckRules(TPtrC &, TInt32, TPtrC &)
CheckToneFileSizeL(const TDesC &, TInt)
TInt
|
CheckToneFileSizeL
|
(
|
const
TDesC
&
|
aFile,
|
|
TInt
|
aSizeLimit
|
|
)
|
[private]
|
Checks ringing tone file size.
Parameters
const
TDesC
& aFile
|
file to check.
|
TInt
aSizeLimit
|
maximum allowed file size in bytes.
|
ConstructL(const TInt, const TInt)
void
|
ConstructL
|
(
|
const
TInt
|
aModelResourceId,
|
|
const
TInt
|
aDirectoriesResourceId
|
|
)
|
[private]
|
Parameters
const
TInt
aModelResourceId
|
A CLF model resource, see CLFContentListing.rh
|
const
TInt
aDirectoriesResourceId
|
A resource using FILELISTDIRECTORIES structure, see FileListModel.rh for details
|
FilterItemsL(const TArray< MCLFItem * > &, RPointerArray< MCLFItem > &)
void
|
FilterItemsL
|
(
|
const
TArray
< MCLFItem * > &
|
aItemList,
|
|
RPointerArray
< MCLFItem > &
|
aFilteredItemList
|
|
)
|
[private]
|
FindFileL(const TDesC &)
Find a file from the model's list
Parameters
const
TDesC
& aFileName
|
The file name to be searched
|
GetFileName(TDes &, const TInt)
void
|
GetFileName
|
(
|
TDes
&
|
aFileName,
|
|
const
TInt
|
aIndex
|
|
)
|
|
Retrieves a full path of an entry (e.g. "c:\folder\file.ext")
Parameters
TDes
& aFileName
|
A modifiable descriptor where the path and filename is placed, or KNullDesc if aIndex points to the null text item. Note: aFileName.Length() >= KMaxFileName
|
const
TInt
aIndex
|
Index of the entry to retrieve
|
GetFileNameAtIndex(TInt, TDes &)
void
|
GetFileNameAtIndex
|
(
|
TInt
|
aIndex,
|
|
TDes
&
|
aFileName
|
|
)
|
const [private]
|
Gets a filename at specific index.
Parameters
TInt
aIndex
|
Index of the file (whole list is indexed)
|
TDes
& aFileName
|
Descriptor where the filename is stored.
|
GetPopupList()
CFLDPopupList *
|
GetPopupList
|
(
|
)
|
|
InsertEndNullItemL(const TDesC &)
void
|
InsertEndNullItemL
|
(
|
const
TDesC
&
|
aItemText
|
)
|
|
Adds a text (e.g. "None") as the last item of the list, which will not be sorted among the file name items.
Parameters
const
TDesC
& aItemText
|
A descriptor containing the null item text
|
InsertEndNullItemL(const TDesC &, const TDesC &)
void
|
InsertEndNullItemL
|
(
|
const
TDesC
&
|
aItemText,
|
|
const
TDesC
&
|
aFileName
|
|
)
|
|
Adds a text (e.g. "None") as the last item of the list, which will not be sorted among the file name items.
Parameters
const
TDesC
& aItemText
|
A descriptor containing the null item text
|
const
TDesC
& aFileName
|
A descriptor containing the ringing tone file name form null item
|
InsertNullItemL(const TDesC &)
void
|
InsertNullItemL
|
(
|
const
TDesC
&
|
aItemText
|
)
|
|
Adds a text (e.g. "None") as the first item of the list, which will not be sorted among the file name items.
Parameters
const
TDesC
& aItemText
|
A descriptor containing the null item text
|
InsertNullItemL(const TDesC &, const TDesC &)
void
|
InsertNullItemL
|
(
|
const
TDesC
&
|
aItemText,
|
|
const
TDesC
&
|
aFileName
|
|
)
|
|
Adds a text (e.g. "None") as the first item of the list, which will not be sorted among the file name items.
Parameters
const
TDesC
& aItemText
|
A descriptor containing the null item text
|
const
TDesC
& aFileName
|
A descriptor containing the ringing tone file name form null item
|
LoadDirectoriesL(const TInt)
void
|
LoadDirectoriesL
|
(
|
const
TInt
|
aDirectoriesResourceId
|
)
|
[private]
|
Loads directories from resource file
Parameters
const
TInt
aDirectoriesResourceId
|
Resource ID to directory structure
|
MdcaCount()
TInt
|
MdcaCount
|
(
|
)
|
const [private]
|
MediaFileType(const TDesC &)
Parameters
const
TDesC
& aFileName
|
A descriptor containing the media file name
|
NewL(const TInt, const TInt)
Two-phased static constructor.
Parameters
const
TInt
aModelResourceId
|
A CLF model resource, see CLFContentListing.rh
|
const
TInt
aDirectoriesResourceId
|
A resource using FILELISTDIRECTORIES structure, see FileListModel.rh for details
|
NewLC(const TInt, const TInt)
Two-phased static constructor.
Parameters
const
TInt
aModelResourceId
|
A CLF model resource, see CLFContentListing.rh
|
const
TInt
aDirectoriesResourceId
|
A resource using FILELISTDIRECTORIES structure, see FileListModel.rh for details
|
PopulateListBoxL()
void
|
PopulateListBoxL
|
(
|
)
|
[private]
|
List all files from the list model to the list box.
PopulateReferenceListL()
void
|
PopulateReferenceListL
|
(
|
)
|
[private]
|
Fill the entry reference list according to the added directories list and filtering parameters
RefreshEntryListL()
void
|
RefreshEntryListL
|
(
|
)
|
|
ResetExclusiveMediaTypes()
void
|
ResetExclusiveMediaTypes
|
(
|
)
|
|
Removes all the defined exlusive media types
ResetExclusiveMimeTypes()
void
|
ResetExclusiveMimeTypes
|
(
|
)
|
|
Removes all the defined exlusive MIME types
ScanRomDirectoriesAndInsertL()
void
|
ScanRomDirectoriesAndInsertL
|
(
|
)
|
[private]
|
Scans user defined Rom directories and adds found entries into iRomRingingToneArray
ScanRomDirectoriesL()
void
|
ScanRomDirectoriesL
|
(
|
)
|
[private]
|
Scans user defined Rom directories and adds found entries into iRomRingingToneArray
SetEntryFormatter(MFLDEntryFormatter *)
SetMaxFileSize(const TInt)
void
|
SetMaxFileSize
|
(
|
const
TInt
|
aMaxFileSize
|
)
|
|
Sets the maximum file size for the list.
Parameters
const
TInt
aMaxFileSize
|
The maximum file size in bytes. If you want to allow all file sizes, set this to KFLDNoSizeFiltering (defined in FileListModel.hrh).
|
SetPopupList(CFLDPopupList *)
void
|
SetPopupList
|
(
|
CFLDPopupList *
|
aPopupList
|
)
|
|
Sets popup list to Model. Needed to update the listbox after the model has changed (e.g. after inserting a memory card).
Parameters
CFLDPopupList * aPopupList
|
The popup list
|
SetWantedMediaTypesL(const TArray< TCLFMediaType > &)
Sets wanted media types. Overrides all settings defined inside resource, defined with AddExclusive -methods or with SetWanted -methods.
SetWantedMimeTypesL(const MDesCArray &)
void
|
SetWantedMimeTypesL
|
(
|
const MDesCArray &
|
aMimeTypes
|
)
|
|
Sets wanted mime types. Overrides all settings defined inside resource, defined with AddExclusive -methods or with SetWanted -methods.
Parameters
const MDesCArray & aMimeTypes
|
The array containing wanted MIME types
|
Member Data Documentation
CFLDChangedItemObserver * iChangedItemObserver
CDesCArraySeg
iDirectoryPaths
Contains descriptors containing the user-defined phone directory paths
RPointerArray< HBufC > iEndNullTextArray
RPointerArray< HBufC > iEndNullTextRingingToneArray
MCLFContentListingEngine * iEngine
MCLFContentListingEngine *
|
iEngine
|
[private]
|
MFLDEntryFormatter * iEntryFormatter
RPointerArray< CFLDEntryReference > iEntryReferences
Contains references to all the entries. This is the list that gets sorted and filtered
RArray< TInt32 > iExclusiveMediaTypes
CDesCArraySeg
iExclusiveMimeTypes
TInt
iMaxFileSize
TInt
|
iMaxFileSize
|
[private]
|
MCLFItemListModel * iModel
MCLFItemListModel *
|
iModel
|
[private]
|
RPointerArray< HBufC > iNullTextArray
RPointerArray< HBufC > iNullTextRingingToneArray
CFLDOperationObserver * iObserver
CFLDPopupList * iPopupList
CFLDPopupList *
|
iPopupList
|
[private]
|
CDesCArraySeg
iRomDirectoryPaths
Contains descriptors containing the user-defined ROM directory paths
RPointerArray< MCLFModifiableItem > iRomRingingToneArray
RPointerArray
< MCLFModifiableItem >
|
iRomRingingToneArray
|
[private]
|
TBool
iRomTonesOnly
TBool
|
iRomTonesOnly
|
[private]
|
CActiveSchedulerWait
iWait
CFLDWaitNote * iWaitNote
CFLDWaitNote *
|
iWaitNote
|
[private]
|
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.