MMPXHarvesterUtility Class Reference

class MMPXHarvesterUtility

Harvester Utility

Utility class to the harvester server

mpxharvesterutility.lib

Member Functions Documentation

AddFileL(const TDesC &, MMPXHarvesterUtilityObserver *)

void AddFileL ( const TDesC & aFilePath,
MMPXHarvesterUtilityObserver * aObs
) [pure virtual]

Add a single song. This method is asynchronous and will call back via the observer interface.

Since
S60 3.0
Note:

S60 metadata utility is REALLY slow, so this has to be async

Parameters

const TDesC & aFilePath path to the song to be added
MMPXHarvesterUtilityObserver * aObs observer to the add file event

AddFileL(CMPXMedia *&)

TInt AddFileL ( CMPXMedia *& aMedia ) [pure virtual]

Add a media property.

Since
S60 3.0

Parameters

CMPXMedia *& aMedia media to add

CancelScanL()

void CancelScanL ( ) [pure virtual]

Cancels a scan to refresh the db.

Since
S60 3.0

CheckForSystemEventsL()

void CheckForSystemEventsL ( ) [pure virtual]

Sends a message to the harvester server to poll for any system events. If there is a sytem event happening, It will notify the rest of the MPX framework. This is used for process start up to query for any on-going events.

Since
S60 3.0

Close()

void Close ( ) [pure virtual]

Closes the utility and deletes the object.

Since
S60 3.0

CloseTransactionL()

void CloseTransactionL ( ) [inline, virtual]

Close the transaction. This method is synchronous. Method is not pure virtual for backward compatibility.

Since
S60 3.2.3

DeleteFileL(const TDesC &, MMPXHarvesterUtilityObserver *)

void DeleteFileL ( const TDesC & aFilePath,
MMPXHarvesterUtilityObserver * aObs
) [pure virtual]

Remove a single song. This Method is asynchronous and will call back to observer interface.

Since
S60 3.0

Parameters

const TDesC & aFilePath path to the song to be removed
MMPXHarvesterUtilityObserver * aObs observer to the delete event

DeleteFilesL(const MDesCArray &, MMPXHarvesterUtilityObserver *)

void DeleteFilesL ( const MDesCArray & aArray,
MMPXHarvesterUtilityObserver * aObs
) [pure virtual]

Remove a list of songs. This method is asynchronous and will call back to observer interface.

Since
S60 3.0

Parameters

const MDesCArray & aArray list of songs to remove
MMPXHarvesterUtilityObserver * aObs observer to the delete event

DeleteFilesL(const MDesCArray &)

void DeleteFilesL ( const MDesCArray & aArray ) [pure virtual]

Remove a list of songs. This method is asynchronous and will call back to observer interface.

Since
S60 3.0

Parameters

const MDesCArray & aArray list of songs to remove

DeleteFilesL(const MDesCArray &, TBool)

void DeleteFilesL ( const MDesCArray & ,
TBool
) [inline, virtual]

Remove a list of songs. This method is asynchronous and will call back to observer interface. Method is not pure virtual for backward compatibility.

Since
S60 3.2.3

Parameters

const MDesCArray &
TBool

ExportPlaylistL(const CMPXMedia &, const TDesC &, TInt, MMPXHarvesterUtilityObserver *)

void ExportPlaylistL ( const CMPXMedia & aProp,
const TDesC & aPath,
TInt aPlaylistType,
MMPXHarvesterUtilityObserver * aObs
) [pure virtual]

Export a Media property as a playlist (Asynchronous). Note that this utility does not have a task queue, The user can ONLY execute 1 async op at a time! This method is asynchronous and will call back via the observer interface.

Since
S60 3.0

Parameters

const CMPXMedia & aProp CMPXMedia object to contain the "list" of items
const TDesC & aPath path and filename
TInt aPlaylistType playlist type, default to M3U
MMPXHarvesterUtilityObserver * aObs observer for async callback

FindCollectionIdL(const TDesC &)

TInt FindCollectionIdL ( const TDesC & aFile ) [pure virtual]

Finds the collection ID based on a File name.

Since
S60 3.0

Parameters

const TDesC & aFile file name to lookup

GetColUidForFileL(const TDesC &)

TInt GetColUidForFileL ( const TDesC & aFilePath ) [pure virtual]

Get a collection ID for the file.

Since
S60 3.0

Parameters

const TDesC & aFilePath

GetMediaForFileL(const TDesC &, MMPXHarvesterUtilityObserver *)

void GetMediaForFileL ( const TDesC & aFilePath,
MMPXHarvesterUtilityObserver * aObs
) [pure virtual]

Get a media object for the file. This method is asynchronous and will call back via the observer interface.

Since
S60 3.0
Note:

S60 metadata utility is REALLY slow, so this has to be async

Parameters

const TDesC & aFilePath path to the song to be added
MMPXHarvesterUtilityObserver * aObs observer to the add file event

ImportFileL(const TDesC &, MMPXHarvesterUtilityObserver *)

void ImportFileL ( const TDesC & aFilename,
MMPXHarvesterUtilityObserver * aObs
) [pure virtual]

Imports a "file" in general (Async). File is not added to any databases.

Since
S60 3.0

Parameters

const TDesC & aFilename
MMPXHarvesterUtilityObserver * aObs observer for the import event

ImportPlaylistL(const TDesC &, MMPXHarvesterUtilityObserver *)

void ImportPlaylistL ( const TDesC & aFilename,
MMPXHarvesterUtilityObserver * aObs
) [pure virtual]

Import a playlist from a file (Asynchronous). This method is asynchronous and will call back via the observer interface.

Since
S60 3.0

Parameters

const TDesC & aFilename
MMPXHarvesterUtilityObserver * aObs

IsPlaylistL(const TDesC &)

TBool IsPlaylistL ( const TDesC & aUri ) [pure virtual]

Determines whether the given file is a playlist from available playlist plugins currently in the system. The existence of the file is not part of this validation process.

An unsupported playlist file is tested as EFalse. But after the appropriate playlist plugin has been installed, the client can retest it and ETrue will be returned.

Since
S60 3.0

Parameters

const TDesC & aUri URI of the media to be tested

OptionalAttributesL(TInt, RArray< TMPXAttribute > &)

void OptionalAttributesL ( TInt aPlaylistType,
RArray < TMPXAttribute > & aOptionalAttributes
) [pure virtual]

Query the optional attributes for tracks for the specified playlist type.

Since
S60 3.0

Parameters

TInt aPlaylistType playlist type for this query
RArray < TMPXAttribute > & aOptionalAttributes out parameter, an array of optional attributes of the specified playlist type

PlaylistFileExtensionLC(TInt)

HBufC * PlaylistFileExtensionLC ( TInt aPlaylistType ) [pure virtual]

Parameters

TInt aPlaylistType

RecreateDatabasesL()

void RecreateDatabasesL ( ) [pure virtual]

Recreate all databases (deletes old). Used to handle db corruption by deleting and re-starting.

Since
S60 3.0

RemoveAllFilesL()

void RemoveAllFilesL ( ) [pure virtual]

Remove all songs from the harvester.

Since
S60 3.0

RemoveFileL(const TDesC &)

TInt RemoveFileL ( const TDesC & aFilePath ) [pure virtual]

Remove a single song.

Since
S60 3.0

Parameters

const TDesC & aFilePath path to the song to be removed

RemoveFilesL(const MDesCArray &)

void RemoveFilesL ( const MDesCArray & aFilesArray ) [pure virtual]

Remove a list of songs.

Since
S60 3.0

Parameters

const MDesCArray & aFilesArray

RenameFileL(const TDesC &, const TDesC &, TInt)

void RenameFileL ( const TDesC & aOldUri,
const TDesC & aNewUri,
TInt aCollection
) [pure virtual]

Rename file.

Since
S60 3.0

Parameters

const TDesC & aOldUri existing URI
const TDesC & aNewUri new URI
TInt aCollection collection Id of the collection the file belongs to

RenameFileLC(const CMPXMedia &)

HBufC * RenameFileLC ( const CMPXMedia & aMedia ) [pure virtual]

Rename file for the given media.

Since
S60 3.0

Parameters

const CMPXMedia & aMedia media to be renamed

RequiredAttributesL(TInt, RArray< TMPXAttribute > &)

void RequiredAttributesL ( TInt aPlaylistType,
RArray < TMPXAttribute > & aRequiredAttributes
) [pure virtual]

Query the required attributes for tracks for the specified playlist type.

Since
S60 3.0

Parameters

TInt aPlaylistType playlist type for this query
RArray < TMPXAttribute > & aRequiredAttributes out parameter, an array of required attributes of the specified playlist type

ScanL()

void ScanL ( ) [pure virtual]

Initiates a scan for new files on all drives. All files are added to the collection. Scan results are broadcasted through the collection framework.

Since
S60 3.0

ShutdownL()

void ShutdownL ( ) [pure virtual]

Shutdown the server.

Since
S60 3.0
Note:

test function only!! shuts down the harvester server immediately

UpdateFileL(CMPXMedia *&)

void UpdateFileL ( CMPXMedia *& aProperty ) [pure virtual]

Update the collection id column in the harvester for a media.

Since
S60 3.0

Parameters

CMPXMedia *& aProperty