VirtualBox Main API
Public Attributes | List of all members
IUSBDeviceStateChangedEvent Interface Reference

Notification when a USB device is attached to or detached from the virtual USB controller. More...

Inheritance diagram for IUSBDeviceStateChangedEvent:
IEvent

Public Attributes

readonly attribute IUSBDevice device
 Device that is subject to state change.
 
readonly attribute boolean attached
 true if the device was attached and false otherwise.
 
readonly attribute IVirtualBoxErrorInfo error
 null on success or an error message object on failure.
 
- Public Attributes inherited from IEvent
readonly attribute VBoxEventType type
 Event type.
 
readonly attribute IEventSource source
 Source of this event.
 
readonly attribute boolean waitable
 If we can wait for this event being processed.
 

Additional Inherited Members

- Public Member Functions inherited from IEvent
void setProcessed ()
 Internal method called by the system when all listeners of a particular event have called IEventSource::eventProcessed.
 
void waitProcessed (in long timeout, [retval] out boolean result)
 Wait until time outs, or this event is processed.
 

Detailed Description

Notification when a USB device is attached to or detached from the virtual USB controller.

This notification is sent as a result of the indirect request to attach the device because it matches one of the machine USB filters, or as a result of the direct request issued by IConsole::attachUSBDevice or IConsole::detachUSBDevice.

This notification is sent in case of both a succeeded and a failed request completion. When the request succeeds, the error parameter is null, and the given device has been already added to (when attached is true) or removed from (when attached is false) the collection represented by IConsole::USBDevices. On failure, the collection doesn't change and the error parameter represents the error message describing the failure.

Interface ID:
{806DA61B-6679-422A-B629-51B06B0C6D93}

Member Data Documentation

◆ device

readonly attribute IUSBDevice IUSBDeviceStateChangedEvent::device

Device that is subject to state change.

◆ attached

readonly attribute boolean IUSBDeviceStateChangedEvent::attached

true if the device was attached and false otherwise.

◆ error

readonly attribute IVirtualBoxErrorInfo IUSBDeviceStateChangedEvent::error

null on success or an error message object on failure.