VirtualBox

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

最後變更 在這個檔案從30714是 30714,由 vboxsync 提交於 15 年 前

Main: remove SupportErrorInfo template magic

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 3.6 KB
 
1/* $Id: USBDeviceImpl.h 30714 2010-07-07 16:20:03Z vboxsync $ */
2
3/** @file
4 * Header file for the OUSBDevice (IUSBDevice) class, VBoxC.
5 */
6
7/*
8 * Copyright (C) 2006-2009 Oracle Corporation
9 *
10 * This file is part of VirtualBox Open Source Edition (OSE), as
11 * available from http://www.alldomusa.eu.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 "VirtualBoxBase.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 VirtualBoxBase,
30 public VirtualBoxSupportTranslation<OUSBDevice>,
31 VBOX_SCRIPTABLE_IMPL(IUSBDevice)
32{
33public:
34
35 VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(OUSBDevice, IUSBDevice)
36
37 DECLARE_NOT_AGGREGATABLE(OUSBDevice)
38
39 DECLARE_PROTECT_FINAL_CONSTRUCT()
40
41 BEGIN_COM_MAP(OUSBDevice)
42 COM_INTERFACE_ENTRY (ISupportErrorInfo)
43 COM_INTERFACE_ENTRY (IUSBDevice)
44 COM_INTERFACE_ENTRY2 (IDispatch, IUSBDevice)
45 END_COM_MAP()
46
47 DECLARE_EMPTY_CTOR_DTOR (OUSBDevice)
48
49 HRESULT FinalConstruct();
50 void FinalRelease();
51
52 // public initializer/uninitializer for internal purposes only
53 HRESULT init (IUSBDevice *a_pUSBDevice);
54 void uninit();
55
56 // IUSBDevice properties
57 STDMETHOD(COMGETTER(Id))(BSTR *aId);
58 STDMETHOD(COMGETTER(VendorId))(USHORT *aVendorId);
59 STDMETHOD(COMGETTER(ProductId))(USHORT *aProductId);
60 STDMETHOD(COMGETTER(Revision))(USHORT *aRevision);
61 STDMETHOD(COMGETTER(Manufacturer))(BSTR *aManufacturer);
62 STDMETHOD(COMGETTER(Product))(BSTR *aProduct);
63 STDMETHOD(COMGETTER(SerialNumber))(BSTR *aSerialNumber);
64 STDMETHOD(COMGETTER(Address))(BSTR *aAddress);
65 STDMETHOD(COMGETTER(Port))(USHORT *aPort);
66 STDMETHOD(COMGETTER(Version))(USHORT *aVersion);
67 STDMETHOD(COMGETTER(PortVersion))(USHORT *aPortVersion);
68 STDMETHOD(COMGETTER(Remote))(BOOL *aRemote);
69
70 // public methods only for internal purposes
71 const Guid &id() const { return mData.id; }
72
73private:
74
75 struct Data
76 {
77 Data() : vendorId (0), productId (0), revision (0), port (0),
78 version (1), portVersion (1), remote (FALSE) {}
79
80 /** The UUID of this device. */
81 const Guid id;
82
83 /** The vendor id of this USB device. */
84 const USHORT vendorId;
85 /** The product id of this USB device. */
86 const USHORT productId;
87 /** The product revision number of this USB device.
88 * (high byte = integer; low byte = decimal) */
89 const USHORT revision;
90 /** The Manufacturer string. (Quite possibly NULL.) */
91 const Bstr manufacturer;
92 /** The Product string. (Quite possibly NULL.) */
93 const Bstr product;
94 /** The SerialNumber string. (Quite possibly NULL.) */
95 const Bstr serialNumber;
96 /** The host specific address of the device. */
97 const Bstr address;
98 /** The host port number. */
99 const USHORT port;
100 /** The major USB version number of the device. */
101 const USHORT version;
102 /** The major USB version number of the port the device is attached to. */
103 const USHORT portVersion;
104 /** Remote (VRDP) or local device. */
105 const BOOL remote;
106 };
107
108 Data mData;
109};
110
111#endif // ____H_USBDEVICEIMPL
112/* vi: set tabstop=4 shiftwidth=4 expandtab: */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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