VirtualBox

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

Last change on this file was 98103, checked in by vboxsync, 16 months ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.8 KB
RevLine 
[13659]1/* $Id: USBDeviceImpl.h 98103 2023-01-17 14:15:46Z vboxsync $ */
[1]2/** @file
[8721]3 * Header file for the OUSBDevice (IUSBDevice) class, VBoxC.
[1]4 */
5
6/*
[98103]7 * Copyright (C) 2006-2023 Oracle and/or its affiliates.
[1]8 *
[96407]9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.virtualbox.org.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, in version 3 of the
15 * License.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, see <https://www.gnu.org/licenses>.
24 *
25 * SPDX-License-Identifier: GPL-3.0-only
[1]26 */
27
[76562]28#ifndef MAIN_INCLUDED_USBDeviceImpl_h
29#define MAIN_INCLUDED_USBDeviceImpl_h
[76487]30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
[1]33
[50403]34#include "USBDeviceWrap.h"
[1]35
36/**
37 * Object class used for maintaining devices attached to a USB controller.
38 * Generally this contains much less information.
39 */
[436]40class ATL_NO_VTABLE OUSBDevice :
[50403]41 public USBDeviceWrap
[1]42{
43public:
44
[90828]45 DECLARE_COMMON_CLASS_METHODS(OUSBDevice)
[13659]46
47 HRESULT FinalConstruct();
48 void FinalRelease();
49
[1]50 // public initializer/uninitializer for internal purposes only
[56584]51 HRESULT init(IUSBDevice *a_pUSBDevice);
[13659]52 void uninit();
[1]53
54 // public methods only for internal purposes
[50403]55 const Guid &i_id() const { return mData.id; }
[1]56
57private:
58
[50403]59 // Wrapped IUSBDevice properties
60 HRESULT getId(com::Guid &aId);
61 HRESULT getVendorId(USHORT *aVendorId);
62 HRESULT getProductId(USHORT *aProductId);
63 HRESULT getRevision(USHORT *aRevision);
64 HRESULT getManufacturer(com::Utf8Str &aManufacturer);
65 HRESULT getProduct(com::Utf8Str &aProduct);
66 HRESULT getSerialNumber(com::Utf8Str &aSerialNumber);
67 HRESULT getAddress(com::Utf8Str &aAddress);
68 HRESULT getPort(USHORT *aPort);
[81667]69 HRESULT getPortPath(com::Utf8Str &aPortPath);
[50403]70 HRESULT getVersion(USHORT *aVersion);
[53297]71 HRESULT getSpeed(USBConnectionSpeed_T *aSpeed);
[50403]72 HRESULT getRemote(BOOL *aRemote);
[59117]73 HRESULT getBackend(com::Utf8Str &aBackend);
[59381]74 HRESULT getDeviceInfo(std::vector<com::Utf8Str> &aInfo);
[50403]75
[13659]76 struct Data
77 {
[56584]78 Data() : vendorId(0), productId(0), revision(0), port(0),
[81644]79 version(1), speed(USBConnectionSpeed_Null),
[56584]80 remote(FALSE) {}
[13659]81
82 /** The UUID of this device. */
83 const Guid id;
84
85 /** The vendor id of this USB device. */
86 const USHORT vendorId;
87 /** The product id of this USB device. */
88 const USHORT productId;
89 /** The product revision number of this USB device.
90 * (high byte = integer; low byte = decimal) */
91 const USHORT revision;
92 /** The Manufacturer string. (Quite possibly NULL.) */
[50403]93 const com::Utf8Str manufacturer;
[13659]94 /** The Product string. (Quite possibly NULL.) */
[50403]95 const com::Utf8Str product;
[13659]96 /** The SerialNumber string. (Quite possibly NULL.) */
[50403]97 const com::Utf8Str serialNumber;
[13659]98 /** The host specific address of the device. */
[50403]99 const com::Utf8Str address;
[59117]100 /** The device specific backend. */
101 const com::Utf8Str backend;
[13659]102 /** The host port number. */
103 const USHORT port;
[81667]104 /** The host port path. */
105 const com::Utf8Str portPath;
[13659]106 /** The major USB version number of the device. */
107 const USHORT version;
[53297]108 /** The speed at which the device is communicating. */
109 const USBConnectionSpeed_T speed;
[13659]110 /** Remote (VRDP) or local device. */
111 const BOOL remote;
112 };
113
114 Data mData;
[1]115};
116
[76562]117#endif /* !MAIN_INCLUDED_USBDeviceImpl_h */
[14949]118/* vi: set tabstop=4 shiftwidth=4 expandtab: */
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use