Changeset 2939 in vbox for trunk/src/VBox/Main/include
- Timestamp:
- May 30, 2007 4:59:36 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/HostUSBDeviceImpl.h
r1 r2939 25 25 #include "VirtualBoxBase.h" 26 26 #include "USBDeviceFilterImpl.h" 27 /* #include "USBProxyService.h" circular on Host/HostUSBDevice, the includer must include this. */ 27 /* #include "USBProxyService.h" circular on Host/HostUSBDevice, the includer 28 * must include this. */ 28 29 #include "Collection.h" 29 30 … … 34 35 35 36 /** 36 * Object class used for the Host USBDevices property.37 * Object class used to hold Host USB Device properties. 37 38 */ 38 39 class ATL_NO_VTABLE HostUSBDevice : 40 public VirtualBoxBaseNEXT, 39 41 public VirtualBoxSupportErrorInfoImpl <HostUSBDevice, IHostUSBDevice>, 40 42 public VirtualBoxSupportTranslation <HostUSBDevice>, 41 public VirtualBoxBase,42 43 public IHostUSBDevice 43 44 { 44 45 public: 45 46 46 HostUSBDevice(); 47 virtual ~HostUSBDevice(); 47 VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT (HostUSBDevice) 48 48 49 49 DECLARE_NOT_AGGREGATABLE(HostUSBDevice) … … 59 59 NS_DECL_ISUPPORTS 60 60 61 DECLARE_EMPTY_CTOR_DTOR (HostUSBDevice) 62 63 HRESULT FinalConstruct(); 64 void FinalRelease(); 65 61 66 // public initializer/uninitializer for internal purposes only 62 67 HRESULT init(PUSBDEVICE aUsb, USBProxyService *aUSBProxyService); 68 void uninit(); 63 69 64 70 // IUSBDevice properties … … 79 85 // public methods only for internal purposes 80 86 81 const Guid &id() { return mId; } 82 USBDeviceState_T state() { return mState; } 87 /* @note Must be called from under the object read lock. */ 88 const Guid &id() const { return mId; } 89 90 /* @note Must be called from under the object read lock. */ 91 USBDeviceState_T state() const { return mState; } 92 93 /* @note Must be called from under the object read lock. */ 94 USBDeviceState_T pendingState() const { return mPendingState; } 95 96 /* @note Must be called from under the object read lock. */ 83 97 ComObjPtr <SessionMachine, ComWeakRef> &machine() { return mMachine; } 98 99 /// @todo remove 100 #if 0 101 /* @note Must be called from under the object read lock. */ 84 102 bool isIgnored() { return mIgnored; } 103 #endif 104 105 /* @note Must be called from under the object read lock. */ 106 bool isStatePending() const { return mIsStatePending; } 107 108 /* @note Must be called from under the object read lock. */ 109 PCUSBDEVICE usbData() const { return mUsb; } 85 110 86 111 Utf8Str name(); 87 112 113 /// @todo remove 114 #if 0 88 115 void setIgnored(); 116 #endif 117 89 118 bool setCaptured (SessionMachine *aMachine); 90 119 int setHostDriven(); 91 120 int reset(); 92 121 122 /// @todo remove 123 #if 0 93 124 void setHostState (USBDeviceState_T aState); 125 #endif 94 126 95 127 bool isMatch (const USBDeviceFilter::Data &aData); … … 105 137 private: 106 138 107 Guid mId;139 const Guid mId; 108 140 USBDeviceState_T mState; 141 USBDeviceState_T mPendingState; 109 142 ComObjPtr <SessionMachine, ComWeakRef> mMachine; 110 bool mIgnored; 143 bool mIsStatePending : 1; 144 /// @todo remove 145 #if 0 146 bool mIgnored : 1; 147 #endif 148 111 149 /** Pointer to the USB Proxy Service instance. */ 112 150 USBProxyService *mUSBProxyService; … … 114 152 /** Pointer to the USB Device structure owned by this device. 115 153 * Only used for host devices. */ 116 PUSBDEVICE m _pUsb;154 PUSBDEVICE mUsb; 117 155 }; 118 156
Note:
See TracChangeset
for help on using the changeset viewer.