|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.jusb.UsbConfigurationImp
public class UsbConfigurationImp
UsbConfiguration implementation.
This must be set up before use.
setter
.setter
.added
.
Constructor Summary | |
---|---|
UsbConfigurationImp(UsbDeviceImp device,
UsbConfigurationDescriptor desc)
Constructor. |
Method Summary | |
---|---|
void |
addUsbInterfaceImp(UsbInterfaceImp setting)
Add a UsbInterfaceImp. |
boolean |
containsUsbInterface(byte number)
If the specified UsbInterface is contained in this UsbConfiguration. |
java.lang.String |
getConfigurationString()
Get the configuration String. |
UsbConfigurationDescriptor |
getUsbConfigurationDescriptor()
Get the configuration descriptor. |
UsbDevice |
getUsbDevice()
Get the parent UsbDevice that this UsbConfiguration belongs to. |
UsbDeviceImp |
getUsbDeviceImp()
|
UsbInterface |
getUsbInterface(byte number)
Get a UsbInterface. |
UsbInterfaceImp |
getUsbInterfaceImp(byte number)
Get a UsbInterfaceImp. |
java.util.List |
getUsbInterfaces()
Get all UsbInterfaces for this configuration. |
java.util.List |
getUsbInterfaceSettingList(byte number)
Get the List of settings for the specified interface numer. |
boolean |
isActive()
If this UsbConfiguration is active. |
void |
setActiveUsbInterfaceImpSetting(UsbInterfaceImp setting)
Change an interface setting to be the active alternate setting. |
void |
setUsbConfigurationDescriptor(UsbConfigurationDescriptor desc)
|
void |
setUsbDeviceImp(UsbDeviceImp device)
Set the UsbDeviceImp. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UsbConfigurationImp(UsbDeviceImp device, UsbConfigurationDescriptor desc)
device
- The parent device.desc
- This configuration's descriptor.Method Detail |
---|
public boolean isActive()
UsbConfiguration
isActive
in interface UsbConfiguration
public java.util.List getUsbInterfaces()
UsbConfiguration
The returned UsbInterface settings depend on whether this configuration (and by association its contained interfaces) is active or not:
UsbInterface.getSetting(byte number)
.
getUsbInterfaces
in interface UsbConfiguration
public UsbInterface getUsbInterface(byte number)
getUsbInterface
in interface UsbConfiguration
number
- The number of the interface to get
public UsbInterfaceImp getUsbInterfaceImp(byte number)
number
- The number of the interface to get.
public boolean containsUsbInterface(byte number)
UsbConfiguration
containsUsbInterface
in interface UsbConfiguration
number
- the number of the UsbInterface to check.
public void addUsbInterfaceImp(UsbInterfaceImp setting)
The first setting for a particular interface number will default as the active setting. If the setting being added has already been added, it will be changed to be the active setting for the interface number.
setting
- The UsbInterfaceImp to add.public void setActiveUsbInterfaceImpSetting(UsbInterfaceImp setting)
This behaves identical to addUsbInterfaceImp
.
setting
- The UsbInterfaceImp setting to change.public java.util.List getUsbInterfaceSettingList(byte number)
number
- The interface number.
public UsbDevice getUsbDevice()
UsbConfiguration
getUsbDevice
in interface UsbConfiguration
public UsbDeviceImp getUsbDeviceImp()
public void setUsbDeviceImp(UsbDeviceImp device)
This will also add this to the parent UsbDeviceImp.
device
- The parent UsbDeviceImppublic UsbConfigurationDescriptor getUsbConfigurationDescriptor()
UsbConfiguration
The descriptor may be cached.
getUsbConfigurationDescriptor
in interface UsbConfiguration
public java.lang.String getConfigurationString() throws UsbException, java.io.UnsupportedEncodingException, UsbDisconnectedException
UsbConfiguration
This is a convienence method. The String may be cached. If the device does not support strings or does not define the configuration string, this returns null.
getConfigurationString
in interface UsbConfiguration
UsbException
- If there was an error getting the UsbStringDescriptor.
java.io.UnsupportedEncodingException
- If the string encoding is not supported.
UsbDisconnectedException
- If the device has been disconnected.public void setUsbConfigurationDescriptor(UsbConfigurationDescriptor desc)
desc
- the new configuration descriptor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |