Changeset 28098 in vbox for trunk/src/VBox/Main/xml/Settings.cpp
- Timestamp:
- Apr 8, 2010 3:35:38 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 59814
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/xml/Settings.cpp
r27918 r28098 3693 3693 /** 3694 3694 * Builds the XML DOM tree for the machine config under the given XML element. 3695 * 3695 3696 * This has been separated out from write() so it can be called from elsewhere, 3696 3697 * such as the OVF code, to build machine XML in an existing XML tree. 3697 * @param elmMachine 3698 */ 3699 void MachineConfigFile::buildMachineXML(xml::ElementNode &elmMachine) 3698 * 3699 * As a result, this gets called from two locations: 3700 * 3701 * -- MachineConfigFile::write(); 3702 * 3703 * -- Appliance::buildXMLForOneVirtualSystem() 3704 * 3705 * @param elmMachine XML <Machine> element to add attributes and elements to. 3706 * @param fWriteSnapshots If false, we omit snapshots entirely (we don't recurse then). 3707 */ 3708 void MachineConfigFile::buildMachineXML(xml::ElementNode &elmMachine, 3709 bool fIncludeSnapshots) 3700 3710 { 3701 3711 elmMachine.setAttribute("uuid", makeString(uuid)); … … 3708 3718 if (strStateFile.length()) 3709 3719 elmMachine.setAttribute("stateFile", strStateFile); 3710 if ( !uuidCurrentSnapshot.isEmpty())3720 if (fIncludeSnapshots && !uuidCurrentSnapshot.isEmpty()) 3711 3721 elmMachine.setAttribute("currentSnapshot", makeString(uuidCurrentSnapshot)); 3712 3722 if (strSnapshotFolder.length()) … … 3734 3744 writeExtraData(elmMachine, mapExtraDataItems); 3735 3745 3736 if ( llFirstSnapshot.size())3746 if (fIncludeSnapshots && llFirstSnapshot.size()) 3737 3747 buildSnapshotXML(elmMachine, llFirstSnapshot.front()); 3738 3748 … … 3901 3911 3902 3912 xml::ElementNode *pelmMachine = m->pelmRoot->createChild("Machine"); 3903 buildMachineXML(*pelmMachine); 3913 buildMachineXML(*pelmMachine, 3914 true /* fIncludeSnapshots */); 3904 3915 3905 3916 // now go write the XML
Note:
See TracChangeset
for help on using the changeset viewer.