MMPXCollectionHelper Class Reference

class MMPXCollectionHelper

Abstract class for collection helper. Use this class to add or remove songs and playlists from Music Player and Podcast app.

mpxcollectionhelper.lib

Member Functions Documentation

AddL(const TDesC &, MMPXCollectionHelperObserver *)

voidAddL(const TDesC &aFile,
MMPXCollectionHelperObserver *aObserver
)[pure virtual]

Add an item based on file path and use the harvester to parse the file. On completion MMPXCollectionHelperObserver::HandleAddFileCompleteL() is called back.

Since
S60 3.2.3

Parameters

const TDesC & aFilefull path and name of the file.
MMPXCollectionHelperObserver * aObserverobserver for the add operation

AddL(CMPXMedia *)

voidAddL(CMPXMedia *aMedia)[pure virtual]
Add an item (song or playlist) with some media properties registers with playlists.
Since
S60 3.2.3
leave
KErrArgument leave if the given media doesn't contain the correct attributes

Parameters

CMPXMedia * aMediamedia property to add.

CleanupDeletedMediasL()

voidCleanupDeletedMediasL()[pure virtual]
Delete all records that have been marked as deleted.
Since
S60 3.2.3
leave
KErrNotSupported Virtual Void function that will leave if called and not implemented

Close()

voidClose()[pure virtual]
Close the helper.
Since
S60 3.2.3

FindAllL(CMPXMedia &, const TArray< TMPXAttribute > &)

CMPXMedia *FindAllL(CMPXMedia &aCriteria,
const TArray< TMPXAttribute > &aAttrs
)[pure virtual]
Generic find function.
Since
S60 3.2.3

Parameters

CMPXMedia & aCriteriacriterias to search upon.
const TArray< TMPXAttribute > & aAttrsattributes to return.

GetL(const TDesC &, const TArray< TMPXAttribute > &, TMPXGeneralCategory)

CMPXMedia *GetL(const TDesC &aFile,
const TArray< TMPXAttribute > &aAttrs,
TMPXGeneralCategoryaItemCat = EMPXSong
)[pure virtual]
Gets the metadata for a file.
Since
S60 3.2.3
leave
KErrArgument leave if not updating a song or a playlist.
leave
KErrNoMemory leave if search array is empty.
leave
KErrNotFound leave if array indexcount is 0.
leave
KErrCorrupt default case if the above conditions are not satisfied and object is not found

Parameters

const TDesC & aFilepath to the file.
const TArray< TMPXAttribute > & aAttrsattributes to return.
TMPXGeneralCategory aItemCat = EMPXSongcategory of the file either EMPXSong or EMPXPlaylist.

GetL(const TDesC &, TMPXGeneralCategory)

const CMPXMedia &GetL(const TDesC &aFile,
TMPXGeneralCategoryaItemCat = EMPXSong
)[pure virtual]
Gets the metadata for a file.
Since
S60 3.2.3
leave
KErrNotSupported Virtual const function that will leave if called and not implemented

Parameters

const TDesC & aFilepath to the file.
TMPXGeneralCategory aItemCat = EMPXSongcategory of the file either EMPXSong or EMPXPlaylist.

RemoveAllL()

voidRemoveAllL()[pure virtual]
Remove all entries from the music, podcast and harvester databases.
Since
S60 3.2.3

RemoveL(const TDesC &, TMPXGeneralCategory)

voidRemoveL(const TDesC &aFile,
TMPXGeneralCategoryaItemCat = EMPXSong
)[pure virtual]
Remove a song, playlist, m3u file from the collection and from the harvester database.
Since
S60 3.2.3
leave
KErrArgument leave if the file to be removed does not exist

Parameters

const TDesC & aFilefile to remove.
TMPXGeneralCategory aItemCat = EMPXSongtype of the item (optional).

RenameL(const TDesC &, const TDesC &, TMPXGeneralCategory)

voidRenameL(const TDesC &aOldUri,
const TDesC &aNewUri,
TMPXGeneralCategoryaItemCat = EMPXSong
)[pure virtual]
Renames a file.
Since
S60 3.2.3
leave
KErrArgument leave if not updating a song or a playlist

Parameters

const TDesC & aOldUriexisting URI of the file to be renamed.
const TDesC & aNewUrinew URI of the file.
TMPXGeneralCategory aItemCat = EMPXSongcategory of the file either EMPXSong or EMPXPlaylist.

SetL(CMPXMedia *&)

voidSetL(CMPXMedia *&aMedia)[pure virtual]
Updates the metadata for a file based on the path.
Since
S60 3.2.3
leave
KErrArgument leave if the given media doesn't contain the correct attributes or leave if not updating a song or a playlist

Parameters

CMPXMedia *& aMediamedia item to update.