- Timestamp:
- Mar 3, 2009 9:16:15 AM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 43608
- Location:
- trunk/src/VBox
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp
r17078 r17260 66 66 67 67 /* get the children */ 68 ComPtr<ISnapshotCollection> coll; 69 rootSnapshot->COMGETTER(Children)(coll.asOutParam()); 70 if (coll) 71 { 72 ComPtr<ISnapshotEnumerator> enumerator; 73 coll->Enumerate(enumerator.asOutParam()); 74 ULONG index = 0; 75 BOOL hasMore = FALSE; 76 while (enumerator->HasMore(&hasMore), hasMore) 77 { 78 ComPtr<ISnapshot> snapshot; 79 enumerator->GetNext(snapshot.asOutParam()); 68 SafeIfaceArray <ISnapshot> coll; 69 rootSnapshot->COMGETTER(Children)(ComSafeArrayAsOutParam(coll)); 70 if (!coll.isNull()) 71 { 72 for (size_t index = 0; index < coll.size(); ++index) 73 { 74 ComPtr<ISnapshot> snapshot = coll[index]; 80 75 if (snapshot) 81 76 { … … 88 83 showSnapshots(snapshot, details, newPrefix, level + 1); 89 84 } 90 index++;91 85 } 92 86 } -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp
r17255 r17260 2671 2671 regExp.cap (1).toInt() : maxSnapShotIndex; 2672 2672 /* Traversing to the next child */ 2673 index = index.GetChildren() .GetItemAt (0);2673 index = index.GetChildren()[0]; 2674 2674 } 2675 2675 dlg.mLeName->setText (snapShotName.arg (maxSnapShotIndex + 1)); -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxSnapshotsWgt.cpp
r13580 r17260 800 800 } 801 801 802 CSnapshot Enumerator en = aSnapshot.GetChildren().Enumerate();803 while (en.HasMore())804 { 805 CSnapshot sn = en.GetNext();802 CSnapshotVector snapvec = aSnapshot.GetChildren(); 803 for (int i = 0; i < snapvec.size(); ++i) 804 { 805 CSnapshot sn = snapvec[i]; 806 806 populateSnapshots (sn, si); 807 807 } -
trunk/src/VBox/Main/SnapshotImpl.cpp
r15051 r17260 284 284 } 285 285 286 STDMETHODIMP Snapshot::COMGETTER(Children) ( ISnapshotCollection **aChildren)287 { 288 CheckComArgOut PointerValid(aChildren);286 STDMETHODIMP Snapshot::COMGETTER(Children) (ComSafeArrayOut (ISnapshot *, aChildren)) 287 { 288 CheckComArgOutSafeArrayPointerValid(aChildren); 289 289 290 290 AutoWriteLock alock (this); … … 293 293 AutoWriteLock chLock (childrenLock ()); 294 294 295 ComObjPtr <SnapshotCollection> collection; 296 collection.createObject(); 297 collection->init (children()); 298 collection.queryInterfaceTo (aChildren); 295 SafeIfaceArray <ISnapshot> collection (children()); 296 collection.detachTo (ComSafeArrayOutArg (aChildren)); 299 297 300 298 return S_OK; -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r17255 r17260 7457 7457 --> 7458 7458 7459 <enumerator7460 name="ISnapshotEnumerator" type="ISnapshot"7461 uuid="25cfa2a4-1f1d-4f05-9658-b7a5894ef1a3"7462 />7463 7464 <collection7465 name="ISnapshotCollection" type="ISnapshot"7466 enumerator="ISnapshotEnumerator"7467 uuid="23852e3c-94cd-4801-ab05-ed35675b3894"7468 readonly="yes"7469 />7470 7471 7459 <interface 7472 7460 name="ISnapshot" extends="$unknown" 7473 uuid=" 9f1bbf79-13b0-4da2-abba-4a992c65c083"7461 uuid="5db6b1d9-c76b-4424-a6f4-8257f642d6ea" 7474 7462 wsmap="managed" 7475 7463 > … … 7664 7652 </attribute> 7665 7653 7666 <attribute name="children" type="ISnapshot Collection" readonly="yes">7654 <attribute name="children" type="ISnapshot" readonly="yes" safearray="yes"> 7667 7655 <desc> 7668 7656 Child snapshots (all snapshots having this one as a parent). -
trunk/src/VBox/Main/include/SnapshotImpl.h
r15051 r17260 87 87 STDMETHOD(COMGETTER(Machine)) (IMachine **aMachine); 88 88 STDMETHOD(COMGETTER(Parent)) (ISnapshot **aParent); 89 STDMETHOD(COMGETTER(Children)) ( ISnapshotCollection **aChildren);89 STDMETHOD(COMGETTER(Children)) (ComSafeArrayOut (ISnapshot *, aChildren)); 90 90 91 91 // ISnapshot methods … … 125 125 }; 126 126 127 COM_DECL_READONLY_ENUM_AND_COLLECTION (Snapshot)128 129 127 #endif // ____H_SNAPSHOTIMPL 130 128 -
trunk/src/VBox/Main/xpcom/server.cpp
r17255 r17260 242 242 /* collections and enumerators */ 243 243 244 COM_IMPL_READONLY_ENUM_AND_COLLECTION(Snapshot)245 244 #ifdef VBOX_WITH_USB 246 245 COM_IMPL_READONLY_ENUM_AND_COLLECTION(HostUSBDevice)
Note:
See TracChangeset
for help on using the changeset viewer.