VirtualBox

Ignore:
Timestamp:
Apr 8, 2010 3:35:38 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
59814
Message:

Main: don't export snapshots in OVF, separate OVF import from vbox:Machine import

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/xml/Settings.cpp

    r27918 r28098  
    36933693/**
    36943694 * Builds the XML DOM tree for the machine config under the given XML element.
     3695 *
    36953696 * This has been separated out from write() so it can be called from elsewhere,
    36963697 * 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 */
     3708void MachineConfigFile::buildMachineXML(xml::ElementNode &elmMachine,
     3709                                        bool fIncludeSnapshots)
    37003710{
    37013711    elmMachine.setAttribute("uuid", makeString(uuid));
     
    37083718    if (strStateFile.length())
    37093719        elmMachine.setAttribute("stateFile", strStateFile);
    3710     if (!uuidCurrentSnapshot.isEmpty())
     3720    if (fIncludeSnapshots && !uuidCurrentSnapshot.isEmpty())
    37113721        elmMachine.setAttribute("currentSnapshot", makeString(uuidCurrentSnapshot));
    37123722    if (strSnapshotFolder.length())
     
    37343744    writeExtraData(elmMachine, mapExtraDataItems);
    37353745
    3736     if (llFirstSnapshot.size())
     3746    if (fIncludeSnapshots && llFirstSnapshot.size())
    37373747        buildSnapshotXML(elmMachine, llFirstSnapshot.front());
    37383748
     
    39013911
    39023912        xml::ElementNode *pelmMachine = m->pelmRoot->createChild("Machine");
    3903         buildMachineXML(*pelmMachine);
     3913        buildMachineXML(*pelmMachine,
     3914                        true /* fIncludeSnapshots */);
    39043915
    39053916        // now go write the XML
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette