Lines Matching refs:settings

7  * functionality such as talking to the XML back-end classes and settings version management.
9 * The code can read all VirtualBox settings files version 1.3 and higher. That version was
10 * written by VirtualBox 2.0. It can write settings version 1.7 (used by VirtualBox 2.2 and
13 * The settings versions enum is defined in src/VBox/Main/idl/VirtualBox.xidl. To introduce
14 * a new settings version (should be necessary at most once per VirtualBox major release,
19 * VBOX_XML_VERSION does not have to be changed if the settings for a default VM do not
23 * Once a new settings version has been added, these are the rules for introducing a new
25 * previous versions, then settings version checks need to be introduced. See the
29 * The settings versions checks are necessary because since version 3.1, VirtualBox no longer
30 * automatically converts XML settings files but only if necessary, that is, if settings are
32 * settings file of an older version, then an old VirtualBox (before 3.1) will attempt to
37 * 1) Make sure the constructor of corresponding settings structure has a proper default.
39 * 2) In the settings reader method, try to read the setting; if it's there, great, if not,
45 * settings version to the current version so the settings writer (4) can write out
51 * 4) In the settings writer method, write the setting _only_ if the current settings
69 #include "VBox/settings.h"
85 using namespace settings;
93 /** VirtualBox XML settings namespace */
94 #define VBOX_XML_NAMESPACE "http://www.innotek.de/VirtualBox-settings"
96 /** VirtualBox XML settings version number substring ("x.y") */
99 /** VirtualBox XML settings version platform substring */
120 /** VirtualBox XML settings full version string ("x.y-platform") */
123 const struct Snapshot settings::g_SnapshotEmpty; /* default ctor is OK */
124 const struct Medium settings::g_MediumEmpty; /* default ctor is OK */
160 SettingsVersion_T svRead; // settings version that the original file had when it was read,
188 class settings::ConfigFileError : public xml::LogicError
248 * pstrFilename is != NULL and reads the settings version from it.
261 // reading existing settings file:
273 throw ConfigFileError(this, NULL, N_("Root element in VirtualBox settings files must be \"VirtualBox\"."));
278 LogRel(("Loading settings file \"%s\" with version \"%s\"\n", m->strFilename.c_str(), m->strSettingsVersionFull.c_str()));
280 // parse settings version; allow future versions but fail if file is older than 1.6
343 Log(("Parsed settings version %d.%d to enum value %d\n", ulMajor, ulMinor, m->sv));
347 throw ConfigFileError(this, m->pelmRoot, N_("Cannot handle settings version '%s'"), m->strSettingsVersionFull.c_str());
349 // remember the settings version we read in case it gets upgraded later,
355 // creating new settings file:
586 * with settings format before 1.4 (VirtualBox 2.0 used settings format 1.3). The elements
631 // location is special here: current settings specify an "iscsi://user@server:port/target/lun"
778 Medium &med) // medium settings to fill out
905 * VirtualBox settings version (e.g. "1.10-linux"). Used by
951 AssertMsg(m->sv <= SettingsVersion_v1_7, ("Settings.cpp: unexpected settings version %d, unhandled future version?\n", m->sv));
961 // settings version after SettingsVersion_v1_7, which should
966 // for "forgotten settings" this may not be the best choice,
987 * set the "sv" member to the required settings version that is to
988 * be written. For newly created files, the settings version will be
990 * the settings version indicated in the file. However, this method
991 * will silently make sure that the settings version is always
993 * support for earlier settings versions.
1009 // add settings version attribute to root element
1013 // this is where we must check whether we're upgrading the settings version
1015 // VirtualBox version and recover his old settings files.
1209 *it); // settings::Medium
1315 * so that the settings version does not get lost when a copy of the Machine settings
1316 * file is made to see if settings have actually changed.
1333 * machine settings have really changed and thus need to be written out to disk.
1504 * If pstrFilename is != NULL, this reads the given settings file into the member
1577 // DHCP servers were introduced with settings version 1.7; if we're loading
1579 // with default settings
1795 * machine settings have really changed and thus need to be written out to disk.
1815 * machine settings have really changed and thus need to be written out to disk.
1835 * machine settings have really changed and thus need to be written out to disk.
1849 * machine settings have really changed and thus need to be written out to disk.
1863 * machine settings have really changed and thus need to be written out to disk.
1893 * machine settings have really changed and thus need to be written out to disk.
1912 * machine settings have really changed and thus need to be written out to disk.
1929 * machine settings have really changed and thus need to be written out to disk.
1945 * machine settings have really changed and thus need to be written out to disk.
2026 * machine settings have really changed and thus need to be written out to disk.
2095 * machine settings have really changed and thus need to be written out to disk.
2118 * machine settings have really changed and thus need to be written out to disk.
2141 * machine settings have really changed and thus need to be written out to disk.
2153 * machine settings have really changed and thus need to be written out to disk.
2190 * If pstrFilename is != NULL, this reads the given settings file into the member
2227 * own media registry (which is true for settings version v1.11 and higher,
2252 * whether machine settings have really changed and thus need to be written out to disk.
2257 * -- settings versions and file names inherited from ConfigFileBase;
2406 /* run over disabled list and load settings */
2642 // settings before 1.3 used lower case so make sure this is case-insensitive
2720 * For legacy pre-1.7 settings we also need a storage structure because
3024 // settings before 1.3 used lower case so make sure this is case-insensitive
3102 // settings before 1.3 used lower case so make sure this is case-insensitive
3392 * This gets called instead of readStorageControllers() for legacy pre-1.7 settings
3393 * files which have a <HardDiskAttachments> node and storage controller settings
3394 * hidden in the <Hardware> settings. We set the StorageControllers fields just the
3461 * This is only called for settings version 1.7 and above; see readHardDiskAttachments_pre1_7()
3494 // for settings below version 1.11 because they allowed only
3613 /* AHCI controller ports are hotpluggable by default, keep compatibility with existing settings. */
3629 * This gets called for legacy pre-1.9 settings files after having parsed the
3633 * Before settings version 1.9, DVD and floppy drives were specified separately
3683 // shouldn't happen because pre-1.9 settings files always had at least one IDE controller in the settings
3884 // go through Hardware once more to repair the settings controller structures
4056 // go through Hardware once more to repair the settings controller structures
4342 /* In 4.0 videochannel settings were replaced with properties, so look at properties. */
4407 // settings formats before 1.9 had separate DVDDrive and FloppyDrive items under Hardware;
4420 // in old settings format, the DVD drive could only have been under the IDE controller
4431 throw ConfigFileError(this, NULL, N_("Internal error: cannot save more than one DVD drive with old settings format"));
4469 throw ConfigFileError(this, NULL, N_("Internal error: cannot save more than one floppy drive with old settings format"));
4963 * This parameter is ignored unless the settings version is at least v1.9, which
4987 // for pre-1.9 settings
4994 // pre-1.8 settings use shorter controller names, they are
4995 // expanded when reading the settings
5046 // For settings version before 1.9, DVDs and floppies are in hardware, not storage controllers,
5119 * @param pDbg Pointer to the debugging settings.
5138 * @param pAutostart Pointer to the autostart settings.
5255 * settings version is at least v1.11 (VirtualBox 4.0).
5263 * attribute to the machine tag with the vbox settings version. This is for
5264 * the OVF export case in which we don't have the settings version set in
5270 * unless the settings version is at least v1.9, which is always the case
5287 // add settings version attribute to machine element
5488 * This adjusts the settings version in m->sv if incompatible settings require
5489 * a settings bump, whereas otherwise we try to preserve the settings version
5511 * from the default for old settings.
5631 /* Skip checking other controllers if the settings bump is necessary. */
5762 // settings version 1.9 is required if there is not exactly one DVD
5766 // settings version 1.10 is required if the host cache should be disabled
5768 // settings version 1.11 is required for bandwidth limits and if more than
5845 // disabling the host IO cache requires settings version 1.10
5879 // so any deviation from that will require settings version 1.9
5888 // VirtualBox 3.2: Check for non default I/O settings
5957 // all the following require settings version 1.9
5969 // "accelerate 2d video" requires settings version 1.8
5975 // The hardware versions other than "1" requires settings version 1.4 (2.1+).
5991 // createStubDocument() sets the settings version to at least 1.7; however,
5992 // we might need to enfore a later settings version if incompatible settings