Songbird USB Device Utilities Definitions. More...
#include <nsAutoPtr.h>
#include <nsTArray.h>
Go to the source code of this file.
Classes | |
struct | sbUSBDescriptorHeader |
struct | sbUSBDeviceDescriptor |
struct | sbUSBConfigurationDescriptor |
struct | sbUSBInterfaceDescriptor |
struct | sbUSBStringDescriptor |
class | sbUSBDeviceRef |
class | sbUSBDescriptor |
Macros | |
#define | SB_USB_DESCRIPTOR_TYPE_DEVICE 1 |
#define | SB_USB_DESCRIPTOR_TYPE_CONFIGURATION 2 |
#define | SB_USB_DESCRIPTOR_TYPE_STRING 3 |
#define | SB_USB_DESCRIPTOR_TYPE_INTERFACE 4 |
#define | SB_USB_DESCRIPTOR_TYPE_ENDPOINT 5 |
#define | SB_USB_APPLE_VENDOR_ID 0x05ac |
Typedefs | |
typedef nsTArray< nsRefPtr < sbUSBDescriptor > > | sbUSBDescriptorList |
Functions | |
nsresult | sbUSBDeviceImplementsClass (sbUSBDescriptorList &aDescriptorList, PRUint8 aUSBClass, PRBool *aImplementsClass) |
nsresult | sbUSBDeviceGetDescriptor (sbUSBDeviceRef *aDeviceRef, PRUint8 aDescriptorType, PRUint8 aDescriptorIndex, PRUint16 aDescriptorIndex2, sbUSBDescriptor **aDescriptor) |
nsresult | sbUSBDeviceGetStringDescriptor (sbUSBDeviceRef *aDeviceRef, PRUint8 aDescriptorIndex, PRUint16 aDescriptorIndex2, nsAString &aString) |
nsresult | sbUSBDeviceGetLanguageList (sbUSBDeviceRef *aDeviceRef, nsTArray< PRUint16 > &aLanguageList) |
nsresult | sbUSBDeviceAddConfigurationDescriptors (sbUSBDeviceRef *aDeviceRef, PRUint8 aConfigurationIndex, sbUSBDescriptorList &aDescriptorList) |
nsresult | sbUSBDeviceGetDescriptor (sbUSBDeviceRef *aDeviceRef, PRUint8 aDescriptorType, PRUint8 aDescriptorIndex, PRUint16 aDescriptorIndex2, PRUint16 aDescriptorLength, sbUSBDescriptor **aDescriptor) |
Songbird USB Device Utilities Definitions.
Definition in file sbUSBDeviceUtils.h.
#define SB_USB_APPLE_VENDOR_ID 0x05ac |
Definition at line 84 of file sbUSBDeviceUtils.h.
#define SB_USB_DESCRIPTOR_TYPE_CONFIGURATION 2 |
Definition at line 76 of file sbUSBDeviceUtils.h.
#define SB_USB_DESCRIPTOR_TYPE_DEVICE 1 |
Definition at line 75 of file sbUSBDeviceUtils.h.
#define SB_USB_DESCRIPTOR_TYPE_ENDPOINT 5 |
Definition at line 79 of file sbUSBDeviceUtils.h.
#define SB_USB_DESCRIPTOR_TYPE_INTERFACE 4 |
Definition at line 78 of file sbUSBDeviceUtils.h.
#define SB_USB_DESCRIPTOR_TYPE_STRING 3 |
Definition at line 77 of file sbUSBDeviceUtils.h.
typedef nsTArray<nsRefPtr<sbUSBDescriptor> > sbUSBDescriptorList |
Definition at line 61 of file sbUSBDeviceUtils.h.
nsresult sbUSBDeviceAddConfigurationDescriptors | ( | sbUSBDeviceRef * | aDeviceRef, |
PRUint8 | aConfigurationIndex, | ||
sbUSBDescriptorList & | aDescriptorList | ||
) |
Add to aDescriptorList the list of configuration descriptors for the device specified by aDeviceRef and configuration index specified by aConfigurationIndex.
aDeviceRef | Device reference for which to get descriptors. |
aConfigurationIndex | Index of configuration to get. |
aDescriptorList | List of descriptors. |
Definition at line 316 of file sbUSBDeviceUtils.cpp.
nsresult sbUSBDeviceGetDescriptor | ( | sbUSBDeviceRef * | aDeviceRef, |
PRUint8 | aDescriptorType, | ||
PRUint8 | aDescriptorIndex, | ||
PRUint16 | aDescriptorIndex2, | ||
sbUSBDescriptor ** | aDescriptor | ||
) |
Return in aDescriptor the USB descriptor for the device specified by aDeviceRef of descriptor type specified by aDescriptorType and descriptor index specified by aDescriptorIndex and aDescriptorIndex2.
aDeviceRef | Device reference for which to get descriptor. |
aDescriptorType | Type of descriptor to get. |
aDescriptorIndex | Index of descriptor to get. |
aDescriptorIndex2 | Second index of descriptor to get (only used for string descriptors). |
aDescriptor | Returned descriptor. |
Definition at line 140 of file sbUSBDeviceUtils.cpp.
nsresult sbUSBDeviceGetDescriptor | ( | sbUSBDeviceRef * | aDeviceRef, |
PRUint8 | aDescriptorType, | ||
PRUint8 | aDescriptorIndex, | ||
PRUint16 | aDescriptorIndex2, | ||
PRUint16 | aDescriptorLength, | ||
sbUSBDescriptor ** | aDescriptor | ||
) |
Return in aDescriptor the USB descriptor for the device specified by aDeviceRef of descriptor type specified by aDescriptorType and descriptor index specified by aDescriptorIndex and aDescriptorIndex2. Read up to aDescriptorLength bytes of descriptor data.
aDeviceRef | Device reference for which to get descriptor. |
aDescriptorType | Type of descriptor to get. |
aDescriptorIndex | Index of descriptor to get. |
aDescriptorIndex2 | Second index of descriptor to get (only used for string descriptors). |
aDescriptorLength | Number of bytes of descriptor data to get. |
aDescriptor | Returned descriptor. |
Definition at line 109 of file sbWindowsUSBDeviceUtils.cpp.
nsresult sbUSBDeviceGetLanguageList | ( | sbUSBDeviceRef * | aDeviceRef, |
nsTArray< PRUint16 > & | aLanguageList | ||
) |
Return in aLanguageList the list of language ID's supported by the device specified by aDeviceRef.
aDeviceRef | Device reference for which to get language ID's. |
aLanguageList | List of language ID's. |
Definition at line 272 of file sbUSBDeviceUtils.cpp.
nsresult sbUSBDeviceGetStringDescriptor | ( | sbUSBDeviceRef * | aDeviceRef, |
PRUint8 | aDescriptorIndex, | ||
PRUint16 | aDescriptorIndex2, | ||
nsAString & | aString | ||
) |
Return in aString the USB string descriptor string for the device specified by aDeviceRef with the descriptor index specified by aDescriptorIndex and aDescriptorIndex2.
aDeviceRef | Device reference for which to get descriptor. |
aDescriptorIndex | Index of descriptor to get. |
aDescriptorIndex2 | Second index of descriptor to get (only used for string descriptors). |
aString | Returned descriptor string. |
Definition at line 232 of file sbUSBDeviceUtils.cpp.
nsresult sbUSBDeviceImplementsClass | ( | sbUSBDescriptorList & | aDescriptorList, |
PRUint8 | aUSBClass, | ||
PRBool * | aImplementsClass | ||
) |
Return true in aImplementsClass if the USB device with the descriptors specified by aDescriptorList implements the USB class specified by aUSBClass.
aDescriptorList | List of device USB descriptors. |
aUSBClass | USB class to check. |
aImplementsClass | Returned true if device implements USB class. |
Definition at line 67 of file sbUSBDeviceUtils.cpp.