org.virtualbox_7_0
Enum USBDeviceState

java.lang.Object
  extended by java.lang.Enum<USBDeviceState>
      extended by org.virtualbox_7_0.USBDeviceState
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<USBDeviceState>

public enum USBDeviceState
extends java.lang.Enum<USBDeviceState>

USB device state. This enumeration represents all possible states of the USB device physically attached to the host computer regarding its state on the host computer and availability to guest computers (all currently running virtual machines). Once a supported USB device is attached to the host, global USB filters (IHost.getUSBDeviceFilters()) are activated. They can either ignore the device, or put it to USBDeviceState_Held state, or do nothing. Unless the device is ignored by global filters, filters of all currently running guests (IUSBDeviceFilters.getDeviceFilters()) are activated that can put it to USBDeviceState_Captured state. If the device was ignored by global filters, or didn't match any filters at all (including guest ones), it is handled by the host in a normal way. In this case, the device state is determined by the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy or USBDeviceState_Available, depending on the current device usage. Besides auto-capturing based on filters, the device can be manually captured by guests (IConsole.attachUSBDevice(String,String)) if its state is USBDeviceState_Busy, USBDeviceState_Available or USBDeviceState_Held. NOTE: Due to differences in USB stack implementations in Linux and Win32, states USBDeviceState_Busy and USBDeviceState_Unavailable are applicable only to the Linux version of the product. This also means that (IConsole.attachUSBDevice(String,String)) can only succeed on Win32 if the device state is USBDeviceState_Held.

See Also:
IHostUSBDevice, Interface ID: {B99A2E65-67FB-4882-82FD-F3E5E8193AB4}

Enum Constant Summary
Available
          Not used by the host computer, available to guests (the host computer can also start using the device at any time).
Busy
          Being used by the host computer, potentially available to guests.
Captured
          Captured by one of the guest computers, not available to anybody else.
Held
          Held by the VirtualBox server (ignored by the host computer), available to guests.
NotSupported
          Not supported by the VirtualBox server, not available to guests.
Unavailable
          Being used by the host computer exclusively, not available to guests.
 
Method Summary
static USBDeviceState fromValue(long v)
           
static USBDeviceState fromValue(java.lang.String v)
           
 int value()
           
static USBDeviceState valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static USBDeviceState[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

NotSupported

public static final USBDeviceState NotSupported
Not supported by the VirtualBox server, not available to guests.


Unavailable

public static final USBDeviceState Unavailable
Being used by the host computer exclusively, not available to guests.


Busy

public static final USBDeviceState Busy
Being used by the host computer, potentially available to guests.


Available

public static final USBDeviceState Available
Not used by the host computer, available to guests (the host computer can also start using the device at any time).


Held

public static final USBDeviceState Held
Held by the VirtualBox server (ignored by the host computer), available to guests.


Captured

public static final USBDeviceState Captured
Captured by one of the guest computers, not available to anybody else.

Method Detail

values

public static USBDeviceState[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (USBDeviceState c : USBDeviceState.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static USBDeviceState valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

value

public int value()

fromValue

public static USBDeviceState fromValue(long v)

fromValue

public static USBDeviceState fromValue(java.lang.String v)