sbBaseDeviceMarshall Class Reference

#include <sbBaseDeviceMarshall.h>

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

Classes

class  CompatibilityComparer
 

Public Member Functions

sbIDeviceControllerFindCompatibleControllers (nsIPropertyBag *deviceParams)
 
sbIDeviceControllerFindCompatibleControllers (nsIPropertyBag *deviceParams, CompatibilityComparer &deviceComparer)
 
- Public Member Functions inherited from sbIDeviceMarshall
void loadControllers (in sbIDeviceControllerRegistrar aRegistrar)
 
void beginMonitoring ()
 
void stopMonitoring ()
 
void removeDevice (in sbIDevice aDevice)
 

Protected Member Functions

virtual ~sbBaseDeviceMarshall ()
 
 sbBaseDeviceMarshall (nsACString const &categoryName)
 
void RegisterControllers (sbIDeviceControllerRegistrar *registrar)
 
nsIArray * GetControllers () const
 
nsIArray * RefreshControllers ()
 
void ClearMonitoringFlag ()
 
PRBool IsMonitoring () const
 

Additional Inherited Members

- Public Attributes inherited from sbIDeviceMarshall
readonly attribute nsIDPtr id
 
readonly attribute AString name
 

Detailed Description

This class provides a set of common tools for use by device marshall implementations. Currently this class provides three main purposes.

  • Monitoring shutdown via the ClearMonitoringFlag this ensure proper shutdown.
  • Controller instantiation. It will instantiate all the controllers for a marshaller and return them via the GetControllers or will directly register them with RegisterControllers
  • Compatibility search via the FindCompatibleControllers methods.

Definition at line 52 of file sbBaseDeviceMarshall.h.

Constructor & Destructor Documentation

sbBaseDeviceMarshall::~sbBaseDeviceMarshall ( )
protectedvirtual

Verifies that shutdown has been called.

Definition at line 44 of file sbBaseDeviceMarshall.cpp.

sbBaseDeviceMarshall::sbBaseDeviceMarshall ( nsACString const &  categoryName)
protected

Initializes the shutdown flag.

Definition at line 39 of file sbBaseDeviceMarshall.cpp.

Member Function Documentation

void sbBaseDeviceMarshall::ClearMonitoringFlag ( )
inlineprotected

Derived classes call this at the start of their stopMonitoring implementation. An assert will fire on destruction if this is not called. Monitoring would normally be turned off during shutdown.

Definition at line 144 of file sbBaseDeviceMarshall.h.

sbIDeviceController* sbBaseDeviceMarshall::FindCompatibleControllers ( nsIPropertyBag *  deviceParams)
inline

Locates the most compatible controller based on the ControllerComparer.

Definition at line 100 of file sbBaseDeviceMarshall.h.

Here is the caller graph for this function:

sbIDeviceController * sbBaseDeviceMarshall::FindCompatibleControllers ( nsIPropertyBag *  deviceParams,
CompatibilityComparer deviceComparer 
)

Locates the most compatible controller based on deviceComparer.

Definition at line 177 of file sbBaseDeviceMarshall.cpp.

Here is the call graph for this function:

nsIArray* sbBaseDeviceMarshall::GetControllers ( ) const
inlineprotected

Retrieves the controllers for the category and loads them into the controllers array

Definition at line 124 of file sbBaseDeviceMarshall.h.

Here is the call graph for this function:

Here is the caller graph for this function:

PRBool sbBaseDeviceMarshall::IsMonitoring ( ) const
inlineprotected

Derived classes can use this to determine whether or not monitoring is active

Definition at line 151 of file sbBaseDeviceMarshall.h.

nsIArray * sbBaseDeviceMarshall::RefreshControllers ( )
protected

Refreshes the list of controllers returning an array interface to them

Definition at line 122 of file sbBaseDeviceMarshall.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void sbBaseDeviceMarshall::RegisterControllers ( sbIDeviceControllerRegistrar registrar)
protected

Definition at line 50 of file sbBaseDeviceMarshall.cpp.

Here is the call graph for this function:


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