Changeset 78297 in vbox for trunk/src/VBox
- Timestamp:
- Apr 25, 2019 5:05:03 PM (6 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/medium
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumEnumerator.cpp
r76774 r78297 32 32 33 33 34 template<class T> 35 static QStringList toStringList(const QList<T> &list) 34 template<class T> static QStringList toStringList(const QList<T> &list) 36 35 { 37 36 QStringList l; … … 60 59 61 60 /** Contains medium enumeration task body. */ 62 v oid run()61 virtual void run() /* override */ 63 62 { 64 63 /* Get medium: */ 65 UIMedium medium = property("medium").value<UIMedium>();64 UIMedium guiMedium = property("medium").value<UIMedium>(); 66 65 /* Enumerate it: */ 67 medium.blockAndQueryState();66 guiMedium.blockAndQueryState(); 68 67 /* Put it back: */ 69 setProperty("medium", QVariant::fromValue( medium));68 setProperty("medium", QVariant::fromValue(guiMedium)); 70 69 } 71 70 }; … … 79 78 80 79 /* Prepare Main event handlers: */ 81 connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigMachineDataChange, this, &UIMediumEnumerator::sltHandleMachineUpdate); 82 connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigSnapshotTake, this, &UIMediumEnumerator::sltHandleMachineUpdate); 83 connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigSnapshotDelete, this, &UIMediumEnumerator::sltHandleSnapshotDeleted); 84 connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigSnapshotChange, this, &UIMediumEnumerator::sltHandleMachineUpdate); 85 connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigSnapshotRestore, this, &UIMediumEnumerator::sltHandleSnapshotDeleted); 86 connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigMachineRegistered, this, &UIMediumEnumerator::sltHandleMachineRegistration); 80 connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigMachineDataChange, 81 this, &UIMediumEnumerator::sltHandleMachineUpdate); 82 connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigSnapshotTake, 83 this, &UIMediumEnumerator::sltHandleMachineUpdate); 84 connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigSnapshotDelete, 85 this, &UIMediumEnumerator::sltHandleSnapshotDeleted); 86 connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigSnapshotChange, 87 this, &UIMediumEnumerator::sltHandleMachineUpdate); 88 connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigSnapshotRestore, 89 this, &UIMediumEnumerator::sltHandleSnapshotDeleted); 90 connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigMachineRegistered, 91 this, &UIMediumEnumerator::sltHandleMachineRegistration); 87 92 88 93 /* Listen for global thread-pool: */ 89 connect(vboxGlobal().threadPool(), &UIThreadPool::sigTaskComplete, this, &UIMediumEnumerator::sltHandleMediumEnumerationTaskComplete); 94 connect(vboxGlobal().threadPool(), &UIThreadPool::sigTaskComplete, 95 this, &UIMediumEnumerator::sltHandleMediumEnumerationTaskComplete); 90 96 } 91 97 … … 96 102 } 97 103 98 UIMedium UIMediumEnumerator::medium(const QUuid &uMediumID) 104 UIMedium UIMediumEnumerator::medium(const QUuid &uMediumID) const 99 105 { 100 106 /* Search through current medium-map for the medium with passed ID: */ 101 107 if (m_media.contains(uMediumID)) 102 return m_media [uMediumID];108 return m_media.value(uMediumID); 103 109 /* Return NULL medium otherwise: */ 104 110 return UIMedium(); 105 111 } 106 112 107 void UIMediumEnumerator::createMedium(const UIMedium & medium)113 void UIMediumEnumerator::createMedium(const UIMedium &guiMedium) 108 114 { 109 115 /* Get medium ID: */ 110 const QUuid uMediumID = medium.id();116 const QUuid uMediumID = guiMedium.id(); 111 117 112 118 /* Do not create UIMedium(s) with incorrect ID: */ 113 119 AssertReturnVoid(!uMediumID.isNull()); 114 AssertReturnVoid(uMediumID != UIMedium::nullID());115 120 /* Make sure medium doesn't exists already: */ 116 121 AssertReturnVoid(!m_media.contains(uMediumID)); 117 122 118 123 /* Insert medium: */ 119 m_media[uMediumID] = medium;124 m_media[uMediumID] = guiMedium; 120 125 LogRel(("GUI: UIMediumEnumerator: Medium with key={%s} created\n", uMediumID.toString().toUtf8().constData())); 121 126 … … 128 133 /* Do not delete UIMedium(s) with incorrect ID: */ 129 134 AssertReturnVoid(!uMediumID.isNull()); 130 AssertReturnVoid(uMediumID != UIMedium::nullID());131 135 /* Make sure medium still exists: */ 132 136 AssertReturnVoid(m_media.contains(uMediumID)); … … 140 144 } 141 145 142 void UIMediumEnumerator::enumerateMedia(const CMediumVector & mediaList/* = CMediumVector() */)146 void UIMediumEnumerator::enumerateMedia(const CMediumVector &inputMedia /* = CMediumVector() */) 143 147 { 144 148 /* Make sure we are not already in progress: */ … … 150 154 addNullMediumToMap(media); 151 155 /* If @p mediaList is empty we start the media enumeration with all known media: */ 152 if ( mediaList.isEmpty())156 if (inputMedia.isEmpty()) 153 157 { 154 158 addMediaToMap(vboxGlobal().virtualBox().GetHardDisks(), media); … … 162 166 addMediaToMap(vboxGlobal().host().GetDVDDrives(), media); 163 167 addMediaToMap(vboxGlobal().virtualBox().GetDVDImages(), media); 164 addMediaToMap( mediaList, media);168 addMediaToMap(inputMedia, media); 165 169 } 166 170 if (VBoxGlobal::isCleaningUp()) … … 184 188 /* Start enumeration for UIMedium(s) with correct ID: */ 185 189 foreach (const QUuid &uMediumID, m_media.keys()) 186 if (!uMediumID.isNull() && uMediumID != UIMedium::nullID())190 if (!uMediumID.isNull()) 187 191 createMediumEnumerationTask(m_media[uMediumID]); 188 192 } … … 305 309 306 310 /* Get enumerated UIMedium: */ 307 const UIMedium uimedium = pTask->property("medium").value<UIMedium>(); 308 const QUuid uUIMediumKey = uimedium.key(); 309 LogRel2(("GUI: UIMediumEnumerator: Medium with key={%s} enumerated\n", uUIMediumKey.toString().toUtf8().constData())); 311 const UIMedium guiMedium = pTask->property("medium").value<UIMedium>(); 312 const QUuid uMediumKey = guiMedium.key(); 313 LogRel2(("GUI: UIMediumEnumerator: Medium with key={%s} enumerated\n", 314 uMediumKey.toString().toUtf8().constData())); 310 315 311 316 /* Remove task from internal set: */ … … 313 318 314 319 /* Make sure such UIMedium still exists: */ 315 if (!m_media.contains(uUIMediumKey)) 316 { 317 LogRel2(("GUI: UIMediumEnumerator: Medium with key={%s} already deleted by a third party\n", uUIMediumKey.toString().toUtf8().constData())); 320 if (!m_media.contains(uMediumKey)) 321 { 322 LogRel2(("GUI: UIMediumEnumerator: Medium with key={%s} already deleted by a third party\n", 323 uMediumKey.toString().toUtf8().constData())); 318 324 return; 319 325 } 320 326 321 327 /* Check if UIMedium ID was changed: */ 322 const QUuid u UIMediumID = uimedium.id();328 const QUuid uMediumID = guiMedium.id(); 323 329 /* UIMedium ID was changed to nullID: */ 324 if (u UIMediumID == UIMedium::nullID())330 if (uMediumID == UIMedium::nullID()) 325 331 { 326 332 /* Delete this medium: */ 327 m_media.remove(uUIMediumKey); 328 LogRel2(("GUI: UIMediumEnumerator: Medium with key={%s} closed and deleted (after enumeration)\n", uUIMediumKey.toString().toUtf8().constData())); 333 m_media.remove(uMediumKey); 334 LogRel2(("GUI: UIMediumEnumerator: Medium with key={%s} closed and deleted (after enumeration)\n", 335 uMediumKey.toString().toUtf8().constData())); 329 336 330 337 /* And notify listener about delete: */ 331 emit sigMediumDeleted(u UIMediumKey);338 emit sigMediumDeleted(uMediumKey); 332 339 } 333 340 /* UIMedium ID was changed to something proper: */ 334 else if (u UIMediumID != uUIMediumKey)341 else if (uMediumID != uMediumKey) 335 342 { 336 343 /* We have to reinject enumerated medium: */ 337 m_media.remove(uUIMediumKey); 338 m_media[uUIMediumID] = uimedium; 339 m_media[uUIMediumID].setKey(uUIMediumID); 340 LogRel2(("GUI: UIMediumEnumerator: Medium with key={%s} has it changed to {%s}\n", uUIMediumKey.toString().toUtf8().constData(), 341 uUIMediumID.toString().toUtf8().constData())); 344 m_media.remove(uMediumKey); 345 m_media[uMediumID] = guiMedium; 346 m_media[uMediumID].setKey(uMediumID); 347 LogRel2(("GUI: UIMediumEnumerator: Medium with key={%s} has it changed to {%s}\n", 348 uMediumKey.toString().toUtf8().constData(), 349 uMediumID.toString().toUtf8().constData())); 342 350 343 351 /* And notify listener about delete/create: */ 344 emit sigMediumDeleted(u UIMediumKey);345 emit sigMediumCreated(u UIMediumID);352 emit sigMediumDeleted(uMediumKey); 353 emit sigMediumCreated(uMediumID); 346 354 } 347 355 /* UIMedium ID was not changed: */ … … 349 357 { 350 358 /* Just update enumerated medium: */ 351 m_media[uUIMediumID] = uimedium; 352 LogRel2(("GUI: UIMediumEnumerator: Medium with key={%s} updated\n", uUIMediumID.toString().toUtf8().constData())); 359 m_media[uMediumID] = guiMedium; 360 LogRel2(("GUI: UIMediumEnumerator: Medium with key={%s} updated\n", 361 uMediumID.toString().toUtf8().constData())); 353 362 354 363 /* And notify listener about update: */ 355 emit sigMediumEnumerated(u UIMediumID);364 emit sigMediumEnumerated(uMediumID); 356 365 } 357 366 … … 373 382 } 374 383 375 void UIMediumEnumerator::createMediumEnumerationTask(const UIMedium & medium)384 void UIMediumEnumerator::createMediumEnumerationTask(const UIMedium &guiMedium) 376 385 { 377 386 /* Prepare medium-enumeration task: */ 378 UITask *pTask = new UITaskMediumEnumeration( medium);387 UITask *pTask = new UITaskMediumEnumeration(guiMedium); 379 388 /* Append to internal set: */ 380 389 m_tasks << pTask; … … 387 396 /* Insert NULL uimedium to the passed uimedium map. 388 397 * Get existing one from the previous map if any. */ 389 QUuid uNullMediumID = UIMedium::nullID(); 390 UIMedium uimedium = m_media.contains(uNullMediumID) ? m_media[uNullMediumID] : UIMedium(); 391 media.insert(uNullMediumID, uimedium); 398 const UIMedium guiMedium = m_media.contains(UIMedium::nullID()) 399 ? m_media[UIMedium::nullID()] 400 : UIMedium(); 401 media.insert(UIMedium::nullID(), guiMedium); 392 402 } 393 403 … … 396 406 /* Insert hard-disks to the passed uimedium map. 397 407 * Get existing one from the previous map if any. */ 398 foreach ( CMedium medium, inputMedia)408 foreach (const CMedium &comMedium, inputMedia) 399 409 { 400 410 /* If VBoxGlobal is cleaning up, abort immediately: */ … … 403 413 404 414 /* Prepare uimedium on the basis of current medium: */ 405 QUuid uMediumID = medium.GetId();406 UIMedium uimedium = m_media.contains(uMediumID) ? m_media[uMediumID] :407 UIMedium(medium, UIMediumDefs::mediumTypeToLocal(medium.GetDeviceType()));408 415 const QUuid uMediumID = comMedium.GetId(); 416 const UIMedium guiMedium = m_media.contains(uMediumID) 417 ? m_media.value(uMediumID) 418 : UIMedium(comMedium, UIMediumDefs::mediumTypeToLocal(comMedium.GetDeviceType())); 409 419 /* Insert uimedium into map: */ 410 outputMedia.insert( uimedium.id(), uimedium);420 outputMedia.insert(guiMedium.id(), guiMedium); 411 421 412 422 /* Insert medium children into map too: */ 413 addMediaToMap( medium.GetChildren(), outputMedia);423 addMediaToMap(comMedium.GetChildren(), outputMedia); 414 424 } 415 425 } … … 421 431 * @param fTakeIntoAccountCurrentStateOnly defines whether we should take into accound current VM state only. 422 432 */ 423 void UIMediumEnumerator::calculateCachedUsage(const QUuid &uMachineID, QList<QUuid> &previousUIMediumIDs, const bool fTakeIntoAccountCurrentStateOnly) const 433 void UIMediumEnumerator::calculateCachedUsage(const QUuid &uMachineID, 434 QList<QUuid> &previousUIMediumIDs, 435 const bool fTakeIntoAccountCurrentStateOnly) const 424 436 { 425 437 /* For each the UIMedium ID cache have: */ 426 foreach (const QUuid &u MediumID, mediumIDs())438 foreach (const QUuid &uUIMediumID, mediumIDs()) 427 439 { 428 440 /* Get corresponding UIMedium: */ 429 const UIMedium & uimedium = m_media[uMediumID];441 const UIMedium &guiMedium = m_media[uUIMediumID]; 430 442 /* Get the list of the machines this UIMedium attached to. 431 443 * Take into account current-state only if necessary. */ 432 const QList<QUuid> &machineIDs = fTakeIntoAccountCurrentStateOnly ? 433 uimedium.curStateMachineIds() : uimedium.machineIds(); 444 const QList<QUuid> &machineIDs = fTakeIntoAccountCurrentStateOnly 445 ? guiMedium.curStateMachineIds() 446 : guiMedium.machineIds(); 434 447 /* Add this UIMedium ID to previous usage if necessary: */ 435 448 if (machineIDs.contains(uMachineID)) 436 previousUIMediumIDs.append(u MediumID);449 previousUIMediumIDs.append(uUIMediumID); 437 450 } 438 451 } … … 445 458 * @param fTakeIntoAccountCurrentStateOnly defines whether we should take into accound current VM state only. 446 459 */ 447 void UIMediumEnumerator::calculateActualUsage(const QUuid &uMachineID, CMediumMap ¤tCMediums, QList<QUuid> ¤tCMediumIDs, const bool fTakeIntoAccountCurrentStateOnly) const 460 void UIMediumEnumerator::calculateActualUsage(const QUuid &uMachineID, 461 CMediumMap ¤tCMediums, 462 QList<QUuid> ¤tCMediumIDs, 463 const bool fTakeIntoAccountCurrentStateOnly) const 448 464 { 449 465 /* Search for corresponding machine: */ 450 CMachine machine = vboxGlobal().virtualBox().FindMachine(uMachineID.toString());451 if ( machine.isNull())466 CMachine comMachine = vboxGlobal().virtualBox().FindMachine(uMachineID.toString()); 467 if (comMachine.isNull()) 452 468 { 453 469 /* Usually means the machine is already gone, not harmful. */ … … 457 473 /* Calculate actual usage starting from root-snapshot if necessary: */ 458 474 if (!fTakeIntoAccountCurrentStateOnly) 459 calculateActualUsage(machine.FindSnapshot(QString()), currentCMediums, currentCMediumIDs); 475 calculateActualUsage(comMachine.FindSnapshot(QString()), currentCMediums, currentCMediumIDs); 476 460 477 /* Calculate actual usage for current machine state: */ 461 calculateActualUsage( machine, currentCMediums, currentCMediumIDs);478 calculateActualUsage(comMachine, currentCMediums, currentCMediumIDs); 462 479 } 463 480 … … 468 485 * @param currentCMediumIDs receives CMedium IDs used in actual data. 469 486 */ 470 void UIMediumEnumerator::calculateActualUsage(const CSnapshot &snapshot, CMediumMap ¤tCMediums, QList<QUuid> ¤tCMediumIDs) const 487 void UIMediumEnumerator::calculateActualUsage(const CSnapshot &comSnapshot, 488 CMediumMap ¤tCMediums, 489 QList<QUuid> ¤tCMediumIDs) const 471 490 { 472 491 /* Check passed snapshot: */ 473 if ( snapshot.isNull())492 if (comSnapshot.isNull()) 474 493 return; 475 494 476 495 /* Calculate actual usage for passed snapshot machine: */ 477 calculateActualUsage( snapshot.GetMachine(), currentCMediums, currentCMediumIDs);496 calculateActualUsage(comSnapshot.GetMachine(), currentCMediums, currentCMediumIDs); 478 497 479 498 /* Iterate through passed snapshot children: */ 480 foreach (const CSnapshot &c hildSnapshot, snapshot.GetChildren())481 calculateActualUsage(c hildSnapshot, currentCMediums, currentCMediumIDs);499 foreach (const CSnapshot &comChildSnapshot, comSnapshot.GetChildren()) 500 calculateActualUsage(comChildSnapshot, currentCMediums, currentCMediumIDs); 482 501 } 483 502 … … 488 507 * @param currentCMediumIDs receives CMedium IDs used in actual data. 489 508 */ 490 void UIMediumEnumerator::calculateActualUsage(const CMachine &machine, CMediumMap ¤tCMediums, QList<QUuid> ¤tCMediumIDs) const 509 void UIMediumEnumerator::calculateActualUsage(const CMachine &comMachine, 510 CMediumMap ¤tCMediums, 511 QList<QUuid> ¤tCMediumIDs) const 491 512 { 492 513 /* Check passed machine: */ 493 AssertReturnVoid(! machine.isNull());514 AssertReturnVoid(!comMachine.isNull()); 494 515 495 516 /* For each the attachment machine have: */ 496 foreach (const CMediumAttachment & attachment, machine.GetMediumAttachments())517 foreach (const CMediumAttachment &comAttachment, comMachine.GetMediumAttachments()) 497 518 { 498 519 /* Get corresponding CMedium: */ 499 CMedium c medium = attachment.GetMedium();500 if (!c medium.isNull())520 CMedium comMedium = comAttachment.GetMedium(); 521 if (!comMedium.isNull()) 501 522 { 502 523 /* Make sure that CMedium was not yet closed: */ 503 const QUuid uCMediumID = cmedium.GetId();504 if (c medium.isOk() && !uCMediumID.isNull())524 const QUuid &uCMediumID = comMedium.GetId(); 525 if (comMedium.isOk() && !uCMediumID.isNull()) 505 526 { 506 527 /* Add this CMedium to current usage: */ 507 currentCMediums.insert(uCMediumID, c medium);528 currentCMediums.insert(uCMediumID, comMedium); 508 529 currentCMediumIDs.append(uCMediumID); 509 530 } … … 519 540 { 520 541 /* For each of previously used UIMedium ID: */ 521 foreach (const QUuid &u MediumID, previousUIMediumIDs)542 foreach (const QUuid &uUIMediumID, previousUIMediumIDs) 522 543 { 523 544 /* Make sure this ID still in our map: */ 524 if (m_media.contains(u MediumID))545 if (m_media.contains(uUIMediumID)) 525 546 { 526 547 /* Get corresponding UIMedium: */ 527 UIMedium & uimedium = m_media[uMediumID];548 UIMedium &guiMedium = m_media[uUIMediumID]; 528 549 529 550 /* If corresponding CMedium still exists: */ 530 CMedium c medium = uimedium.medium();531 if (!c medium.GetId().isNull() && cmedium.isOk())551 CMedium comMedium = guiMedium.medium(); 552 if (!comMedium.GetId().isNull() && comMedium.isOk()) 532 553 { 533 554 /* Refresh UIMedium parent first of all: */ 534 uimedium.updateParentID();555 guiMedium.updateParentID(); 535 556 /* Enumerate corresponding UIMedium: */ 536 createMediumEnumerationTask( uimedium);557 createMediumEnumerationTask(guiMedium); 537 558 } 538 559 /* If corresponding CMedium was closed already: */ … … 540 561 { 541 562 /* Uncache corresponding UIMedium: */ 542 m_media.remove(uMediumID); 543 LogRel2(("GUI: UIMediumEnumerator: Medium with key={%s} uncached\n", uMediumID.toString().toUtf8().constData())); 563 m_media.remove(uUIMediumID); 564 LogRel2(("GUI: UIMediumEnumerator: Medium with key={%s} uncached\n", 565 uUIMediumID.toString().toUtf8().constData())); 544 566 545 567 /* And notify listeners: */ 546 emit sigMediumDeleted(u MediumID);568 emit sigMediumDeleted(uUIMediumID); 547 569 } 548 570 } … … 555 577 * @param currentCMediumIDs reflects CMedium IDs used in actual data. 556 578 */ 557 void UIMediumEnumerator::recacheFromActualUsage(const CMediumMap ¤tCMediums, const QList<QUuid> ¤tCMediumIDs) 579 void UIMediumEnumerator::recacheFromActualUsage(const CMediumMap ¤tCMediums, 580 const QList<QUuid> ¤tCMediumIDs) 558 581 { 559 582 /* For each of currently used CMedium ID: */ … … 564 587 { 565 588 /* Create new UIMedium: */ 566 const CMedium &c medium = currentCMediums[uCMediumID];567 UIMedium uimedium(cmedium, UIMediumDefs::mediumTypeToLocal(cmedium.GetDeviceType()));568 QUuid uUIMediumKey = uimedium.key();589 const CMedium &comMedium = currentCMediums[uCMediumID]; 590 const UIMedium guiMedium(comMedium, UIMediumDefs::mediumTypeToLocal(comMedium.GetDeviceType())); 591 const QUuid &uUIMediumKey = guiMedium.key(); 569 592 570 593 /* Cache created UIMedium: */ 571 m_media.insert(uUIMediumKey, uimedium); 572 LogRel2(("GUI: UIMediumEnumerator: Medium with key={%s} cached\n", uUIMediumKey.toString().toUtf8().constData())); 594 m_media.insert(uUIMediumKey, guiMedium); 595 LogRel2(("GUI: UIMediumEnumerator: Medium with key={%s} cached\n", 596 uUIMediumKey.toString().toUtf8().constData())); 573 597 574 598 /* And notify listeners: */ -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumEnumerator.h
r76581 r78297 62 62 /* API: Medium-access stuff: */ 63 63 QList<QUuid> mediumIDs() const; 64 UIMedium medium(const QUuid &uMediumID) ;65 void createMedium(const UIMedium & medium);64 UIMedium medium(const QUuid &uMediumID) const; 65 void createMedium(const UIMedium &guiMedium); 66 66 void deleteMedium(const QUuid &uMediumID); 67 67 68 68 /* API: Medium-enumeration stuff: */ 69 69 bool isMediumEnumerationInProgress() const { return m_fMediumEnumerationInProgress; } 70 void enumerateMedia(const CMediumVector & mediaList= CMediumVector());70 void enumerateMedia(const CMediumVector &inputMedia = CMediumVector()); 71 71 void refreshMedia(); 72 72 … … 89 89 90 90 /* Helpers: Medium-enumeration stuff: */ 91 void createMediumEnumerationTask(const UIMedium & medium);92 void addNullMediumToMap(UIMediumMap & media);91 void createMediumEnumerationTask(const UIMedium &guiMedium); 92 void addNullMediumToMap(UIMediumMap &outputMedia); 93 93 void addMediaToMap(const CMediumVector &inputMedia, UIMediumMap &outputMedia); 94 94 95 95 /* Helpers: Medium re-caching stuff: */ 96 void calculateCachedUsage(const QUuid &uMachineID, QList<QUuid> &previousUIMediumIDs, const bool fTakeIntoAccountCurrentStateOnly) const; 97 void calculateActualUsage(const QUuid &uMachineID, CMediumMap ¤tCMediums, QList<QUuid> ¤tCMediumIDs, const bool fTakeIntoAccountCurrentStateOnly) const; 98 void calculateActualUsage(const CSnapshot &snapshot, CMediumMap ¤tCMediums, QList<QUuid> ¤tCMediumIDs) const; 99 void calculateActualUsage(const CMachine &machine, CMediumMap ¤tCMediums, QList<QUuid> ¤tCMediumIDs) const; 96 void calculateCachedUsage(const QUuid &uMachineID, 97 QList<QUuid> &previousUIMediumIDs, 98 const bool fTakeIntoAccountCurrentStateOnly) const; 99 void calculateActualUsage(const QUuid &uMachineID, 100 CMediumMap ¤tCMediums, 101 QList<QUuid> ¤tCMediumIDs, 102 const bool fTakeIntoAccountCurrentStateOnly) const; 103 void calculateActualUsage(const CSnapshot &comSnapshot, 104 CMediumMap ¤tCMediums, 105 QList<QUuid> ¤tCMediumIDs) const; 106 void calculateActualUsage(const CMachine &comMachine, 107 CMediumMap ¤tCMediums, 108 QList<QUuid> ¤tCMediumIDs) const; 100 109 void recacheFromCachedUsage(const QList<QUuid> &previousUIMediumIDs); 101 void recacheFromActualUsage(const CMediumMap ¤tCMediums, const QList<QUuid> ¤tCMediumIDs); 110 void recacheFromActualUsage(const CMediumMap ¤tCMediums, 111 const QList<QUuid> ¤tCMediumIDs); 102 112 103 113 /* Variables: */ 104 bool m_fMediumEnumerationInProgress;105 QSet<UITask*> m_tasks;106 UIMediumMap m_media;114 bool m_fMediumEnumerationInProgress; 115 QSet<UITask*> m_tasks; 116 UIMediumMap m_media; 107 117 }; 108 118
Note:
See TracChangeset
for help on using the changeset viewer.