Changeset 13659 in vbox for trunk/src/VBox/Main/include/RemoteUSBDeviceImpl.h
- Timestamp:
- Oct 29, 2008 3:45:03 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/RemoteUSBDeviceImpl.h
r8155 r13659 1 /* $Id$ */ 2 1 3 /** @file 2 4 * … … 6 8 7 9 /* 8 * Copyright (C) 2006-200 7Sun Microsystems, Inc.10 * Copyright (C) 2006-2008 Sun Microsystems, Inc. 9 11 * 10 12 * This file is part of VirtualBox Open Source Edition (OSE), as … … 26 28 #include "VirtualBoxBase.h" 27 29 #include "Collection.h" 28 #include <VBox/vrdpapi.h> 30 31 struct _VRDPUSBDEVICEDESC; 32 typedef _VRDPUSBDEVICEDESC VRDPUSBDEVICEDESC; 29 33 30 34 class ATL_NO_VTABLE RemoteUSBDevice : 35 public VirtualBoxBaseNEXT, 31 36 public VirtualBoxSupportErrorInfoImpl <RemoteUSBDevice, IHostUSBDevice>, 32 37 public VirtualBoxSupportTranslation <RemoteUSBDevice>, 33 public VirtualBoxBase,34 38 public IHostUSBDevice 35 39 { 36 40 public: 37 41 38 DECLARE_NOT_AGGREGATABLE(RemoteUSBDevice) 42 VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT (OUSBDevice) 43 44 DECLARE_NOT_AGGREGATABLE (RemoteUSBDevice) 39 45 40 46 DECLARE_PROTECT_FINAL_CONSTRUCT() 41 47 42 BEGIN_COM_MAP (RemoteUSBDevice)43 COM_INTERFACE_ENTRY (ISupportErrorInfo)44 COM_INTERFACE_ENTRY (IHostUSBDevice)45 COM_INTERFACE_ENTRY (IUSBDevice)48 BEGIN_COM_MAP (RemoteUSBDevice) 49 COM_INTERFACE_ENTRY (ISupportErrorInfo) 50 COM_INTERFACE_ENTRY (IHostUSBDevice) 51 COM_INTERFACE_ENTRY (IUSBDevice) 46 52 END_COM_MAP() 47 53 … … 75 81 76 82 // public methods only for internal purposes 77 bool dirty (void) { return mDirty; }78 void dirty (bool aDirty) { mD irty = aDirty; }79 80 uint16_t devId (void) { return mDevId; }81 uint32_t clientId (void) { return m ClientId; }82 83 bool captured (void) { return mState == USBDeviceState_Captured; }83 bool dirty (void) const { return mData.dirty; } 84 void dirty (bool aDirty) { mData.dirty = aDirty; } 85 86 uint16_t devId (void) const { return mData.devId; } 87 uint32_t clientId (void) { return mData.clientId; } 88 89 bool captured (void) const { return mData.state == USBDeviceState_Captured; } 84 90 void captured (bool aCaptured) 85 91 { 86 92 if (aCaptured) 87 93 { 88 Assert(m State == USBDeviceState_Available);89 m State = USBDeviceState_Captured;94 Assert(mData.state == USBDeviceState_Available); 95 mData.state = USBDeviceState_Captured; 90 96 } 91 97 else 92 98 { 93 Assert(m State == USBDeviceState_Captured);94 m State = USBDeviceState_Available;99 Assert(mData.state == USBDeviceState_Captured); 100 mData.state = USBDeviceState_Available; 95 101 } 96 102 } … … 101 107 private: 102 108 103 Guid mId; 104 105 uint16_t mVendorId; 106 uint16_t mProductId; 107 uint16_t mRevision; 108 109 Bstr mManufacturer; 110 Bstr mProduct; 111 Bstr mSerialNumber; 112 113 Bstr mAddress; 114 115 uint16_t mPort; 116 uint16_t mVersion; 117 uint16_t mPortVersion; 118 119 USBDeviceState_T mState; 120 121 bool mDirty; 122 uint16_t mDevId; 123 uint32_t mClientId; 109 struct Data 110 { 111 Data() : vendorId (0), productId (0), revision (0), port (0), version (1), 112 portVersion (1), dirty (FALSE), devId (0), clientId (0) {} 113 114 const Guid id; 115 116 const uint16_t vendorId; 117 const uint16_t productId; 118 const uint16_t revision; 119 120 const Bstr manufacturer; 121 const Bstr product; 122 const Bstr serialNumber; 123 124 const Bstr address; 125 126 const uint16_t port; 127 const uint16_t version; 128 const uint16_t portVersion; 129 130 USBDeviceState_T state; 131 bool dirty; 132 133 const uint16_t devId; 134 const uint32_t clientId; 135 }; 136 137 Data mData; 124 138 }; 125 139
Note:
See TracChangeset
for help on using the changeset viewer.