Lines Matching refs:settings

77 #include <VBox/settings.h>
195 mLongMode = HC_ARCH_BITS == 64 ? settings::Hardware::LongMode_Enabled : settings::Hardware::LongMode_Disabled;
283 * @param strConfigFile Local file system path to the VM settings file (can
289 * @param fForceOverwrite Whether to overwrite an existing machine settings file.
318 mData->pMachineConfigFile = new settings::MachineConfigFile(NULL);
336 // with the machine file; say so if the settings file name is the same as the
337 // settings file parent directory (machine directory)
362 ? settings::Hardware::LongMode_Enabled : settings::Hardware::LongMode_Disabled;
404 * @param aConfigFile Local file system path to the VM settings file (can
429 // now load the settings from XML:
446 mData->pMachineConfigFile = new settings::MachineConfigFile(&mData->m_strConfigFileFull);
495 // reloading the settings will fail
516 * for the settings file as well.
523 const settings::MachineConfigFile &config)
553 mData->pMachineConfigFile = new settings::MachineConfigFile(NULL);
590 // reloading the settings will fail
634 tr("Invalid machine settings file name '%s' (%Rrc)"),
644 * Tries to create a machine settings file in the path stored in the machine
646 * the settings file could not be written (e.g. because machine dir is read-only).
653 // when we create a new machine, we must be able to create the settings file
664 tr("Machine settings file '%s' already exists"),
669 * of a new settings file will fail. */
673 tr("Could not delete the existing settings file '%s' (%Rrc)"),
681 tr("Invalid machine settings file name '%s' (%Rrc)"),
688 * Initializes the registered machine by loading the settings file.
691 * startup the whole VirtualBox server in case if the settings file of some
719 mData->pMachineConfigFile = new settings::MachineConfigFile(&mData->m_strConfigFileFull);
750 * the settings file */
753 /* commit all changes made during loading the settings file */
755 /// @todo r=klaus for some reason the settings loading logic backs up
756 // the settings, and therefore a commit is needed. Should probably be changed.
774 // reloading the settings will fail
879 LogWarningThisFunc(("Discarding unsaved settings changes!\n"));
1204 // We must not throw away entries yet, otherwise settings are lost
1519 /** Save settings if online - @todo why is this required? -- @bugref{6818} */
1680 /** Save settings if online - @todo why is this required? -- @bugref{6818} */
1719 /** Save settings if online - @todo why is this required? -- @bugref{6818} */
2149 if (mHWData->mLongMode == settings::Hardware::LongMode_Enabled)
2151 else if (mHWData->mLongMode == settings::Hardware::LongMode_Disabled)
2215 mHWData->mLongMode = !aValue ? settings::Hardware::LongMode_Disabled : settings::Hardware::LongMode_Enabled;
2801 /** Save settings if online - @todo why is this required? -- @bugref{6818} */
2833 /** Save settings if online - @todo why is this required? -- @bugref{6818} */
3824 // This type is new with VirtualBox 4.0 and therefore requires settings
3825 // version 1.11 in the settings backend. Unfortunately it is not enough to do
4281 * job to save its settings like all other settings changes. */
4364 * job to save its settings like all other settings changes. */
4754 // old settings. Re-get the correct reference.
4806 * job to save its settings like all other settings changes. */
4879 for (settings::StringsMap::const_iterator it = mData->pMachineConfigFile->mapExtraDataItems.begin();
4898 settings::StringsMap::const_iterator it = mData->pMachineConfigFile->mapExtraDataItems.find(aKey);
4936 settings::StringsMap::const_iterator it = mData->pMachineConfigFile->mapExtraDataItems.find(aKey);
4974 // This saving of settings is tricky: there is no "old state" for the
4975 // extradata items at all (unlike all other settings), so the old/new
4976 // settings comparison would give a wrong result!
4981 // save the global settings; for that we should hold only the VirtualBox lock
5009 /* the settings file path may never be null */
5019 // save the global settings; for that we should hold only the VirtualBox lock
5316 /* delete the settings only when the file actually exists */
5372 // delete the directory that contains the settings file, but only
5399 tr("Cannot delete settings of a registered machine"));
6557 /** Save settings if online - @todo why is this required? -- @bugref{6818} */
6594 /** Save settings if online - @todo why is this required? -- @bugref{6818} */
7174 HRESULT Machine::i_saveRegistryEntry(settings::MachineRegistryEntry &data)
7189 * machine settings file as the current directory.
7236 // use strTarget as a temporary buffer to hold the machine settings dir
7244 // triggering default settings for not present config attributes.
7919 * all settings.
7952 // Ensure the settings are saved. If we are going to be registered and
8074 settings::StringsMap::const_iterator it = mData->pMachineConfigFile->mapExtraDataItems.find(strKey);
8094 * current state of this machine object allows to change settings of the
8106 * changeable settings of the machine (i.e. the machine is not registered, or
8109 * runtime changeable settings.
8231 /* create associated BIOS settings object */
8538 * Initializes all machine instance data from the given settings structures
8556 * @param config Machine settings from XML.
8561 HRESULT Machine::i_loadMachineDataFromSettings(const settings::MachineConfigFile &config,
8650 const settings::Snapshot &snap = config.llFirstSnapshot.front();
8670 * otherwise it will be not possible to change the settings
8689 // after loading settings, we are no longer different from the XML on disk
8699 * @param aCurSnapshotId Current snapshot ID from the settings file.
8702 HRESULT Machine::i_loadSnapshot(const settings::Snapshot &data,
8760 for (settings::SnapshotsList::const_iterator it = data.llChildSnapshots.begin();
8764 const settings::Snapshot &childData = *it;
8776 * Loads settings into mHWData.
8778 * @param data Reference to the hardware settings.
8779 * @param pDbg Pointer to the debugging settings.
8780 * @param pAutostart Pointer to the autostart settings.
8782 HRESULT Machine::i_loadHardware(const settings::Hardware &data, const settings::Debugging *pDbg,
8783 const settings::Autostart *pAutostart)
8812 for (settings::CpuList::const_iterator it = data.llCpus.begin();
8816 const settings::Cpu &cpu = *it;
8823 for (settings::CpuIdLeafsList::const_iterator it = data.llCpuIdLeafs.begin();
8827 const settings::CpuIdLeaf &leaf = *it;
8871 settings::BootOrderMap::const_iterator it = data.mapBootOrder.find(i);
8916 for (settings::USBControllerList::const_iterator it = data.usbSettings.llUSBControllers.begin();
8920 const settings::USBController &settingsCtrl = *it;
8946 for (settings::NetworkAdaptersList::const_iterator it = data.llNetworkAdapters.begin();
8950 const settings::NetworkAdapter &nic = *it;
8959 for (settings::SerialPortsList::const_iterator it = data.llSerialPorts.begin();
8963 const settings::SerialPort &s = *it;
8971 for (settings::ParallelPortsList::const_iterator it = data.llParallelPorts.begin();
8975 const settings::ParallelPort &p = *it;
8987 for (settings::SharedFoldersList::const_iterator it = data.llSharedFolders.begin();
8991 const settings::SharedFolder &sf = *it;
9020 // guest settings
9023 // IO settings
9028 for (settings::HostPCIDeviceAttachmentList::const_iterator it = data.pciAttachments.begin();
9032 const settings::HostPCIDeviceAttachment &hpda = *it;
9047 for (settings::GuestPropertiesList::const_iterator it = data.llGuestProperties.begin();
9051 const settings::GuestProperty &prop = *it;
9080 * Called from Machine::loadHardware() to load the debugging settings of the
9083 * @param pDbg Pointer to the settings.
9085 HRESULT Machine::i_loadDebugging(const settings::Debugging *pDbg)
9100 HRESULT Machine::i_loadStorageControllers(const settings::Storage &data,
9108 for (settings::StorageControllersList::const_iterator it = data.llStorageControllers.begin();
9112 const settings::StorageController &ctlData = *it;
9141 /* Set IDE emulation settings (only for AHCI controller). */
9173 const settings::StorageController &data,
9180 for (settings::AttachedDevicesList::const_iterator it = data.llAttachedDevices.begin();
9184 const settings::AttachedDevice &ad = *it;
9186 for (settings::AttachedDevicesList::const_iterator it2 = it;
9193 const settings::AttachedDevice &ad2 = *it2;
9208 for (settings::AttachedDevicesList::const_iterator it = data.llAttachedDevices.begin();
9212 const settings::AttachedDevice &dev = *it;
9586 * Helper for #i_saveSettings. Cares about renaming the settings directory and
9587 * file if the machine name was changed and about creating a new settings file
9602 /* attempt to rename the settings file if machine name is changed */
9673 tr("Could not rename the directory '%s' to '%s' to save the settings file (%Rrc)"),
9696 /* then try to rename the settings file itself */
9699 /* get the path to old settings file in renamed directory */
9711 tr("Could not rename the settings file '%s' to '%s' (%Rrc)"),
9773 /* ensure the settings directory exists */
9782 tr("Could not create a directory '%s' to save the settings file (%Rrc)"),
9795 tr("Could not create the settings file '%s' (%Rrc)"),
9812 * Used when saving settings after an operation that makes them 100%
9813 * correspond to the settings from the current snapshot.
9817 * - SaveS_Force: settings will be saved without doing a deep compare of the
9818 * settings structures. This is used when this is called because snapshots
9827 * settings have changed. This will happen if a machine rename has been
9838 /* make sure child objects are unable to modify the settings while we are
9848 /* First, prepare to save settings. It will care about renaming the
9849 * settings directory and file if the machine name was changed and about
9850 * creating a new settings file if this is a new machine. */
9854 // keep a pointer to the current settings structures
9855 settings::MachineConfigFile *pOldConfig = mData->pMachineConfigFile;
9856 settings::MachineConfigFile *pNewConfig = NULL;
9861 pNewConfig = new settings::MachineConfigFile(NULL);
9864 // now go and copy all the settings data from COM to the settings structures
9882 // do a deep compare of the settings that we just saved with the settings
9884 // which does a deep compare of all the settings, which is expensive but less expensive
9888 // could still be modified if any settings changed
9907 // after saving settings, we are no longer different from the XML on disk
9941 * Implementation for saving the machine settings into the given
9942 * settings::MachineConfigFile instance. This copies machine extradata
9965 void Machine::i_copyMachineDataToSettings(settings::MachineConfigFile &config)
10007 /* try to make the file name relative to the settings file dir */
10054 HRESULT Machine::i_saveAllSnapshots(settings::MachineConfigFile &config)
10066 // the settings use a list for "the first snapshot"
10067 config.llFirstSnapshot.push_back(settings::g_SnapshotEmpty);
10096 * @param data Reference to the settings object for the hardware config.
10097 * @param pDbg Pointer to the settings object for the debugging config
10099 * @param pAutostart Pointer to the settings object for the autostart config
10102 HRESULT Machine::i_saveHardware(settings::Hardware &data, settings::Debugging *pDbg,
10103 settings::Autostart *pAutostart)
10156 settings::Cpu cpu;
10212 /* VRDEServer settings (optional) */
10224 settings::USBController settingsCtrl;
10241 * may be extra NIC settings in the vector. */
10244 settings::NetworkAdapter nic;
10260 settings::SerialPort s;
10272 settings::ParallelPort p;
10293 settings::SharedFolder sf;
10311 // IO settings
10325 settings::HostPCIDeviceAttachment hpda;
10351 settings::GuestProperty prop;
10386 HRESULT Machine::i_saveStorageControllers(settings::Storage &data)
10397 settings::StorageController ctl;
10416 /* Save IDE emulation settings. */
10441 settings::StorageController &data)
10453 settings::AttachedDevice dev;
10483 * Saves machine state settings as defined by aFlags
10514 /* try to make the file name relative to the settings file dir */
11543 * Returns true if the settings file is located in the directory named exactly
11547 * @param aSettingsDir if not NULL, the full machine settings file directory
11574 * Discards all changes to machine settings.
11747 * Commits all the changes to machine settings.
11815 * discarding a chipset type change will not lose settings. */
12543 // any machine settings modified?
12546 LogWarningThisFunc(("Discarding unsaved settings changes!\n"));
12819 /* save all VM settings */
12922 * update the settings file */
13518 * might be to the original settings, which we are going to change. */
13536 // old settings. Re-get the correct reference.
14311 * the current settings. The caller is responsible for that. The call
14493 settings::GuestPropertiesList &llGuestProperties = mData->pMachineConfigFile->hardwareMachine.llGuestProperties;
14494 settings::GuestPropertiesList::iterator it = llGuestProperties.begin();
14497 const settings::GuestProperty &prop = *it;