sbMainThreadMetadataProcessor Class Reference

#include <sbMainThreadMetadataProcessor.h>

Inheritance diagram for sbMainThreadMetadataProcessor:
Collaboration diagram for sbMainThreadMetadataProcessor:

Public Member Functions

sbMainThreadMetadataProcessor (sbFileMetadataService *aManager)
virtual ~sbMainThreadMetadataProcessor ()
nsresult Start ()
nsresult Stop ()

Protected Attributes

nsRefPtr< sbFileMetadataServicemJobManager
nsTArray< nsRefPtr
< sbMetadataJobItem > > 
nsCOMPtr< nsITimer > mTimer
PRBool mRunning

Detailed Description

Used by sbFileMetadataService to process sbMetadataJobItem handlers on the main thread thread. Runs multiple handlers at once (if async) and polls them for completion.

Definition at line 55 of file sbMainThreadMetadataProcessor.h.

Constructor & Destructor Documentation

sbMainThreadMetadataProcessor::sbMainThreadMetadataProcessor ( sbFileMetadataService aManager)

Definition at line 65 of file sbMainThreadMetadataProcessor.cpp.

sbMainThreadMetadataProcessor::~sbMainThreadMetadataProcessor ( )

Definition at line 76 of file sbMainThreadMetadataProcessor.cpp.

Here is the call graph for this function:

Member Function Documentation

nsresult sbMainThreadMetadataProcessor::Start ( )

Make sure that the timer is running. Note that this method should be called any time a new job is added, since the timer will shut down if it runs out of things to do.

Definition at line 85 of file sbMainThreadMetadataProcessor.cpp.

nsresult sbMainThreadMetadataProcessor::Stop ( )

Shut down the timer. Must be called from the main thread.

Definition at line 116 of file sbMainThreadMetadataProcessor.cpp.

Here is the caller graph for this function:

Member Data Documentation

nsTArray<nsRefPtr<sbMetadataJobItem> > sbMainThreadMetadataProcessor::mCurrentJobItems

Definition at line 85 of file sbMainThreadMetadataProcessor.h.

nsRefPtr<sbFileMetadataService> sbMainThreadMetadataProcessor::mJobManager

Definition at line 81 of file sbMainThreadMetadataProcessor.h.

PRBool sbMainThreadMetadataProcessor::mRunning

Definition at line 91 of file sbMainThreadMetadataProcessor.h.

nsCOMPtr<nsITimer> sbMainThreadMetadataProcessor::mTimer

Definition at line 88 of file sbMainThreadMetadataProcessor.h.

The documentation for this class was generated from the following files: