The Pedigree Project  0.1
Classes | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
UsbPnP Class Reference
+ Collaboration diagram for UsbPnP:

Classes

struct  CallbackItem
 

Public Member Functions

void registerCallback (uint16_t nVendorId, uint16_t nProductId, callback_t callback)
 Register a callback for the given vendor and product IDs.
 
void registerCallback (uint8_t nClass, uint8_t nSubclass, uint8_t nProtocol, callback_t callback)
 Register a callback for the given class, subclass and protocol numbers.
 
bool probeDevice (Device *pDeviceBase)
 Tries to find a suitable driver for the given USB device.
 

Static Public Member Functions

static UsbPnPinstance ()
 Singleton design.
 

Private Types

typedef UsbDevice *(* callback_t) (UsbDevice *)
 Callback function type.
 

Private Member Functions

DevicedoProbe (Device *pDeviceBase)
 
void reprobeDevices (Device *pParent)
 Goes down the device tree, reprobing every USB device.
 

Private Attributes

List< CallbackItem * > m_Callbacks
 Callback list.
 

Static Private Attributes

static UsbPnP m_Instance
 Static instance.
 

Detailed Description

Definition at line 40 of file UsbPnP.h.

Member Function Documentation

Device * UsbPnP::doProbe ( Device pDeviceBase)
private

Probes a device and returns the new device if it was successfully loaded and owned by a driver, or the original pointer otherwise.

Definition at line 42 of file UsbPnP.cc.

References UsbPnP::CallbackItem::callback, UsbDevice::getDescriptor(), UsbDevice::getInterface(), Device::getType(), UsbDevice::getUsbState(), UsbDevice::initialiseDriver(), UsbPnP::CallbackItem::nClass, UsbPnP::CallbackItem::nVendorId, and Device::UsbContainer.

Referenced by reprobeDevices().

+ Here is the caller graph for this function:


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