sbBackgroundThreadMetadataProcessor Class Reference

#include <sbBackgroundThreadMetadataProcessor.h>

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

Public Member Functions

NS_DECL_ISUPPORTS
NS_DECL_NSIRUNNABLE 
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 ( )
virtual

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
protected

Definition at line 80 of file sbBackgroundThreadMetadataProcessor.h.

PRMonitor* sbBackgroundThreadMetadataProcessor::mMonitor
protected

Definition at line 90 of file sbBackgroundThreadMetadataProcessor.h.

PRBool sbBackgroundThreadMetadataProcessor::mShouldShutdown
protected

Definition at line 86 of file sbBackgroundThreadMetadataProcessor.h.

nsCOMPtr<nsIThread> sbBackgroundThreadMetadataProcessor::mThread
protected

Definition at line 83 of file sbBackgroundThreadMetadataProcessor.h.


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