sbIFileMetadataService Interface Reference

import"sbIFileMetadataService.idl";

Inheritance diagram for sbIFileMetadataService:
[legend]
Collaboration diagram for sbIFileMetadataService:
[legend]

Public Member Functions

sbIJobProgress read (in nsIArray aMediaItemArray)
 Start a processing job to read metadata from the files associated with the given media items. More...
 
sbIJobProgress write (in nsIArray aMediaItemArray, in nsIStringEnumerator aRequiredProperties)
 Start a processing job to write metadata from the given media items back to their associated files. More...
 
void restartProcessors (in unsigned short aProcessorsToRestart)
 Restart the processors. More...
 

Public Attributes

const unsigned short MAIN_THREAD_PROCESSOR = 1
 Main Thread Processor Flag for restartProcessors. More...
 
const unsigned short BACKGROUND_THREAD_PROCESSOR = 2
 Background Thread Processor Flag for restartProcessors. More...
 

Detailed Description

Definition at line 57 of file sbIFileMetadataService.idl.

Member Function Documentation

sbIJobProgress sbIFileMetadataService::read ( in nsIArray  aMediaItemArray)

Start a processing job to read metadata from the files associated with the given media items.

Note that all the media items must be from the same library. This restriction is due to the fact that library batching can only be done on a per library basis.

If called off of the main thread, will proxy to complete job startup. Be aware that proxy events may be processed on the calling thread while waiting. Also note that the sbIJobProgress token returned should NOT be accessed off of the main thread.

Parameters
aMediaItemsArrayAn array filled with media items to be scanned.
Returns
An interface for monitoring the status of the request
void sbIFileMetadataService::restartProcessors ( in unsigned short  aProcessorsToRestart)

Restart the processors.

Parameters
aProcessorsToRestartCombination of desired flags (MAIN_THREAD_PROCESSOR and/or BACKGROUND_THREAD_PROCESSOR)
Note
If the requested processor is already running it will not be restarted. Restart of the processors only works if the file metadata service is currently running. If it is not running this method will throw NS_ERROR_UNEXPECTED.
sbIJobProgress sbIFileMetadataService::write ( in nsIArray  aMediaItemArray,
in nsIStringEnumerator  aRequiredProperties 
)

Start a processing job to write metadata from the given media items back to their associated files.

Note that all the media items must be from the same library. This restriction is due to the fact that library batching can only be done on a per library basis.

Also note that if a property is found in a file but does not exist in the associated sbIMediaItem, it will be removed from the file on write.

Also note that for each item all the properties in the list of aRequiredProperties will be written even if they have not changed.

If called off of the main thread, will proxy to complete job startup. Be aware that proxy events may be processed on the calling thread while waiting. Also note that the sbIJobProgress token returned should NOT be accessed off of the main thread.

Parameters
aMediaItemsArrayAn array filled with media items to be scanned.
aRequiredPropertiesA String Enumertor filled with property ids that we wish to write.
Returns
An interface for monitoring the status of the request

Member Data Documentation

const unsigned short sbIFileMetadataService::BACKGROUND_THREAD_PROCESSOR = 2

Background Thread Processor Flag for restartProcessors.

Definition at line 116 of file sbIFileMetadataService.idl.

const unsigned short sbIFileMetadataService::MAIN_THREAD_PROCESSOR = 1

Main Thread Processor Flag for restartProcessors.

Definition at line 112 of file sbIFileMetadataService.idl.


The documentation for this interface was generated from the following file: