Changeset 21686 in vbox
- Timestamp:
- Jul 17, 2009 1:41:39 PM (16 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 47 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ApplianceImpl.cpp
r21622 r21686 345 345 void Appliance::uninit() 346 346 { 347 /* Enclose the state transition Ready->InUninit->NotReady */348 AutoUninitSpan autoUninitSpan (this);349 if (autoUninitSpan.uninitDone())350 return;351 352 347 delete m; 353 348 m = NULL; -
trunk/src/VBox/Main/HostImpl.cpp
r21622 r21686 152 152 void Host::FinalRelease() 153 153 { 154 uninit(); 154 if (isReady()) 155 uninit(); 155 156 } 156 157 … … 163 164 * @param aParent VirtualBox parent object. 164 165 */ 165 HRESULT Host::init(VirtualBox *aParent) 166 { 167 LogFlowThisFunc (("aParent=%p\n", aParent)); 168 169 /* Enclose the state transition NotReady->InInit->Ready */ 170 AutoInitSpan autoInitSpan (this); 171 AssertReturn (autoInitSpan.isOk(), E_FAIL); 166 HRESULT Host::init (VirtualBox *aParent) 167 { 168 LogFlowThisFunc (("isReady=%d\n", isReady())); 169 170 ComAssertRet (aParent, E_INVALIDARG); 171 172 AutoWriteLock alock (this); 173 ComAssertRet (!isReady(), E_FAIL); 172 174 173 175 mParent = aParent; … … 258 260 #endif /* VBOX_WITH_CROGL */ 259 261 260 /* Confirm a successful initialization */ 261 autoInitSpan.setSucceeded(); 262 262 setReady(true); 263 263 return S_OK; 264 264 } … … 270 270 void Host::uninit() 271 271 { 272 LogFlowThisFunc (("\n")); 273 274 /* Enclose the state transition Ready->InUninit->NotReady */ 275 AutoUninitSpan autoUninitSpan (this); 276 if (autoUninitSpan.uninitDone()) 277 return; 272 LogFlowThisFunc (("isReady=%d\n", isReady())); 273 274 AssertReturn (isReady(), (void) 0); 278 275 279 276 #ifdef VBOX_WITH_RESOURCE_USAGE_API … … 298 295 mUSBDeviceFilters.clear(); 299 296 #endif 297 298 setReady (FALSE); 300 299 } 301 300 … … 312 311 { 313 312 CheckComArgOutSafeArrayPointerValid(aDrives); 314 315 AutoCaller autoCaller (this); 316 CheckComRCReturnRC (autoCaller.rc()); 317 318 AutoWriteLock alock (this); 319 320 std::list< ComObjPtr<HostDVDDrive> > list; 313 AutoWriteLock alock (this); 314 CHECK_READY(); 315 std::list <ComObjPtr <HostDVDDrive> > list; 321 316 HRESULT rc = S_OK; 322 317 try … … 444 439 { 445 440 CheckComArgOutPointerValid(aDrives); 446 447 AutoCaller autoCaller(this); 448 CheckComRCReturnRC(autoCaller.rc()); 449 450 AutoWriteLock alock(this); 451 452 std::list<ComObjPtr <HostFloppyDrive> > list; 441 AutoWriteLock alock (this); 442 CHECK_READY(); 443 444 std::list <ComObjPtr <HostFloppyDrive> > list; 453 445 HRESULT rc = S_OK; 454 446 … … 562 554 return E_POINTER; 563 555 564 AutoCaller autoCaller (this); 565 CheckComRCReturnRC (autoCaller.rc()); 566 567 AutoWriteLock alock (this); 556 AutoWriteLock alock (this); 557 CHECK_READY(); 568 558 569 559 std::list <ComObjPtr <HostNetworkInterface> > list; … … 843 833 CheckComArgOutSafeArrayPointerValid(aUSBDevices); 844 834 845 AutoCaller autoCaller (this); 846 CheckComRCReturnRC (autoCaller.rc()); 847 848 AutoWriteLock alock (this); 835 AutoWriteLock alock (this); 836 CHECK_READY(); 849 837 850 838 MultiResult rc = checkUSBProxyService(); … … 870 858 CheckComArgOutSafeArrayPointerValid(aUSBDeviceFilters); 871 859 872 AutoCaller autoCaller (this); 873 CheckComRCReturnRC (autoCaller.rc()); 874 875 AutoWriteLock alock (this); 860 AutoWriteLock alock (this); 861 CHECK_READY(); 876 862 877 863 MultiResult rc = checkUSBProxyService(); … … 903 889 { 904 890 CheckComArgOutPointerValid(aCount); 905 // AutoCaller autoCaller (this); 906 // CheckComRCReturnRC (autoCaller.rc()); 907 908 // AutoReadLock alock (this); 909 891 AutoWriteLock alock (this); 892 CHECK_READY(); 910 893 *aCount = RTMpGetPresentCount(); 911 894 return S_OK; … … 921 904 { 922 905 CheckComArgOutPointerValid(aCount); 923 // AutoCaller autoCaller (this); 924 // CheckComRCReturnRC (autoCaller.rc()); 925 926 // AutoReadLock alock (this); 927 906 AutoWriteLock alock (this); 907 CHECK_READY(); 928 908 *aCount = RTMpGetOnlineCount(); 929 909 return S_OK; … … 940 920 { 941 921 CheckComArgOutPointerValid(aSpeed); 942 // AutoCaller autoCaller (this); 943 // CheckComRCReturnRC (autoCaller.rc()); 944 945 // AutoReadLock alock (this); 946 922 AutoWriteLock alock (this); 923 CHECK_READY(); 947 924 *aSpeed = RTMpGetMaxFrequency(aCpuId); 948 925 return S_OK; … … 958 935 { 959 936 CheckComArgOutPointerValid(aDescription); 960 // AutoCaller autoCaller (this); 961 // CheckComRCReturnRC (autoCaller.rc()); 962 963 // AutoReadLock alock (this); 964 937 AutoWriteLock alock (this); 938 CHECK_READY(); 965 939 /** @todo */ 966 940 ReturnComNotImplemented(); … … 977 951 { 978 952 CheckComArgOutPointerValid(aSupported); 979 AutoCaller autoCaller (this); 980 CheckComRCReturnRC (autoCaller.rc()); 981 982 AutoReadLock alock (this); 953 AutoWriteLock alock (this); 954 CHECK_READY(); 983 955 984 956 switch (aFeature) … … 1011 983 { 1012 984 CheckComArgOutPointerValid(aSize); 1013 AutoCaller autoCaller (this); 1014 CheckComRCReturnRC (autoCaller.rc()); 1015 1016 AutoWriteLock alock (this); 1017 985 AutoWriteLock alock (this); 986 CHECK_READY(); 1018 987 /* @todo This is an ugly hack. There must be a function in IPRT for that. */ 1019 988 pm::CollectorHAL *hal = pm::createHAL(); … … 1036 1005 { 1037 1006 CheckComArgOutPointerValid(aAvailable); 1038 AutoCaller autoCaller (this); 1039 CheckComRCReturnRC (autoCaller.rc()); 1040 1041 AutoWriteLock alock (this); 1042 1007 AutoWriteLock alock (this); 1008 CHECK_READY(); 1043 1009 /* @todo This is an ugly hack. There must be a function in IPRT for that. */ 1044 1010 pm::CollectorHAL *hal = pm::createHAL(); … … 1061 1027 { 1062 1028 CheckComArgOutPointerValid(aOs); 1063 // AutoCaller autoCaller (this); 1064 // CheckComRCReturnRC (autoCaller.rc()); 1065 1066 // AutoReadLock alock (this); 1029 AutoWriteLock alock (this); 1030 CHECK_READY(); 1067 1031 1068 1032 char szOSName[80]; … … 1083 1047 { 1084 1048 CheckComArgOutPointerValid(aVersion); 1085 // AutoCaller autoCaller (this); 1086 // CheckComRCReturnRC (autoCaller.rc()); 1087 1088 // AutoReadLock alock (this); 1049 AutoWriteLock alock (this); 1050 CHECK_READY(); 1089 1051 1090 1052 /* Get the OS release. Reserve some buffer space for the service pack. */ … … 1122 1084 { 1123 1085 CheckComArgOutPointerValid(aUTCTime); 1124 // AutoCaller autoCaller (this); 1125 // CheckComRCReturnRC (autoCaller.rc()); 1126 1127 // AutoReadLock alock (this); 1128 1086 AutoWriteLock alock (this); 1087 CHECK_READY(); 1129 1088 RTTIMESPEC now; 1130 1089 *aUTCTime = RTTimeSpecGetMilli(RTTimeNow(&now)); 1131 1132 1090 return S_OK; 1133 1091 } … … 1136 1094 { 1137 1095 CheckComArgOutPointerValid(aSupported); 1138 AutoCaller autoCaller (this); 1139 CheckComRCReturnRC (autoCaller.rc()); 1140 1141 AutoReadLock alock (this); 1096 1097 AutoWriteLock alock(this); 1098 CHECK_READY(); 1142 1099 1143 1100 *aSupported = f3DAccelerationSupported; … … 1155 1112 CheckComArgOutPointerValid(aProgress); 1156 1113 1157 AutoCaller autoCaller (this); 1158 CheckComRCReturnRC (autoCaller.rc()); 1159 1160 AutoWriteLock alock (this); 1114 AutoWriteLock alock (this); 1115 CHECK_READY(); 1161 1116 1162 1117 int r = NetIfCreateHostOnlyNetworkInterface (mParent, aHostNetworkInterface, aProgress); … … 1177 1132 CheckComArgOutPointerValid(aProgress); 1178 1133 1179 AutoCaller autoCaller (this); 1180 CheckComRCReturnRC (autoCaller.rc()); 1181 1182 AutoWriteLock alock (this); 1134 AutoWriteLock alock (this); 1135 CHECK_READY(); 1183 1136 1184 1137 /* first check whether an interface with the given name already exists */ … … 1206 1159 CheckComArgOutPointerValid(aFilter); 1207 1160 1208 AutoCaller autoCaller (this); 1209 CheckComRCReturnRC (autoCaller.rc()); 1210 1211 AutoWriteLock alock (this); 1161 AutoWriteLock alock (this); 1162 CHECK_READY(); 1212 1163 1213 1164 ComObjPtr <HostUSBDeviceFilter> filter; … … 1234 1185 1235 1186 /* Note: HostUSBDeviceFilter and USBProxyService also uses this lock. */ 1236 AutoCaller autoCaller (this); 1237 CheckComRCReturnRC (autoCaller.rc()); 1238 1239 AutoWriteLock alock (this); 1187 AutoWriteLock alock (this); 1188 CHECK_READY(); 1240 1189 1241 1190 MultiResult rc = checkUSBProxyService(); … … 1285 1234 1286 1235 /* Note: HostUSBDeviceFilter and USBProxyService also uses this lock. */ 1287 AutoCaller autoCaller (this); 1288 CheckComRCReturnRC (autoCaller.rc()); 1289 1290 AutoWriteLock alock (this); 1236 AutoWriteLock alock (this); 1237 CHECK_READY(); 1291 1238 1292 1239 MultiResult rc = checkUSBProxyService(); … … 1344 1291 using namespace settings; 1345 1292 1346 AutoCaller autoCaller (this); 1347 CheckComRCReturnRC (autoCaller.rc()); 1348 1349 AutoWriteLock alock (this); 1293 AutoWriteLock alock (this); 1294 CHECK_READY(); 1350 1295 1351 1296 AssertReturn (!aGlobal.isNull(), E_FAIL); … … 1408 1353 using namespace settings; 1409 1354 1410 AutoCaller autoCaller (this); 1411 CheckComRCReturnRC (autoCaller.rc()); 1412 1413 AutoWriteLock alock (this); 1355 AutoWriteLock alock (this); 1356 CHECK_READY(); 1414 1357 1415 1358 ComAssertRet (!aGlobal.isNull(), E_FAIL); … … 1488 1431 BOOL aActiveChanged /* = FALSE */) 1489 1432 { 1490 AutoCaller autoCaller (this); 1491 CheckComRCReturnRC (autoCaller.rc()); 1492 1493 AutoWriteLock alock (this); 1433 AutoWriteLock alock (this); 1434 CHECK_READY(); 1494 1435 1495 1436 if (aFilter->mInList) … … 2068 2009 HRESULT Host::checkUSBProxyService() 2069 2010 { 2070 AutoCaller autoCaller (this); 2071 CheckComRCReturnRC (autoCaller.rc()); 2072 2073 AutoWriteLock alock (this); 2011 AutoWriteLock alock (this); 2012 CHECK_READY(); 2074 2013 2075 2014 AssertReturn (mUSBProxyService, E_FAIL); -
trunk/src/VBox/Main/MachineImpl.cpp
r21622 r21686 5125 5125 5126 5126 /* initialize the snapshot */ 5127 rc = snapshot->init(mParent, // VirtualBox object 5128 uuid, 5129 name, 5130 description, 5131 timeStamp, 5132 snapshotMachine, 5133 aParentSnapshot); 5134 CheckComRCReturnRC(rc); 5127 rc = snapshot->init (uuid, name, description, timeStamp, 5128 snapshotMachine, aParentSnapshot); 5129 CheckComRCReturnRC (rc); 5135 5130 } 5136 5131 … … 9204 9199 ComObjPtr <Snapshot> snapshot; 9205 9200 snapshot.createObject(); 9206 rc = snapshot->init(mParent, 9207 snapshotId, 9208 aName, 9209 aDescription, 9210 *RTTimeNow(&time), 9211 snapshotMachine, 9212 mData->mCurrentSnapshot); 9201 rc = snapshot->init (snapshotId, aName, aDescription, 9202 *RTTimeNow (&time), snapshotMachine, 9203 mData->mCurrentSnapshot); 9213 9204 AssertComRCReturnRC (rc); 9214 9205 -
trunk/src/VBox/Main/SnapshotImpl.cpp
r21622 r21686 65 65 * @param aParent parent snapshot (NULL if no parent) 66 66 */ 67 HRESULT Snapshot::init(VirtualBox *aVirtualBox, 68 const Guid &aId, 69 IN_BSTR aName, 70 IN_BSTR aDescription, 71 RTTIMESPEC aTimeStamp, 72 SnapshotMachine *aMachine, 73 Snapshot *aParent) 67 HRESULT Snapshot::init (const Guid &aId, IN_BSTR aName, IN_BSTR aDescription, 68 RTTIMESPEC aTimeStamp, SnapshotMachine *aMachine, 69 Snapshot *aParent) 74 70 { 75 71 LogFlowMember (("Snapshot::init(aParent=%p)\n", aParent)); … … 77 73 ComAssertRet (!aId.isEmpty() && aName && aMachine, E_INVALIDARG); 78 74 79 /* Enclose the state transition NotReady->InInit->Ready */ 80 AutoInitSpan autoInitSpan (this); 81 AssertReturn (autoInitSpan.isOk(), E_FAIL); 82 83 /* share parent weakly */ 84 unconst (mVirtualBox) = aVirtualBox; 75 AutoWriteLock alock (this); 76 ComAssertRet (!isReady(), E_FAIL); 85 77 86 78 mParent = aParent; … … 95 87 aParent->addDependentChild (this); 96 88 97 /* Confirm a successful initialization when it's the case */ 98 autoInitSpan.setSucceeded(); 89 setReady (true); 99 90 100 91 return S_OK; … … 110 101 LogFlowMember (("Snapshot::uninit()\n")); 111 102 112 /* Enclose the state transition Ready->InUninit->NotReady */ 113 // AutoUninitSpan autoUninitSpan (this); @todo this creates a deadlock, investigate what this does actually 114 // if (autoUninitSpan.uninitDone()) 115 // return; 103 AutoWriteLock alock (this); 104 105 LogFlowMember (("Snapshot::uninit(): isReady=%d\n", isReady())); 106 if (!isReady()) 107 return; 116 108 117 109 // uninit all children 118 110 uninitDependentChildren(); 119 111 112 setReady (false); 113 120 114 if (mParent) 121 115 { 116 alock.leave(); 122 117 mParent->removeDependentChild (this); 118 alock.enter(); 123 119 mParent.setNull(); 124 120 } … … 138 134 void Snapshot::discard() 139 135 { 140 AutoCaller autoCaller (this); 141 if (FAILED(autoCaller.rc())) 142 return; 143 144 AutoWriteLock alock (this); 136 LogFlowMember (("Snapshot::discard()\n")); 137 138 AutoWriteLock alock (this); 139 AssertReturn (isReady(), (void) 0); 145 140 146 141 { … … 174 169 CheckComArgOutPointerValid(aId); 175 170 176 AutoCaller autoCaller (this); 177 CheckComRCReturnRC (autoCaller.rc()); 178 179 AutoReadLock alock (this); 171 AutoWriteLock alock (this); 172 CHECK_READY(); 180 173 181 174 mData.mId.toUtf16().cloneTo (aId); … … 187 180 CheckComArgOutPointerValid(aName); 188 181 189 AutoCaller autoCaller (this); 190 CheckComRCReturnRC (autoCaller.rc()); 191 192 AutoReadLock alock (this); 182 AutoWriteLock alock (this); 183 CHECK_READY(); 193 184 194 185 mData.mName.cloneTo (aName); … … 204 195 CheckComArgNotNull(aName); 205 196 206 AutoCaller autoCaller (this); 207 CheckComRCReturnRC (autoCaller.rc()); 208 209 AutoWriteLock alock (this); 197 AutoWriteLock alock (this); 198 CHECK_READY(); 210 199 211 200 if (mData.mName != aName) … … 225 214 CheckComArgOutPointerValid(aDescription); 226 215 227 AutoCaller autoCaller (this); 228 CheckComRCReturnRC (autoCaller.rc()); 229 230 AutoReadLock alock (this); 216 AutoWriteLock alock (this); 217 CHECK_READY(); 231 218 232 219 mData.mDescription.cloneTo (aDescription); … … 238 225 CheckComArgNotNull(aDescription); 239 226 240 AutoCaller autoCaller (this); 241 CheckComRCReturnRC (autoCaller.rc()); 242 243 AutoWriteLock alock (this); 227 AutoWriteLock alock (this); 228 CHECK_READY(); 244 229 245 230 if (mData.mDescription != aDescription) … … 259 244 CheckComArgOutPointerValid(aTimeStamp); 260 245 261 AutoCaller autoCaller (this); 262 CheckComRCReturnRC (autoCaller.rc()); 263 264 AutoReadLock alock (this); 246 AutoWriteLock alock (this); 247 CHECK_READY(); 265 248 266 249 *aTimeStamp = RTTimeSpecGetMilli (&mData.mTimeStamp); … … 272 255 CheckComArgOutPointerValid(aOnline); 273 256 274 AutoCaller autoCaller (this); 275 CheckComRCReturnRC (autoCaller.rc()); 276 277 AutoReadLock alock (this); 257 AutoWriteLock alock (this); 258 CHECK_READY(); 278 259 279 260 *aOnline = !stateFilePath().isNull(); … … 285 266 CheckComArgOutPointerValid(aMachine); 286 267 287 AutoCaller autoCaller (this); 288 CheckComRCReturnRC (autoCaller.rc()); 289 290 AutoReadLock alock (this); 268 AutoWriteLock alock (this); 269 CHECK_READY(); 291 270 292 271 mData.mMachine.queryInterfaceTo (aMachine); … … 298 277 CheckComArgOutPointerValid(aParent); 299 278 300 AutoCaller autoCaller (this); 301 CheckComRCReturnRC (autoCaller.rc()); 302 303 AutoReadLock alock (this); 279 AutoWriteLock alock (this); 280 CHECK_READY(); 304 281 305 282 mParent.queryInterfaceTo (aParent); … … 311 288 CheckComArgOutSafeArrayPointerValid(aChildren); 312 289 313 AutoCaller autoCaller (this); 314 CheckComRCReturnRC (autoCaller.rc()); 315 316 AutoReadLock alock (this); 317 AutoReadLock chLock (childrenLock ()); 290 AutoWriteLock alock (this); 291 CHECK_READY(); 292 293 AutoWriteLock chLock (childrenLock ()); 318 294 319 295 SafeIfaceArray <ISnapshot> collection (children()); … … 341 317 ULONG Snapshot::descendantCount() 342 318 { 343 AutoCaller autoCaller (this); 344 AssertComRC(autoCaller.rc()); 345 346 AutoReadLock alock (this); 347 348 AutoReadLock chLock (childrenLock ()); 319 AutoWriteLock alock(this); 320 AssertReturn (isReady(), 0); 321 322 AutoWriteLock chLock (childrenLock ()); 349 323 350 324 ULONG count = (ULONG)children().size(); … … 363 337 * etc. of this snapshot. This snapshot itself is also included in the search. 364 338 */ 365 ComObjPtr <Snapshot> Snapshot::findChildOrSelf (IN_GUID aId)339 ComObjPtr <Snapshot> Snapshot::findChildOrSelf (IN_GUID aId) 366 340 { 367 341 ComObjPtr <Snapshot> child; 368 342 369 AutoCaller autoCaller (this); 370 AssertComRC(autoCaller.rc()); 371 372 AutoReadLock alock (this); 343 AutoWriteLock alock (this); 344 AssertReturn (isReady(), child); 373 345 374 346 if (mData.mId == aId) … … 397 369 AssertReturn (aName, child); 398 370 399 AutoCaller autoCaller (this); 400 AssertComRC(autoCaller.rc()); 401 402 AutoReadLock alock (this); 371 AutoWriteLock alock (this); 372 AssertReturn (isReady(), child); 403 373 404 374 if (mData.mName == aName) … … 435 405 AssertReturnVoid (aNewPath); 436 406 437 AutoCaller autoCaller (this); 438 AssertComRC(autoCaller.rc()); 439 440 AutoWriteLock alock (this); 407 AutoWriteLock alock (this); 408 AssertReturnVoid (isReady()); 441 409 442 410 Utf8Str path = mData.mMachine->mSSData->mStateFilePath; … … 462 430 } 463 431 464 /** 465 * Returns VirtualBox::mSnapshotsTreeLockHandle(), for convenience. Don't forget 466 * to follow these locking rules: 467 * 468 * 1. The write lock on this handle must be either held alone on the thread 469 * or requested *after* the VirtualBox object lock. Mixing with other 470 * locks is prohibited. 471 * 472 * 2. The read lock on this handle may be intermixed with any other lock 473 * with the exception that it must be requested *after* the VirtualBox 474 * object lock. 475 */ 476 RWLockHandle* Snapshot::treeLock() 477 { 478 return mVirtualBox->snapshotTreeLockHandle(); 479 } 480 481 /** Reimplements VirtualBoxWithTypedChildren::childrenLock() to return 482 * treeLock(). */ 483 RWLockHandle* Snapshot::childrenLock() 484 { 485 return treeLock(); 486 } 487 488 432 /* vi: set tabstop=4 shiftwidth=4 expandtab: */ -
trunk/src/VBox/Main/USBControllerImpl.cpp
r21660 r21686 317 317 class ATL_NO_VTABLE USBDeviceFilter : 318 318 public VirtualBoxBase, 319 public VirtualBoxSupportErrorInfoImpl <USBDeviceFilter, IUSBDeviceFilter>,320 public VirtualBoxSupportTranslation <USBDeviceFilter>,319 public VirtualBoxSupportErrorInfoImpl <USBDeviceFilter, IUSBDeviceFilter>, 320 public VirtualBoxSupportTranslation <USBDeviceFilter>, 321 321 public IUSBDeviceFilter 322 322 { -
trunk/src/VBox/Main/VirtualBoxBase.cpp
r21622 r21686 1153 1153 * @note Locks #childrenLock() for reading. 1154 1154 */ 1155 VirtualBoxBase* VirtualBoxBaseWithChildrenNEXT::getDependentChild(const ComPtr<IUnknown> &aUnk) 1155 VirtualBoxBaseNEXT * 1156 VirtualBoxBaseWithChildrenNEXT::getDependentChild (const ComPtr <IUnknown> &aUnk) 1156 1157 { 1157 1158 AssertReturn (!aUnk.isNull(), NULL); … … 1173 1174 1174 1175 /** Helper for addDependentChild(). */ 1175 void VirtualBoxBaseWithChildrenNEXT::doAddDependentChild (IUnknown *aUnk,1176 VirtualBoxBase*aChild)1176 void VirtualBoxBaseWithChildrenNEXT::doAddDependentChild ( 1177 IUnknown *aUnk, VirtualBoxBaseNEXT *aChild) 1177 1178 { 1178 1179 AssertReturnVoid (aUnk != NULL); -
trunk/src/VBox/Main/include/ApplianceImpl.h
r21622 r21686 34 34 class ATL_NO_VTABLE Appliance : 35 35 public VirtualBoxBaseWithChildrenNEXT, 36 public VirtualBoxSupportErrorInfoImpl <Appliance, IAppliance>,37 public VirtualBoxSupportTranslation <Appliance>,36 public VirtualBoxSupportErrorInfoImpl <Appliance, IAppliance>, 37 public VirtualBoxSupportTranslation <Appliance>, 38 38 VBOX_SCRIPTABLE_IMPL(IAppliance) 39 39 { … … 142 142 143 143 class ATL_NO_VTABLE VirtualSystemDescription : 144 public VirtualBoxBaseWithChildren ,145 public VirtualBoxSupportErrorInfoImpl <VirtualSystemDescription, IVirtualSystemDescription>,146 public VirtualBoxSupportTranslation <VirtualSystemDescription>,144 public VirtualBoxBaseWithChildrenNEXT, 145 public VirtualBoxSupportErrorInfoImpl <VirtualSystemDescription, IVirtualSystemDescription>, 146 public VirtualBoxSupportTranslation <VirtualSystemDescription>, 147 147 VBOX_SCRIPTABLE_IMPL(IVirtualSystemDescription) 148 148 { -
trunk/src/VBox/Main/include/AudioAdapterImpl.h
r21622 r21686 30 30 31 31 class ATL_NO_VTABLE AudioAdapter : 32 public VirtualBoxBase ,33 public VirtualBoxSupportErrorInfoImpl <AudioAdapter, IAudioAdapter>,34 public VirtualBoxSupportTranslation <AudioAdapter>,32 public VirtualBoxBaseNEXT, 33 public VirtualBoxSupportErrorInfoImpl <AudioAdapter, IAudioAdapter>, 34 public VirtualBoxSupportTranslation <AudioAdapter>, 35 35 VBOX_SCRIPTABLE_IMPL(IAudioAdapter) 36 36 { -
trunk/src/VBox/Main/include/BIOSSettingsImpl.h
r21622 r21686 31 31 32 32 class ATL_NO_VTABLE BIOSSettings : 33 public VirtualBoxSupportErrorInfoImpl <BIOSSettings, IBIOSSettings>,34 public VirtualBoxSupportTranslation <BIOSSettings>,35 public VirtualBoxBase ,33 public VirtualBoxSupportErrorInfoImpl <BIOSSettings, IBIOSSettings>, 34 public VirtualBoxSupportTranslation <BIOSSettings>, 35 public VirtualBoxBaseNEXT, 36 36 VBOX_SCRIPTABLE_IMPL(IBIOSSettings) 37 37 { -
trunk/src/VBox/Main/include/ConsoleImpl.h
r21647 r21686 79 79 class ATL_NO_VTABLE Console : 80 80 public VirtualBoxBaseWithChildrenNEXT, 81 public VirtualBoxSupportErrorInfoImpl <Console, IConsole>,82 public VirtualBoxSupportTranslation <Console>,81 public VirtualBoxSupportErrorInfoImpl <Console, IConsole>, 82 public VirtualBoxSupportTranslation <Console>, 83 83 VBOX_SCRIPTABLE_IMPL(IConsole) 84 84 { -
trunk/src/VBox/Main/include/ConsoleVRDPServer.h
r21622 r21686 233 233 234 234 class ATL_NO_VTABLE RemoteDisplayInfo : 235 public VirtualBoxBase ,236 public VirtualBoxSupportErrorInfoImpl <RemoteDisplayInfo, IRemoteDisplayInfo>,237 public VirtualBoxSupportTranslation <RemoteDisplayInfo>,235 public VirtualBoxBaseNEXT, 236 public VirtualBoxSupportErrorInfoImpl <RemoteDisplayInfo, IRemoteDisplayInfo>, 237 public VirtualBoxSupportTranslation <RemoteDisplayInfo>, 238 238 VBOX_SCRIPTABLE_IMPL(IRemoteDisplayInfo) 239 239 { -
trunk/src/VBox/Main/include/DHCPServerImpl.h
r21622 r21686 35 35 36 36 class ATL_NO_VTABLE DHCPServer : 37 public VirtualBoxBase ,38 public VirtualBoxSupportErrorInfoImpl <DHCPServer, IDHCPServer>,39 public VirtualBoxSupportTranslation <DHCPServer>,37 public VirtualBoxBaseNEXT, 38 public VirtualBoxSupportErrorInfoImpl <DHCPServer, IDHCPServer>, 39 public VirtualBoxSupportTranslation <DHCPServer>, 40 40 VBOX_SCRIPTABLE_IMPL(IDHCPServer) 41 41 { -
trunk/src/VBox/Main/include/DVDDriveImpl.h
r21622 r21686 32 32 33 33 class ATL_NO_VTABLE DVDDrive : 34 public VirtualBoxBase ,35 public VirtualBoxSupportErrorInfoImpl <DVDDrive, IDVDDrive>,36 public VirtualBoxSupportTranslation <DVDDrive>,34 public VirtualBoxBaseNEXT, 35 public VirtualBoxSupportErrorInfoImpl <DVDDrive, IDVDDrive>, 36 public VirtualBoxSupportTranslation <DVDDrive>, 37 37 VBOX_SCRIPTABLE_IMPL(IDVDDrive) 38 38 { -
trunk/src/VBox/Main/include/DisplayImpl.h
r21622 r21686 83 83 84 84 class ATL_NO_VTABLE Display : 85 public VirtualBoxBase ,85 public VirtualBoxBaseNEXT, 86 86 VBOX_SCRIPTABLE_IMPL(IConsoleCallback), 87 public VirtualBoxSupportErrorInfoImpl <Display, IDisplay>,88 public VirtualBoxSupportTranslation <Display>,87 public VirtualBoxSupportErrorInfoImpl <Display, IDisplay>, 88 public VirtualBoxSupportTranslation <Display>, 89 89 VBOX_SCRIPTABLE_IMPL(IDisplay) 90 90 { -
trunk/src/VBox/Main/include/FloppyDriveImpl.h
r21622 r21686 32 32 33 33 class ATL_NO_VTABLE FloppyDrive : 34 public VirtualBoxBase ,35 public VirtualBoxSupportErrorInfoImpl <FloppyDrive, IFloppyDrive>,36 public VirtualBoxSupportTranslation <FloppyDrive>,34 public VirtualBoxBaseNEXT, 35 public VirtualBoxSupportErrorInfoImpl <FloppyDrive, IFloppyDrive>, 36 public VirtualBoxSupportTranslation <FloppyDrive>, 37 37 VBOX_SCRIPTABLE_IMPL(IFloppyDrive) 38 38 { -
trunk/src/VBox/Main/include/FramebufferImpl.h
r21622 r21686 29 29 30 30 class ATL_NO_VTABLE Framebuffer : 31 public VirtualBoxBase ,32 public VirtualBoxSupportErrorInfoImpl <Framebuffer, IFramebuffer>,33 public VirtualBoxSupportTranslation <Framebuffer>,31 public VirtualBoxBaseNEXT, 32 public VirtualBoxSupportErrorInfoImpl <Framebuffer, IFramebuffer>, 33 public VirtualBoxSupportTranslation <Framebuffer>, 34 34 VBOX_SCRIPTABLE_IMPL(IFramebuffer) 35 35 { … … 76 76 BOOL *aSupported) = 0; 77 77 78 STDMETHOD(GetVisibleRegion)(BYTE *aRectangles, ULONG aCount, 79 ULONG *aCountCopied) = 0; 78 STDMETHOD(GetVisibleRegion)(BYTE *aRectangles, ULONG aCount, 79 ULONG *aCountCopied) = 0; 80 80 STDMETHOD(SetVisibleRegion)(BYTE *aRectangles, ULONG aCount) = 0; 81 81 -
trunk/src/VBox/Main/include/GuestImpl.h
r21622 r21686 31 31 32 32 class ATL_NO_VTABLE Guest : 33 public VirtualBoxSupportErrorInfoImpl <Guest, IGuest>,34 public VirtualBoxSupportTranslation <Guest>,35 public VirtualBoxBase ,33 public VirtualBoxSupportErrorInfoImpl <Guest, IGuest>, 34 public VirtualBoxSupportTranslation <Guest>, 35 public VirtualBoxBaseNEXT, 36 36 VBOX_SCRIPTABLE_IMPL(IGuest) 37 37 { -
trunk/src/VBox/Main/include/GuestOSTypeImpl.h
r21622 r21686 29 29 30 30 class ATL_NO_VTABLE GuestOSType : 31 public VirtualBoxBase ,32 public VirtualBoxSupportErrorInfoImpl <GuestOSType, IGuestOSType>,33 public VirtualBoxSupportTranslation <GuestOSType>,31 public VirtualBoxBaseNEXT, 32 public VirtualBoxSupportErrorInfoImpl <GuestOSType, IGuestOSType>, 33 public VirtualBoxSupportTranslation <GuestOSType>, 34 34 VBOX_SCRIPTABLE_IMPL(IGuestOSType) 35 35 { -
trunk/src/VBox/Main/include/HardDiskAttachmentImpl.h
r21622 r21686 28 28 29 29 class ATL_NO_VTABLE HardDiskAttachment : 30 public VirtualBoxBase ,30 public VirtualBoxBaseNEXT, 31 31 public com::SupportErrorInfoImpl<HardDiskAttachment, IHardDiskAttachment>, 32 32 public VirtualBoxSupportTranslation<HardDiskAttachment>, -
trunk/src/VBox/Main/include/HardDiskFormatImpl.h
r21622 r21686 43 43 */ 44 44 class ATL_NO_VTABLE HardDiskFormat : 45 public VirtualBoxBase ,46 public VirtualBoxSupportErrorInfoImpl <HardDiskFormat, IHardDiskFormat>,47 public VirtualBoxSupportTranslation <HardDiskFormat>,45 public VirtualBoxBaseNEXT, 46 public VirtualBoxSupportErrorInfoImpl <HardDiskFormat, IHardDiskFormat>, 47 public VirtualBoxSupportTranslation <HardDiskFormat>, 48 48 VBOX_SCRIPTABLE_IMPL(IHardDiskFormat) 49 49 { -
trunk/src/VBox/Main/include/HardDiskImpl.h
r21622 r21686 46 46 class ATL_NO_VTABLE HardDisk 47 47 : public com::SupportErrorInfoDerived<MediumBase, HardDisk, IHardDisk> 48 , public VirtualBoxBaseWithTypedChildren <HardDisk>48 , public VirtualBoxBaseWithTypedChildrenNEXT<HardDisk> 49 49 , public VirtualBoxSupportTranslation<HardDisk> 50 50 , VBOX_SCRIPTABLE_IMPL(IHardDisk) … … 52 52 public: 53 53 54 typedef VirtualBoxBaseWithTypedChildren<HardDisk>::DependentChildren List; 54 typedef VirtualBoxBaseWithTypedChildrenNEXT <HardDisk>::DependentChildren 55 List; 55 56 56 57 class MergeChain; -
trunk/src/VBox/Main/include/HostDVDDriveImpl.h
r21622 r21686 26 26 27 27 class ATL_NO_VTABLE HostDVDDrive : 28 public VirtualBoxBase ,29 public VirtualBoxSupportErrorInfoImpl <HostDVDDrive, IHostDVDDrive>,30 public VirtualBoxSupportTranslation <HostDVDDrive>,28 public VirtualBoxBaseNEXT, 29 public VirtualBoxSupportErrorInfoImpl <HostDVDDrive, IHostDVDDrive>, 30 public VirtualBoxSupportTranslation <HostDVDDrive>, 31 31 VBOX_SCRIPTABLE_IMPL(IHostDVDDrive) 32 32 { -
trunk/src/VBox/Main/include/HostFloppyDriveImpl.h
r21622 r21686 26 26 27 27 class ATL_NO_VTABLE HostFloppyDrive : 28 public VirtualBoxBase ,29 public VirtualBoxSupportErrorInfoImpl <HostFloppyDrive, IHostFloppyDrive>,30 public VirtualBoxSupportTranslation <HostFloppyDrive>,28 public VirtualBoxBaseNEXT, 29 public VirtualBoxSupportErrorInfoImpl <HostFloppyDrive, IHostFloppyDrive>, 30 public VirtualBoxSupportTranslation <HostFloppyDrive>, 31 31 VBOX_SCRIPTABLE_IMPL(IHostFloppyDrive) 32 32 { -
trunk/src/VBox/Main/include/HostImpl.h
r21622 r21686 52 52 class ATL_NO_VTABLE Host : 53 53 public VirtualBoxBaseWithChildren, 54 public VirtualBoxSupportErrorInfoImpl <Host, IHost>,55 public VirtualBoxSupportTranslation <Host>,54 public VirtualBoxSupportErrorInfoImpl <Host, IHost>, 55 public VirtualBoxSupportTranslation <Host>, 56 56 VBOX_SCRIPTABLE_IMPL(IHost) 57 57 { -
trunk/src/VBox/Main/include/HostNetworkInterfaceImpl.h
r21622 r21686 35 35 36 36 class ATL_NO_VTABLE HostNetworkInterface : 37 public VirtualBoxBase ,38 public VirtualBoxSupportErrorInfoImpl <HostNetworkInterface, IHostNetworkInterface>,39 public VirtualBoxSupportTranslation <HostNetworkInterface>,37 public VirtualBoxBaseNEXT, 38 public VirtualBoxSupportErrorInfoImpl <HostNetworkInterface, IHostNetworkInterface>, 39 public VirtualBoxSupportTranslation <HostNetworkInterface>, 40 40 VBOX_SCRIPTABLE_IMPL(IHostNetworkInterface) 41 41 { -
trunk/src/VBox/Main/include/KeyboardImpl.h
r21622 r21686 48 48 49 49 class ATL_NO_VTABLE Keyboard : 50 public VirtualBoxBase ,51 public VirtualBoxSupportErrorInfoImpl <Keyboard, IKeyboard>,52 public VirtualBoxSupportTranslation <Keyboard>,50 public VirtualBoxBaseNEXT, 51 public VirtualBoxSupportErrorInfoImpl <Keyboard, IKeyboard>, 52 public VirtualBoxSupportTranslation <Keyboard>, 53 53 VBOX_SCRIPTABLE_IMPL(IKeyboard) 54 54 { -
trunk/src/VBox/Main/include/MachineDebuggerImpl.h
r21622 r21686 30 30 31 31 class ATL_NO_VTABLE MachineDebugger : 32 public VirtualBoxBase ,33 public VirtualBoxSupportErrorInfoImpl <MachineDebugger, IMachineDebugger>,34 public VirtualBoxSupportTranslation <MachineDebugger>,32 public VirtualBoxBaseNEXT, 33 public VirtualBoxSupportErrorInfoImpl <MachineDebugger, IMachineDebugger>, 34 public VirtualBoxSupportTranslation <MachineDebugger>, 35 35 VBOX_SCRIPTABLE_IMPL(IMachineDebugger) 36 36 { -
trunk/src/VBox/Main/include/MachineImpl.h
r21622 r21686 78 78 class ATL_NO_VTABLE Machine : 79 79 public VirtualBoxBaseWithChildrenNEXT, 80 public VirtualBoxSupportErrorInfoImpl <Machine, IMachine>,81 public VirtualBoxSupportTranslation <Machine>,80 public VirtualBoxSupportErrorInfoImpl <Machine, IMachine>, 81 public VirtualBoxSupportTranslation <Machine>, 82 82 VBOX_SCRIPTABLE_IMPL(IMachine) 83 83 { … … 873 873 */ 874 874 class ATL_NO_VTABLE SessionMachine : 875 public VirtualBoxSupportTranslation <SessionMachine>,875 public VirtualBoxSupportTranslation <SessionMachine>, 876 876 public Machine, 877 877 VBOX_SCRIPTABLE_IMPL(IInternalMachineControl) … … 1048 1048 */ 1049 1049 class ATL_NO_VTABLE SnapshotMachine : 1050 public VirtualBoxSupportTranslation <SnapshotMachine>,1050 public VirtualBoxSupportTranslation <SnapshotMachine>, 1051 1051 public Machine 1052 1052 { -
trunk/src/VBox/Main/include/MediumImpl.h
r21622 r21686 47 47 virtual public VirtualBoxBaseProto, 48 48 public com::SupportErrorInfoBase, 49 public VirtualBoxSupportTranslation <MediumBase>,49 public VirtualBoxSupportTranslation <MediumBase>, 50 50 VBOX_SCRIPTABLE_IMPL(IMedium) 51 51 { … … 212 212 class ATL_NO_VTABLE ImageMediumBase 213 213 : public MediumBase 214 , public VirtualBoxBase 214 , public VirtualBoxBaseNEXT 215 215 { 216 216 public: … … 293 293 */ 294 294 class ATL_NO_VTABLE FloppyImage 295 : public com::SupportErrorInfoDerived <ImageMediumBase, FloppyImage, IFloppyImage>296 , public VirtualBoxSupportTranslation <FloppyImage>295 : public com::SupportErrorInfoDerived <ImageMediumBase, FloppyImage, IFloppyImage> 296 , public VirtualBoxSupportTranslation <FloppyImage> 297 297 , VBOX_SCRIPTABLE_IMPL(IFloppyImage) 298 298 { -
trunk/src/VBox/Main/include/MouseImpl.h
r21622 r21686 50 50 51 51 class ATL_NO_VTABLE Mouse : 52 public VirtualBoxBase ,53 public VirtualBoxSupportErrorInfoImpl <Mouse, IMouse>,54 public VirtualBoxSupportTranslation <Mouse>,52 public VirtualBoxBaseNEXT, 53 public VirtualBoxSupportErrorInfoImpl <Mouse, IMouse>, 54 public VirtualBoxSupportTranslation <Mouse>, 55 55 VBOX_SCRIPTABLE_IMPL(IMouse) 56 56 { -
trunk/src/VBox/Main/include/NetworkAdapterImpl.h
r21622 r21686 31 31 32 32 class ATL_NO_VTABLE NetworkAdapter : 33 public VirtualBoxBase ,34 public VirtualBoxSupportErrorInfoImpl <NetworkAdapter, INetworkAdapter>,35 public VirtualBoxSupportTranslation <NetworkAdapter>,33 public VirtualBoxBaseNEXT, 34 public VirtualBoxSupportErrorInfoImpl <NetworkAdapter, INetworkAdapter>, 35 public VirtualBoxSupportTranslation <NetworkAdapter>, 36 36 VBOX_SCRIPTABLE_IMPL(INetworkAdapter) 37 37 { -
trunk/src/VBox/Main/include/ParallelPortImpl.h
r21622 r21686 29 29 30 30 class ATL_NO_VTABLE ParallelPort : 31 public VirtualBoxBase ,32 public VirtualBoxSupportErrorInfoImpl <ParallelPort, IParallelPort>,33 public VirtualBoxSupportTranslation <ParallelPort>,31 public VirtualBoxBaseNEXT, 32 public VirtualBoxSupportErrorInfoImpl <ParallelPort, IParallelPort>, 33 public VirtualBoxSupportTranslation <ParallelPort>, 34 34 VBOX_SCRIPTABLE_IMPL(IParallelPort) 35 35 { -
trunk/src/VBox/Main/include/PerformanceImpl.h
r21622 r21686 52 52 53 53 class ATL_NO_VTABLE PerformanceMetric : 54 public VirtualBoxBase ,55 public VirtualBoxSupportTranslation <PerformanceMetric>,54 public VirtualBoxBaseNEXT, 55 public VirtualBoxSupportTranslation <PerformanceMetric>, 56 56 VBOX_SCRIPTABLE_IMPL(IPerformanceMetric) 57 57 { … … 121 121 122 122 class ATL_NO_VTABLE PerformanceCollector : 123 public VirtualBoxBase ,124 public VirtualBoxSupportErrorInfoImpl <PerformanceCollector, IPerformanceCollector>,125 public VirtualBoxSupportTranslation <PerformanceCollector>,123 public VirtualBoxBaseNEXT, 124 public VirtualBoxSupportErrorInfoImpl <PerformanceCollector, IPerformanceCollector>, 125 public VirtualBoxSupportTranslation <PerformanceCollector>, 126 126 VBOX_SCRIPTABLE_IMPL(IPerformanceCollector) 127 127 { -
trunk/src/VBox/Main/include/ProgressImpl.h
r21622 r21686 40 40 */ 41 41 class ATL_NO_VTABLE ProgressBase : 42 public VirtualBoxBase ,42 public VirtualBoxBaseNEXT, 43 43 public com::SupportErrorInfoBase, 44 public VirtualBoxSupportTranslation <ProgressBase>,44 public VirtualBoxSupportTranslation <ProgressBase>, 45 45 VBOX_SCRIPTABLE_IMPL(IProgress) 46 46 { … … 133 133 */ 134 134 class ATL_NO_VTABLE Progress : 135 public com::SupportErrorInfoDerived <ProgressBase, Progress, IProgress>,136 public VirtualBoxSupportTranslation <Progress>135 public com::SupportErrorInfoDerived <ProgressBase, Progress, IProgress>, 136 public VirtualBoxSupportTranslation <Progress> 137 137 { 138 138 … … 305 305 */ 306 306 class ATL_NO_VTABLE CombinedProgress : 307 public com::SupportErrorInfoDerived <ProgressBase, CombinedProgress, IProgress>,308 public VirtualBoxSupportTranslation <CombinedProgress>307 public com::SupportErrorInfoDerived <ProgressBase, CombinedProgress, IProgress>, 308 public VirtualBoxSupportTranslation <CombinedProgress> 309 309 { 310 310 -
trunk/src/VBox/Main/include/RemoteUSBDeviceImpl.h
r21622 r21686 32 32 33 33 class ATL_NO_VTABLE RemoteUSBDevice : 34 public VirtualBoxBase ,35 public VirtualBoxSupportErrorInfoImpl <RemoteUSBDevice, IHostUSBDevice>,36 public VirtualBoxSupportTranslation <RemoteUSBDevice>,34 public VirtualBoxBaseNEXT, 35 public VirtualBoxSupportErrorInfoImpl <RemoteUSBDevice, IHostUSBDevice>, 36 public VirtualBoxSupportTranslation <RemoteUSBDevice>, 37 37 VBOX_SCRIPTABLE_IMPL(IHostUSBDevice) 38 38 { -
trunk/src/VBox/Main/include/SerialPortImpl.h
r21622 r21686 31 31 32 32 class ATL_NO_VTABLE SerialPort : 33 public VirtualBoxBase ,34 public VirtualBoxSupportErrorInfoImpl <SerialPort, ISerialPort>,35 public VirtualBoxSupportTranslation <SerialPort>,33 public VirtualBoxBaseNEXT, 34 public VirtualBoxSupportErrorInfoImpl <SerialPort, ISerialPort>, 35 public VirtualBoxSupportTranslation <SerialPort>, 36 36 VBOX_SCRIPTABLE_IMPL(ISerialPort) 37 37 { -
trunk/src/VBox/Main/include/SessionImpl.h
r21622 r21686 42 42 43 43 class ATL_NO_VTABLE Session : 44 public VirtualBoxBase ,45 public VirtualBoxSupportErrorInfoImpl <Session, ISession>,46 public VirtualBoxSupportTranslation <Session>,44 public VirtualBoxBaseNEXT, 45 public VirtualBoxSupportErrorInfoImpl <Session, ISession>, 46 public VirtualBoxSupportTranslation <Session>, 47 47 VBOX_SCRIPTABLE_IMPL(ISession), 48 48 VBOX_SCRIPTABLE_IMPL(IInternalSessionControl) … … 62 62 BEGIN_COM_MAP(Session) 63 63 COM_INTERFACE_ENTRY2(IDispatch, ISession) 64 COM_INTERFACE_ENTRY2(IDispatch, IInternalSessionControl) 64 COM_INTERFACE_ENTRY2(IDispatch, IInternalSessionControl) 65 65 COM_INTERFACE_ENTRY(IInternalSessionControl) 66 66 COM_INTERFACE_ENTRY(ISupportErrorInfo) -
trunk/src/VBox/Main/include/SharedFolderImpl.h
r21622 r21686 31 31 32 32 class ATL_NO_VTABLE SharedFolder : 33 public VirtualBoxBase ,34 public VirtualBoxSupportErrorInfoImpl <SharedFolder, ISharedFolder>,35 public VirtualBoxSupportTranslation <SharedFolder>,33 public VirtualBoxBaseNEXT, 34 public VirtualBoxSupportErrorInfoImpl <SharedFolder, ISharedFolder>, 35 public VirtualBoxSupportTranslation <SharedFolder>, 36 36 VBOX_SCRIPTABLE_IMPL(ISharedFolder) 37 37 { -
trunk/src/VBox/Main/include/SnapshotImpl.h
r21622 r21686 30 30 31 31 class SnapshotMachine; 32 class VirtualBox;33 32 34 33 class ATL_NO_VTABLE Snapshot : 35 public VirtualBoxSupportErrorInfoImpl <Snapshot, ISnapshot>,36 public VirtualBoxSupportTranslation <Snapshot>,37 public VirtualBoxBaseWithTypedChildren <Snapshot>,34 public VirtualBoxSupportErrorInfoImpl <Snapshot, ISnapshot>, 35 public VirtualBoxSupportTranslation <Snapshot>, 36 public VirtualBoxBaseWithTypedChildren <Snapshot>, 38 37 VBOX_SCRIPTABLE_IMPL(ISnapshot) 39 38 { … … 52 51 }; 53 52 54 typedef VirtualBoxBaseWithTypedChildren<Snapshot>::DependentChildren SnapshotList; 53 typedef VirtualBoxBaseWithTypedChildren <Snapshot>::DependentChildren 54 SnapshotList; 55 55 56 56 DECLARE_NOT_AGGREGATABLE(Snapshot) … … 66 66 NS_DECL_ISUPPORTS 67 67 68 Snapshot()69 { };70 ~Snapshot()71 { };72 73 68 HRESULT FinalConstruct(); 74 69 void FinalRelease(); 75 70 76 71 // public initializer/uninitializer only for internal purposes 77 HRESULT init(VirtualBox *aVirtualBox, 78 const Guid &aId, 79 IN_BSTR aName, 80 IN_BSTR aDescription, 81 RTTIMESPEC aTimeStamp, 82 SnapshotMachine *aMachine, 83 Snapshot *aParent); 72 HRESULT init (const Guid &aId, IN_BSTR aName, IN_BSTR aDescription, 73 RTTIMESPEC aTimeStamp, SnapshotMachine *aMachine, 74 Snapshot *aParent); 84 75 void uninit(); 85 76 … … 109 100 ComObjPtr <Snapshot> parent() const { return (Snapshot *) mParent; } 110 101 102 /** Shortcut to #dependentChildrenLock() */ 103 RWLockHandle *childrenLock() const { return dependentChildrenLock(); } 104 111 105 /** 112 106 * Shortcut to #dependentChildren(). … … 124 118 static const wchar_t *getComponentName() { return L"Snapshot"; } 125 119 126 RWLockHandle *treeLock();127 RWLockHandle *childrenLock();128 129 120 private: 130 121 131 /** weak VirtualBox parent */ 132 const ComObjPtr<VirtualBox, ComWeakRef> mVirtualBox; 133 134 ComObjPtr<Snapshot, ComWeakRef> mParent; 122 ComObjPtr <Snapshot, ComWeakRef> mParent; 135 123 136 124 Data mData; -
trunk/src/VBox/Main/include/StorageControllerImpl.h
r21622 r21686 33 33 class ATL_NO_VTABLE StorageController : 34 34 public VirtualBoxBaseWithChildrenNEXT, 35 public VirtualBoxSupportErrorInfoImpl <StorageController, IStorageController>,36 public VirtualBoxSupportTranslation <StorageController>,35 public VirtualBoxSupportErrorInfoImpl <StorageController, IStorageController>, 36 public VirtualBoxSupportTranslation <StorageController>, 37 37 VBOX_SCRIPTABLE_IMPL(IStorageController) 38 38 { -
trunk/src/VBox/Main/include/SystemPropertiesImpl.h
r21622 r21686 35 35 36 36 class ATL_NO_VTABLE SystemProperties : 37 public VirtualBoxBase ,38 public VirtualBoxSupportErrorInfoImpl <SystemProperties, ISystemProperties>,39 public VirtualBoxSupportTranslation <SystemProperties>,37 public VirtualBoxBaseNEXT, 38 public VirtualBoxSupportErrorInfoImpl <SystemProperties, ISystemProperties>, 39 public VirtualBoxSupportTranslation <SystemProperties>, 40 40 VBOX_SCRIPTABLE_IMPL(ISystemProperties) 41 41 { -
trunk/src/VBox/Main/include/USBControllerImpl.h
r21622 r21686 44 44 class ATL_NO_VTABLE USBController : 45 45 public VirtualBoxBaseWithChildrenNEXT, 46 public VirtualBoxSupportErrorInfoImpl <USBController, IUSBController>,47 public VirtualBoxSupportTranslation <USBController>,46 public VirtualBoxSupportErrorInfoImpl <USBController, IUSBController>, 47 public VirtualBoxSupportTranslation <USBController>, 48 48 VBOX_SCRIPTABLE_IMPL(IUSBController) 49 49 { -
trunk/src/VBox/Main/include/USBDeviceImpl.h
r21622 r21686 33 33 */ 34 34 class ATL_NO_VTABLE OUSBDevice : 35 public VirtualBoxBase ,35 public VirtualBoxBaseNEXT, 36 36 public VirtualBoxSupportErrorInfoImpl<OUSBDevice, IUSBDevice>, 37 37 public VirtualBoxSupportTranslation<OUSBDevice>, -
trunk/src/VBox/Main/include/VFSExplorerImpl.h
r21622 r21686 30 30 31 31 class ATL_NO_VTABLE VFSExplorer : 32 public VirtualBoxBase ,33 public VirtualBoxSupportErrorInfoImpl <VFSExplorer, IVFSExplorer>,34 public VirtualBoxSupportTranslation <VFSExplorer>,32 public VirtualBoxBaseNEXT, 33 public VirtualBoxSupportErrorInfoImpl <VFSExplorer, IVFSExplorer>, 34 public VirtualBoxSupportTranslation <VFSExplorer>, 35 35 VBOX_SCRIPTABLE_IMPL(IVFSExplorer) 36 36 { -
trunk/src/VBox/Main/include/VRDPServerImpl.h
r21622 r21686 32 32 33 33 class ATL_NO_VTABLE VRDPServer : 34 public VirtualBoxBase ,35 public VirtualBoxSupportErrorInfoImpl <VRDPServer, IVRDPServer>,36 public VirtualBoxSupportTranslation <VRDPServer>,34 public VirtualBoxBaseNEXT, 35 public VirtualBoxSupportErrorInfoImpl <VRDPServer, IVRDPServer>, 36 public VirtualBoxSupportTranslation <VRDPServer>, 37 37 VBOX_SCRIPTABLE_IMPL(IVRDPServer) 38 38 { -
trunk/src/VBox/Main/include/VirtualBoxBase.h
r21622 r21686 466 466 //////////////////////////////////////////////////////////////////////////////// 467 467 468 /// @todo (dmik) remove after we switch to VirtualBoxBaseNEXT completely 469 /** 470 * Checks whether this object is ready or not. Objects are typically ready 471 * after they are successfully created by their parent objects and become 472 * not ready when the respective parent itself becomes not ready or gets 473 * destroyed while a reference to the child is still held by the caller 474 * (which prevents it from destruction). 475 * 476 * When this object is not ready, the macro sets error info and returns 477 * E_ACCESSDENIED (the translatable error message is defined in null context). 478 * Otherwise, the macro does nothing. 479 * 480 * This macro <b>must</b> be used at the beginning of all interface methods 481 * (right after entering the class lock) in classes derived from both 482 * VirtualBoxBase and VirtualBoxSupportErrorInfoImpl. 483 */ 484 #define CHECK_READY() \ 485 do { \ 486 if (!isReady()) \ 487 return setError (E_ACCESSDENIED, tr ("The object is not ready")); \ 488 } while (0) 489 468 490 /** 469 491 * Declares an empty constructor and destructor for the given class. … … 1218 1240 //////////////////////////////////////////////////////////////////////////////// 1219 1241 1242 /// @todo (dmik) remove after we switch to VirtualBoxBaseNEXT completely 1220 1243 class ATL_NO_VTABLE VirtualBoxBase 1221 1244 : virtual public VirtualBoxBaseProto … … 1229 1252 public: 1230 1253 VirtualBoxBase() 1231 {} 1232 1254 { 1255 mReady = false; 1256 } 1233 1257 virtual ~VirtualBoxBase() 1234 {} 1258 { 1259 } 1235 1260 1236 1261 /** … … 1241 1266 * method's implementation must call setReady (false), 1242 1267 */ 1243 virtual void uninit() 1244 {} 1268 virtual void uninit() {} 1269 1270 1271 // sets the ready state of the object 1272 void setReady(bool isReady) 1273 { 1274 mReady = isReady; 1275 } 1276 // get the ready state of the object 1277 bool isReady() 1278 { 1279 return mReady; 1280 } 1245 1281 1246 1282 static const char *translate (const char *context, const char *sourceText, 1247 1283 const char *comment = 0); 1284 1285 private: 1286 1287 // flag determining whether an object is ready 1288 // for usage, i.e. methods may be called 1289 bool mReady; 1290 // mutex semaphore to lock the object 1291 }; 1292 1293 /** 1294 * Temporary class to disable deprecated methods of VirtualBoxBase. 1295 * Can be used as a base for components that are completely switched to 1296 * the new locking scheme (VirtualBoxBaseProto). 1297 * 1298 * @todo remove after we switch to VirtualBoxBaseNEXT completely. 1299 */ 1300 class VirtualBoxBaseNEXT : public VirtualBoxBase 1301 { 1302 private: 1303 1304 void lock(); 1305 void unlock(); 1306 void setReady (bool isReady); 1307 bool isReady(); 1248 1308 }; 1249 1309 … … 1323 1383 1324 1384 template <class C> 1325 const char *VirtualBoxSupportTranslation <C>::sClassName = NULL;1385 const char *VirtualBoxSupportTranslation <C>::sClassName = NULL; 1326 1386 1327 1387 /** … … 1338 1398 const char *aComment = NULL) \ 1339 1399 { \ 1340 return VirtualBoxSupportTranslation <C>::tr (aSourceText, aComment); \1400 return VirtualBoxSupportTranslation <C>::tr (aSourceText, aComment); \ 1341 1401 } 1342 1402 … … 2023 2083 * has gone. 2024 2084 */ 2025 class VirtualBoxBaseWithChildrenNEXT : public VirtualBoxBase 2085 class VirtualBoxBaseWithChildrenNEXT : public VirtualBoxBaseNEXT 2026 2086 { 2027 2087 public: … … 2131 2191 void uninitDependentChildren(); 2132 2192 2133 VirtualBoxBase *getDependentChild(const ComPtr <IUnknown> &aUnk);2193 VirtualBoxBaseNEXT *getDependentChild (const ComPtr <IUnknown> &aUnk); 2134 2194 2135 2195 private: 2136 void doAddDependentChild(IUnknown *aUnk, VirtualBoxBase *aChild); 2196 2197 /// @todo temporarily reinterpret VirtualBoxBase * as VirtualBoxBaseNEXT * 2198 // until ported HardDisk and Progress to the new scheme. 2199 void doAddDependentChild (IUnknown *aUnk, VirtualBoxBase *aChild) 2200 { 2201 doAddDependentChild (aUnk, 2202 reinterpret_cast <VirtualBoxBaseNEXT *> (aChild)); 2203 } 2204 2205 void doAddDependentChild (IUnknown *aUnk, VirtualBoxBaseNEXT *aChild); 2137 2206 void doRemoveDependentChild (IUnknown *aUnk); 2138 2207 2139 typedef std::map <IUnknown*, VirtualBoxBase*> DependentChildren;2208 typedef std::map <IUnknown *, VirtualBoxBaseNEXT *> DependentChildren; 2140 2209 DependentChildren mDependentChildren; 2141 2210 }; 2142 2211 2143 2212 //////////////////////////////////////////////////////////////////////////////// 2213 2214 /** 2215 * Base class to track component's children of some particular type. 2216 * 2217 * This class is similar to VirtualBoxBaseWithChildren, with the exception 2218 * that all children must be of the same type. For this reason, it's not 2219 * necessary to use a map to store children, so a list is used instead. 2220 * 2221 * As opposed to VirtualBoxBaseWithChildren, children added by 2222 * #addDependentChild() are <b>strongly</b> referenced, so that they cannot 2223 * be externally destructed until #removeDependentChild() is called. 2224 * 2225 * Also, this class doesn't have the 2226 * VirtualBoxBaseWithChildrenNEXT::getDependentChild() method because it would 2227 * be not fast for long lists. 2228 * 2229 * @param C type of child objects (must inherit VirtualBoxBase AND 2230 * implement some interface) 2231 * 2232 * @deprecated Use VirtualBoxBaseWithTypedChildrenNEXT for new classes. 2233 */ 2234 template <class C> 2235 class VirtualBoxBaseWithTypedChildren : public VirtualBoxBase 2236 { 2237 public: 2238 2239 typedef std::list <ComObjPtr <C> > DependentChildren; 2240 2241 VirtualBoxBaseWithTypedChildren() : mInUninit (false) {} 2242 2243 virtual ~VirtualBoxBaseWithTypedChildren() {} 2244 2245 /** 2246 * Adds the given child to the list of dependent children. 2247 * Must be called from the child's init() method, 2248 * from under the child's lock. 2249 * 2250 * @param C the child object to add (must inherit VirtualBoxBase AND 2251 * implement some interface) 2252 */ 2253 void addDependentChild (C *child) 2254 { 2255 AssertReturn (child, (void) 0); 2256 2257 AutoWriteLock alock (mMapLock); 2258 if (mInUninit) 2259 return; 2260 2261 mDependentChildren.push_back (child); 2262 } 2263 2264 /** 2265 * Removes the given child from the list of dependent children. 2266 * Must be called from the child's uninit() method, 2267 * under the child's lock. 2268 * 2269 * @param C the child object to remove (must inherit VirtualBoxBase AND 2270 * implement some interface) 2271 */ 2272 void removeDependentChild (C *child) 2273 { 2274 AssertReturn (child, (void) 0); 2275 2276 AutoWriteLock alock (mMapLock); 2277 if (mInUninit) 2278 return; 2279 2280 mDependentChildren.remove (child); 2281 } 2282 2283 protected: 2284 2285 /** 2286 * Returns an internal lock handle to lock the list of children 2287 * returned by #dependentChildren() using AutoReadLock/AutoWriteLock: 2288 * <code> 2289 * AutoReadLock alock (dependentChildrenLock()); 2290 * </code> 2291 * 2292 * This is necessary for example to access the list of children returned by 2293 * #dependentChildren(). 2294 */ 2295 RWLockHandle *dependentChildrenLock() const { return &mMapLock; } 2296 2297 /** 2298 * Returns the read-only list of all dependent children. 2299 * @note 2300 * Access the returned list (iterate, get size etc.) only after 2301 * doing |AutoWriteLock alock (dependentChildrenLock());|! 2302 */ 2303 const DependentChildren &dependentChildren() const { return mDependentChildren; } 2304 2305 /** 2306 * Uninitializes all dependent children registered with #addDependentChild(). 2307 * 2308 * @note 2309 * This method will call uninit() methods of children. If these methods 2310 * access the parent object, uninitDependentChildren() must be called 2311 * either at the beginning of the parent uninitialization sequence (when 2312 * it is still operational) or after setReady(false) is called to 2313 * indicate the parent is out of action. 2314 */ 2315 void uninitDependentChildren() 2316 { 2317 AutoWriteLock alock (this); 2318 AutoWriteLock mapLock (mMapLock); 2319 2320 if (mDependentChildren.size()) 2321 { 2322 // set flag to ignore #removeDependentChild() called from child->uninit() 2323 mInUninit = true; 2324 2325 // leave the locks to let children waiting for #removeDependentChild() run 2326 mapLock.leave(); 2327 alock.leave(); 2328 2329 for (typename DependentChildren::iterator it = mDependentChildren.begin(); 2330 it != mDependentChildren.end(); ++ it) 2331 { 2332 C *child = (*it); 2333 Assert (child); 2334 if (child) 2335 child->uninit(); 2336 } 2337 mDependentChildren.clear(); 2338 2339 alock.enter(); 2340 mapLock.enter(); 2341 2342 mInUninit = false; 2343 } 2344 } 2345 2346 /** 2347 * Removes (detaches) all dependent children registered with 2348 * #addDependentChild(), without uninitializing them. 2349 * 2350 * @note This method must be called from under the main object's lock 2351 */ 2352 void removeDependentChildren() 2353 { 2354 AutoWriteLock alock (mMapLock); 2355 mDependentChildren.clear(); 2356 } 2357 2358 private: 2359 2360 DependentChildren mDependentChildren; 2361 2362 bool mInUninit; 2363 mutable RWLockHandle mMapLock; 2364 }; 2144 2365 2145 2366 //////////////////////////////////////////////////////////////////////////////// … … 2171 2392 */ 2172 2393 template <class C> 2173 class VirtualBoxBaseWithTypedChildren : public VirtualBoxBase2394 class VirtualBoxBaseWithTypedChildrenNEXT : public VirtualBoxBaseNEXT 2174 2395 { 2175 2396 public: … … 2177 2398 typedef std::list <ComObjPtr <C> > DependentChildren; 2178 2399 2179 VirtualBoxBaseWithTypedChildren() 2180 {} 2181 2182 virtual ~VirtualBoxBaseWithTypedChildren() 2183 {} 2400 VirtualBoxBaseWithTypedChildrenNEXT() {} 2401 2402 virtual ~VirtualBoxBaseWithTypedChildrenNEXT() {} 2184 2403 2185 2404 /** -
trunk/src/VBox/Main/include/VirtualBoxImpl.h
r21622 r21686 64 64 class ATL_NO_VTABLE VirtualBox : 65 65 public VirtualBoxBaseWithChildrenNEXT, 66 public VirtualBoxSupportErrorInfoImpl <VirtualBox, IVirtualBox>,67 public VirtualBoxSupportTranslation <VirtualBox>,66 public VirtualBoxSupportErrorInfoImpl <VirtualBox, IVirtualBox>, 67 public VirtualBoxSupportTranslation <VirtualBox>, 68 68 VBOX_SCRIPTABLE_IMPL(IVirtualBox) 69 69 #ifdef RT_OS_WINDOWS … … 359 359 RWLockHandle *hardDiskTreeLockHandle() { return &mHardDiskTreeLockHandle; } 360 360 361 RWLockHandle *snapshotTreeLockHandle() { return &mSnapshotTreeLockHandle; }362 363 361 /* for VirtualBoxSupportErrorInfoImpl */ 364 362 static const wchar_t *getComponentName() { return L"VirtualBox"; } … … 509 507 RWLockHandle mHardDiskTreeLockHandle; 510 508 RWLockHandle mChildrenMapLockHandle; 511 RWLockHandle mSnapshotTreeLockHandle;512 509 513 510 static Bstr sVersion;
Note:
See TracChangeset
for help on using the changeset viewer.