VirtualBox

source: vbox/trunk/include/VBox/settings.h@ 52664

Last change on this file since 52664 was 52312, checked in by vboxsync, 10 years ago

6219: New parameters related to file size / recording time limitation for VM Video Capture have been added (vcpmaxtime, vcpmaxsize and vcpoptions - special codec options in key=value format). EbmlWriter has been refactored. Removed some redundant code.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Revision Author Id
File size: 43.3 KB
RevLine 
[6076]1/** @file
[22173]2 * Settings file data structures.
3 *
4 * These structures are created by the settings file loader and filled with values
[26156]5 * copied from the raw XML data. This was all new with VirtualBox 3.1 and allows us
6 * to finally make the XML reader version-independent and read VirtualBox XML files
7 * from earlier and even newer (future) versions without requiring complicated,
8 * tedious and error-prone XSLT conversions.
[22173]9 *
[26156]10 * It is this file that defines all structures that map VirtualBox global and
11 * machine settings to XML files. These structures are used by the rest of Main,
12 * even though this header file does not require anything else in Main.
13 *
[22173]14 * Note: Headers in Main code have been tweaked to only declare the structures
15 * defined here so that this header need only be included from code files that
16 * actually use these structures.
[6076]17 */
18
19/*
[50996]20 * Copyright (C) 2007-2014 Oracle Corporation
[6076]21 *
22 * This file is part of VirtualBox Open Source Edition (OSE), as
23 * available from http://www.virtualbox.org. This file is free software;
24 * you can redistribute it and/or modify it under the terms of the GNU
[8155]25 * General Public License (GPL) as published by the Free Software
26 * Foundation, in version 2 as it comes in the "COPYING" file of the
27 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
28 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
29 *
30 * The contents of this file may alternatively be used under the terms
31 * of the Common Development and Distribution License Version 1.0
32 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
33 * VirtualBox OSE distribution, in which case the provisions of the
34 * CDDL are applicable instead of those of the GPL.
35 *
36 * You may elect to license modified versions of this file under the
37 * terms and conditions of either the GPL or the CDDL or both.
[6076]38 */
39
40#ifndef ___VBox_settings_h
41#define ___VBox_settings_h
42
43#include <iprt/time.h>
44
[22173]45#include "VBox/com/VirtualBox.h"
46
[16560]47#include <VBox/com/Guid.h>
[22173]48#include <VBox/com/string.h>
[16560]49
[22173]50#include <list>
51#include <map>
[6076]52
[46720]53/**
54 * Maximum depth of the snapshot tree, to prevent stack overflows.
55 * XPCOM has a relatively low stack size for its workers, and we have
56 * to avoid crashes due to exceeding the limit both on reading and
57 * writing config files.
58 */
59#define SETTINGS_SNAPSHOT_DEPTH_MAX 250
60
[22173]61namespace xml
62{
63 class ElementNode;
64}
[6076]65
66namespace settings
67{
68
[22173]69class ConfigFileError;
[14854]70
[22173]71////////////////////////////////////////////////////////////////////////////////
72//
[31464]73// Structures shared between Machine XML and VirtualBox.xml
[22173]74//
75////////////////////////////////////////////////////////////////////////////////
[14854]76
[31464]77/**
78 * USB device filter definition. This struct is used both in MainConfigFile
79 * (for global USB filters) and MachineConfigFile (for machine filters).
80 *
81 * NOTE: If you add any fields in here, you must update a) the constructor and b)
82 * the operator== which is used by MachineConfigFile::operator==(), or otherwise
83 * your settings might never get saved.
84 */
85struct USBDeviceFilter
86{
87 USBDeviceFilter()
88 : fActive(false),
89 action(USBDeviceFilterAction_Null),
90 ulMaskedInterfaces(0)
91 {}
92
93 bool operator==(const USBDeviceFilter&u) const;
94
95 com::Utf8Str strName;
96 bool fActive;
97 com::Utf8Str strVendorId,
98 strProductId,
99 strRevision,
100 strManufacturer,
101 strProduct,
102 strSerialNumber,
103 strPort;
104 USBDeviceFilterAction_T action; // only used with host USB filters
105 com::Utf8Str strRemote; // irrelevant for host USB objects
106 uint32_t ulMaskedInterfaces; // irrelevant for host USB objects
107};
108
[31481]109typedef std::map<com::Utf8Str, com::Utf8Str> StringsMap;
[42129]110typedef std::list<com::Utf8Str> StringsList;
[31464]111
[22173]112// ExtraDataItem (used by both VirtualBox.xml and machines XML)
[22186]113struct USBDeviceFilter;
[22173]114typedef std::list<USBDeviceFilter> USBDeviceFiltersList;
[14854]115
[31464]116struct Medium;
117typedef std::list<Medium> MediaList;
118
[22173]119/**
[31464]120 * NOTE: If you add any fields in here, you must update a) the constructor and b)
121 * the operator== which is used by MachineConfigFile::operator==(), or otherwise
122 * your settings might never get saved.
123 */
124struct Medium
125{
[38746]126 Medium()
127 : fAutoReset(false),
128 hdType(MediumType_Normal)
129 {}
130
[31464]131 com::Guid uuid;
132 com::Utf8Str strLocation;
133 com::Utf8Str strDescription;
134
135 // the following are for hard disks only:
136 com::Utf8Str strFormat;
137 bool fAutoReset; // optional, only for diffs, default is false
[31481]138 StringsMap properties;
[31464]139 MediumType_T hdType;
140
141 MediaList llChildren; // only used with hard disks
142
143 bool operator==(const Medium &m) const;
144};
145
146/**
[31615]147 * A media registry. Starting with VirtualBox 3.3, this can appear in both the
148 * VirtualBox.xml file as well as machine XML files with settings version 1.11
149 * or higher, so these lists are now in ConfigFileBase.
150 *
[31464]151 * NOTE: If you add any fields in here, you must update a) the constructor and b)
152 * the operator== which is used by MachineConfigFile::operator==(), or otherwise
153 * your settings might never get saved.
154 */
155struct MediaRegistry
156{
157 MediaList llHardDisks,
158 llDvdImages,
159 llFloppyImages;
160
161 bool operator==(const MediaRegistry &m) const;
162};
163
164/**
[46349]165 *
[45117]166 */
[48094]167struct NATRule
168{
169 NATRule()
170 : proto(NATProtocol_TCP),
171 u16HostPort(0),
172 u16GuestPort(0)
173 {}
[45117]174
[48094]175 bool operator==(const NATRule &r) const
176 {
177 return strName == r.strName
178 && proto == r.proto
179 && u16HostPort == r.u16HostPort
180 && strHostIP == r.strHostIP
181 && u16GuestPort == r.u16GuestPort
182 && strGuestIP == r.strGuestIP;
183 }
[45117]184
[48094]185 com::Utf8Str strName;
186 NATProtocol_T proto;
187 uint16_t u16HostPort;
188 com::Utf8Str strHostIP;
189 uint16_t u16GuestPort;
190 com::Utf8Str strGuestIP;
191};
192typedef std::list<NATRule> NATRuleList;
[45117]193
[48094]194
[48093]195struct NATHostLoopbackOffset
196{
197 /** Note: 128/8 is only acceptable */
198 com::Utf8Str strLoopbackHostAddress;
199 uint32_t u32Offset;
200 bool operator == (const com::Utf8Str& strAddr)
201 {
202 return (strLoopbackHostAddress == strAddr);
203 }
[48538]204
[48093]205 bool operator == (uint32_t off)
206 {
207 return (this->u32Offset == off);
208 }
209};
210typedef std::list<NATHostLoopbackOffset> NATLoopbackOffsetList;
211
[45117]212/**
[22173]213 * Common base class for both MainConfigFile and MachineConfigFile
214 * which contains some common logic for both.
215 */
[22185]216class ConfigFileBase
[14854]217{
218public:
[22173]219 bool fileExists();
[14854]220
[26156]221 void copyBaseFrom(const ConfigFileBase &b);
222
[22173]223protected:
224 ConfigFileBase(const com::Utf8Str *pstrFilename);
[37502]225 /* Note: this copy constructor doesn't create a full copy of other, cause
226 * the file based stuff (xml doc) could not be copied. */
227 ConfigFileBase(const ConfigFileBase &other);
228
[22173]229 ~ConfigFileBase();
[14854]230
[22173]231 void parseUUID(com::Guid &guid,
232 const com::Utf8Str &strUUID) const;
233 void parseTimestamp(RTTIMESPEC &timestamp,
234 const com::Utf8Str &str) const;
[14854]235
[22173]236 com::Utf8Str makeString(const RTTIMESPEC &tm);
[14854]237
[22173]238 void readExtraData(const xml::ElementNode &elmExtraData,
[31481]239 StringsMap &map);
[22173]240 void readUSBDeviceFilters(const xml::ElementNode &elmDeviceFilters,
241 USBDeviceFiltersList &ll);
[31464]242 typedef enum {Error, HardDisk, DVDImage, FloppyImage} MediaType;
243 void readMedium(MediaType t, const xml::ElementNode &elmMedium, MediaList &llMedia);
244 void readMediaRegistry(const xml::ElementNode &elmMediaRegistry, MediaRegistry &mr);
[45117]245 void readNATForwardRuleList(const xml::ElementNode &elmParent, NATRuleList &llRules);
[48093]246 void readNATLoopbacks(const xml::ElementNode &elmParent, NATLoopbackOffsetList &llLoopBacks);
[14854]247
[28195]248 void setVersionAttribute(xml::ElementNode &elm);
[22173]249 void createStubDocument();
[6076]250
[31481]251 void buildExtraData(xml::ElementNode &elmParent, const StringsMap &me);
[31464]252 void buildUSBDeviceFilters(xml::ElementNode &elmParent,
[22173]253 const USBDeviceFiltersList &ll,
254 bool fHostMode);
[33524]255 void buildMedium(xml::ElementNode &elmMedium,
256 DeviceType_T devType,
257 const Medium &m,
258 uint32_t level);
[31464]259 void buildMediaRegistry(xml::ElementNode &elmParent,
260 const MediaRegistry &mr);
[45117]261 void buildNATForwardRuleList(xml::ElementNode &elmParent, const NATRuleList &natRuleList);
[48093]262 void buildNATLoopbacks(xml::ElementNode &elmParent, const NATLoopbackOffsetList &natLoopbackList);
[22173]263 void clearDocument();
[6076]264
[22173]265 struct Data;
266 Data *m;
[6076]267
[22173]268 friend class ConfigFileError;
269};
[6076]270
[22173]271////////////////////////////////////////////////////////////////////////////////
272//
[26156]273// VirtualBox.xml structures
274//
275////////////////////////////////////////////////////////////////////////////////
276
[22185]277struct Host
[22173]278{
279 USBDeviceFiltersList llUSBDeviceFilters;
280};
[6076]281
[22185]282struct SystemProperties
[6076]283{
[22173]284 SystemProperties()
285 : ulLogHistoryCount(3)
[48004]286#if defined(RT_OS_DARWIN) || defined(RT_OS_WINDOWS)
287 , fExclusiveHwVirt(false)
288#else
289 , fExclusiveHwVirt(true)
290#endif
[22173]291 {}
[6076]292
[22173]293 com::Utf8Str strDefaultMachineFolder;
294 com::Utf8Str strDefaultHardDiskFolder;
295 com::Utf8Str strDefaultHardDiskFormat;
[33386]296 com::Utf8Str strVRDEAuthLibrary;
[22173]297 com::Utf8Str strWebServiceAuthLibrary;
[34244]298 com::Utf8Str strDefaultVRDEExtPack;
[42179]299 com::Utf8Str strAutostartDatabasePath;
[42748]300 com::Utf8Str strDefaultAdditionsISO;
[44948]301 com::Utf8Str strDefaultFrontend;
[46367]302 com::Utf8Str strLoggingLevel;
[22175]303 uint32_t ulLogHistoryCount;
[47991]304 bool fExclusiveHwVirt;
[22173]305};
[6076]306
[22185]307struct MachineRegistryEntry
[22173]308{
309 com::Guid uuid;
310 com::Utf8Str strSettingsFile;
311};
312typedef std::list<MachineRegistryEntry> MachinesRegistry;
[16560]313
[47018]314typedef std::map<DhcpOpt_T, com::Utf8Str> DhcpOptionMap;
315typedef DhcpOptionMap::value_type DhcpOptValuePair;
316typedef DhcpOptionMap::iterator DhcpOptIterator;
317typedef DhcpOptionMap::const_iterator DhcpOptConstIterator;
318
319typedef struct VmNameSlotKey
320{
321 VmNameSlotKey(const com::Utf8Str& aVmName, LONG aSlot): VmName(aVmName),
322 Slot(aSlot){}
323 const com::Utf8Str VmName;
324 LONG Slot;
325 bool operator< (const VmNameSlotKey& that) const
326 {
327 if (VmName == that.VmName)
328 return Slot < that.Slot;
329 else return VmName < that.VmName;
330 }
331} VmNameSlotKey;
332typedef std::map<VmNameSlotKey, DhcpOptionMap> VmSlot2OptionsMap;
333typedef VmSlot2OptionsMap::value_type VmSlot2OptionsPair;
334typedef VmSlot2OptionsMap::iterator VmSlot2OptionsIterator;
335typedef VmSlot2OptionsMap::const_iterator VmSlot2OptionsConstIterator;
336
[22185]337struct DHCPServer
[22173]338{
[38746]339 DHCPServer()
340 : fEnabled(false)
341 {}
342
[22173]343 com::Utf8Str strNetworkName,
344 strIPAddress,
345 strIPLower,
346 strIPUpper;
347 bool fEnabled;
[47018]348 std::map<DhcpOpt_T, com::Utf8Str> GlobalDhcpOptions;
349 VmSlot2OptionsMap VmSlot2OptionsM;
[22173]350};
351typedef std::list<DHCPServer> DHCPServersList;
[16560]352
[45117]353
354/**
[46349]355 * Nat Networking settings (NAT service).
[45117]356 */
357struct NATNetwork
358{
359 com::Utf8Str strNetworkName;
360 bool fEnabled;
361 com::Utf8Str strNetwork;
362 bool fIPv6;
363 com::Utf8Str strIPv6Prefix;
[48093]364 uint32_t u32HostLoopback6Offset;
365 NATLoopbackOffsetList llHostLoopbackOffsetList;
[45117]366 bool fAdvertiseDefaultIPv6Route;
367 bool fNeedDhcpServer;
368 NATRuleList llPortForwardRules4;
369 NATRuleList llPortForwardRules6;
[49587]370 NATNetwork():fEnabled(true),
[45117]371 fAdvertiseDefaultIPv6Route(false),
[49587]372 fNeedDhcpServer(true)
[45117]373 {}
374 bool operator==(const NATNetwork &n) const
375 {
376 return strNetworkName == n.strNetworkName
377 && strNetwork == n.strNetwork;
378 }
[46349]379
[45117]380};
381typedef std::list<NATNetwork> NATNetworksList;
382
[45138]383
[22185]384class MainConfigFile : public ConfigFileBase
[22173]385{
386public:
387 MainConfigFile(const com::Utf8Str *pstrFilename);
[16560]388
[22173]389 void readMachineRegistry(const xml::ElementNode &elmMachineRegistry);
390 void readDHCPServers(const xml::ElementNode &elmDHCPServers);
[47018]391 void readDhcpOptions(DhcpOptionMap& map, const xml::ElementNode& options);
[45117]392 void readNATNetworks(const xml::ElementNode &elmNATNetworks);
[16560]393
[22188]394 void write(const com::Utf8Str strFilename);
[16560]395
[22173]396 Host host;
397 SystemProperties systemProperties;
[31464]398 MediaRegistry mediaRegistry;
[22173]399 MachinesRegistry llMachines;
400 DHCPServersList llDhcpServers;
[45117]401 NATNetworksList llNATNetworks;
[31481]402 StringsMap mapExtraDataItems;
[47503]403
404private:
405 void bumpSettingsVersionIfNeeded();
[22173]406};
[16560]407
[22173]408////////////////////////////////////////////////////////////////////////////////
409//
410// Machine XML structures
411//
412////////////////////////////////////////////////////////////////////////////////
[16560]413
[26156]414/**
415 * NOTE: If you add any fields in here, you must update a) the constructor and b)
416 * the operator== which is used by MachineConfigFile::operator==(), or otherwise
417 * your settings might never get saved.
418 */
[33386]419struct VRDESettings
[22173]420{
[33386]421 VRDESettings()
[22173]422 : fEnabled(true),
[33386]423 authType(AuthType_Null),
[22173]424 ulAuthTimeout(5000),
425 fAllowMultiConnection(false),
[35146]426 fReuseSingleConnection(false)
[22173]427 {}
[16560]428
[33386]429 bool operator==(const VRDESettings& v) const;
[26156]430
[22173]431 bool fEnabled;
[33386]432 AuthType_T authType;
[22175]433 uint32_t ulAuthTimeout;
[34574]434 com::Utf8Str strAuthLibrary;
[22173]435 bool fAllowMultiConnection,
[35146]436 fReuseSingleConnection;
[34244]437 com::Utf8Str strVrdeExtPack;
[33556]438 StringsMap mapProperties;
[22173]439};
[6076]440
[26156]441/**
442 * NOTE: If you add any fields in here, you must update a) the constructor and b)
443 * the operator== which is used by MachineConfigFile::operator==(), or otherwise
444 * your settings might never get saved.
445 */
[22185]446struct BIOSSettings
[6076]447{
[22173]448 BIOSSettings()
449 : fACPIEnabled(true),
450 fIOAPICEnabled(false),
451 fLogoFadeIn(true),
[26830]452 fLogoFadeOut(true),
[22173]453 ulLogoDisplayTime(0),
454 biosBootMenuMode(BIOSBootMenuMode_MessageAndMenu),
455 fPXEDebugEnabled(false),
456 llTimeOffset(0)
457 {}
[6076]458
[26156]459 bool operator==(const BIOSSettings &d) const;
[25201]460
[22173]461 bool fACPIEnabled,
462 fIOAPICEnabled,
463 fLogoFadeIn,
464 fLogoFadeOut;
[22175]465 uint32_t ulLogoDisplayTime;
[22173]466 com::Utf8Str strLogoImagePath;
467 BIOSBootMenuMode_T biosBootMenuMode;
468 bool fPXEDebugEnabled;
[22177]469 int64_t llTimeOffset;
[22173]470};
[6076]471
[26156]472/**
473 * NOTE: If you add any fields in here, you must update a) the constructor and b)
474 * the operator== which is used by MachineConfigFile::operator==(), or otherwise
475 * your settings might never get saved.
476 */
[22185]477struct USBController
[22173]478{
479 USBController()
[47401]480 : enmType(USBControllerType_Null)
[22173]481 {}
[6076]482
[26156]483 bool operator==(const USBController &u) const;
484
[47401]485 com::Utf8Str strName;
486 USBControllerType_T enmType;
487};
488typedef std::list<USBController> USBControllerList;
489
490struct USB
491{
492 USB() {}
493
494 bool operator==(const USB &u) const;
495
496 /** List of USB controllers present. */
497 USBControllerList llUSBControllers;
498 /** List of USB device filters. */
[22173]499 USBDeviceFiltersList llDeviceFilters;
500};
[6076]501
[27857]502 struct NAT
503 {
[38746]504 NAT()
505 : u32Mtu(0),
506 u32SockRcv(0),
507 u32SockSnd(0),
508 u32TcpRcv(0),
509 u32TcpSnd(0),
[42551]510 fDNSPassDomain(true), /* historically this value is true */
511 fDNSProxy(false),
512 fDNSUseHostResolver(false),
[38746]513 fAliasLog(false),
514 fAliasProxyOnly(false),
515 fAliasUseSamePorts(false)
516 {}
[34837]517
[27857]518 bool operator==(const NAT &n) const
519 {
[28867]520 return strNetwork == n.strNetwork
521 && strBindIP == n.strBindIP
522 && u32Mtu == n.u32Mtu
523 && u32SockRcv == n.u32SockRcv
524 && u32SockSnd == n.u32SockSnd
525 && u32TcpSnd == n.u32TcpSnd
526 && u32TcpRcv == n.u32TcpRcv
[42551]527 && strTFTPPrefix == n.strTFTPPrefix
528 && strTFTPBootFile == n.strTFTPBootFile
529 && strTFTPNextServer == n.strTFTPNextServer
530 && fDNSPassDomain == n.fDNSPassDomain
531 && fDNSProxy == n.fDNSProxy
532 && fDNSUseHostResolver == n.fDNSUseHostResolver
[28867]533 && fAliasLog == n.fAliasLog
534 && fAliasProxyOnly == n.fAliasProxyOnly
535 && fAliasUseSamePorts == n.fAliasUseSamePorts
536 && llRules == n.llRules;
[27857]537 }
[38746]538
539 com::Utf8Str strNetwork;
540 com::Utf8Str strBindIP;
541 uint32_t u32Mtu;
542 uint32_t u32SockRcv;
543 uint32_t u32SockSnd;
544 uint32_t u32TcpRcv;
545 uint32_t u32TcpSnd;
[42551]546 com::Utf8Str strTFTPPrefix;
547 com::Utf8Str strTFTPBootFile;
548 com::Utf8Str strTFTPNextServer;
549 bool fDNSPassDomain;
550 bool fDNSProxy;
551 bool fDNSUseHostResolver;
[38746]552 bool fAliasLog;
553 bool fAliasProxyOnly;
554 bool fAliasUseSamePorts;
555 NATRuleList llRules;
[27857]556 };
[45117]557
[26156]558/**
559 * NOTE: If you add any fields in here, you must update a) the constructor and b)
560 * the operator== which is used by MachineConfigFile::operator==(), or otherwise
561 * your settings might never get saved.
562 */
[22185]563struct NetworkAdapter
[22173]564{
565 NetworkAdapter()
566 : ulSlot(0),
567 type(NetworkAdapterType_Am79C970A),
568 fEnabled(false),
569 fCableConnected(false),
570 ulLineSpeed(0),
[36082]571 enmPromiscModePolicy(NetworkAdapterPromiscModePolicy_Deny),
[22173]572 fTraceEnabled(false),
[28106]573 mode(NetworkAttachmentType_Null),
[37200]574 ulBootPriority(0)
[22173]575 {}
[6076]576
[26156]577 bool operator==(const NetworkAdapter &n) const;
578
[22173]579 uint32_t ulSlot;
[6076]580
[36082]581 NetworkAdapterType_T type;
582 bool fEnabled;
583 com::Utf8Str strMACAddress;
584 bool fCableConnected;
585 uint32_t ulLineSpeed;
586 NetworkAdapterPromiscModePolicy_T enmPromiscModePolicy;
587 bool fTraceEnabled;
588 com::Utf8Str strTraceFile;
[6076]589
[36082]590 NetworkAttachmentType_T mode;
591 NAT nat;
[37200]592 com::Utf8Str strBridgedName;
593 com::Utf8Str strHostOnlyName;
594 com::Utf8Str strInternalNetworkName;
595 com::Utf8Str strGenericDriver;
596 StringsMap genericProperties;
[48538]597 com::Utf8Str strNATNetworkName;
[36082]598 uint32_t ulBootPriority;
[36275]599 com::Utf8Str strBandwidthGroup; // requires settings version 1.13 (VirtualBox 4.2)
[22173]600};
601typedef std::list<NetworkAdapter> NetworkAdaptersList;
[6076]602
[26156]603/**
604 * NOTE: If you add any fields in here, you must update a) the constructor and b)
605 * the operator== which is used by MachineConfigFile::operator==(), or otherwise
606 * your settings might never get saved.
607 */
[22185]608struct SerialPort
[22173]609{
610 SerialPort()
[25203]611 : ulSlot(0),
612 fEnabled(false),
[27481]613 ulIOBase(0x3f8),
614 ulIRQ(4),
[22173]615 portMode(PortMode_Disconnected),
616 fServer(false)
617 {}
[6076]618
[26156]619 bool operator==(const SerialPort &n) const;
[25203]620
[22173]621 uint32_t ulSlot;
[6076]622
[22173]623 bool fEnabled;
[22175]624 uint32_t ulIOBase;
625 uint32_t ulIRQ;
[22173]626 PortMode_T portMode;
627 com::Utf8Str strPath;
628 bool fServer;
629};
630typedef std::list<SerialPort> SerialPortsList;
[6076]631
[26156]632/**
633 * NOTE: If you add any fields in here, you must update a) the constructor and b)
634 * the operator== which is used by MachineConfigFile::operator==(), or otherwise
635 * your settings might never get saved.
636 */
[22185]637struct ParallelPort
[22173]638{
639 ParallelPort()
[25202]640 : ulSlot(0),
641 fEnabled(false),
642 ulIOBase(0x378),
[40322]643 ulIRQ(7)
[22173]644 {}
[6076]645
[26156]646 bool operator==(const ParallelPort &d) const;
[25202]647
[22173]648 uint32_t ulSlot;
[6076]649
[22173]650 bool fEnabled;
[22175]651 uint32_t ulIOBase;
652 uint32_t ulIRQ;
[22173]653 com::Utf8Str strPath;
654};
655typedef std::list<ParallelPort> ParallelPortsList;
[6076]656
[26156]657/**
658 * NOTE: If you add any fields in here, you must update a) the constructor and b)
659 * the operator== which is used by MachineConfigFile::operator==(), or otherwise
660 * your settings might never get saved.
661 */
[22185]662struct AudioAdapter
[22173]663{
664 AudioAdapter()
665 : fEnabled(true),
666 controllerType(AudioControllerType_AC97),
667 driverType(AudioDriverType_Null)
668 {}
[6076]669
[26156]670 bool operator==(const AudioAdapter &a) const
671 {
672 return (this == &a)
673 || ( (fEnabled == a.fEnabled)
674 && (controllerType == a.controllerType)
675 && (driverType == a.driverType)
676 );
677 }
678
[22173]679 bool fEnabled;
680 AudioControllerType_T controllerType;
681 AudioDriverType_T driverType;
682};
[6076]683
[26156]684/**
685 * NOTE: If you add any fields in here, you must update a) the constructor and b)
686 * the operator== which is used by MachineConfigFile::operator==(), or otherwise
687 * your settings might never get saved.
688 */
[22185]689struct SharedFolder
[22173]690{
691 SharedFolder()
692 : fWritable(false)
[31002]693 , fAutoMount(false)
[22173]694 {}
[6076]695
[26156]696 bool operator==(const SharedFolder &a) const;
697
[22173]698 com::Utf8Str strName,
699 strHostPath;
700 bool fWritable;
[31002]701 bool fAutoMount;
[22173]702};
703typedef std::list<SharedFolder> SharedFoldersList;
[6076]704
[26156]705/**
706 * NOTE: If you add any fields in here, you must update a) the constructor and b)
707 * the operator== which is used by MachineConfigFile::operator==(), or otherwise
708 * your settings might never get saved.
709 */
[22185]710struct GuestProperty
[22173]711{
712 GuestProperty()
713 : timestamp(0)
714 {};
[6076]715
[26156]716 bool operator==(const GuestProperty &g) const;
717
[22173]718 com::Utf8Str strName,
719 strValue;
[22175]720 uint64_t timestamp;
[22173]721 com::Utf8Str strFlags;
722};
723typedef std::list<GuestProperty> GuestPropertiesList;
[6076]724
[22173]725typedef std::map<uint32_t, DeviceType_T> BootOrderMap;
[6076]726
[26156]727/**
728 * NOTE: If you add any fields in here, you must update a) the constructor and b)
729 * the operator== which is used by MachineConfigFile::operator==(), or otherwise
730 * your settings might never get saved.
731 */
[24296]732struct CpuIdLeaf
733{
734 CpuIdLeaf()
[24364]735 : ulId(UINT32_MAX),
[24296]736 ulEax(0),
737 ulEbx(0),
738 ulEcx(0),
739 ulEdx(0)
740 {}
741
[26156]742 bool operator==(const CpuIdLeaf &c) const
743 {
744 return ( (this == &c)
745 || ( (ulId == c.ulId)
746 && (ulEax == c.ulEax)
747 && (ulEbx == c.ulEbx)
748 && (ulEcx == c.ulEcx)
749 && (ulEdx == c.ulEdx)
750 )
751 );
752 }
753
[24296]754 uint32_t ulId;
755 uint32_t ulEax;
756 uint32_t ulEbx;
757 uint32_t ulEcx;
758 uint32_t ulEdx;
759};
760typedef std::list<CpuIdLeaf> CpuIdLeafsList;
761
[26156]762/**
763 * NOTE: If you add any fields in here, you must update a) the constructor and b)
764 * the operator== which is used by MachineConfigFile::operator==(), or otherwise
765 * your settings might never get saved.
766 */
[25901]767struct Cpu
768{
769 Cpu()
770 : ulId(UINT32_MAX)
771 {}
772
[26156]773 bool operator==(const Cpu &c) const
774 {
775 return (ulId == c.ulId);
776 }
777
[25901]778 uint32_t ulId;
779};
780typedef std::list<Cpu> CpuList;
781
[26156]782/**
[27324]783 * NOTE: If you add any fields in here, you must update a) the constructor and b)
784 * the operator== which is used by MachineConfigFile::operator==(), or otherwise
785 * your settings might never get saved.
786 */
[34587]787struct BandwidthGroup
788{
789 BandwidthGroup()
[41842]790 : cMaxBytesPerSec(0),
[34587]791 enmType(BandwidthGroupType_Null)
792 {}
793
794 bool operator==(const BandwidthGroup &i) const
795 {
796 return ( (strName == i.strName)
[41842]797 && (cMaxBytesPerSec == i.cMaxBytesPerSec)
[34587]798 && (enmType == i.enmType));
799 }
800
801 com::Utf8Str strName;
[41842]802 uint64_t cMaxBytesPerSec;
[34587]803 BandwidthGroupType_T enmType;
804};
805typedef std::list<BandwidthGroup> BandwidthGroupList;
806
807/**
808 * NOTE: If you add any fields in here, you must update a) the constructor and b)
809 * the operator== which is used by MachineConfigFile::operator==(), or otherwise
810 * your settings might never get saved.
811 */
[42551]812struct IOSettings
[27324]813{
[42551]814 IOSettings();
[27324]815
[42551]816 bool operator==(const IOSettings &i) const
[27324]817 {
[42551]818 return ( (fIOCacheEnabled == i.fIOCacheEnabled)
819 && (ulIOCacheSize == i.ulIOCacheSize)
[34587]820 && (llBandwidthGroups == i.llBandwidthGroups));
[27324]821 }
822
[42551]823 bool fIOCacheEnabled;
824 uint32_t ulIOCacheSize;
[34587]825 BandwidthGroupList llBandwidthGroups;
[27324]826};
827
828/**
[35885]829 * NOTE: If you add any fields in here, you must update a) the constructor and b)
830 * the operator== which is used by MachineConfigFile::operator==(), or otherwise
831 * your settings might never get saved.
832 */
[42551]833struct HostPCIDeviceAttachment
[35885]834{
[42551]835 HostPCIDeviceAttachment()
[35885]836 : uHostAddress(0),
837 uGuestAddress(0)
838 {}
839
[42551]840 bool operator==(const HostPCIDeviceAttachment &a) const
[35885]841 {
842 return ( (uHostAddress == a.uHostAddress)
843 && (uGuestAddress == a.uGuestAddress)
844 && (strDeviceName == a.strDeviceName)
845 );
846 }
847
848 com::Utf8Str strDeviceName;
849 uint32_t uHostAddress;
850 uint32_t uGuestAddress;
851};
[42551]852typedef std::list<HostPCIDeviceAttachment> HostPCIDeviceAttachmentList;
[35885]853
854/**
[26156]855 * Representation of Machine hardware; this is used in the MachineConfigFile.hardwareMachine
856 * field.
857 *
858 * NOTE: If you add any fields in here, you must update a) the constructor and b)
859 * the operator== which is used by MachineConfigFile::operator==(), or otherwise
860 * your settings might never get saved.
861 */
[22185]862struct Hardware
[22173]863{
[22296]864 Hardware();
[6076]865
[26156]866 bool operator==(const Hardware&) const;
867
[50996]868 bool areParavirtDefaultSettings() const
869 {
870 return paravirtProvider == ParavirtProvider_Legacy;
871 }
872
[22173]873 com::Utf8Str strVersion; // hardware version, optional
[24136]874 com::Guid uuid; // hardware uuid, optional (null).
[6076]875
[22173]876 bool fHardwareVirt,
877 fNestedPaging,
[27166]878 fLargePages,
[22173]879 fVPID,
[45971]880 fUnrestrictedExecution,
[31818]881 fHardwareVirtForce,
[23751]882 fSyntheticCpu,
[49058]883 fTripleFaultReset,
[22173]884 fPAE;
[45622]885 typedef enum LongModeType { LongMode_Enabled, LongMode_Disabled, LongMode_Legacy } LongModeType;
886 LongModeType enmLongMode;
[22173]887 uint32_t cCPUs;
[26459]888 bool fCpuHotPlug; // requires settings version 1.10 (VirtualBox 3.2)
889 CpuList llCpus; // requires settings version 1.10 (VirtualBox 3.2)
[42551]890 bool fHPETEnabled; // requires settings version 1.10 (VirtualBox 3.2)
[32885]891 uint32_t ulCpuExecutionCap; // requires settings version 1.11 (VirtualBox 3.3)
[26459]892
[24296]893 CpuIdLeafsList llCpuIdLeafs;
[6076]894
[22173]895 uint32_t ulMemorySizeMB;
[6076]896
[22173]897 BootOrderMap mapBootOrder; // item 0 has highest priority
[6076]898
[45660]899 GraphicsControllerType_T graphicsControllerType;
[22173]900 uint32_t ulVRAMSizeMB;
901 uint32_t cMonitors;
902 bool fAccelerate3D,
903 fAccelerate2DVideo; // requires settings version 1.8 (VirtualBox 3.1)
[45838]904
[46667]905 uint32_t ulVideoCaptureHorzRes; // requires settings version 1.14 (VirtualBox 4.3)
906 uint32_t ulVideoCaptureVertRes; // requires settings version 1.14 (VirtualBox 4.3)
907 uint32_t ulVideoCaptureRate; // requires settings version 1.14 (VirtualBox 4.3)
908 uint32_t ulVideoCaptureFPS; // requires settings version 1.14 (VirtualBox 4.3)
[52312]909 uint32_t ulVideoCaptureMaxTime; // requires settings version 1.14 (VirtualBox 4.3)
910 uint32_t ulVideoCaptureMaxSize; // requires settings version 1.14 (VirtualBox 4.3)
[46667]911 bool fVideoCaptureEnabled; // requires settings version 1.14 (VirtualBox 4.3)
912 uint64_t u64VideoCaptureScreens; // requires settings version 1.14 (VirtualBox 4.3)
913 com::Utf8Str strVideoCaptureFile; // requires settings version 1.14 (VirtualBox 4.3)
[46123]914
[32431]915 FirmwareType_T firmwareType; // requires settings version 1.9 (VirtualBox 3.1)
[26459]916
[42551]917 PointingHIDType_T pointingHIDType; // requires settings version 1.10 (VirtualBox 3.2)
918 KeyboardHIDType_T keyboardHIDType; // requires settings version 1.10 (VirtualBox 3.2)
[6076]919
[32120]920 ChipsetType_T chipsetType; // requires settings version 1.11 (VirtualBox 4.0)
[50996]921 ParavirtProvider_T paravirtProvider; // requires settings version 1.15 (VirtualBox 4.4)
[32120]922
[41371]923 bool fEmulatedUSBCardReader; // 1.12 (VirtualBox 4.1)
924
[33386]925 VRDESettings vrdeSettings;
[6076]926
[22173]927 BIOSSettings biosSettings;
[47401]928 USB usbSettings;
[22173]929 NetworkAdaptersList llNetworkAdapters;
930 SerialPortsList llSerialPorts;
931 ParallelPortsList llParallelPorts;
932 AudioAdapter audioAdapter;
[6076]933
[22173]934 // technically these two have no business in the hardware section, but for some
935 // clever reason <Hardware> is where they are in the XML....
936 SharedFoldersList llSharedFolders;
937 ClipboardMode_T clipboardMode;
[51476]938 DnDMode_T dndMode;
[6076]939
[22173]940 uint32_t ulMemoryBalloonSize;
[29463]941 bool fPageFusionEnabled;
[6076]942
[22173]943 GuestPropertiesList llGuestProperties;
944 com::Utf8Str strNotificationPatterns;
[27324]945
[42551]946 IOSettings ioSettings; // requires settings version 1.10 (VirtualBox 3.2)
947 HostPCIDeviceAttachmentList pciAttachments; // requires settings version 1.12 (VirtualBox 4.1)
[44948]948
949 com::Utf8Str strDefaultFrontend; // requires settings version 1.14 (VirtualBox 4.3)
[22173]950};
[6076]951
[23223]952/**
953 * A device attached to a storage controller. This can either be a
954 * hard disk or a DVD drive or a floppy drive and also specifies
955 * which medium is "in" the drive; as a result, this is a combination
956 * of the Main IMedium and IMediumAttachment interfaces.
[26156]957 *
958 * NOTE: If you add any fields in here, you must update a) the constructor and b)
959 * the operator== which is used by MachineConfigFile::operator==(), or otherwise
960 * your settings might never get saved.
[23223]961 */
[22185]962struct AttachedDevice
[22173]963{
964 AttachedDevice()
[23223]965 : deviceType(DeviceType_Null),
966 fPassThrough(false),
[37709]967 fTempEject(false),
[37824]968 fNonRotational(false),
[49190]969 fDiscard(false),
970 fHotPluggable(false),
[22173]971 lPort(0),
[34587]972 lDevice(0)
[22173]973 {}
[6076]974
[26156]975 bool operator==(const AttachedDevice &a) const;
976
[23223]977 DeviceType_T deviceType; // only HardDisk, DVD or Floppy are allowed
978
979 // DVDs can be in pass-through mode:
980 bool fPassThrough;
981
[37709]982 // Whether guest-triggered eject of DVDs will keep the medium in the
983 // VM config or not:
984 bool fTempEject;
985
[37824]986 // Whether the medium is non-rotational:
987 bool fNonRotational;
988
[38873]989 // Whether the medium supports discarding unused blocks:
990 bool fDiscard;
991
[48879]992 // Whether the medium is hot-pluggable:
993 bool fHotPluggable;
994
[22177]995 int32_t lPort;
996 int32_t lDevice;
[23223]997
998 // if an image file is attached to the device (ISO, RAW, or hard disk image such as VDI),
999 // this is its UUID; it depends on deviceType which media registry this then needs to
1000 // be looked up in. If no image file (only permitted for DVDs and floppies), then the UUID is NULL
[22173]1001 com::Guid uuid;
[23223]1002
1003 // for DVDs and floppies, the attachment can also be a host device:
1004 com::Utf8Str strHostDriveSrc; // if != NULL, value of <HostDrive>/@src
[34587]1005
1006 // Bandwidth group the device is attached to.
1007 com::Utf8Str strBwGroup;
[6076]1008};
[22173]1009typedef std::list<AttachedDevice> AttachedDevicesList;
[6076]1010
[26156]1011/**
1012 * NOTE: If you add any fields in here, you must update a) the constructor and b)
1013 * the operator== which is used by MachineConfigFile::operator==(), or otherwise
1014 * your settings might never get saved.
1015 */
[22185]1016struct StorageController
[6076]1017{
[22173]1018 StorageController()
1019 : storageBus(StorageBus_IDE),
1020 controllerType(StorageControllerType_PIIX3),
1021 ulPortCount(2),
[24250]1022 ulInstance(0),
[29480]1023 fUseHostIOCache(true),
[34010]1024 fBootable(true),
[22173]1025 lIDE0MasterEmulationPort(0),
1026 lIDE0SlaveEmulationPort(0),
1027 lIDE1MasterEmulationPort(0),
1028 lIDE1SlaveEmulationPort(0)
1029 {}
[6076]1030
[26156]1031 bool operator==(const StorageController &s) const;
1032
1033 com::Utf8Str strName;
[28764]1034 StorageBus_T storageBus; // _SATA, _SCSI, _IDE, _SAS
[22173]1035 StorageControllerType_T controllerType;
[26156]1036 uint32_t ulPortCount;
1037 uint32_t ulInstance;
[29480]1038 bool fUseHostIOCache;
[34010]1039 bool fBootable;
[6076]1040
[22173]1041 // only for when controllerType == StorageControllerType_IntelAhci:
[26156]1042 int32_t lIDE0MasterEmulationPort,
1043 lIDE0SlaveEmulationPort,
1044 lIDE1MasterEmulationPort,
1045 lIDE1SlaveEmulationPort;
[6076]1046
[26156]1047 AttachedDevicesList llAttachedDevices;
[22173]1048};
1049typedef std::list<StorageController> StorageControllersList;
[6076]1050
[26156]1051/**
1052 * We wrap the storage controllers list into an extra struct so we can
1053 * use an undefined struct without needing std::list<> in all the headers.
1054 *
1055 * NOTE: If you add any fields in here, you must update a) the constructor and b)
1056 * the operator== which is used by MachineConfigFile::operator==(), or otherwise
1057 * your settings might never get saved.
1058 */
[22185]1059struct Storage
[22173]1060{
[26156]1061 bool operator==(const Storage &s) const;
1062
[22173]1063 StorageControllersList llStorageControllers;
1064};
[6076]1065
[40418]1066/**
1067 * Settings that has to do with debugging.
1068 */
1069struct Debugging
1070{
1071 Debugging()
1072 : fTracingEnabled(false),
1073 fAllowTracingToAccessVM(false),
1074 strTracingConfig()
1075 { }
1076
1077 bool operator==(const Debugging &rOther) const
1078 {
1079 return fTracingEnabled == rOther.fTracingEnabled
1080 && fAllowTracingToAccessVM == rOther.fAllowTracingToAccessVM
1081 && strTracingConfig == rOther.strTracingConfig;
1082 }
1083
1084 bool areDefaultSettings() const
1085 {
1086 return !fTracingEnabled
1087 && !fAllowTracingToAccessVM
1088 && strTracingConfig.isEmpty();
1089 }
1090
1091 bool fTracingEnabled;
1092 bool fAllowTracingToAccessVM;
1093 com::Utf8Str strTracingConfig;
1094};
1095
[41914]1096/**
1097 * Settings that has to do with autostart.
1098 */
1099struct Autostart
1100{
1101 Autostart()
1102 : fAutostartEnabled(false),
1103 uAutostartDelay(0),
1104 enmAutostopType(AutostopType_Disabled)
1105 { }
1106
1107 bool operator==(const Autostart &rOther) const
1108 {
1109 return fAutostartEnabled == rOther.fAutostartEnabled
1110 && uAutostartDelay == rOther.uAutostartDelay
1111 && enmAutostopType == rOther.enmAutostopType;
1112 }
1113
1114 bool areDefaultSettings() const
1115 {
1116 return !fAutostartEnabled
1117 && !uAutostartDelay
1118 && enmAutostopType == AutostopType_Disabled;
1119 }
1120
1121 bool fAutostartEnabled;
1122 uint32_t uAutostartDelay;
1123 AutostopType_T enmAutostopType;
1124};
1125
[22173]1126struct Snapshot;
1127typedef std::list<Snapshot> SnapshotsList;
[6076]1128
[26156]1129/**
1130 * NOTE: If you add any fields in here, you must update a) the constructor and b)
1131 * the operator== which is used by MachineConfigFile::operator==(), or otherwise
1132 * your settings might never get saved.
1133 */
[22185]1134struct Snapshot
[22173]1135{
[26156]1136 bool operator==(const Snapshot &s) const;
1137
[22173]1138 com::Guid uuid;
1139 com::Utf8Str strName,
1140 strDescription; // optional
1141 RTTIMESPEC timestamp;
[6076]1142
[22173]1143 com::Utf8Str strStateFile; // for online snapshots only
[6076]1144
[22173]1145 Hardware hardware;
1146 Storage storage;
1147
[40418]1148 Debugging debugging;
[41914]1149 Autostart autostart;
[40418]1150
[22173]1151 SnapshotsList llChildSnapshots;
[6076]1152};
1153
[31539]1154struct MachineUserData
1155{
1156 MachineUserData()
[43041]1157 : fDirectoryIncludesUUID(false),
1158 fNameSync(true),
[31539]1159 fTeleporterEnabled(false),
1160 uTeleporterPort(0),
[31685]1161 enmFaultToleranceState(FaultToleranceState_Inactive),
[31686]1162 uFaultTolerancePort(0),
[31696]1163 uFaultToleranceInterval(0),
1164 fRTCUseUTC(false)
[42129]1165 {
1166 llGroups.push_back("/");
1167 }
[31539]1168
1169 bool operator==(const MachineUserData &c) const
1170 {
1171 return (strName == c.strName)
[43041]1172 && (fDirectoryIncludesUUID == c.fDirectoryIncludesUUID)
[31539]1173 && (fNameSync == c.fNameSync)
1174 && (strDescription == c.strDescription)
[42176]1175 && (llGroups == c.llGroups)
[31539]1176 && (strOsType == c.strOsType)
1177 && (strSnapshotFolder == c.strSnapshotFolder)
1178 && (fTeleporterEnabled == c.fTeleporterEnabled)
1179 && (uTeleporterPort == c.uTeleporterPort)
1180 && (strTeleporterAddress == c.strTeleporterAddress)
1181 && (strTeleporterPassword == c.strTeleporterPassword)
[31685]1182 && (enmFaultToleranceState == c.enmFaultToleranceState)
1183 && (uFaultTolerancePort == c.uFaultTolerancePort)
[31686]1184 && (uFaultToleranceInterval == c.uFaultToleranceInterval)
[31685]1185 && (strFaultToleranceAddress == c.strFaultToleranceAddress)
[31742]1186 && (strFaultTolerancePassword == c.strFaultTolerancePassword)
[46349]1187 && (fRTCUseUTC == c.fRTCUseUTC)
1188 && (ovIcon == c.ovIcon);
[31539]1189 }
1190
1191 com::Utf8Str strName;
[43041]1192 bool fDirectoryIncludesUUID;
[31539]1193 bool fNameSync;
1194 com::Utf8Str strDescription;
[42129]1195 StringsList llGroups;
[31539]1196 com::Utf8Str strOsType;
1197 com::Utf8Str strSnapshotFolder;
1198 bool fTeleporterEnabled;
1199 uint32_t uTeleporterPort;
1200 com::Utf8Str strTeleporterAddress;
1201 com::Utf8Str strTeleporterPassword;
[31685]1202 FaultToleranceState_T enmFaultToleranceState;
1203 uint32_t uFaultTolerancePort;
1204 com::Utf8Str strFaultToleranceAddress;
[31742]1205 com::Utf8Str strFaultTolerancePassword;
[31686]1206 uint32_t uFaultToleranceInterval;
[31539]1207 bool fRTCUseUTC;
[46349]1208 com::Utf8Str ovIcon;
[31539]1209};
1210
[26156]1211/**
1212 * MachineConfigFile represents an XML machine configuration. All the machine settings
1213 * that go out to the XML (or are read from it) are in here.
1214 *
1215 * NOTE: If you add any fields in here, you must update a) the constructor and b)
1216 * the operator== which is used by Machine::saveSettings(), or otherwise your settings
1217 * might never get saved.
1218 */
[22185]1219class MachineConfigFile : public ConfigFileBase
[6076]1220{
1221public:
[22173]1222 com::Guid uuid;
[31539]1223
1224 MachineUserData machineUserData;
1225
[30764]1226 com::Utf8Str strStateFile;
[22173]1227 bool fCurrentStateModified; // optional, default is true
1228 RTTIMESPEC timeLastStateChange; // optional, defaults to now
1229 bool fAborted; // optional, default is false
[6076]1230
[31539]1231 com::Guid uuidCurrentSnapshot;
1232
[22173]1233 Hardware hardwareMachine;
1234 Storage storageMachine;
[31464]1235 MediaRegistry mediaRegistry;
[40418]1236 Debugging debugging;
[41914]1237 Autostart autostart;
[6076]1238
[31481]1239 StringsMap mapExtraDataItems;
[6076]1240
[22173]1241 SnapshotsList llFirstSnapshot; // first snapshot or empty list if there's none
[6076]1242
[27918]1243 MachineConfigFile(const com::Utf8Str *pstrFilename);
[27835]1244
[27918]1245 bool operator==(const MachineConfigFile &m) const;
[27835]1246
[31615]1247 bool canHaveOwnMediaRegistry() const;
1248
[27918]1249 void importMachineXML(const xml::ElementNode &elmMachine);
1250
1251 void write(const com::Utf8Str &strFilename);
1252
[28195]1253 enum
1254 {
1255 BuildMachineXML_IncludeSnapshots = 0x01,
[50196]1256 BuildMachineXML_WriteVBoxVersionAttribute = 0x02,
[31464]1257 BuildMachineXML_SkipRemovableMedia = 0x04,
[33661]1258 BuildMachineXML_MediaRegistry = 0x08,
1259 BuildMachineXML_SuppressSavedState = 0x10
[28195]1260 };
[29873]1261 void buildMachineXML(xml::ElementNode &elmMachine,
1262 uint32_t fl,
1263 std::list<xml::ElementNode*> *pllElementsWithUuidAttributes);
[28195]1264
[30934]1265 static bool isAudioDriverAllowedOnThisHost(AudioDriverType_T drv);
1266 static AudioDriverType_T getHostDefaultAudioDriver();
1267
[27918]1268private:
1269 void readNetworkAdapters(const xml::ElementNode &elmHardware, NetworkAdaptersList &ll);
[28295]1270 void readAttachedNetworkMode(const xml::ElementNode &pelmMode, bool fEnabled, NetworkAdapter &nic);
[27918]1271 void readCpuIdTree(const xml::ElementNode &elmCpuid, CpuIdLeafsList &ll);
1272 void readCpuTree(const xml::ElementNode &elmCpu, CpuList &ll);
1273 void readSerialPorts(const xml::ElementNode &elmUART, SerialPortsList &ll);
1274 void readParallelPorts(const xml::ElementNode &elmLPT, ParallelPortsList &ll);
[30934]1275 void readAudioAdapter(const xml::ElementNode &elmAudioAdapter, AudioAdapter &aa);
[27918]1276 void readGuestProperties(const xml::ElementNode &elmGuestProperties, Hardware &hw);
1277 void readStorageControllerAttributes(const xml::ElementNode &elmStorageController, StorageController &sctl);
1278 void readHardware(const xml::ElementNode &elmHardware, Hardware &hw, Storage &strg);
1279 void readHardDiskAttachments_pre1_7(const xml::ElementNode &elmHardDiskAttachments, Storage &strg);
1280 void readStorageControllers(const xml::ElementNode &elmStorageControllers, Storage &strg);
1281 void readDVDAndFloppies_pre1_9(const xml::ElementNode &elmHardware, Storage &strg);
[40066]1282 void readTeleporter(const xml::ElementNode *pElmTeleporter, MachineUserData *pUserData);
[41914]1283 void readDebugging(const xml::ElementNode *pElmDbg, Debugging *pDbg);
1284 void readAutostart(const xml::ElementNode *pElmAutostart, Autostart *pAutostart);
[42176]1285 void readGroups(const xml::ElementNode *elmGroups, StringsList *pllGroups);
[49687]1286 bool readSnapshot(const com::Guid &curSnapshotUuid, uint32_t depth, const xml::ElementNode &elmSnapshot, Snapshot &snap);
[27918]1287 void convertOldOSType_pre1_5(com::Utf8Str &str);
1288 void readMachine(const xml::ElementNode &elmMachine);
1289
1290 void buildHardwareXML(xml::ElementNode &elmParent, const Hardware &hw, const Storage &strg);
[37200]1291 void buildNetworkXML(NetworkAttachmentType_T mode, xml::ElementNode &elmParent, bool fEnabled, const NetworkAdapter &nic);
[29873]1292 void buildStorageControllersXML(xml::ElementNode &elmParent,
1293 const Storage &st,
1294 bool fSkipRemovableMedia,
1295 std::list<xml::ElementNode*> *pllElementsWithUuidAttributes);
[40418]1296 void buildDebuggingXML(xml::ElementNode *pElmParent, const Debugging *pDbg);
[41914]1297 void buildAutostartXML(xml::ElementNode *pElmParent, const Autostart *pAutostart);
[42176]1298 void buildGroupsXML(xml::ElementNode *pElmParent, const StringsList *pllGroups);
[46720]1299 void buildSnapshotXML(uint32_t depth, xml::ElementNode &elmParent, const Snapshot &snap);
[27918]1300
1301 void bumpSettingsVersionIfNeeded();
1302};
1303
[22173]1304} // namespace settings
[6076]1305
[14854]1306
[6076]1307#endif /* ___VBox_settings_h */
Note: See TracBrowser for help on using the repository browser.

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