|
The Pedigree Project 0.1
|
Collaboration diagram for UsbPnP:Classes | |
| struct | ActiveInvocation |
| struct | CallbackItem |
| class | Registration |
Public Member Functions | |
| MUST_USE_RESULT bool | registerCallback (uint16_t nVendorId, uint16_t nProductId, callback_t callback, Registration ®istration) |
| Register a callback for the given vendor and product IDs. | |
| MUST_USE_RESULT bool | registerCallback (uint8_t nClass, uint8_t nSubclass, uint8_t nProtocol, callback_t callback, Registration ®istration) |
| 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 UsbPnP & | instance () |
| Singleton design. | |
Private Types | |
| typedef UsbDevice *(* | callback_t) (UsbDevice *) |
| Callback function type. | |
Private Member Functions | |
| bool | probeDeviceAdmitted (UsbDeviceContainer *container, OperationBarrier::Lease &lease) |
| Device * | doProbe (Device *pDeviceBase) |
| bool | registerCallbackItem (CallbackItem *item, Registration ®istration, bool reprobe) |
| bool | unregisterCallback (CallbackItem *item) |
| void | retireBindings (CallbackItem *item, bool reprobe) |
| void | publishBinding (CallbackItem *item, UsbDeviceContainer *container, OperationBarrier::Lease &binding) |
| void | detachBinding (UsbDeviceContainer *container) |
| void | unlinkBindingLocked (UsbDeviceContainer *container) |
| bool | acquireCallback (UsbDevice *device, size_t afterSequence, CallbackItem *&item, callback_t &callback, size_t &sequence, ActiveInvocation &invocation) |
| void | finishCallback (CallbackItem *item, ActiveInvocation &invocation) |
| bool | isCallbackContext (void *owner) const |
| bool | inCurrentCallbackContext () |
| void | reprobeDevices (Device *pParent) |
| Goes down the device tree, reprobing every USB device. | |
Static Private Member Functions | |
| static void * | currentInvocationOwner () |
Private Attributes | |
| CallbackItem * | m_FirstCallback |
| CallbackItem * | m_LastCallback |
| size_t | m_CallbackCount |
| Spinlock | m_CallbackLock |
| Mutex | m_BindingLock |
| size_t | m_NextCallbackSequence |
| ActiveInvocation * | m_ActiveInvocations |
Static Private Attributes | |
| static UsbPnP | m_Instance |
| Static instance. | |
Friends | |
| class | UsbHub |
| class | UsbDeviceContainer |
|
private |
|
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 218 of file UsbPnP.cc.
References UsbDevice::getInterface(), Device::getType(), UsbDevice::getUsbState(), UsbDevice::initialiseDriver(), UsbDeviceContainer::replaceUsbDevice(), OperationBarrier::tryAcquire(), and Device::UsbContainer.
|
private |
|
inlinestatic |
|
private |
| bool UsbPnP::probeDevice | ( | Device * | pDeviceBase | ) |
Tries to find a suitable driver for the given USB device.
Definition at line 198 of file UsbPnP.cc.
References Device::getType(), and Device::UsbContainer.
|
private |
|
private |
| bool UsbPnP::registerCallback | ( | uint16_t | nVendorId, |
| uint16_t | nProductId, | ||
| callback_t | callback, | ||
| Registration & | registration | ||
| ) |
| bool UsbPnP::registerCallback | ( | uint8_t | nClass, |
| uint8_t | nSubclass, | ||
| uint8_t | nProtocol, | ||
| callback_t | callback, | ||
| Registration & | registration | ||
| ) |
|
private |
|
private |
Goes down the device tree, reprobing every USB device.
Definition at line 388 of file UsbPnP.cc.
References List< T, nodePoolSize >::count(), Device::foreach(), Device::getType(), List< T, nodePoolSize >::popFront(), List< T, nodePoolSize >::pushBack(), and Device::UsbContainer.
|
private |
|
private |
|
private |
|
friend |
|
private |
|
private |
|
private |