settings.h revision aa0553becec2abc2e781f839ba1d399c31c2c07f
d46ee884c41b808b239563b1978468aae12e33a2vboxsync/** @file
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync * Settings file data structures.
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync *
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync * These structures are created by the settings file loader and filled with values
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * copied from the raw XML data. This was all new with VirtualBox 3.1 and allows us
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * to finally make the XML reader version-independent and read VirtualBox XML files
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * from earlier and even newer (future) versions without requiring complicated,
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * tedious and error-prone XSLT conversions.
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync *
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * It is this file that defines all structures that map VirtualBox global and
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * machine settings to XML files. These structures are used by the rest of Main,
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * even though this header file does not require anything else in Main.
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync *
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync * Note: Headers in Main code have been tweaked to only declare the structures
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync * defined here so that this header need only be included from code files that
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync * actually use these structures.
d46ee884c41b808b239563b1978468aae12e33a2vboxsync */
d46ee884c41b808b239563b1978468aae12e33a2vboxsync
d46ee884c41b808b239563b1978468aae12e33a2vboxsync/*
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync * Copyright (C) 2007-2011 Oracle Corporation
d46ee884c41b808b239563b1978468aae12e33a2vboxsync *
d46ee884c41b808b239563b1978468aae12e33a2vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
d46ee884c41b808b239563b1978468aae12e33a2vboxsync * available from http://www.virtualbox.org. This file is free software;
d46ee884c41b808b239563b1978468aae12e33a2vboxsync * you can redistribute it and/or modify it under the terms of the GNU
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync * General Public License (GPL) as published by the Free Software
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync *
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync * The contents of this file may alternatively be used under the terms
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync * of the Common Development and Distribution License Version 1.0
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync * VirtualBox OSE distribution, in which case the provisions of the
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync * CDDL are applicable instead of those of the GPL.
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync *
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync * You may elect to license modified versions of this file under the
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync * terms and conditions of either the GPL or the CDDL or both.
d46ee884c41b808b239563b1978468aae12e33a2vboxsync */
d46ee884c41b808b239563b1978468aae12e33a2vboxsync
d46ee884c41b808b239563b1978468aae12e33a2vboxsync#ifndef ___VBox_settings_h
d46ee884c41b808b239563b1978468aae12e33a2vboxsync#define ___VBox_settings_h
d46ee884c41b808b239563b1978468aae12e33a2vboxsync
d46ee884c41b808b239563b1978468aae12e33a2vboxsync#include <iprt/time.h>
3b70c9ab3cea93ab1a771d2db319311282041382vboxsync
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync#include "VBox/com/VirtualBox.h"
d46ee884c41b808b239563b1978468aae12e33a2vboxsync
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync#include <VBox/com/Guid.h>
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync#include <VBox/com/string.h>
d46ee884c41b808b239563b1978468aae12e33a2vboxsync
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync#include <list>
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync#include <map>
2a229554eb081e98411c81dcdef146c35a000f80vboxsync
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsyncnamespace xml
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync{
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync class ElementNode;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync}
e33247bff4fddfdba92538374bcc9e2753044a38vboxsync
d46ee884c41b808b239563b1978468aae12e33a2vboxsyncnamespace settings
d46ee884c41b808b239563b1978468aae12e33a2vboxsync{
d46ee884c41b808b239563b1978468aae12e33a2vboxsync
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsyncclass ConfigFileError;
e33247bff4fddfdba92538374bcc9e2753044a38vboxsync
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync////////////////////////////////////////////////////////////////////////////////
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync//
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync// Structures shared between Machine XML and VirtualBox.xml
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync//
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync////////////////////////////////////////////////////////////////////////////////
e33247bff4fddfdba92538374bcc9e2753044a38vboxsync
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync/**
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync * USB device filter definition. This struct is used both in MainConfigFile
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync * (for global USB filters) and MachineConfigFile (for machine filters).
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync *
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync * NOTE: If you add any fields in here, you must update a) the constructor and b)
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync * the operator== which is used by MachineConfigFile::operator==(), or otherwise
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync * your settings might never get saved.
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync */
d8523ff7d948462e328eec88b602effe2e7f7080vboxsyncstruct USBDeviceFilter
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync{
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync USBDeviceFilter()
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync : fActive(false),
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync action(USBDeviceFilterAction_Null),
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync ulMaskedInterfaces(0)
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync {}
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync bool operator==(const USBDeviceFilter&u) const;
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync com::Utf8Str strName;
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync bool fActive;
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync com::Utf8Str strVendorId,
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync strProductId,
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync strRevision,
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync strManufacturer,
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync strProduct,
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync strSerialNumber,
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync strPort;
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync USBDeviceFilterAction_T action; // only used with host USB filters
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync com::Utf8Str strRemote; // irrelevant for host USB objects
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync uint32_t ulMaskedInterfaces; // irrelevant for host USB objects
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync};
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync
64836f6a22eea42b83b0ec64abcb3aa7ccc27f25vboxsynctypedef std::map<com::Utf8Str, com::Utf8Str> StringsMap;
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync// ExtraDataItem (used by both VirtualBox.xml and machines XML)
71e8510a26b72d539cf6d7d7157bd87a53de8cf4vboxsyncstruct USBDeviceFilter;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsynctypedef std::list<USBDeviceFilter> USBDeviceFiltersList;
e33247bff4fddfdba92538374bcc9e2753044a38vboxsync
d8523ff7d948462e328eec88b602effe2e7f7080vboxsyncstruct Medium;
d8523ff7d948462e328eec88b602effe2e7f7080vboxsynctypedef std::list<Medium> MediaList;
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync/**
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync * NOTE: If you add any fields in here, you must update a) the constructor and b)
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync * the operator== which is used by MachineConfigFile::operator==(), or otherwise
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync * your settings might never get saved.
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync */
d8523ff7d948462e328eec88b602effe2e7f7080vboxsyncstruct Medium
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync{
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync com::Guid uuid;
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync com::Utf8Str strLocation;
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync com::Utf8Str strDescription;
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync // the following are for hard disks only:
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync com::Utf8Str strFormat;
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync bool fAutoReset; // optional, only for diffs, default is false
64836f6a22eea42b83b0ec64abcb3aa7ccc27f25vboxsync StringsMap properties;
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync MediumType_T hdType;
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync MediaList llChildren; // only used with hard disks
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync bool operator==(const Medium &m) const;
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync};
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync/**
b099c6398b85f527d7343cb1da573e1e95f9fd10vboxsync * A media registry. Starting with VirtualBox 3.3, this can appear in both the
b099c6398b85f527d7343cb1da573e1e95f9fd10vboxsync * VirtualBox.xml file as well as machine XML files with settings version 1.11
b099c6398b85f527d7343cb1da573e1e95f9fd10vboxsync * or higher, so these lists are now in ConfigFileBase.
b099c6398b85f527d7343cb1da573e1e95f9fd10vboxsync *
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync * NOTE: If you add any fields in here, you must update a) the constructor and b)
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync * the operator== which is used by MachineConfigFile::operator==(), or otherwise
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync * your settings might never get saved.
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync */
d8523ff7d948462e328eec88b602effe2e7f7080vboxsyncstruct MediaRegistry
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync{
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync MediaList llHardDisks,
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync llDvdImages,
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync llFloppyImages;
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync bool operator==(const MediaRegistry &m) const;
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync};
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync/**
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync * Common base class for both MainConfigFile and MachineConfigFile
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync * which contains some common logic for both.
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync */
358a99c385080f7f31166943f3ac3a2aea6b5263vboxsyncclass ConfigFileBase
e33247bff4fddfdba92538374bcc9e2753044a38vboxsync{
e33247bff4fddfdba92538374bcc9e2753044a38vboxsyncpublic:
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync bool fileExists();
e33247bff4fddfdba92538374bcc9e2753044a38vboxsync
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync void copyBaseFrom(const ConfigFileBase &b);
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsyncprotected:
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync ConfigFileBase(const com::Utf8Str *pstrFilename);
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync ~ConfigFileBase();
e33247bff4fddfdba92538374bcc9e2753044a38vboxsync
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync void parseUUID(com::Guid &guid,
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync const com::Utf8Str &strUUID) const;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync void parseTimestamp(RTTIMESPEC &timestamp,
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync const com::Utf8Str &str) const;
e33247bff4fddfdba92538374bcc9e2753044a38vboxsync
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync com::Utf8Str makeString(const RTTIMESPEC &tm);
e33247bff4fddfdba92538374bcc9e2753044a38vboxsync
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync void readExtraData(const xml::ElementNode &elmExtraData,
64836f6a22eea42b83b0ec64abcb3aa7ccc27f25vboxsync StringsMap &map);
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync void readUSBDeviceFilters(const xml::ElementNode &elmDeviceFilters,
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync USBDeviceFiltersList &ll);
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync typedef enum {Error, HardDisk, DVDImage, FloppyImage} MediaType;
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync void readMedium(MediaType t, const xml::ElementNode &elmMedium, MediaList &llMedia);
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync void readMediaRegistry(const xml::ElementNode &elmMediaRegistry, MediaRegistry &mr);
e33247bff4fddfdba92538374bcc9e2753044a38vboxsync
ec037c82be3787508e228c537bd15ad9de28bac0vboxsync void setVersionAttribute(xml::ElementNode &elm);
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync void createStubDocument();
d46ee884c41b808b239563b1978468aae12e33a2vboxsync
64836f6a22eea42b83b0ec64abcb3aa7ccc27f25vboxsync void buildExtraData(xml::ElementNode &elmParent, const StringsMap &me);
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync void buildUSBDeviceFilters(xml::ElementNode &elmParent,
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync const USBDeviceFiltersList &ll,
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync bool fHostMode);
ee00a0b29854e7f513198772bccb6650f6dd2184vboxsync void buildMedium(xml::ElementNode &elmMedium,
ee00a0b29854e7f513198772bccb6650f6dd2184vboxsync DeviceType_T devType,
ee00a0b29854e7f513198772bccb6650f6dd2184vboxsync const Medium &m,
ee00a0b29854e7f513198772bccb6650f6dd2184vboxsync uint32_t level);
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync void buildMediaRegistry(xml::ElementNode &elmParent,
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync const MediaRegistry &mr);
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync void clearDocument();
d46ee884c41b808b239563b1978468aae12e33a2vboxsync
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync struct Data;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync Data *m;
d46ee884c41b808b239563b1978468aae12e33a2vboxsync
23fcbbebf3d2e4d3bf386a8b347ed271078cb9c8vboxsyncprivate:
23fcbbebf3d2e4d3bf386a8b347ed271078cb9c8vboxsync // prohibit copying (Data contains pointers to XML which cannot be copied)
23fcbbebf3d2e4d3bf386a8b347ed271078cb9c8vboxsync ConfigFileBase(const ConfigFileBase&);
23fcbbebf3d2e4d3bf386a8b347ed271078cb9c8vboxsync
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync friend class ConfigFileError;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync};
d46ee884c41b808b239563b1978468aae12e33a2vboxsync
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync////////////////////////////////////////////////////////////////////////////////
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync//
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync// VirtualBox.xml structures
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync//
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync////////////////////////////////////////////////////////////////////////////////
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync
358a99c385080f7f31166943f3ac3a2aea6b5263vboxsyncstruct Host
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync{
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync USBDeviceFiltersList llUSBDeviceFilters;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync};
d46ee884c41b808b239563b1978468aae12e33a2vboxsync
358a99c385080f7f31166943f3ac3a2aea6b5263vboxsyncstruct SystemProperties
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync{
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync SystemProperties()
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync : ulLogHistoryCount(3)
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync {}
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync com::Utf8Str strDefaultMachineFolder;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync com::Utf8Str strDefaultHardDiskFolder;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync com::Utf8Str strDefaultHardDiskFormat;
3933885bc0c2c93436d858a14564c6179ec72872vboxsync com::Utf8Str strVRDEAuthLibrary;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync com::Utf8Str strWebServiceAuthLibrary;
9ca017ceee656f9d33f2cb6652e401b5f17fcfb7vboxsync com::Utf8Str strDefaultVRDEExtPack;
fd0cf98cb3eafc5c96b7e95d934b01c5df4785fbvboxsync uint32_t ulLogHistoryCount;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync};
d46ee884c41b808b239563b1978468aae12e33a2vboxsync
358a99c385080f7f31166943f3ac3a2aea6b5263vboxsyncstruct MachineRegistryEntry
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync{
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync com::Guid uuid;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync com::Utf8Str strSettingsFile;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync};
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsynctypedef std::list<MachineRegistryEntry> MachinesRegistry;
d46ee884c41b808b239563b1978468aae12e33a2vboxsync
358a99c385080f7f31166943f3ac3a2aea6b5263vboxsyncstruct DHCPServer
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync{
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync com::Utf8Str strNetworkName,
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync strIPAddress,
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync strIPNetworkMask,
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync strIPLower,
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync strIPUpper;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync bool fEnabled;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync};
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsynctypedef std::list<DHCPServer> DHCPServersList;
d46ee884c41b808b239563b1978468aae12e33a2vboxsync
358a99c385080f7f31166943f3ac3a2aea6b5263vboxsyncclass MainConfigFile : public ConfigFileBase
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync{
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsyncpublic:
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync MainConfigFile(const com::Utf8Str *pstrFilename);
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync void readMachineRegistry(const xml::ElementNode &elmMachineRegistry);
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync void readDHCPServers(const xml::ElementNode &elmDHCPServers);
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync
6c2e2f2be39d679eb8e2e371afd146099f8dc5e7vboxsync void write(const com::Utf8Str strFilename);
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync Host host;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync SystemProperties systemProperties;
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync MediaRegistry mediaRegistry;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync MachinesRegistry llMachines;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync DHCPServersList llDhcpServers;
64836f6a22eea42b83b0ec64abcb3aa7ccc27f25vboxsync StringsMap mapExtraDataItems;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync};
5ff3fa0492332325f57e80636321619e2224027evboxsync
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync////////////////////////////////////////////////////////////////////////////////
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync//
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync// Machine XML structures
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync//
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync////////////////////////////////////////////////////////////////////////////////
5ff3fa0492332325f57e80636321619e2224027evboxsync
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync/**
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * NOTE: If you add any fields in here, you must update a) the constructor and b)
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * the operator== which is used by MachineConfigFile::operator==(), or otherwise
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * your settings might never get saved.
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync */
3933885bc0c2c93436d858a14564c6179ec72872vboxsyncstruct VRDESettings
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync{
3933885bc0c2c93436d858a14564c6179ec72872vboxsync VRDESettings()
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync : fEnabled(true),
3933885bc0c2c93436d858a14564c6179ec72872vboxsync authType(AuthType_Null),
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync ulAuthTimeout(5000),
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync fAllowMultiConnection(false),
060f7ec6ae5c99df18341ef2e1f3e91f4b0c89f1vboxsync fReuseSingleConnection(false)
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync {}
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync
3933885bc0c2c93436d858a14564c6179ec72872vboxsync bool operator==(const VRDESettings& v) const;
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync bool fEnabled;
3933885bc0c2c93436d858a14564c6179ec72872vboxsync AuthType_T authType;
fd0cf98cb3eafc5c96b7e95d934b01c5df4785fbvboxsync uint32_t ulAuthTimeout;
6e25221ce8ef8e656d1e15eb7ec5cf8ae758ceb2vboxsync com::Utf8Str strAuthLibrary;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync bool fAllowMultiConnection,
060f7ec6ae5c99df18341ef2e1f3e91f4b0c89f1vboxsync fReuseSingleConnection;
9ca017ceee656f9d33f2cb6652e401b5f17fcfb7vboxsync com::Utf8Str strVrdeExtPack;
fc60d7c6501c5e676e41b11c042d4358d9faa81dvboxsync StringsMap mapProperties;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync};
5ff3fa0492332325f57e80636321619e2224027evboxsync
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync/**
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * NOTE: If you add any fields in here, you must update a) the constructor and b)
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * the operator== which is used by MachineConfigFile::operator==(), or otherwise
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * your settings might never get saved.
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync */
358a99c385080f7f31166943f3ac3a2aea6b5263vboxsyncstruct BIOSSettings
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync{
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync BIOSSettings()
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync : fACPIEnabled(true),
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync fIOAPICEnabled(false),
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync fLogoFadeIn(true),
a12929133f77ffa755a13a7d5d2ff3d87c41c9c5vboxsync fLogoFadeOut(true),
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync ulLogoDisplayTime(0),
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync biosBootMenuMode(BIOSBootMenuMode_MessageAndMenu),
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync fPXEDebugEnabled(false),
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync llTimeOffset(0)
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync {}
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync bool operator==(const BIOSSettings &d) const;
52262a1f2eed7acaf08d8a169159e8201c9da661vboxsync
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync bool fACPIEnabled,
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync fIOAPICEnabled,
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync fLogoFadeIn,
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync fLogoFadeOut;
fd0cf98cb3eafc5c96b7e95d934b01c5df4785fbvboxsync uint32_t ulLogoDisplayTime;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync com::Utf8Str strLogoImagePath;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync BIOSBootMenuMode_T biosBootMenuMode;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync bool fPXEDebugEnabled;
10153a147e7cb38821b5e7404bd2ef6b9af5be4avboxsync int64_t llTimeOffset;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync};
5ff3fa0492332325f57e80636321619e2224027evboxsync
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync/**
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * NOTE: If you add any fields in here, you must update a) the constructor and b)
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * the operator== which is used by MachineConfigFile::operator==(), or otherwise
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * your settings might never get saved.
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync */
358a99c385080f7f31166943f3ac3a2aea6b5263vboxsyncstruct USBController
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync{
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync USBController()
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync : fEnabled(false),
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync fEnabledEHCI(false)
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync {}
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync bool operator==(const USBController &u) const;
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync bool fEnabled;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync bool fEnabledEHCI;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync USBDeviceFiltersList llDeviceFilters;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync};
5ff3fa0492332325f57e80636321619e2224027evboxsync
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync struct NATRule
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync {
4d7634b748d791c1b985e04664cc5d00c6c120f0vboxsync NATRule(): proto(NATProtocol_TCP),
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync u16HostPort(0),
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync u16GuestPort(0){}
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync com::Utf8Str strName;
4d7634b748d791c1b985e04664cc5d00c6c120f0vboxsync NATProtocol_T proto;
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync uint16_t u16HostPort;
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync com::Utf8Str strHostIP;
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync uint16_t u16GuestPort;
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync com::Utf8Str strGuestIP;
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync bool operator==(const NATRule &r) const
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync {
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync return strName == r.strName
4d7634b748d791c1b985e04664cc5d00c6c120f0vboxsync && proto == r.proto
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync && u16HostPort == r.u16HostPort
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync && strHostIP == r.strHostIP
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync && u16GuestPort == r.u16GuestPort
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync && strGuestIP == r.strGuestIP;
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync }
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync };
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync typedef std::list<NATRule> NATRuleList;
f7c0f913c4c22ee18059ff97055442566d0f14a1vboxsync
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync struct NAT
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync {
85d78ebc068381ca25c84242e38ec4b2be4843a5vboxsync NAT() : u32Mtu(0),
85d78ebc068381ca25c84242e38ec4b2be4843a5vboxsync u32SockRcv(0),
85d78ebc068381ca25c84242e38ec4b2be4843a5vboxsync u32SockSnd(0),
85d78ebc068381ca25c84242e38ec4b2be4843a5vboxsync u32TcpRcv(0),
85d78ebc068381ca25c84242e38ec4b2be4843a5vboxsync u32TcpSnd(0),
85d78ebc068381ca25c84242e38ec4b2be4843a5vboxsync fDnsPassDomain(true), /* historically this value is true */
85d78ebc068381ca25c84242e38ec4b2be4843a5vboxsync fDnsProxy(false),
85d78ebc068381ca25c84242e38ec4b2be4843a5vboxsync fDnsUseHostResolver(false),
85d78ebc068381ca25c84242e38ec4b2be4843a5vboxsync fAliasLog(false),
85d78ebc068381ca25c84242e38ec4b2be4843a5vboxsync fAliasProxyOnly(false),
5d02e7a489b8a8a87f2ab2a3f866ba88794a45a9vboxsync fAliasUseSamePorts(false)
5d02e7a489b8a8a87f2ab2a3f866ba88794a45a9vboxsync {}
5d02e7a489b8a8a87f2ab2a3f866ba88794a45a9vboxsync
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync com::Utf8Str strNetwork;
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync com::Utf8Str strBindIP;
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync uint32_t u32Mtu;
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync uint32_t u32SockRcv;
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync uint32_t u32SockSnd;
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync uint32_t u32TcpRcv;
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync uint32_t u32TcpSnd;
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync com::Utf8Str strTftpPrefix;
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync com::Utf8Str strTftpBootFile;
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync com::Utf8Str strTftpNextServer;
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync bool fDnsPassDomain;
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync bool fDnsProxy;
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync bool fDnsUseHostResolver;
62a515eec8de1b7804ec6997c0f2013fef5c5a6bvboxsync bool fAliasLog;
62a515eec8de1b7804ec6997c0f2013fef5c5a6bvboxsync bool fAliasProxyOnly;
62a515eec8de1b7804ec6997c0f2013fef5c5a6bvboxsync bool fAliasUseSamePorts;
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync NATRuleList llRules;
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync bool operator==(const NAT &n) const
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync {
85d78ebc068381ca25c84242e38ec4b2be4843a5vboxsync return strNetwork == n.strNetwork
85d78ebc068381ca25c84242e38ec4b2be4843a5vboxsync && strBindIP == n.strBindIP
85d78ebc068381ca25c84242e38ec4b2be4843a5vboxsync && u32Mtu == n.u32Mtu
85d78ebc068381ca25c84242e38ec4b2be4843a5vboxsync && u32SockRcv == n.u32SockRcv
85d78ebc068381ca25c84242e38ec4b2be4843a5vboxsync && u32SockSnd == n.u32SockSnd
85d78ebc068381ca25c84242e38ec4b2be4843a5vboxsync && u32TcpSnd == n.u32TcpSnd
85d78ebc068381ca25c84242e38ec4b2be4843a5vboxsync && u32TcpRcv == n.u32TcpRcv
85d78ebc068381ca25c84242e38ec4b2be4843a5vboxsync && strTftpPrefix == n.strTftpPrefix
85d78ebc068381ca25c84242e38ec4b2be4843a5vboxsync && strTftpBootFile == n.strTftpBootFile
85d78ebc068381ca25c84242e38ec4b2be4843a5vboxsync && strTftpNextServer == n.strTftpNextServer
85d78ebc068381ca25c84242e38ec4b2be4843a5vboxsync && fDnsPassDomain == n.fDnsPassDomain
85d78ebc068381ca25c84242e38ec4b2be4843a5vboxsync && fDnsProxy == n.fDnsProxy
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync && fDnsUseHostResolver == n.fDnsUseHostResolver
85d78ebc068381ca25c84242e38ec4b2be4843a5vboxsync && fAliasLog == n.fAliasLog
85d78ebc068381ca25c84242e38ec4b2be4843a5vboxsync && fAliasProxyOnly == n.fAliasProxyOnly
85d78ebc068381ca25c84242e38ec4b2be4843a5vboxsync && fAliasUseSamePorts == n.fAliasUseSamePorts
85d78ebc068381ca25c84242e38ec4b2be4843a5vboxsync && llRules == n.llRules;
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync }
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync };
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync/**
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * NOTE: If you add any fields in here, you must update a) the constructor and b)
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * the operator== which is used by MachineConfigFile::operator==(), or otherwise
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * your settings might never get saved.
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync */
358a99c385080f7f31166943f3ac3a2aea6b5263vboxsyncstruct NetworkAdapter
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync{
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync NetworkAdapter()
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync : ulSlot(0),
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync type(NetworkAdapterType_Am79C970A),
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync fEnabled(false),
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync fCableConnected(false),
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync ulLineSpeed(0),
b604fbf16eda38d14b4999c245f032bfaa5aa85avboxsync enmPromiscModePolicy(NetworkAdapterPromiscModePolicy_Deny),
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync fTraceEnabled(false),
f62342e2cc901a67e27fa69c0e712ee35e9c4c68vboxsync mode(NetworkAttachmentType_Null),
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync ulBootPriority(0)
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync {}
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync bool operator==(const NetworkAdapter &n) const;
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync uint32_t ulSlot;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync
b604fbf16eda38d14b4999c245f032bfaa5aa85avboxsync NetworkAdapterType_T type;
b604fbf16eda38d14b4999c245f032bfaa5aa85avboxsync bool fEnabled;
b604fbf16eda38d14b4999c245f032bfaa5aa85avboxsync com::Utf8Str strMACAddress;
b604fbf16eda38d14b4999c245f032bfaa5aa85avboxsync bool fCableConnected;
b604fbf16eda38d14b4999c245f032bfaa5aa85avboxsync uint32_t ulLineSpeed;
b604fbf16eda38d14b4999c245f032bfaa5aa85avboxsync NetworkAdapterPromiscModePolicy_T enmPromiscModePolicy;
b604fbf16eda38d14b4999c245f032bfaa5aa85avboxsync bool fTraceEnabled;
b604fbf16eda38d14b4999c245f032bfaa5aa85avboxsync com::Utf8Str strTraceFile;
b604fbf16eda38d14b4999c245f032bfaa5aa85avboxsync
b604fbf16eda38d14b4999c245f032bfaa5aa85avboxsync NetworkAttachmentType_T mode;
b604fbf16eda38d14b4999c245f032bfaa5aa85avboxsync NAT nat;
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync com::Utf8Str strBridgedName;
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync com::Utf8Str strHostOnlyName;
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync com::Utf8Str strInternalNetworkName;
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync com::Utf8Str strGenericDriver;
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync StringsMap genericProperties;
b604fbf16eda38d14b4999c245f032bfaa5aa85avboxsync uint32_t ulBootPriority;
13d1fd6f43e9a245a4f2b4fc6845bdaa5d0f4134vboxsync com::Utf8Str strBandwidthGroup; // requires settings version 1.13 (VirtualBox 4.2)
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync};
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsynctypedef std::list<NetworkAdapter> NetworkAdaptersList;
d46ee884c41b808b239563b1978468aae12e33a2vboxsync
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync/**
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * NOTE: If you add any fields in here, you must update a) the constructor and b)
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * the operator== which is used by MachineConfigFile::operator==(), or otherwise
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * your settings might never get saved.
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync */
358a99c385080f7f31166943f3ac3a2aea6b5263vboxsyncstruct SerialPort
d46ee884c41b808b239563b1978468aae12e33a2vboxsync{
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync SerialPort()
d3bef44ac7674167abeada174f0d6cf0572249c5vboxsync : ulSlot(0),
d3bef44ac7674167abeada174f0d6cf0572249c5vboxsync fEnabled(false),
cbc68a61f0aa44b3f2b8a24217de2091c3ca2258vboxsync ulIOBase(0x3f8),
cbc68a61f0aa44b3f2b8a24217de2091c3ca2258vboxsync ulIRQ(4),
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync portMode(PortMode_Disconnected),
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync fServer(false)
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync {}
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync bool operator==(const SerialPort &n) const;
d3bef44ac7674167abeada174f0d6cf0572249c5vboxsync
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync uint32_t ulSlot;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync bool fEnabled;
fd0cf98cb3eafc5c96b7e95d934b01c5df4785fbvboxsync uint32_t ulIOBase;
fd0cf98cb3eafc5c96b7e95d934b01c5df4785fbvboxsync uint32_t ulIRQ;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync PortMode_T portMode;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync com::Utf8Str strPath;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync bool fServer;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync};
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsynctypedef std::list<SerialPort> SerialPortsList;
d46ee884c41b808b239563b1978468aae12e33a2vboxsync
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync/**
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * NOTE: If you add any fields in here, you must update a) the constructor and b)
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * the operator== which is used by MachineConfigFile::operator==(), or otherwise
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * your settings might never get saved.
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync */
358a99c385080f7f31166943f3ac3a2aea6b5263vboxsyncstruct ParallelPort
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync{
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync ParallelPort()
04ee5d908f45a7883257fa7e40fb42bbdbaf24b9vboxsync : ulSlot(0),
04ee5d908f45a7883257fa7e40fb42bbdbaf24b9vboxsync fEnabled(false),
04ee5d908f45a7883257fa7e40fb42bbdbaf24b9vboxsync ulIOBase(0x378),
04ee5d908f45a7883257fa7e40fb42bbdbaf24b9vboxsync ulIRQ(4)
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync {}
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync bool operator==(const ParallelPort &d) const;
04ee5d908f45a7883257fa7e40fb42bbdbaf24b9vboxsync
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync uint32_t ulSlot;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync bool fEnabled;
fd0cf98cb3eafc5c96b7e95d934b01c5df4785fbvboxsync uint32_t ulIOBase;
fd0cf98cb3eafc5c96b7e95d934b01c5df4785fbvboxsync uint32_t ulIRQ;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync com::Utf8Str strPath;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync};
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsynctypedef std::list<ParallelPort> ParallelPortsList;
d46ee884c41b808b239563b1978468aae12e33a2vboxsync
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync/**
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * NOTE: If you add any fields in here, you must update a) the constructor and b)
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * the operator== which is used by MachineConfigFile::operator==(), or otherwise
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * your settings might never get saved.
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync */
358a99c385080f7f31166943f3ac3a2aea6b5263vboxsyncstruct AudioAdapter
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync{
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync AudioAdapter()
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync : fEnabled(true),
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync controllerType(AudioControllerType_AC97),
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync driverType(AudioDriverType_Null)
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync {}
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync bool operator==(const AudioAdapter &a) const
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync {
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync return (this == &a)
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync || ( (fEnabled == a.fEnabled)
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync && (controllerType == a.controllerType)
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync && (driverType == a.driverType)
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync );
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync }
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync bool fEnabled;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync AudioControllerType_T controllerType;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync AudioDriverType_T driverType;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync};
d46ee884c41b808b239563b1978468aae12e33a2vboxsync
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync/**
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * NOTE: If you add any fields in here, you must update a) the constructor and b)
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * the operator== which is used by MachineConfigFile::operator==(), or otherwise
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * your settings might never get saved.
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync */
358a99c385080f7f31166943f3ac3a2aea6b5263vboxsyncstruct SharedFolder
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync{
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync SharedFolder()
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync : fWritable(false)
f1301dd8b6870b5a25c7dbdd46e0a0671bb62031vboxsync , fAutoMount(false)
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync {}
d46ee884c41b808b239563b1978468aae12e33a2vboxsync
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync bool operator==(const SharedFolder &a) const;
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync com::Utf8Str strName,
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync strHostPath;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync bool fWritable;
f1301dd8b6870b5a25c7dbdd46e0a0671bb62031vboxsync bool fAutoMount;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync};
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsynctypedef std::list<SharedFolder> SharedFoldersList;
d46ee884c41b808b239563b1978468aae12e33a2vboxsync
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync/**
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * NOTE: If you add any fields in here, you must update a) the constructor and b)
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * the operator== which is used by MachineConfigFile::operator==(), or otherwise
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * your settings might never get saved.
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync */
358a99c385080f7f31166943f3ac3a2aea6b5263vboxsyncstruct GuestProperty
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync{
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync GuestProperty()
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync : timestamp(0)
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync {};
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync bool operator==(const GuestProperty &g) const;
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync com::Utf8Str strName,
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync strValue;
fd0cf98cb3eafc5c96b7e95d934b01c5df4785fbvboxsync uint64_t timestamp;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync com::Utf8Str strFlags;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync};
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsynctypedef std::list<GuestProperty> GuestPropertiesList;
d46ee884c41b808b239563b1978468aae12e33a2vboxsync
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsynctypedef std::map<uint32_t, DeviceType_T> BootOrderMap;
d46ee884c41b808b239563b1978468aae12e33a2vboxsync
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync/**
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * NOTE: If you add any fields in here, you must update a) the constructor and b)
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * the operator== which is used by MachineConfigFile::operator==(), or otherwise
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * your settings might never get saved.
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync */
34aaaf212fe61ccafbae15eb832d6062ba548799vboxsyncstruct CpuIdLeaf
34aaaf212fe61ccafbae15eb832d6062ba548799vboxsync{
34aaaf212fe61ccafbae15eb832d6062ba548799vboxsync CpuIdLeaf()
1ea22ca610c19eb455275a4398575b6291c27629vboxsync : ulId(UINT32_MAX),
34aaaf212fe61ccafbae15eb832d6062ba548799vboxsync ulEax(0),
34aaaf212fe61ccafbae15eb832d6062ba548799vboxsync ulEbx(0),
34aaaf212fe61ccafbae15eb832d6062ba548799vboxsync ulEcx(0),
34aaaf212fe61ccafbae15eb832d6062ba548799vboxsync ulEdx(0)
34aaaf212fe61ccafbae15eb832d6062ba548799vboxsync {}
34aaaf212fe61ccafbae15eb832d6062ba548799vboxsync
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync bool operator==(const CpuIdLeaf &c) const
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync {
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync return ( (this == &c)
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync || ( (ulId == c.ulId)
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync && (ulEax == c.ulEax)
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync && (ulEbx == c.ulEbx)
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync && (ulEcx == c.ulEcx)
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync && (ulEdx == c.ulEdx)
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync )
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync );
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync }
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync
34aaaf212fe61ccafbae15eb832d6062ba548799vboxsync uint32_t ulId;
34aaaf212fe61ccafbae15eb832d6062ba548799vboxsync uint32_t ulEax;
34aaaf212fe61ccafbae15eb832d6062ba548799vboxsync uint32_t ulEbx;
34aaaf212fe61ccafbae15eb832d6062ba548799vboxsync uint32_t ulEcx;
34aaaf212fe61ccafbae15eb832d6062ba548799vboxsync uint32_t ulEdx;
34aaaf212fe61ccafbae15eb832d6062ba548799vboxsync};
34aaaf212fe61ccafbae15eb832d6062ba548799vboxsynctypedef std::list<CpuIdLeaf> CpuIdLeafsList;
34aaaf212fe61ccafbae15eb832d6062ba548799vboxsync
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync/**
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * NOTE: If you add any fields in here, you must update a) the constructor and b)
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * the operator== which is used by MachineConfigFile::operator==(), or otherwise
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * your settings might never get saved.
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync */
6e12ccc60ac657fb87e27b7a2b26e0a63bebe024vboxsyncstruct Cpu
6e12ccc60ac657fb87e27b7a2b26e0a63bebe024vboxsync{
6e12ccc60ac657fb87e27b7a2b26e0a63bebe024vboxsync Cpu()
6e12ccc60ac657fb87e27b7a2b26e0a63bebe024vboxsync : ulId(UINT32_MAX)
6e12ccc60ac657fb87e27b7a2b26e0a63bebe024vboxsync {}
6e12ccc60ac657fb87e27b7a2b26e0a63bebe024vboxsync
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync bool operator==(const Cpu &c) const
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync {
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync return (ulId == c.ulId);
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync }
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync
6e12ccc60ac657fb87e27b7a2b26e0a63bebe024vboxsync uint32_t ulId;
6e12ccc60ac657fb87e27b7a2b26e0a63bebe024vboxsync};
6e12ccc60ac657fb87e27b7a2b26e0a63bebe024vboxsynctypedef std::list<Cpu> CpuList;
6e12ccc60ac657fb87e27b7a2b26e0a63bebe024vboxsync
63b785c3291332a86a9bc473e68f08121368898bvboxsync/**
63b785c3291332a86a9bc473e68f08121368898bvboxsync * NOTE: If you add any fields in here, you must update a) the constructor and b)
63b785c3291332a86a9bc473e68f08121368898bvboxsync * the operator== which is used by MachineConfigFile::operator==(), or otherwise
63b785c3291332a86a9bc473e68f08121368898bvboxsync * your settings might never get saved.
63b785c3291332a86a9bc473e68f08121368898bvboxsync */
63b785c3291332a86a9bc473e68f08121368898bvboxsyncstruct BandwidthGroup
63b785c3291332a86a9bc473e68f08121368898bvboxsync{
63b785c3291332a86a9bc473e68f08121368898bvboxsync BandwidthGroup()
63b785c3291332a86a9bc473e68f08121368898bvboxsync : cMaxMbPerSec(0),
63b785c3291332a86a9bc473e68f08121368898bvboxsync enmType(BandwidthGroupType_Null)
63b785c3291332a86a9bc473e68f08121368898bvboxsync {}
63b785c3291332a86a9bc473e68f08121368898bvboxsync
63b785c3291332a86a9bc473e68f08121368898bvboxsync bool operator==(const BandwidthGroup &i) const
63b785c3291332a86a9bc473e68f08121368898bvboxsync {
63b785c3291332a86a9bc473e68f08121368898bvboxsync return ( (strName == i.strName)
63b785c3291332a86a9bc473e68f08121368898bvboxsync && (cMaxMbPerSec == i.cMaxMbPerSec)
63b785c3291332a86a9bc473e68f08121368898bvboxsync && (enmType == i.enmType));
63b785c3291332a86a9bc473e68f08121368898bvboxsync }
63b785c3291332a86a9bc473e68f08121368898bvboxsync
63b785c3291332a86a9bc473e68f08121368898bvboxsync com::Utf8Str strName;
63b785c3291332a86a9bc473e68f08121368898bvboxsync uint32_t cMaxMbPerSec;
63b785c3291332a86a9bc473e68f08121368898bvboxsync BandwidthGroupType_T enmType;
63b785c3291332a86a9bc473e68f08121368898bvboxsync};
63b785c3291332a86a9bc473e68f08121368898bvboxsynctypedef std::list<BandwidthGroup> BandwidthGroupList;
63b785c3291332a86a9bc473e68f08121368898bvboxsync
2dad255b092a5659ea0274b9385e2019ad040ea7vboxsync/**
2dad255b092a5659ea0274b9385e2019ad040ea7vboxsync * NOTE: If you add any fields in here, you must update a) the constructor and b)
2dad255b092a5659ea0274b9385e2019ad040ea7vboxsync * the operator== which is used by MachineConfigFile::operator==(), or otherwise
2dad255b092a5659ea0274b9385e2019ad040ea7vboxsync * your settings might never get saved.
2dad255b092a5659ea0274b9385e2019ad040ea7vboxsync */
2dad255b092a5659ea0274b9385e2019ad040ea7vboxsyncstruct IoSettings
2dad255b092a5659ea0274b9385e2019ad040ea7vboxsync{
2dad255b092a5659ea0274b9385e2019ad040ea7vboxsync IoSettings();
2dad255b092a5659ea0274b9385e2019ad040ea7vboxsync
2dad255b092a5659ea0274b9385e2019ad040ea7vboxsync bool operator==(const IoSettings &i) const
2dad255b092a5659ea0274b9385e2019ad040ea7vboxsync {
63b785c3291332a86a9bc473e68f08121368898bvboxsync return ( (fIoCacheEnabled == i.fIoCacheEnabled)
63b785c3291332a86a9bc473e68f08121368898bvboxsync && (ulIoCacheSize == i.ulIoCacheSize)
63b785c3291332a86a9bc473e68f08121368898bvboxsync && (llBandwidthGroups == i.llBandwidthGroups));
2dad255b092a5659ea0274b9385e2019ad040ea7vboxsync }
2dad255b092a5659ea0274b9385e2019ad040ea7vboxsync
63b785c3291332a86a9bc473e68f08121368898bvboxsync bool fIoCacheEnabled;
63b785c3291332a86a9bc473e68f08121368898bvboxsync uint32_t ulIoCacheSize;
63b785c3291332a86a9bc473e68f08121368898bvboxsync BandwidthGroupList llBandwidthGroups;
2dad255b092a5659ea0274b9385e2019ad040ea7vboxsync};
2dad255b092a5659ea0274b9385e2019ad040ea7vboxsync
342d1c2e846281e0bcbde2e97218273216b3fb32vboxsync/**
342d1c2e846281e0bcbde2e97218273216b3fb32vboxsync * NOTE: If you add any fields in here, you must update a) the constructor and b)
342d1c2e846281e0bcbde2e97218273216b3fb32vboxsync * the operator== which is used by MachineConfigFile::operator==(), or otherwise
342d1c2e846281e0bcbde2e97218273216b3fb32vboxsync * your settings might never get saved.
342d1c2e846281e0bcbde2e97218273216b3fb32vboxsync */
342d1c2e846281e0bcbde2e97218273216b3fb32vboxsyncstruct HostPciDeviceAttachment
342d1c2e846281e0bcbde2e97218273216b3fb32vboxsync{
342d1c2e846281e0bcbde2e97218273216b3fb32vboxsync HostPciDeviceAttachment()
342d1c2e846281e0bcbde2e97218273216b3fb32vboxsync : uHostAddress(0),
342d1c2e846281e0bcbde2e97218273216b3fb32vboxsync uGuestAddress(0)
342d1c2e846281e0bcbde2e97218273216b3fb32vboxsync {}
342d1c2e846281e0bcbde2e97218273216b3fb32vboxsync
342d1c2e846281e0bcbde2e97218273216b3fb32vboxsync bool operator==(const HostPciDeviceAttachment &a) const
342d1c2e846281e0bcbde2e97218273216b3fb32vboxsync {
342d1c2e846281e0bcbde2e97218273216b3fb32vboxsync return ( (uHostAddress == a.uHostAddress)
342d1c2e846281e0bcbde2e97218273216b3fb32vboxsync && (uGuestAddress == a.uGuestAddress)
342d1c2e846281e0bcbde2e97218273216b3fb32vboxsync && (strDeviceName == a.strDeviceName)
342d1c2e846281e0bcbde2e97218273216b3fb32vboxsync );
342d1c2e846281e0bcbde2e97218273216b3fb32vboxsync }
342d1c2e846281e0bcbde2e97218273216b3fb32vboxsync
342d1c2e846281e0bcbde2e97218273216b3fb32vboxsync com::Utf8Str strDeviceName;
342d1c2e846281e0bcbde2e97218273216b3fb32vboxsync uint32_t uHostAddress;
342d1c2e846281e0bcbde2e97218273216b3fb32vboxsync uint32_t uGuestAddress;
342d1c2e846281e0bcbde2e97218273216b3fb32vboxsync};
342d1c2e846281e0bcbde2e97218273216b3fb32vboxsynctypedef std::list<HostPciDeviceAttachment> HostPciDeviceAttachmentList;
342d1c2e846281e0bcbde2e97218273216b3fb32vboxsync
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync/**
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * Representation of Machine hardware; this is used in the MachineConfigFile.hardwareMachine
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * field.
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync *
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * NOTE: If you add any fields in here, you must update a) the constructor and b)
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * the operator== which is used by MachineConfigFile::operator==(), or otherwise
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * your settings might never get saved.
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync */
358a99c385080f7f31166943f3ac3a2aea6b5263vboxsyncstruct Hardware
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync{
606bf1f8cb2c02eb19f231f75e56417f0439951fvboxsync Hardware();
d46ee884c41b808b239563b1978468aae12e33a2vboxsync
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync bool operator==(const Hardware&) const;
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync com::Utf8Str strVersion; // hardware version, optional
ad9e5a61fea617d40d07390ff1737277d6aef869vboxsync com::Guid uuid; // hardware uuid, optional (null).
d46ee884c41b808b239563b1978468aae12e33a2vboxsync
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync bool fHardwareVirt,
2c744347b35ec425c206a25ca4095d30a12474d9vboxsync fHardwareVirtExclusive,
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync fNestedPaging,
c33fc49611f2444dade533488bf431e29eb88bcdvboxsync fLargePages,
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync fVPID,
0f8a368b17f9c3e1ef58be06f4bf290d4bb0a729vboxsync fHardwareVirtForce,
7119861e2c17e0a4e0638b06a544cc571cf6804avboxsync fSyntheticCpu,
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync fPAE;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync uint32_t cCPUs;
7a5aa60c341d7f14da337f31a3ed1afcee98bc8avboxsync bool fCpuHotPlug; // requires settings version 1.10 (VirtualBox 3.2)
7a5aa60c341d7f14da337f31a3ed1afcee98bc8avboxsync CpuList llCpus; // requires settings version 1.10 (VirtualBox 3.2)
7a5aa60c341d7f14da337f31a3ed1afcee98bc8avboxsync bool fHpetEnabled; // requires settings version 1.10 (VirtualBox 3.2)
657b2c9f6d33f08001e5fa6f6e0572dcf0391013vboxsync uint32_t ulCpuExecutionCap; // requires settings version 1.11 (VirtualBox 3.3)
7a5aa60c341d7f14da337f31a3ed1afcee98bc8avboxsync
34aaaf212fe61ccafbae15eb832d6062ba548799vboxsync CpuIdLeafsList llCpuIdLeafs;
d46ee884c41b808b239563b1978468aae12e33a2vboxsync
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync uint32_t ulMemorySizeMB;
d46ee884c41b808b239563b1978468aae12e33a2vboxsync
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync BootOrderMap mapBootOrder; // item 0 has highest priority
d46ee884c41b808b239563b1978468aae12e33a2vboxsync
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync uint32_t ulVRAMSizeMB;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync uint32_t cMonitors;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync bool fAccelerate3D,
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync fAccelerate2DVideo; // requires settings version 1.8 (VirtualBox 3.1)
b35e3948f1287430503b6b432945b8cf4bfd3a23vboxsync FirmwareType_T firmwareType; // requires settings version 1.9 (VirtualBox 3.1)
7a5aa60c341d7f14da337f31a3ed1afcee98bc8avboxsync
c606fa3531314e32f0ae90495618aeae47418477vboxsync PointingHidType_T pointingHidType; // requires settings version 1.10 (VirtualBox 3.2)
c606fa3531314e32f0ae90495618aeae47418477vboxsync KeyboardHidType_T keyboardHidType; // requires settings version 1.10 (VirtualBox 3.2)
d46ee884c41b808b239563b1978468aae12e33a2vboxsync
d70f332ce412cf75187ceda26709e58e4edc69ecvboxsync ChipsetType_T chipsetType; // requires settings version 1.11 (VirtualBox 4.0)
d70f332ce412cf75187ceda26709e58e4edc69ecvboxsync
3933885bc0c2c93436d858a14564c6179ec72872vboxsync VRDESettings vrdeSettings;
d46ee884c41b808b239563b1978468aae12e33a2vboxsync
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync BIOSSettings biosSettings;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync USBController usbController;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync NetworkAdaptersList llNetworkAdapters;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync SerialPortsList llSerialPorts;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync ParallelPortsList llParallelPorts;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync AudioAdapter audioAdapter;
d46ee884c41b808b239563b1978468aae12e33a2vboxsync
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync // technically these two have no business in the hardware section, but for some
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync // clever reason <Hardware> is where they are in the XML....
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync SharedFoldersList llSharedFolders;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync ClipboardMode_T clipboardMode;
d46ee884c41b808b239563b1978468aae12e33a2vboxsync
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync uint32_t ulMemoryBalloonSize;
60be873116377f59c5b5380ecfe531760eb3308cvboxsync bool fPageFusionEnabled;
d46ee884c41b808b239563b1978468aae12e33a2vboxsync
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync GuestPropertiesList llGuestProperties;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync com::Utf8Str strNotificationPatterns;
2dad255b092a5659ea0274b9385e2019ad040ea7vboxsync
2dad255b092a5659ea0274b9385e2019ad040ea7vboxsync IoSettings ioSettings; // requires settings version 1.10 (VirtualBox 3.2)
342d1c2e846281e0bcbde2e97218273216b3fb32vboxsync HostPciDeviceAttachmentList pciAttachments; // requires settings version 1.12 (VirtualBox 4.1)
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync};
d46ee884c41b808b239563b1978468aae12e33a2vboxsync
fc148a6b23d25a87561beaffe0ba06c3ba93bf5avboxsync/**
fc148a6b23d25a87561beaffe0ba06c3ba93bf5avboxsync * A device attached to a storage controller. This can either be a
fc148a6b23d25a87561beaffe0ba06c3ba93bf5avboxsync * hard disk or a DVD drive or a floppy drive and also specifies
fc148a6b23d25a87561beaffe0ba06c3ba93bf5avboxsync * which medium is "in" the drive; as a result, this is a combination
fc148a6b23d25a87561beaffe0ba06c3ba93bf5avboxsync * of the Main IMedium and IMediumAttachment interfaces.
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync *
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * NOTE: If you add any fields in here, you must update a) the constructor and b)
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * the operator== which is used by MachineConfigFile::operator==(), or otherwise
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * your settings might never get saved.
fc148a6b23d25a87561beaffe0ba06c3ba93bf5avboxsync */
358a99c385080f7f31166943f3ac3a2aea6b5263vboxsyncstruct AttachedDevice
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync{
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync AttachedDevice()
fc148a6b23d25a87561beaffe0ba06c3ba93bf5avboxsync : deviceType(DeviceType_Null),
fc148a6b23d25a87561beaffe0ba06c3ba93bf5avboxsync fPassThrough(false),
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync lPort(0),
63b785c3291332a86a9bc473e68f08121368898bvboxsync lDevice(0)
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync {}
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync bool operator==(const AttachedDevice &a) const;
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync
fc148a6b23d25a87561beaffe0ba06c3ba93bf5avboxsync DeviceType_T deviceType; // only HardDisk, DVD or Floppy are allowed
fc148a6b23d25a87561beaffe0ba06c3ba93bf5avboxsync
fc148a6b23d25a87561beaffe0ba06c3ba93bf5avboxsync // DVDs can be in pass-through mode:
fc148a6b23d25a87561beaffe0ba06c3ba93bf5avboxsync bool fPassThrough;
fc148a6b23d25a87561beaffe0ba06c3ba93bf5avboxsync
10153a147e7cb38821b5e7404bd2ef6b9af5be4avboxsync int32_t lPort;
10153a147e7cb38821b5e7404bd2ef6b9af5be4avboxsync int32_t lDevice;
fc148a6b23d25a87561beaffe0ba06c3ba93bf5avboxsync
fc148a6b23d25a87561beaffe0ba06c3ba93bf5avboxsync // if an image file is attached to the device (ISO, RAW, or hard disk image such as VDI),
fc148a6b23d25a87561beaffe0ba06c3ba93bf5avboxsync // this is its UUID; it depends on deviceType which media registry this then needs to
fc148a6b23d25a87561beaffe0ba06c3ba93bf5avboxsync // be looked up in. If no image file (only permitted for DVDs and floppies), then the UUID is NULL
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync com::Guid uuid;
fc148a6b23d25a87561beaffe0ba06c3ba93bf5avboxsync
fc148a6b23d25a87561beaffe0ba06c3ba93bf5avboxsync // for DVDs and floppies, the attachment can also be a host device:
fc148a6b23d25a87561beaffe0ba06c3ba93bf5avboxsync com::Utf8Str strHostDriveSrc; // if != NULL, value of <HostDrive>/@src
63b785c3291332a86a9bc473e68f08121368898bvboxsync
63b785c3291332a86a9bc473e68f08121368898bvboxsync // Bandwidth group the device is attached to.
63b785c3291332a86a9bc473e68f08121368898bvboxsync com::Utf8Str strBwGroup;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync};
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsynctypedef std::list<AttachedDevice> AttachedDevicesList;
d46ee884c41b808b239563b1978468aae12e33a2vboxsync
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync/**
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * NOTE: If you add any fields in here, you must update a) the constructor and b)
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * the operator== which is used by MachineConfigFile::operator==(), or otherwise
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * your settings might never get saved.
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync */
358a99c385080f7f31166943f3ac3a2aea6b5263vboxsyncstruct StorageController
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync{
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync StorageController()
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync : storageBus(StorageBus_IDE),
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync controllerType(StorageControllerType_PIIX3),
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync ulPortCount(2),
c8faf7a704e698dec3679d7df43ae55b1bab3eadvboxsync ulInstance(0),
aceec09dd145a4d6fb14f2ea75a459cc88b334abvboxsync fUseHostIOCache(true),
bf88068260ded16af90b7da4867240fbdd9c8017vboxsync fBootable(true),
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync lIDE0MasterEmulationPort(0),
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync lIDE0SlaveEmulationPort(0),
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync lIDE1MasterEmulationPort(0),
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync lIDE1SlaveEmulationPort(0)
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync {}
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync bool operator==(const StorageController &s) const;
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync com::Utf8Str strName;
89de31eab6e960abcacfb70916598ae1c2e7f737vboxsync StorageBus_T storageBus; // _SATA, _SCSI, _IDE, _SAS
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync StorageControllerType_T controllerType;
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync uint32_t ulPortCount;
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync uint32_t ulInstance;
aceec09dd145a4d6fb14f2ea75a459cc88b334abvboxsync bool fUseHostIOCache;
bf88068260ded16af90b7da4867240fbdd9c8017vboxsync bool fBootable;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync // only for when controllerType == StorageControllerType_IntelAhci:
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync int32_t lIDE0MasterEmulationPort,
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync lIDE0SlaveEmulationPort,
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync lIDE1MasterEmulationPort,
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync lIDE1SlaveEmulationPort;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync AttachedDevicesList llAttachedDevices;
d46ee884c41b808b239563b1978468aae12e33a2vboxsync};
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsynctypedef std::list<StorageController> StorageControllersList;
d46ee884c41b808b239563b1978468aae12e33a2vboxsync
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync/**
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * We wrap the storage controllers list into an extra struct so we can
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * use an undefined struct without needing std::list<> in all the headers.
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync *
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * NOTE: If you add any fields in here, you must update a) the constructor and b)
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * the operator== which is used by MachineConfigFile::operator==(), or otherwise
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * your settings might never get saved.
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync */
358a99c385080f7f31166943f3ac3a2aea6b5263vboxsyncstruct Storage
d46ee884c41b808b239563b1978468aae12e33a2vboxsync{
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync bool operator==(const Storage &s) const;
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync StorageControllersList llStorageControllers;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync};
d46ee884c41b808b239563b1978468aae12e33a2vboxsync
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsyncstruct Snapshot;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsynctypedef std::list<Snapshot> SnapshotsList;
d46ee884c41b808b239563b1978468aae12e33a2vboxsync
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync/**
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * NOTE: If you add any fields in here, you must update a) the constructor and b)
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * the operator== which is used by MachineConfigFile::operator==(), or otherwise
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * your settings might never get saved.
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync */
358a99c385080f7f31166943f3ac3a2aea6b5263vboxsyncstruct Snapshot
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync{
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync bool operator==(const Snapshot &s) const;
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync com::Guid uuid;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync com::Utf8Str strName,
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync strDescription; // optional
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync RTTIMESPEC timestamp;
d46ee884c41b808b239563b1978468aae12e33a2vboxsync
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync com::Utf8Str strStateFile; // for online snapshots only
d46ee884c41b808b239563b1978468aae12e33a2vboxsync
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync Hardware hardware;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync Storage storage;
d46ee884c41b808b239563b1978468aae12e33a2vboxsync
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync SnapshotsList llChildSnapshots;
d46ee884c41b808b239563b1978468aae12e33a2vboxsync};
d46ee884c41b808b239563b1978468aae12e33a2vboxsync
e48239695d41f806ff02d8a60b97dc20d4822d7avboxsyncstruct MachineUserData
e48239695d41f806ff02d8a60b97dc20d4822d7avboxsync{
e48239695d41f806ff02d8a60b97dc20d4822d7avboxsync MachineUserData()
e48239695d41f806ff02d8a60b97dc20d4822d7avboxsync : fNameSync(true),
e48239695d41f806ff02d8a60b97dc20d4822d7avboxsync fTeleporterEnabled(false),
e48239695d41f806ff02d8a60b97dc20d4822d7avboxsync uTeleporterPort(0),
861809c36a5178c28e231b90288d3461e358553fvboxsync enmFaultToleranceState(FaultToleranceState_Inactive),
26ae7f0cac38c33d90eb69a15baef5fbdf7ca376vboxsync uFaultTolerancePort(0),
19cf10f137c0ec4522dff998b88e98f6e423d56dvboxsync uFaultToleranceInterval(0),
19cf10f137c0ec4522dff998b88e98f6e423d56dvboxsync fRTCUseUTC(false)
e48239695d41f806ff02d8a60b97dc20d4822d7avboxsync { }
e48239695d41f806ff02d8a60b97dc20d4822d7avboxsync
e48239695d41f806ff02d8a60b97dc20d4822d7avboxsync bool operator==(const MachineUserData &c) const
e48239695d41f806ff02d8a60b97dc20d4822d7avboxsync {
e48239695d41f806ff02d8a60b97dc20d4822d7avboxsync return (strName == c.strName)
e48239695d41f806ff02d8a60b97dc20d4822d7avboxsync && (fNameSync == c.fNameSync)
e48239695d41f806ff02d8a60b97dc20d4822d7avboxsync && (strDescription == c.strDescription)
e48239695d41f806ff02d8a60b97dc20d4822d7avboxsync && (strOsType == c.strOsType)
e48239695d41f806ff02d8a60b97dc20d4822d7avboxsync && (strSnapshotFolder == c.strSnapshotFolder)
e48239695d41f806ff02d8a60b97dc20d4822d7avboxsync && (fTeleporterEnabled == c.fTeleporterEnabled)
e48239695d41f806ff02d8a60b97dc20d4822d7avboxsync && (uTeleporterPort == c.uTeleporterPort)
e48239695d41f806ff02d8a60b97dc20d4822d7avboxsync && (strTeleporterAddress == c.strTeleporterAddress)
e48239695d41f806ff02d8a60b97dc20d4822d7avboxsync && (strTeleporterPassword == c.strTeleporterPassword)
861809c36a5178c28e231b90288d3461e358553fvboxsync && (enmFaultToleranceState == c.enmFaultToleranceState)
861809c36a5178c28e231b90288d3461e358553fvboxsync && (uFaultTolerancePort == c.uFaultTolerancePort)
26ae7f0cac38c33d90eb69a15baef5fbdf7ca376vboxsync && (uFaultToleranceInterval == c.uFaultToleranceInterval)
861809c36a5178c28e231b90288d3461e358553fvboxsync && (strFaultToleranceAddress == c.strFaultToleranceAddress)
2da39c8916d8c980fc544cdbae725ca57ee5949cvboxsync && (strFaultTolerancePassword == c.strFaultTolerancePassword)
e48239695d41f806ff02d8a60b97dc20d4822d7avboxsync && (fRTCUseUTC == c.fRTCUseUTC);
e48239695d41f806ff02d8a60b97dc20d4822d7avboxsync }
e48239695d41f806ff02d8a60b97dc20d4822d7avboxsync
e48239695d41f806ff02d8a60b97dc20d4822d7avboxsync com::Utf8Str strName;
e48239695d41f806ff02d8a60b97dc20d4822d7avboxsync bool fNameSync;
e48239695d41f806ff02d8a60b97dc20d4822d7avboxsync com::Utf8Str strDescription;
e48239695d41f806ff02d8a60b97dc20d4822d7avboxsync com::Utf8Str strOsType;
e48239695d41f806ff02d8a60b97dc20d4822d7avboxsync com::Utf8Str strSnapshotFolder;
e48239695d41f806ff02d8a60b97dc20d4822d7avboxsync bool fTeleporterEnabled;
e48239695d41f806ff02d8a60b97dc20d4822d7avboxsync uint32_t uTeleporterPort;
e48239695d41f806ff02d8a60b97dc20d4822d7avboxsync com::Utf8Str strTeleporterAddress;
e48239695d41f806ff02d8a60b97dc20d4822d7avboxsync com::Utf8Str strTeleporterPassword;
861809c36a5178c28e231b90288d3461e358553fvboxsync FaultToleranceState_T enmFaultToleranceState;
861809c36a5178c28e231b90288d3461e358553fvboxsync uint32_t uFaultTolerancePort;
861809c36a5178c28e231b90288d3461e358553fvboxsync com::Utf8Str strFaultToleranceAddress;
2da39c8916d8c980fc544cdbae725ca57ee5949cvboxsync com::Utf8Str strFaultTolerancePassword;
26ae7f0cac38c33d90eb69a15baef5fbdf7ca376vboxsync uint32_t uFaultToleranceInterval;
e48239695d41f806ff02d8a60b97dc20d4822d7avboxsync bool fRTCUseUTC;
e48239695d41f806ff02d8a60b97dc20d4822d7avboxsync};
e48239695d41f806ff02d8a60b97dc20d4822d7avboxsync
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync/**
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * MachineConfigFile represents an XML machine configuration. All the machine settings
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * that go out to the XML (or are read from it) are in here.
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync *
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * NOTE: If you add any fields in here, you must update a) the constructor and b)
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * the operator== which is used by Machine::saveSettings(), or otherwise your settings
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync * might never get saved.
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync */
358a99c385080f7f31166943f3ac3a2aea6b5263vboxsyncclass MachineConfigFile : public ConfigFileBase
d46ee884c41b808b239563b1978468aae12e33a2vboxsync{
d46ee884c41b808b239563b1978468aae12e33a2vboxsyncpublic:
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync com::Guid uuid;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync
e48239695d41f806ff02d8a60b97dc20d4822d7avboxsync MachineUserData machineUserData;
e48239695d41f806ff02d8a60b97dc20d4822d7avboxsync
e48239695d41f806ff02d8a60b97dc20d4822d7avboxsync com::Utf8Str strStateFile;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync bool fCurrentStateModified; // optional, default is true
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync RTTIMESPEC timeLastStateChange; // optional, defaults to now
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync bool fAborted; // optional, default is false
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync
e48239695d41f806ff02d8a60b97dc20d4822d7avboxsync com::Guid uuidCurrentSnapshot;
e48239695d41f806ff02d8a60b97dc20d4822d7avboxsync
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync Hardware hardwareMachine;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync Storage storageMachine;
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync MediaRegistry mediaRegistry;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync
64836f6a22eea42b83b0ec64abcb3aa7ccc27f25vboxsync StringsMap mapExtraDataItems;
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync SnapshotsList llFirstSnapshot; // first snapshot or empty list if there's none
d46ee884c41b808b239563b1978468aae12e33a2vboxsync
f7c0f913c4c22ee18059ff97055442566d0f14a1vboxsync MachineConfigFile(const com::Utf8Str *pstrFilename);
f7c0f913c4c22ee18059ff97055442566d0f14a1vboxsync
f7c0f913c4c22ee18059ff97055442566d0f14a1vboxsync bool operator==(const MachineConfigFile &m) const;
f7c0f913c4c22ee18059ff97055442566d0f14a1vboxsync
b099c6398b85f527d7343cb1da573e1e95f9fd10vboxsync bool canHaveOwnMediaRegistry() const;
b099c6398b85f527d7343cb1da573e1e95f9fd10vboxsync
f7c0f913c4c22ee18059ff97055442566d0f14a1vboxsync void importMachineXML(const xml::ElementNode &elmMachine);
f7c0f913c4c22ee18059ff97055442566d0f14a1vboxsync
f7c0f913c4c22ee18059ff97055442566d0f14a1vboxsync void write(const com::Utf8Str &strFilename);
ec037c82be3787508e228c537bd15ad9de28bac0vboxsync
ec037c82be3787508e228c537bd15ad9de28bac0vboxsync enum
ec037c82be3787508e228c537bd15ad9de28bac0vboxsync {
ec037c82be3787508e228c537bd15ad9de28bac0vboxsync BuildMachineXML_IncludeSnapshots = 0x01,
248bc375de5b09204f70b5de2e029800f28da4b5vboxsync BuildMachineXML_WriteVboxVersionAttribute = 0x02,
d8523ff7d948462e328eec88b602effe2e7f7080vboxsync BuildMachineXML_SkipRemovableMedia = 0x04,
f8bda775706ea71db79e09a408aacf2a949d6bc6vboxsync BuildMachineXML_MediaRegistry = 0x08,
f8bda775706ea71db79e09a408aacf2a949d6bc6vboxsync BuildMachineXML_SuppressSavedState = 0x10
ec037c82be3787508e228c537bd15ad9de28bac0vboxsync };
6a801286d1ede5d68a7490a9cd2a6ba0634ff18avboxsync void buildMachineXML(xml::ElementNode &elmMachine,
6a801286d1ede5d68a7490a9cd2a6ba0634ff18avboxsync uint32_t fl,
6a801286d1ede5d68a7490a9cd2a6ba0634ff18avboxsync std::list<xml::ElementNode*> *pllElementsWithUuidAttributes);
f7c0f913c4c22ee18059ff97055442566d0f14a1vboxsync
5f3798b1abe94e5828f28821c234d9e86d77e4a3vboxsync static bool isAudioDriverAllowedOnThisHost(AudioDriverType_T drv);
5f3798b1abe94e5828f28821c234d9e86d77e4a3vboxsync static AudioDriverType_T getHostDefaultAudioDriver();
5f3798b1abe94e5828f28821c234d9e86d77e4a3vboxsync
f7c0f913c4c22ee18059ff97055442566d0f14a1vboxsyncprivate:
f7c0f913c4c22ee18059ff97055442566d0f14a1vboxsync void readNetworkAdapters(const xml::ElementNode &elmHardware, NetworkAdaptersList &ll);
13770a1ab6adae6f0f7792bd79881e049e410d45vboxsync void readAttachedNetworkMode(const xml::ElementNode &pelmMode, bool fEnabled, NetworkAdapter &nic);
f7c0f913c4c22ee18059ff97055442566d0f14a1vboxsync void readCpuIdTree(const xml::ElementNode &elmCpuid, CpuIdLeafsList &ll);
f7c0f913c4c22ee18059ff97055442566d0f14a1vboxsync void readCpuTree(const xml::ElementNode &elmCpu, CpuList &ll);
f7c0f913c4c22ee18059ff97055442566d0f14a1vboxsync void readSerialPorts(const xml::ElementNode &elmUART, SerialPortsList &ll);
f7c0f913c4c22ee18059ff97055442566d0f14a1vboxsync void readParallelPorts(const xml::ElementNode &elmLPT, ParallelPortsList &ll);
5f3798b1abe94e5828f28821c234d9e86d77e4a3vboxsync void readAudioAdapter(const xml::ElementNode &elmAudioAdapter, AudioAdapter &aa);
f7c0f913c4c22ee18059ff97055442566d0f14a1vboxsync void readGuestProperties(const xml::ElementNode &elmGuestProperties, Hardware &hw);
f7c0f913c4c22ee18059ff97055442566d0f14a1vboxsync void readStorageControllerAttributes(const xml::ElementNode &elmStorageController, StorageController &sctl);
f7c0f913c4c22ee18059ff97055442566d0f14a1vboxsync void readHardware(const xml::ElementNode &elmHardware, Hardware &hw, Storage &strg);
f7c0f913c4c22ee18059ff97055442566d0f14a1vboxsync void readHardDiskAttachments_pre1_7(const xml::ElementNode &elmHardDiskAttachments, Storage &strg);
f7c0f913c4c22ee18059ff97055442566d0f14a1vboxsync void readStorageControllers(const xml::ElementNode &elmStorageControllers, Storage &strg);
f7c0f913c4c22ee18059ff97055442566d0f14a1vboxsync void readDVDAndFloppies_pre1_9(const xml::ElementNode &elmHardware, Storage &strg);
f7c0f913c4c22ee18059ff97055442566d0f14a1vboxsync void readSnapshot(const xml::ElementNode &elmSnapshot, Snapshot &snap);
f7c0f913c4c22ee18059ff97055442566d0f14a1vboxsync void convertOldOSType_pre1_5(com::Utf8Str &str);
f7c0f913c4c22ee18059ff97055442566d0f14a1vboxsync void readMachine(const xml::ElementNode &elmMachine);
f2490dbf97c8247439446844458461b00e50beb0vboxsync
f7c0f913c4c22ee18059ff97055442566d0f14a1vboxsync void buildHardwareXML(xml::ElementNode &elmParent, const Hardware &hw, const Storage &strg);
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync void buildNetworkXML(NetworkAttachmentType_T mode, xml::ElementNode &elmParent, bool fEnabled, const NetworkAdapter &nic);
6a801286d1ede5d68a7490a9cd2a6ba0634ff18avboxsync void buildStorageControllersXML(xml::ElementNode &elmParent,
6a801286d1ede5d68a7490a9cd2a6ba0634ff18avboxsync const Storage &st,
6a801286d1ede5d68a7490a9cd2a6ba0634ff18avboxsync bool fSkipRemovableMedia,
6a801286d1ede5d68a7490a9cd2a6ba0634ff18avboxsync std::list<xml::ElementNode*> *pllElementsWithUuidAttributes);
f7c0f913c4c22ee18059ff97055442566d0f14a1vboxsync void buildSnapshotXML(xml::ElementNode &elmParent, const Snapshot &snap);
f7c0f913c4c22ee18059ff97055442566d0f14a1vboxsync
f7c0f913c4c22ee18059ff97055442566d0f14a1vboxsync void bumpSettingsVersionIfNeeded();
f7c0f913c4c22ee18059ff97055442566d0f14a1vboxsync};
f2490dbf97c8247439446844458461b00e50beb0vboxsync
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync} // namespace settings
d46ee884c41b808b239563b1978468aae12e33a2vboxsync
d46ee884c41b808b239563b1978468aae12e33a2vboxsync
d46ee884c41b808b239563b1978468aae12e33a2vboxsync#endif /* ___VBox_settings_h */