Changeset 3758 in vbox for trunk/src/VBox
- Timestamp:
- Jul 21, 2007 8:55:37 PM (18 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/HostImpl.cpp
r3756 r3758 939 939 { 940 940 ComAssertRet (filter->id() == NULL, E_FAIL); 941 #ifndef VBOX_WITH_USBFILTER 941 942 filter->id() = 942 943 mUSBProxyService->insertFilter (ComPtr <IUSBDeviceFilter> (aFilter)); 944 #else 945 filter->id() = mUSBProxyService->insertFilter (&filter->data().mUSBFilter); 946 #endif 943 947 } 944 948 … … 1028 1032 { 1029 1033 ComAssertRet (aFilter->id() == NULL, E_FAIL); 1034 #ifndef VBOX_WITH_USBFILTER 1030 1035 aFilter->id() = 1031 1036 mUSBProxyService->insertFilter (ComPtr <IUSBDeviceFilter> (aFilter)); 1037 #else 1038 aFilter->id() = mUSBProxyService->insertFilter (&aFilter->data().mUSBFilter); 1039 #endif 1032 1040 } 1033 1041 else … … 1045 1053 ComAssertRet (aFilter->id() != NULL, E_FAIL); 1046 1054 mUSBProxyService->removeFilter (aFilter->id()); 1055 #ifndef VBOX_WITH_USBFILTER 1047 1056 aFilter->id() = 1048 1057 mUSBProxyService->insertFilter (ComPtr <IUSBDeviceFilter> (aFilter)); 1058 #else 1059 aFilter->id() = mUSBProxyService->insertFilter (&aFilter->data().mUSBFilter); 1060 #endif 1049 1061 } 1050 1062 } … … 1127 1139 { 1128 1140 HostUSBDeviceFilter *flt = filterObj; // resolve ambiguity 1141 #ifndef VBOX_WITH_USBFILTER 1129 1142 flt->id() = 1130 1143 mUSBProxyService->insertFilter (ComPtr <IUSBDeviceFilter> (flt)); 1144 #else 1145 flt->id() = mUSBProxyService->insertFilter (&filterObj->data().mUSBFilter); 1146 #endif 1131 1147 } 1132 1148 } -
trunk/src/VBox/Main/Makefile.kmk
r3756 r3758 222 222 #ifeq ($(filter-out darwin,$(BUILD_TARGET)),) 223 223 #VBoxSVC_DEFS += VBOX_WITH_USBFILTER 224 #VBoxSVC_LIBS += $(PATH_LIB)/USB Filter$(VBOX_SUFF_LIB)224 #VBoxSVC_LIBS += $(PATH_LIB)/USBLib$(VBOX_SUFF_LIB) 225 225 #endif 226 226 -
trunk/src/VBox/Main/USBControllerImpl.cpp
r3756 r3758 368 368 369 369 ComAssertRet (filter->id() == NULL, E_FAIL); 370 #ifndef VBOX_WITH_USBFILTER 370 371 filter->id() = service->insertFilter (ComPtr <IUSBDeviceFilter> (aFilter)); 372 #else 373 filter->id() = service->insertFilter (&filter->data().mUSBFilter); 374 #endif 371 375 } 372 376 … … 786 790 USBDeviceFilter *flt = *it; /* resolve ambiguity */ 787 791 ComAssertRet (flt->id() == NULL, false); 792 #ifndef VBOX_WITH_USBFILTER 788 793 flt->id() = service->insertFilter 789 794 (ComPtr <IUSBDeviceFilter> (flt)); 795 #else 796 flt->id() = service->insertFilter (&flt->data().mUSBFilter); 797 #endif 790 798 } 791 799 } … … 1010 1018 { 1011 1019 ComAssertRet (aFilter->id() == NULL, E_FAIL); 1020 #ifndef VBOX_WITH_USBFILTER 1012 1021 aFilter->id() = service->insertFilter 1013 1022 (ComPtr <IUSBDeviceFilter> (aFilter)); 1023 #else 1024 aFilter->id() = service->insertFilter (&aFilter->data().mUSBFilter); 1025 #endif 1014 1026 } 1015 1027 else … … 1027 1039 ComAssertRet (aFilter->id() != NULL, E_FAIL); 1028 1040 service->removeFilter (aFilter->id()); 1041 #ifndef VBOX_WITH_USBFILTER 1029 1042 aFilter->id() = service->insertFilter 1030 1043 (ComPtr <IUSBDeviceFilter> (aFilter)); 1044 #else 1045 aFilter->id() = service->insertFilter (&aFilter->data().mUSBFilter); 1046 #endif 1031 1047 } 1032 1048 } … … 1247 1263 { 1248 1264 AssertReturn (flt->id() == NULL, E_FAIL); 1265 #ifndef VBOX_WITH_USBFILTER 1249 1266 flt->id() = service->insertFilter 1250 1267 (ComPtr <IUSBDeviceFilter> (flt)); 1268 #else 1269 flt->id() = service->insertFilter (&flt->data().mUSBFilter); 1270 #endif 1251 1271 } 1252 1272 else -
trunk/src/VBox/Main/USBProxyService.cpp
r3664 r3758 539 539 * for those subclasses that don't reimplement this method. 540 540 */ 541 #ifndef VBOX_WITH_USBFILTER 541 542 void *USBProxyService::insertFilter (IUSBDeviceFilter * /* aFilter */) 543 #else 544 void *USBProxyService::insertFilter (PCUSBFILTER /* aFilter */) 545 #endif 542 546 { 543 547 // return non-NULL to prevent failed assertions in Main … … 546 550 547 551 548 void USBProxyService::removeFilter (void * /* aI D*/)552 void USBProxyService::removeFilter (void * /* aId */) 549 553 { 550 554 } -
trunk/src/VBox/Main/include/USBProxyService.h
r3668 r3758 42 42 * @return ID of the inserted filter 43 43 */ 44 #ifdef VBOX_WITH_USBFILTER 45 virtual void *insertFilter (PCUSBFILTER aFilter); 46 #else 44 47 virtual void *insertFilter (IUSBDeviceFilter *aFilter); 48 #endif 45 49 46 50 /** 47 51 * A filter was removed. 48 52 * 49 * @param aI DID of the filter to remove50 */ 51 virtual void removeFilter (void *aI D);53 * @param aId ID of the filter to remove 54 */ 55 virtual void removeFilter (void *aId); 52 56 53 57 /** … … 260 264 ~USBProxyServiceDarwin(); 261 265 266 #ifdef VBOX_WITH_USBFILTER 267 virtual void *insertFilter (PCUSBFILTER aFilter); 268 virtual void removeFilter (void *aId); 269 #endif 270 262 271 virtual int captureDevice (HostUSBDevice *aDevice); 263 272 virtual int holdDevice (HostUSBDevice *aDevice); … … 284 293 /** Whether we've got a fake async event and should return without entering the runloop. */ 285 294 bool volatile mFakeAsync; 295 /** Whether we've successfully initialized the USBLib and should call USBLibTerm in the destructor. */ 296 bool mUSBLibInitialized; 286 297 }; 287 298 # endif /* RT_OS_DARWIN */
Note:
See TracChangeset
for help on using the changeset viewer.