Changeset 3764 in vbox for trunk/src/VBox/Main/include
- Timestamp:
- Jul 22, 2007 1:19:02 PM (18 years ago)
- Location:
- trunk/src/VBox/Main/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/HostUSBDeviceImpl.h
r3668 r3764 84 84 85 85 /** Additional internal states. 86 * The async detach stuff for Darwin is a two stage journey with a variation 86 * The async detach stuff for Darwin is a two stage journey with a variation 87 87 * (filters) depending on who won the race to lock the Host object. 88 * 89 * @remark Trying out mac os x style enum naming convention here. nice or what? 88 * 89 * @remark Trying out mac os x style enum naming convention here. nice or what? 90 90 */ 91 91 typedef enum 92 { 92 { 93 93 /** Nothing is pending here, check mPendingState. */ 94 kNothingPending, 94 kNothingPending, 95 95 /** 1st stage of the detch, waiting for the logical detach notification. */ 96 kDetachingPendingDetach, 97 /** 1st stage of the detch, waiting for the logical detach notification - re-run filters. 96 kDetachingPendingDetach, 97 /** 1st stage of the detch, waiting for the logical detach notification - re-run filters. 98 98 * Prev: kDetachingPendingDetach */ 99 kDetachingPendingDetachFilters, 100 /** 2nd stage of the detach, waiting for the logical attach notification. 99 kDetachingPendingDetachFilters, 100 /** 2nd stage of the detach, waiting for the logical attach notification. 101 101 * Prev: kDetachingPendingDetach */ 102 102 kDetachingPendingAttach, 103 /** 2nd stage of the detach, waiting for the logical attach notification - re-run filters. 103 /** 2nd stage of the detach, waiting for the logical attach notification - re-run filters. 104 104 * Prev: kDetachingPendingDetachFilters */ 105 105 kDetachingPendingAttachFilters … … 163 163 /** Same as mPendingState but for the internal states. */ 164 164 InternalState mPendingStateEx; 165 /** RTTimeNanoTS() of when mIsStatePending was set or mDetaching changed 165 /** RTTimeNanoTS() of when mIsStatePending was set or mDetaching changed 166 166 * from kNotDetaching. For operations that cannot be cancelled it's 0. */ 167 167 uint64_t mPendingSince; … … 179 179 #ifdef RT_OS_LINUX 180 180 friend class USBProxyServiceLinux; 181 #endif 182 #ifdef RT_OS_DARWIN 183 /** One-shot filter id. */ 184 void *mOneShotId; 185 186 friend class USBProxyServiceDarwin; 181 187 #endif 182 188 }; -
trunk/src/VBox/Main/include/USBProxyService.h
r3758 r3764 64 64 65 65 /** 66 * The device is to be held so that the host OS will not start using it.67 *68 * @returns VBox status code.69 * @param aDevice The device in question.70 */71 virtual int holdDevice (HostUSBDevice *aDevice);72 73 /**74 66 * The device is going to be detached from a VM. 75 67 * … … 137 129 */ 138 130 static uint64_t calcSerialHash (const char *aSerial); 131 132 #ifdef VBOX_WITH_USBFILTER 133 /** 134 * Initializes a filter with the data from the specified device. 135 * 136 * @param aFilter The filter to fill. 137 * @param aDevice The device to fill it with. 138 */ 139 static void initFilterFromDevice (PUSBFILTER aFilter, HostUSBDevice *aDevice); 140 #endif 139 141 140 142 protected: … … 270 272 271 273 virtual int captureDevice (HostUSBDevice *aDevice); 272 virtual int holdDevice (HostUSBDevice *aDevice);273 274 virtual void detachingDevice (HostUSBDevice *aDevice); 274 275 virtual int releaseDevice (HostUSBDevice *aDevice); … … 291 292 * not including newly attached devices. */ 292 293 bool mWaitABitNextTime; 294 #ifndef VBOX_WITH_USBFILTER 293 295 /** Whether we've got a fake async event and should return without entering the runloop. */ 294 296 bool volatile mFakeAsync; 297 #endif 295 298 /** Whether we've successfully initialized the USBLib and should call USBLibTerm in the destructor. */ 296 299 bool mUSBLibInitialized; … … 312 315 313 316 virtual int captureDevice (HostUSBDevice *aDevice); 314 virtual int holdDevice (HostUSBDevice *aDevice);315 317 virtual int releaseDevice (HostUSBDevice *aDevice); 316 318 virtual bool updateDeviceState (HostUSBDevice *aDevice, PUSBDEVICE aUSBDevice); … … 354 356 355 357 virtual int captureDevice (HostUSBDevice *aDevice); 356 virtual int holdDevice (HostUSBDevice *aDevice);357 358 virtual int releaseDevice (HostUSBDevice *aDevice); 358 359 virtual bool updateDeviceState (HostUSBDevice *aDevice, PUSBDEVICE aUSBDevice);
Note:
See TracChangeset
for help on using the changeset viewer.