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

Public Member Functions
void AddL (const TDesC &, MMPXCollectionHelperObserver *)
void AddL ( CMPXMedia *)
void CleanupDeletedMediasL ()
void Close ()
CMPXMedia * FindAllL ( CMPXMedia &, const TArray < TMPXAttribute > &)
CMPXMedia * GetL (const TDesC &, const TArray < TMPXAttribute > &, TMPXGeneralCategory )
const CMPXMedia & GetL (const TDesC &, TMPXGeneralCategory )
void RemoveAllL ()
void RemoveL (const TDesC &, TMPXGeneralCategory )
void RenameL (const TDesC &, const TDesC &, TMPXGeneralCategory )
void SetL ( CMPXMedia *&)

Member Functions Documentation

AddL(const TDesC &, MMPXCollectionHelperObserver *)

void AddL ( 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 & aFile full path and name of the file.
MMPXCollectionHelperObserver * aObserver observer for the add operation

AddL(CMPXMedia *)

void AddL ( 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 * aMedia media property to add.

CleanupDeletedMediasL()

void CleanupDeletedMediasL ( ) [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()

void Close ( ) [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 & aCriteria criterias to search upon.
const TArray < TMPXAttribute > & aAttrs attributes to return.

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

CMPXMedia * GetL ( const TDesC & aFile,
const TArray < TMPXAttribute > & aAttrs,
TMPXGeneralCategory aItemCat = 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 & aFile path to the file.
const TArray < TMPXAttribute > & aAttrs attributes to return.
TMPXGeneralCategory aItemCat = EMPXSong category of the file either EMPXSong or EMPXPlaylist.

GetL(const TDesC &, TMPXGeneralCategory)

const CMPXMedia & GetL ( const TDesC & aFile,
TMPXGeneralCategory aItemCat = 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 & aFile path to the file.
TMPXGeneralCategory aItemCat = EMPXSong category of the file either EMPXSong or EMPXPlaylist.

RemoveAllL()

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

RemoveL(const TDesC &, TMPXGeneralCategory)

void RemoveL ( const TDesC & aFile,
TMPXGeneralCategory aItemCat = 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 & aFile file to remove.
TMPXGeneralCategory aItemCat = EMPXSong type of the item (optional).

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

void RenameL ( const TDesC & aOldUri,
const TDesC & aNewUri,
TMPXGeneralCategory aItemCat = 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 & aOldUri existing URI of the file to be renamed.
const TDesC & aNewUri new URI of the file.
TMPXGeneralCategory aItemCat = EMPXSong category of the file either EMPXSong or EMPXPlaylist.

SetL(CMPXMedia *&)

void SetL ( 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 *& aMedia media item to update.