Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  
  /*
   *  Copyright (C) 2010-2011 Oracle Corporation
   *
   *  This file is part of the VirtualBox SDK, as available from
   *  http://www.virtualbox.org.  This library is free software; you can
   *  redistribute it and/or modify it under the terms of the GNU Lesser General
   *  Public License as published by the Free Software Foundation, in version 2.1
   *  as it comes in the "COPYING.LIB" file of the VirtualBox SDK distribution.
  *  This library is distributed in the hope that it will be useful, but WITHOUT
  *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  *  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
  *  License for more details.
  *
  * IUSBDevice.java
  *
  * DO NOT EDIT! This is a generated file.
  * Generated from: src/VBox/Main/idl/VirtualBox.xidl (VirtualBox's interface definitions in XML)
  * Generator: src/VBox/Main/glue/glue-java.xsl
  */
 
 package org.virtualbox_4_2;
 
 import javax.xml.ws.*;
 import java.util.List;

The IUSBDevice interface represents a virtual USB device attached to the virtual machine. A collection of objects implementing this interface is stored in the IConsole.getUSBDevices() attribute which lists all USB devices attached to a running virtual machine's USB controller. Interface ID: {F8967B0B-4483-400F-92B5-8B675D98A85B}
 
 public class IUSBDevice extends IUnknown {
 
     public IUSBDevice(String wrappedVboxPortType port) {
           super(wrappedport);
     }
Unique USB device ID. This ID is built from #vendorId, #productId, #revision and #serialNumber.

Returns:
String
 
     public String getId() {
       try {
          String retVal = .iusbDeviceGetId();
          return retVal;
      } catch (InvalidObjectFaultMsg e) {
           throw new VBoxException(ee.getMessage());
      } catch (RuntimeFaultMsg e) {
           throw new VBoxException(ee.getMessage());
      }
     }
Vendor ID.

Returns:
Integer
 
     public Integer getVendorId() {
       try {
          Integer retVal = .iusbDeviceGetVendorId();
          return retVal;
      } catch (InvalidObjectFaultMsg e) {
           throw new VBoxException(ee.getMessage());
      } catch (RuntimeFaultMsg e) {
           throw new VBoxException(ee.getMessage());
      }
     }
Product ID.

Returns:
Integer
 
     public Integer getProductId() {
       try {
          Integer retVal = .iusbDeviceGetProductId();
          return retVal;
      } catch (InvalidObjectFaultMsg e) {
           throw new VBoxException(ee.getMessage());
      } catch (RuntimeFaultMsg e) {
           throw new VBoxException(ee.getMessage());
      }
     }
Product revision number. This is a packed BCD represented as unsigned short. The high byte is the integer part and the low byte is the decimal.

Returns:
Integer
    public Integer getRevision() {
      try {
         Integer retVal = .iusbDeviceGetRevision();
         return retVal;
     } catch (InvalidObjectFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     } catch (RuntimeFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     }
    }
Manufacturer string.

Returns:
String
    public String getManufacturer() {
      try {
         String retVal = .iusbDeviceGetManufacturer();
         return retVal;
     } catch (InvalidObjectFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     } catch (RuntimeFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     }
    }
Product string.

Returns:
String
    public String getProduct() {
      try {
         String retVal = .iusbDeviceGetProduct();
         return retVal;
     } catch (InvalidObjectFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     } catch (RuntimeFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     }
    }
Serial number string.

Returns:
String
    public String getSerialNumber() {
      try {
         String retVal = .iusbDeviceGetSerialNumber();
         return retVal;
     } catch (InvalidObjectFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     } catch (RuntimeFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     }
    }
Host specific address of the device.

Returns:
String
    public String getAddress() {
      try {
         String retVal = .iusbDeviceGetAddress();
         return retVal;
     } catch (InvalidObjectFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     } catch (RuntimeFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     }
    }
Host USB port number the device is physically connected to.

Returns:
Integer
    public Integer getPort() {
      try {
         Integer retVal = .iusbDeviceGetPort();
         return retVal;
     } catch (InvalidObjectFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     } catch (RuntimeFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     }
    }
The major USB version of the device - 1 or 2.

Returns:
Integer
    public Integer getVersion() {
      try {
         Integer retVal = .iusbDeviceGetVersion();
         return retVal;
     } catch (InvalidObjectFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     } catch (RuntimeFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     }
    }
The major USB version of the host USB port the device is physically connected to - 1 or 2. For devices not connected to anything this will have the same value as the version attribute.

Returns:
Integer
    public Integer getPortVersion() {
      try {
         Integer retVal = .iusbDeviceGetPortVersion();
         return retVal;
     } catch (InvalidObjectFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     } catch (RuntimeFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     }
    }
Whether the device is physically connected to a remote VRDE client or to a local host machine.

Returns:
Boolean
    public Boolean getRemote() {
      try {
         Boolean retVal = .iusbDeviceGetRemote();
         return retVal;
     } catch (InvalidObjectFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     } catch (RuntimeFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     }
    }
    public static IUSBDevice queryInterface(IUnknown obj) {
       return obj == null ?  null : new IUSBDevice(obj.getWrapped(), obj.getRemoteWSPort());
    }
New to GrepCode? Check out our FAQ X