Open Lighting Architecture  0.9.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
ola::plugin::usbdmx::SunliteFactory Class Reference

Detailed Description

Creates SunLite widgets.

Inheritance diagram for ola::plugin::usbdmx::SunliteFactory:
Inheritance graph
[legend]
Collaboration diagram for ola::plugin::usbdmx::SunliteFactory:
Collaboration graph
[legend]

Public Member Functions

 SunliteFactory (class LibUsbAdaptor *adaptor)
bool DeviceAdded (WidgetObserver *observer, libusb_device *usb_device, const struct libusb_device_descriptor &descriptor)
 Called when a new USB device is added.
void DeviceRemoved (WidgetObserver *observer, libusb_device *device)
 Called when a USB device is removed.

Additional Inherited Members

- Protected Member Functions inherited from ola::plugin::usbdmx::BaseWidgetFactory< Sunlite >
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, Sunlite *widget)
 Initialize a widget and notify the observer.

Member Function Documentation

bool ola::plugin::usbdmx::SunliteFactory::DeviceAdded ( WidgetObserver observer,
libusb_device *  usb_device,
const struct libusb_device_descriptor &  descriptor 
)
virtual

Called when a new USB device is added.

Parameters
observerThe WidgetObserver to notify if this results in a new widget.
usb_devicethe libusb_device that was added.
descriptorthe libusb_device_descriptor that corresponds to the usb_device.
Returns
True if this factory has claimed the usb_device, false otherwise.

Implements ola::plugin::usbdmx::WidgetFactory.

void ola::plugin::usbdmx::SunliteFactory::DeviceRemoved ( WidgetObserver observer,
libusb_device *  usb_device 
)
virtual

Called when a USB device is removed.

Parameters
observerThe WidgetObserver to notify if this action results in a widget removal.
usb_devicethe libusb_device that was removed.

Reimplemented from ola::plugin::usbdmx::BaseWidgetFactory< Sunlite >.


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