MMPXHarvesterUtility Class Reference

class MMPXHarvesterUtility

Harvester Utility

Utility class to the harvester server

mpxharvesterutility.lib

Member Functions Documentation

AddFileL(const TDesC &, MMPXHarvesterUtilityObserver *)

voidAddFileL(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 & aFilePathpath to the song to be added
MMPXHarvesterUtilityObserver * aObsobserver to the add file event

AddFileL(CMPXMedia *&)

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

Add a media property.

Since
S60 3.0

Parameters

CMPXMedia *& aMediamedia to add

CancelScanL()

voidCancelScanL()[pure virtual]

Cancels a scan to refresh the db.

Since
S60 3.0

CheckForSystemEventsL()

voidCheckForSystemEventsL()[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()

voidClose()[pure virtual]

Closes the utility and deletes the object.

Since
S60 3.0

CloseTransactionL()

voidCloseTransactionL()[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 *)

voidDeleteFileL(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 & aFilePathpath to the song to be removed
MMPXHarvesterUtilityObserver * aObsobserver to the delete event

DeleteFilesL(const MDesCArray &, MMPXHarvesterUtilityObserver *)

voidDeleteFilesL(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 & aArraylist of songs to remove
MMPXHarvesterUtilityObserver * aObsobserver to the delete event

DeleteFilesL(const MDesCArray &)

voidDeleteFilesL(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 & aArraylist of songs to remove

DeleteFilesL(const MDesCArray &, TBool)

voidDeleteFilesL(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 *)

voidExportPlaylistL(const CMPXMedia &aProp,
const TDesC &aPath,
TIntaPlaylistType,
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 & aPropCMPXMedia object to contain the "list" of items
const TDesC & aPathpath and filename
TInt aPlaylistTypeplaylist type, default to M3U
MMPXHarvesterUtilityObserver * aObsobserver 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 & aFilefile 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 *)

voidGetMediaForFileL(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 & aFilePathpath to the song to be added
MMPXHarvesterUtilityObserver * aObsobserver to the add file event

ImportFileL(const TDesC &, MMPXHarvesterUtilityObserver *)

voidImportFileL(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 * aObsobserver for the import event

ImportPlaylistL(const TDesC &, MMPXHarvesterUtilityObserver *)

voidImportPlaylistL(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 & aUriURI of the media to be tested

OptionalAttributesL(TInt, RArray< TMPXAttribute > &)

voidOptionalAttributesL(TIntaPlaylistType,
RArray< TMPXAttribute > &aOptionalAttributes
)[pure virtual]

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

Since
S60 3.0

Parameters

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

PlaylistFileExtensionLC(TInt)

HBufC *PlaylistFileExtensionLC(TIntaPlaylistType)[pure virtual]

Parameters

TInt aPlaylistType

RecreateDatabasesL()

voidRecreateDatabasesL()[pure virtual]

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

Since
S60 3.0

RemoveAllFilesL()

voidRemoveAllFilesL()[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 & aFilePathpath to the song to be removed

RemoveFilesL(const MDesCArray &)

voidRemoveFilesL(const MDesCArray &aFilesArray)[pure virtual]

Remove a list of songs.

Since
S60 3.0

Parameters

const MDesCArray & aFilesArray

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

voidRenameFileL(const TDesC &aOldUri,
const TDesC &aNewUri,
TIntaCollection
)[pure virtual]

Rename file.

Since
S60 3.0

Parameters

const TDesC & aOldUriexisting URI
const TDesC & aNewUrinew URI
TInt aCollectioncollection 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 & aMediamedia to be renamed

RequiredAttributesL(TInt, RArray< TMPXAttribute > &)

voidRequiredAttributesL(TIntaPlaylistType,
RArray< TMPXAttribute > &aRequiredAttributes
)[pure virtual]

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

Since
S60 3.0

Parameters

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

ScanL()

voidScanL()[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()

voidShutdownL()[pure virtual]

Shutdown the server.

Since
S60 3.0
Note:

test function only!! shuts down the harvester server immediately

UpdateFileL(CMPXMedia *&)

voidUpdateFileL(CMPXMedia *&aProperty)[pure virtual]

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

Since
S60 3.0

Parameters

CMPXMedia *& aProperty