VirtualBox

source: vbox/trunk/src/VBox/Main/include/USBDeviceImpl.h@ 81644

Last change on this file since 81644 was 81644, checked in by vboxsync, 6 years ago

Main: Removed unused/obsolete/useless portVersion attribute of IUSBDevice.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.4 KB
Line 
1/* $Id: USBDeviceImpl.h 81644 2019-11-04 10:36:44Z vboxsync $ */
2/** @file
3 * Header file for the OUSBDevice (IUSBDevice) class, VBoxC.
4 */
5
6/*
7 * Copyright (C) 2006-2019 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.215389.xyz. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18#ifndef MAIN_INCLUDED_USBDeviceImpl_h
19#define MAIN_INCLUDED_USBDeviceImpl_h
20#ifndef RT_WITHOUT_PRAGMA_ONCE
21# pragma once
22#endif
23
24#include "USBDeviceWrap.h"
25
26/**
27 * Object class used for maintaining devices attached to a USB controller.
28 * Generally this contains much less information.
29 */
30class ATL_NO_VTABLE OUSBDevice :
31 public USBDeviceWrap
32{
33public:
34
35 DECLARE_EMPTY_CTOR_DTOR(OUSBDevice)
36
37 HRESULT FinalConstruct();
38 void FinalRelease();
39
40 // public initializer/uninitializer for internal purposes only
41 HRESULT init(IUSBDevice *a_pUSBDevice);
42 void uninit();
43
44 // public methods only for internal purposes
45 const Guid &i_id() const { return mData.id; }
46
47private:
48
49 // Wrapped IUSBDevice properties
50 HRESULT getId(com::Guid &aId);
51 HRESULT getVendorId(USHORT *aVendorId);
52 HRESULT getProductId(USHORT *aProductId);
53 HRESULT getRevision(USHORT *aRevision);
54 HRESULT getManufacturer(com::Utf8Str &aManufacturer);
55 HRESULT getProduct(com::Utf8Str &aProduct);
56 HRESULT getSerialNumber(com::Utf8Str &aSerialNumber);
57 HRESULT getAddress(com::Utf8Str &aAddress);
58 HRESULT getPort(USHORT *aPort);
59 HRESULT getVersion(USHORT *aVersion);
60 HRESULT getSpeed(USBConnectionSpeed_T *aSpeed);
61 HRESULT getRemote(BOOL *aRemote);
62 HRESULT getBackend(com::Utf8Str &aBackend);
63 HRESULT getDeviceInfo(std::vector<com::Utf8Str> &aInfo);
64
65 struct Data
66 {
67 Data() : vendorId(0), productId(0), revision(0), port(0),
68 version(1), speed(USBConnectionSpeed_Null),
69 remote(FALSE) {}
70
71 /** The UUID of this device. */
72 const Guid id;
73
74 /** The vendor id of this USB device. */
75 const USHORT vendorId;
76 /** The product id of this USB device. */
77 const USHORT productId;
78 /** The product revision number of this USB device.
79 * (high byte = integer; low byte = decimal) */
80 const USHORT revision;
81 /** The Manufacturer string. (Quite possibly NULL.) */
82 const com::Utf8Str manufacturer;
83 /** The Product string. (Quite possibly NULL.) */
84 const com::Utf8Str product;
85 /** The SerialNumber string. (Quite possibly NULL.) */
86 const com::Utf8Str serialNumber;
87 /** The host specific address of the device. */
88 const com::Utf8Str address;
89 /** The device specific backend. */
90 const com::Utf8Str backend;
91 /** The host port number. */
92 const USHORT port;
93 /** The major USB version number of the device. */
94 const USHORT version;
95 /** The speed at which the device is communicating. */
96 const USBConnectionSpeed_T speed;
97 /** Remote (VRDP) or local device. */
98 const BOOL remote;
99 };
100
101 Data mData;
102};
103
104#endif /* !MAIN_INCLUDED_USBDeviceImpl_h */
105/* vi: set tabstop=4 shiftwidth=4 expandtab: */
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette