VirtualBox

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

Last change on this file since 51752 was 50403, checked in by vboxsync, 11 years ago

6813 - src-client/USBDeviceImpl.cpp

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.1 KB
Line 
1/* $Id: USBDeviceImpl.h 50403 2014-02-10 18:53:47Z vboxsync $ */
2
3/** @file
4 * Header file for the OUSBDevice (IUSBDevice) class, VBoxC.
5 */
6
7/*
8 * Copyright (C) 2006-2011 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 getRemote(BOOL *aRemote);
60
61 struct Data
62 {
63 Data() : vendorId (0), productId (0), revision (0), port (0),
64 version (1), portVersion (1), remote (FALSE) {}
65
66 /** The UUID of this device. */
67 const Guid id;
68
69 /** The vendor id of this USB device. */
70 const USHORT vendorId;
71 /** The product id of this USB device. */
72 const USHORT productId;
73 /** The product revision number of this USB device.
74 * (high byte = integer; low byte = decimal) */
75 const USHORT revision;
76 /** The Manufacturer string. (Quite possibly NULL.) */
77 const com::Utf8Str manufacturer;
78 /** The Product string. (Quite possibly NULL.) */
79 const com::Utf8Str product;
80 /** The SerialNumber string. (Quite possibly NULL.) */
81 const com::Utf8Str serialNumber;
82 /** The host specific address of the device. */
83 const com::Utf8Str address;
84 /** The host port number. */
85 const USHORT port;
86 /** The major USB version number of the device. */
87 const USHORT version;
88 /** The major USB version number of the port the device is attached to. */
89 const USHORT portVersion;
90 /** Remote (VRDP) or local device. */
91 const BOOL remote;
92 };
93
94 Data mData;
95};
96
97#endif // ____H_USBDEVICEIMPL
98/* 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