sbBackgroundThreadMetadataProcessor Class Reference

#include <sbBackgroundThreadMetadataProcessor.h>

Inheritance diagram for sbBackgroundThreadMetadataProcessor:
Collaboration diagram for sbBackgroundThreadMetadataProcessor:

Public Member Functions

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

Protected Attributes

nsRefPtr< sbFileMetadataServicemJobManager
nsCOMPtr< nsIThread > mThread
PRBool mShouldShutdown
PRMonitor * mMonitor

Detailed Description

Used by sbFileMetadataService to process sbMetadataJobItem handlers on a background thread.

Definition at line 54 of file sbBackgroundThreadMetadataProcessor.h.

Constructor & Destructor Documentation

sbBackgroundThreadMetadataProcessor::sbBackgroundThreadMetadataProcessor ( sbFileMetadataService aManager)

Definition at line 61 of file sbBackgroundThreadMetadataProcessor.cpp.

sbBackgroundThreadMetadataProcessor::~sbBackgroundThreadMetadataProcessor ( )

Definition at line 74 of file sbBackgroundThreadMetadataProcessor.cpp.

Here is the call graph for this function:

Member Function Documentation

nsresult sbBackgroundThreadMetadataProcessor::Start ( )

Make sure that the background thread is running. Note that this method should be called any time a new job is added, since the thread may go to sleep if it runs out of things to do.

Definition at line 86 of file sbBackgroundThreadMetadataProcessor.cpp.

nsresult sbBackgroundThreadMetadataProcessor::Stop ( )

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

Definition at line 115 of file sbBackgroundThreadMetadataProcessor.cpp.

Here is the caller graph for this function:

Member Data Documentation

nsRefPtr<sbFileMetadataService> sbBackgroundThreadMetadataProcessor::mJobManager

Definition at line 80 of file sbBackgroundThreadMetadataProcessor.h.

PRMonitor* sbBackgroundThreadMetadataProcessor::mMonitor

Definition at line 90 of file sbBackgroundThreadMetadataProcessor.h.

PRBool sbBackgroundThreadMetadataProcessor::mShouldShutdown

Definition at line 86 of file sbBackgroundThreadMetadataProcessor.h.

nsCOMPtr<nsIThread> sbBackgroundThreadMetadataProcessor::mThread

Definition at line 83 of file sbBackgroundThreadMetadataProcessor.h.

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