Songbird Windows USB Device Utilities Source. More...
#include "sbWindowsUSBDeviceUtils.h"
#include "sbWindowsDeviceUtils.h"
#include <sbWindowsUtils.h>
#include <devioctl.h>
#include <usbioctl.h>
Go to the source code of this file.
Functions | |
nsresult | sbUSBDeviceGetDescriptor (sbUSBDeviceRef *aDeviceRef, PRUint8 aDescriptorType, PRUint8 aDescriptorIndex, PRUint16 aDescriptorIndex2, PRUint16 aDescriptorLength, sbUSBDescriptor **aDescriptor) |
nsresult | sbWinUSBDeviceOpenRef (DEVINST aDevInst, sbWinUSBDeviceRef *aDeviceRef) |
nsresult | sbWinUSBDeviceCloseRef (sbWinUSBDeviceRef *aDeviceRef) |
nsresult | sbWinUSBDeviceGetHubAndPort (DEVINST aDevInst, HANDLE *aHubFile, ULONG *aPortIndex) |
nsresult | sbWinUSBHubFindDevicePort (HANDLE aHubFile, DEVINST aDevInst, ULONG *aPortIndex) |
nsresult | sbWinUSBHubGetPortDriverKey (HANDLE aHubFile, ULONG aPortIndex, nsAString &aDriverKey) |
nsresult | sbWinUSBMSCGetLUN (DEVINST aDevInst, PRUint32 *aLUN) |
Variables | |
static const GUID | GUID_DEVINTERFACE_USB_HUB |
Songbird Windows USB Device Utilities Source.
Definition in file sbWindowsUSBDeviceUtils.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 sbWinUSBDeviceCloseRef | ( | sbWinUSBDeviceRef * | aDeviceRef | ) |
Close the USB device reference specified by aDeviceRef.
aDeviceRef | USB device reference to close. |
Definition at line 228 of file sbWindowsUSBDeviceUtils.cpp.
nsresult sbWinUSBDeviceGetHubAndPort | ( | DEVINST | aDevInst, |
HANDLE * | aHubFile, | ||
ULONG * | aPortIndex | ||
) |
Return in aHubFile and aPortIndex the USB device hub file and port index for the USB device specified by aDevInst.
aDevInst | Device instance for which to get hub and port. |
aHubFile | Returned USB hub file for device. |
aPortIndex | Returned USB hub port index for device. |
Definition at line 253 of file sbWindowsUSBDeviceUtils.cpp.
nsresult sbWinUSBDeviceOpenRef | ( | DEVINST | aDevInst, |
sbWinUSBDeviceRef * | aDeviceRef | ||
) |
Open a USB device reference to the device specified by aDevInst and return the reference in aDeviceRef.
aDevInst | USB device instance to open. |
aDeviceRef | Returned device reference. |
Definition at line 197 of file sbWindowsUSBDeviceUtils.cpp.
nsresult sbWinUSBHubFindDevicePort | ( | HANDLE | aHubFile, |
DEVINST | aDevInst, | ||
ULONG * | aPortIndex | ||
) |
Return in aPortIndex the USB hub index of the USB hub specified by aHubFile for the USB device specified by aDevInst.
aHubFile | USB hub for which to find port. |
aDevInst | USB device instance for which to find port. |
aPortIndex | Returned USB hub port index for device. |
Definition at line 303 of file sbWindowsUSBDeviceUtils.cpp.
nsresult sbWinUSBHubGetPortDriverKey | ( | HANDLE | aHubFile, |
ULONG | aPortIndex, | ||
nsAString & | aDriverKey | ||
) |
Return in aDriverKey the driver key for the device attached to the port specified by aPortIndex of the USB hub specified by aHubFile. If no device is attached to the port, aDriverKey is set to void.
aHubFile | USB hub for which to get port driver key. |
aPortIndex | Index of USB hub port for which to get driver key. |
aDriverKey | Returned USB hub port driver key. |
Definition at line 376 of file sbWindowsUSBDeviceUtils.cpp.
nsresult sbWinUSBMSCGetLUN | ( | DEVINST | aDevInst, |
PRUint32 * | aLUN | ||
) |
Return in aLUN the USB MSC LUN for the disk device specified by aDevInst.
aDevInst | Disk for which to get LUN. |
aLUN | Returned LUN. |
Definition at line 446 of file sbWindowsUSBDeviceUtils.cpp.
|
static |
Definition at line 78 of file sbWindowsUSBDeviceUtils.cpp.