VirtualBox

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

Last change on this file since 67954 was 62485, checked in by vboxsync, 8 years ago

(C) 2016

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

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