Open Lighting Architecture
0.9.6
|
A partial implementation of WidgetFactory.
This handles the mapping of libusb_devices to widgets and notifying the observer when widgets are added or removed.
Public Member Functions | |
void | DeviceRemoved (WidgetObserver *observer, libusb_device *device) |
Called when a USB device is removed. | |
Public Member Functions inherited from ola::plugin::usbdmx::WidgetFactory | |
virtual bool | DeviceAdded (WidgetObserver *observer, libusb_device *usb_device, const struct libusb_device_descriptor &descriptor)=0 |
Called when a new USB device is added. |
Protected Member Functions | |
bool | HasDevice (libusb_device *usb_device) |
Check if this factory is already using this device. | |
unsigned int | DeviceCount () const |
Return the number of active widgets. | |
bool | AddWidget (WidgetObserver *observer, libusb_device *usb_device, WidgetType *widget) |
Initialize a widget and notify the observer. |
|
protected |
Initialize a widget and notify the observer.
observer | The WidgetObserver to notify of the new widget. |
usb_device | the libusb_device associated with the widget. |
widget | the new Widget, ownership is transferred. |
|
inlineprotected |
Return the number of active widgets.
|
virtual |
Called when a USB device is removed.
observer | The WidgetObserver to notify if this action results in a widget removal. |
usb_device | the libusb_device that was removed. |
Implements ola::plugin::usbdmx::WidgetFactory.
Reimplemented in ola::plugin::usbdmx::SunliteFactory.
|
inlineprotected |
Check if this factory is already using this device.
usb_device | The libusb_device to check for. |