VirtualBox

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

Last change on this file since 27787 was 27481, checked in by vboxsync, 15 years ago

Settings: I/O base and IRQ mixup for serial ports

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Revision Author Id
File size: 26.0 KB
Line 
1/** @file
2 * Settings file data structures.
3 *
4 * These structures are created by the settings file loader and filled with values
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.
9 *
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 *
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.
17 */
18
19/*
20 * Copyright (C) 2007-2010 Sun Microsystems, Inc.
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
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.
38 *
39 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
40 * Clara, CA 95054 USA or visit http://www.sun.com if you need
41 * additional information or have any questions.
42 */
43
44#ifndef ___VBox_settings_h
45#define ___VBox_settings_h
46
47#include <iprt/time.h>
48
49#include "VBox/com/VirtualBox.h"
50
51#include <VBox/com/Guid.h>
52#include <VBox/com/string.h>
53
54#include <list>
55#include <map>
56
57namespace xml
58{
59 class ElementNode;
60}
61
62namespace settings
63{
64
65class ConfigFileError;
66
67////////////////////////////////////////////////////////////////////////////////
68//
69// Helper classes
70//
71////////////////////////////////////////////////////////////////////////////////
72
73// ExtraDataItem (used by both VirtualBox.xml and machines XML)
74typedef std::map<com::Utf8Str, com::Utf8Str> ExtraDataItemsMap;
75struct USBDeviceFilter;
76typedef std::list<USBDeviceFilter> USBDeviceFiltersList;
77
78/**
79 * Common base class for both MainConfigFile and MachineConfigFile
80 * which contains some common logic for both.
81 */
82class ConfigFileBase
83{
84public:
85 bool fileExists();
86
87 void copyBaseFrom(const ConfigFileBase &b);
88
89protected:
90 ConfigFileBase(const com::Utf8Str *pstrFilename);
91 ~ConfigFileBase();
92
93 void parseUUID(com::Guid &guid,
94 const com::Utf8Str &strUUID) const;
95 void parseTimestamp(RTTIMESPEC &timestamp,
96 const com::Utf8Str &str) const;
97
98 com::Utf8Str makeString(const RTTIMESPEC &tm);
99 com::Utf8Str makeString(const com::Guid &guid);
100
101 void readExtraData(const xml::ElementNode &elmExtraData,
102 ExtraDataItemsMap &map);
103 void readUSBDeviceFilters(const xml::ElementNode &elmDeviceFilters,
104 USBDeviceFiltersList &ll);
105
106 void createStubDocument();
107
108 void writeExtraData(xml::ElementNode &elmParent, const ExtraDataItemsMap &me);
109 void writeUSBDeviceFilters(xml::ElementNode &elmParent,
110 const USBDeviceFiltersList &ll,
111 bool fHostMode);
112
113 void clearDocument();
114
115 struct Data;
116 Data *m;
117
118 friend class ConfigFileError;
119};
120
121////////////////////////////////////////////////////////////////////////////////
122//
123// Structures shared between Machine XML and VirtualBox.xml
124//
125////////////////////////////////////////////////////////////////////////////////
126
127/**
128 * USB device filter definition. This struct is used both in MainConfigFile
129 * (for global USB filters) and MachineConfigFile (for machine filters).
130 *
131 * NOTE: If you add any fields in here, you must update a) the constructor and b)
132 * the operator== which is used by MachineConfigFile::operator==(), or otherwise
133 * your settings might never get saved.
134 */
135struct USBDeviceFilter
136{
137 USBDeviceFilter()
138 : fActive(false),
139 action(USBDeviceFilterAction_Null),
140 ulMaskedInterfaces(0)
141 {}
142
143 bool operator==(const USBDeviceFilter&u) const;
144
145 com::Utf8Str strName;
146 bool fActive;
147 com::Utf8Str strVendorId,
148 strProductId,
149 strRevision,
150 strManufacturer,
151 strProduct,
152 strSerialNumber,
153 strPort;
154 USBDeviceFilterAction_T action; // only used with host USB filters
155 com::Utf8Str strRemote; // irrelevant for host USB objects
156 uint32_t ulMaskedInterfaces; // irrelevant for host USB objects
157};
158
159////////////////////////////////////////////////////////////////////////////////
160//
161// VirtualBox.xml structures
162//
163////////////////////////////////////////////////////////////////////////////////
164
165struct Host
166{
167 USBDeviceFiltersList llUSBDeviceFilters;
168};
169
170struct SystemProperties
171{
172 SystemProperties()
173 : ulLogHistoryCount(3)
174 {}
175
176 com::Utf8Str strDefaultMachineFolder;
177 com::Utf8Str strDefaultHardDiskFolder;
178 com::Utf8Str strDefaultHardDiskFormat;
179 com::Utf8Str strRemoteDisplayAuthLibrary;
180 com::Utf8Str strWebServiceAuthLibrary;
181 uint32_t ulLogHistoryCount;
182};
183
184typedef std::map<com::Utf8Str, com::Utf8Str> PropertiesMap;
185
186struct Medium;
187typedef std::list<Medium> MediaList;
188
189struct Medium
190{
191 com::Guid uuid;
192 com::Utf8Str strLocation;
193 com::Utf8Str strDescription;
194
195 // the following are for hard disks only:
196 com::Utf8Str strFormat;
197 bool fAutoReset; // optional, only for diffs, default is false
198 PropertiesMap properties;
199 MediumType_T hdType;
200
201 MediaList llChildren; // only used with hard disks
202};
203
204struct MachineRegistryEntry
205{
206 com::Guid uuid;
207 com::Utf8Str strSettingsFile;
208};
209typedef std::list<MachineRegistryEntry> MachinesRegistry;
210
211struct DHCPServer
212{
213 com::Utf8Str strNetworkName,
214 strIPAddress,
215 strIPNetworkMask,
216 strIPLower,
217 strIPUpper;
218 bool fEnabled;
219};
220typedef std::list<DHCPServer> DHCPServersList;
221
222class MainConfigFile : public ConfigFileBase
223{
224public:
225 MainConfigFile(const com::Utf8Str *pstrFilename);
226
227 typedef enum {Error, HardDisk, DVDImage, FloppyImage} MediaType;
228 void readMedium(MediaType t, const xml::ElementNode &elmMedium, MediaList &llMedia);
229 void readMediaRegistry(const xml::ElementNode &elmMediaRegistry);
230 void readMachineRegistry(const xml::ElementNode &elmMachineRegistry);
231 void readDHCPServers(const xml::ElementNode &elmDHCPServers);
232
233 void writeHardDisk(xml::ElementNode &elmMedium,
234 const Medium &m,
235 uint32_t level);
236 void write(const com::Utf8Str strFilename);
237
238 Host host;
239 SystemProperties systemProperties;
240 MediaList llHardDisks,
241 llDvdImages,
242 llFloppyImages;
243 MachinesRegistry llMachines;
244 DHCPServersList llDhcpServers;
245 ExtraDataItemsMap mapExtraDataItems;
246};
247
248////////////////////////////////////////////////////////////////////////////////
249//
250// Machine XML structures
251//
252////////////////////////////////////////////////////////////////////////////////
253
254/**
255 * NOTE: If you add any fields in here, you must update a) the constructor and b)
256 * the operator== which is used by MachineConfigFile::operator==(), or otherwise
257 * your settings might never get saved.
258 */
259struct VRDPSettings
260{
261 VRDPSettings()
262 : fEnabled(true),
263 authType(VRDPAuthType_Null),
264 ulAuthTimeout(5000),
265 fAllowMultiConnection(false),
266 fReuseSingleConnection(false)
267 {}
268
269 bool operator==(const VRDPSettings& v) const;
270
271 bool fEnabled;
272 com::Utf8Str strPort;
273 com::Utf8Str strNetAddress;
274 VRDPAuthType_T authType;
275 uint32_t ulAuthTimeout;
276 bool fAllowMultiConnection,
277 fReuseSingleConnection;
278};
279
280/**
281 * NOTE: If you add any fields in here, you must update a) the constructor and b)
282 * the operator== which is used by MachineConfigFile::operator==(), or otherwise
283 * your settings might never get saved.
284 */
285struct BIOSSettings
286{
287 BIOSSettings()
288 : fACPIEnabled(true),
289 fIOAPICEnabled(false),
290 fLogoFadeIn(true),
291 fLogoFadeOut(true),
292 ulLogoDisplayTime(0),
293 biosBootMenuMode(BIOSBootMenuMode_MessageAndMenu),
294 fPXEDebugEnabled(false),
295 llTimeOffset(0)
296 {}
297
298 bool operator==(const BIOSSettings &d) const;
299
300 bool fACPIEnabled,
301 fIOAPICEnabled,
302 fLogoFadeIn,
303 fLogoFadeOut;
304 uint32_t ulLogoDisplayTime;
305 com::Utf8Str strLogoImagePath;
306 BIOSBootMenuMode_T biosBootMenuMode;
307 bool fPXEDebugEnabled;
308 int64_t llTimeOffset;
309};
310
311/**
312 * NOTE: If you add any fields in here, you must update a) the constructor and b)
313 * the operator== which is used by MachineConfigFile::operator==(), or otherwise
314 * your settings might never get saved.
315 */
316struct USBController
317{
318 USBController()
319 : fEnabled(false),
320 fEnabledEHCI(false)
321 {}
322
323 bool operator==(const USBController &u) const;
324
325 bool fEnabled;
326 bool fEnabledEHCI;
327 USBDeviceFiltersList llDeviceFilters;
328};
329
330/**
331 * NOTE: If you add any fields in here, you must update a) the constructor and b)
332 * the operator== which is used by MachineConfigFile::operator==(), or otherwise
333 * your settings might never get saved.
334 */
335struct NetworkAdapter
336{
337 NetworkAdapter()
338 : ulSlot(0),
339 type(NetworkAdapterType_Am79C970A),
340 fEnabled(false),
341 fCableConnected(false),
342 ulLineSpeed(0),
343 fTraceEnabled(false),
344 mode(NetworkAttachmentType_Null)
345 {}
346
347 bool operator==(const NetworkAdapter &n) const;
348
349 uint32_t ulSlot;
350
351 NetworkAdapterType_T type;
352 bool fEnabled;
353 com::Utf8Str strMACAddress;
354 bool fCableConnected;
355 uint32_t ulLineSpeed;
356 bool fTraceEnabled;
357 com::Utf8Str strTraceFile;
358
359 NetworkAttachmentType_T mode;
360 com::Utf8Str strName; // with NAT: nat network or empty;
361 // with bridged: host interface or empty;
362 // otherwise: network name (required)
363};
364typedef std::list<NetworkAdapter> NetworkAdaptersList;
365
366/**
367 * NOTE: If you add any fields in here, you must update a) the constructor and b)
368 * the operator== which is used by MachineConfigFile::operator==(), or otherwise
369 * your settings might never get saved.
370 */
371struct SerialPort
372{
373 SerialPort()
374 : ulSlot(0),
375 fEnabled(false),
376 ulIOBase(0x3f8),
377 ulIRQ(4),
378 portMode(PortMode_Disconnected),
379 fServer(false)
380 {}
381
382 bool operator==(const SerialPort &n) const;
383
384 uint32_t ulSlot;
385
386 bool fEnabled;
387 uint32_t ulIOBase;
388 uint32_t ulIRQ;
389 PortMode_T portMode;
390 com::Utf8Str strPath;
391 bool fServer;
392};
393typedef std::list<SerialPort> SerialPortsList;
394
395/**
396 * NOTE: If you add any fields in here, you must update a) the constructor and b)
397 * the operator== which is used by MachineConfigFile::operator==(), or otherwise
398 * your settings might never get saved.
399 */
400struct ParallelPort
401{
402 ParallelPort()
403 : ulSlot(0),
404 fEnabled(false),
405 ulIOBase(0x378),
406 ulIRQ(4)
407 {}
408
409 bool operator==(const ParallelPort &d) const;
410
411 uint32_t ulSlot;
412
413 bool fEnabled;
414 uint32_t ulIOBase;
415 uint32_t ulIRQ;
416 com::Utf8Str strPath;
417};
418typedef std::list<ParallelPort> ParallelPortsList;
419
420/**
421 * NOTE: If you add any fields in here, you must update a) the constructor and b)
422 * the operator== which is used by MachineConfigFile::operator==(), or otherwise
423 * your settings might never get saved.
424 */
425struct AudioAdapter
426{
427 AudioAdapter()
428 : fEnabled(true),
429 controllerType(AudioControllerType_AC97),
430 driverType(AudioDriverType_Null)
431 {}
432
433 bool operator==(const AudioAdapter &a) const
434 {
435 return (this == &a)
436 || ( (fEnabled == a.fEnabled)
437 && (controllerType == a.controllerType)
438 && (driverType == a.driverType)
439 );
440 }
441
442 bool fEnabled;
443 AudioControllerType_T controllerType;
444 AudioDriverType_T driverType;
445};
446
447/**
448 * NOTE: If you add any fields in here, you must update a) the constructor and b)
449 * the operator== which is used by MachineConfigFile::operator==(), or otherwise
450 * your settings might never get saved.
451 */
452struct SharedFolder
453{
454 SharedFolder()
455 : fWritable(false)
456 {}
457
458 bool operator==(const SharedFolder &a) const;
459
460 com::Utf8Str strName,
461 strHostPath;
462 bool fWritable;
463};
464typedef std::list<SharedFolder> SharedFoldersList;
465
466/**
467 * NOTE: If you add any fields in here, you must update a) the constructor and b)
468 * the operator== which is used by MachineConfigFile::operator==(), or otherwise
469 * your settings might never get saved.
470 */
471struct GuestProperty
472{
473 GuestProperty()
474 : timestamp(0)
475 {};
476
477 bool operator==(const GuestProperty &g) const;
478
479 com::Utf8Str strName,
480 strValue;
481 uint64_t timestamp;
482 com::Utf8Str strFlags;
483};
484typedef std::list<GuestProperty> GuestPropertiesList;
485
486typedef std::map<uint32_t, DeviceType_T> BootOrderMap;
487
488/**
489 * NOTE: If you add any fields in here, you must update a) the constructor and b)
490 * the operator== which is used by MachineConfigFile::operator==(), or otherwise
491 * your settings might never get saved.
492 */
493struct CpuIdLeaf
494{
495 CpuIdLeaf()
496 : ulId(UINT32_MAX),
497 ulEax(0),
498 ulEbx(0),
499 ulEcx(0),
500 ulEdx(0)
501 {}
502
503 bool operator==(const CpuIdLeaf &c) const
504 {
505 return ( (this == &c)
506 || ( (ulId == c.ulId)
507 && (ulEax == c.ulEax)
508 && (ulEbx == c.ulEbx)
509 && (ulEcx == c.ulEcx)
510 && (ulEdx == c.ulEdx)
511 )
512 );
513 }
514
515 uint32_t ulId;
516 uint32_t ulEax;
517 uint32_t ulEbx;
518 uint32_t ulEcx;
519 uint32_t ulEdx;
520};
521typedef std::list<CpuIdLeaf> CpuIdLeafsList;
522
523/**
524 * NOTE: If you add any fields in here, you must update a) the constructor and b)
525 * the operator== which is used by MachineConfigFile::operator==(), or otherwise
526 * your settings might never get saved.
527 */
528struct Cpu
529{
530 Cpu()
531 : ulId(UINT32_MAX)
532 {}
533
534 bool operator==(const Cpu &c) const
535 {
536 return (ulId == c.ulId);
537 }
538
539 uint32_t ulId;
540};
541typedef std::list<Cpu> CpuList;
542
543/**
544 * NOTE: If you add any fields in here, you must update a) the constructor and b)
545 * the operator== which is used by MachineConfigFile::operator==(), or otherwise
546 * your settings might never get saved.
547 */
548struct IoSettings
549{
550 IoSettings();
551
552 bool operator==(const IoSettings &i) const
553 {
554 return ( (ioMgrType == i.ioMgrType)
555 && (ioBackendType == i.ioBackendType)
556 && (fIoCacheEnabled == i.fIoCacheEnabled)
557 && (ulIoCacheSize == i.ulIoCacheSize)
558 && (ulIoBandwidthMax == i.ulIoBandwidthMax));
559 }
560
561 IoMgrType_T ioMgrType;
562 IoBackendType_T ioBackendType;
563 bool fIoCacheEnabled;
564 uint32_t ulIoCacheSize;
565 uint32_t ulIoBandwidthMax;
566};
567
568/**
569 * Representation of Machine hardware; this is used in the MachineConfigFile.hardwareMachine
570 * field.
571 *
572 * NOTE: If you add any fields in here, you must update a) the constructor and b)
573 * the operator== which is used by MachineConfigFile::operator==(), or otherwise
574 * your settings might never get saved.
575 */
576struct Hardware
577{
578 Hardware();
579
580 bool operator==(const Hardware&) const;
581
582 com::Utf8Str strVersion; // hardware version, optional
583 com::Guid uuid; // hardware uuid, optional (null).
584
585 bool fHardwareVirt,
586 fHardwareVirtExclusive,
587 fNestedPaging,
588 fLargePages,
589 fVPID,
590 fSyntheticCpu,
591 fPAE;
592 uint32_t cCPUs;
593 bool fCpuHotPlug; // requires settings version 1.10 (VirtualBox 3.2)
594 CpuList llCpus; // requires settings version 1.10 (VirtualBox 3.2)
595 bool fHpetEnabled; // requires settings version 1.10 (VirtualBox 3.2)
596
597 CpuIdLeafsList llCpuIdLeafs;
598
599 uint32_t ulMemorySizeMB;
600
601 BootOrderMap mapBootOrder; // item 0 has highest priority
602
603 uint32_t ulVRAMSizeMB;
604 uint32_t cMonitors;
605 bool fAccelerate3D,
606 fAccelerate2DVideo; // requires settings version 1.8 (VirtualBox 3.1)
607 FirmwareType_T firmwareType; // requires settings version 1.9 (VirtualBox 3.1)
608
609 PointingHidType_T pointingHidType; // requires settings version 1.10 (VirtualBox 3.2)
610 KeyboardHidType_T keyboardHidType; // requires settings version 1.10 (VirtualBox 3.2)
611
612 VRDPSettings vrdpSettings;
613
614 BIOSSettings biosSettings;
615 USBController usbController;
616 NetworkAdaptersList llNetworkAdapters;
617 SerialPortsList llSerialPorts;
618 ParallelPortsList llParallelPorts;
619 AudioAdapter audioAdapter;
620
621 // technically these two have no business in the hardware section, but for some
622 // clever reason <Hardware> is where they are in the XML....
623 SharedFoldersList llSharedFolders;
624 ClipboardMode_T clipboardMode;
625
626 uint32_t ulMemoryBalloonSize;
627 uint32_t ulStatisticsUpdateInterval;
628
629 GuestPropertiesList llGuestProperties;
630 com::Utf8Str strNotificationPatterns;
631
632 IoSettings ioSettings; // requires settings version 1.10 (VirtualBox 3.2)
633};
634
635/**
636 * A device attached to a storage controller. This can either be a
637 * hard disk or a DVD drive or a floppy drive and also specifies
638 * which medium is "in" the drive; as a result, this is a combination
639 * of the Main IMedium and IMediumAttachment interfaces.
640 *
641 * NOTE: If you add any fields in here, you must update a) the constructor and b)
642 * the operator== which is used by MachineConfigFile::operator==(), or otherwise
643 * your settings might never get saved.
644 */
645struct AttachedDevice
646{
647 AttachedDevice()
648 : deviceType(DeviceType_Null),
649 fPassThrough(false),
650 lPort(0),
651 lDevice(0)
652 {}
653
654 bool operator==(const AttachedDevice &a) const;
655
656 DeviceType_T deviceType; // only HardDisk, DVD or Floppy are allowed
657
658 // DVDs can be in pass-through mode:
659 bool fPassThrough;
660
661 int32_t lPort;
662 int32_t lDevice;
663
664 // if an image file is attached to the device (ISO, RAW, or hard disk image such as VDI),
665 // this is its UUID; it depends on deviceType which media registry this then needs to
666 // be looked up in. If no image file (only permitted for DVDs and floppies), then the UUID is NULL
667 com::Guid uuid;
668
669 // for DVDs and floppies, the attachment can also be a host device:
670 com::Utf8Str strHostDriveSrc; // if != NULL, value of <HostDrive>/@src
671};
672typedef std::list<AttachedDevice> AttachedDevicesList;
673
674/**
675 * NOTE: If you add any fields in here, you must update a) the constructor and b)
676 * the operator== which is used by MachineConfigFile::operator==(), or otherwise
677 * your settings might never get saved.
678 */
679struct StorageController
680{
681 StorageController()
682 : storageBus(StorageBus_IDE),
683 controllerType(StorageControllerType_PIIX3),
684 ulPortCount(2),
685 ulInstance(0),
686 lIDE0MasterEmulationPort(0),
687 lIDE0SlaveEmulationPort(0),
688 lIDE1MasterEmulationPort(0),
689 lIDE1SlaveEmulationPort(0)
690 {}
691
692 bool operator==(const StorageController &s) const;
693
694 com::Utf8Str strName;
695 StorageBus_T storageBus; // _SATA, _SCSI, _IDE
696 StorageControllerType_T controllerType;
697 uint32_t ulPortCount;
698 uint32_t ulInstance;
699
700 // only for when controllerType == StorageControllerType_IntelAhci:
701 int32_t lIDE0MasterEmulationPort,
702 lIDE0SlaveEmulationPort,
703 lIDE1MasterEmulationPort,
704 lIDE1SlaveEmulationPort;
705
706 AttachedDevicesList llAttachedDevices;
707};
708typedef std::list<StorageController> StorageControllersList;
709
710/**
711 * We wrap the storage controllers list into an extra struct so we can
712 * use an undefined struct without needing std::list<> in all the headers.
713 *
714 * NOTE: If you add any fields in here, you must update a) the constructor and b)
715 * the operator== which is used by MachineConfigFile::operator==(), or otherwise
716 * your settings might never get saved.
717 */
718struct Storage
719{
720 bool operator==(const Storage &s) const;
721
722 StorageControllersList llStorageControllers;
723};
724
725struct Snapshot;
726typedef std::list<Snapshot> SnapshotsList;
727
728/**
729 * NOTE: If you add any fields in here, you must update a) the constructor and b)
730 * the operator== which is used by MachineConfigFile::operator==(), or otherwise
731 * your settings might never get saved.
732 */
733struct Snapshot
734{
735 bool operator==(const Snapshot &s) const;
736
737 com::Guid uuid;
738 com::Utf8Str strName,
739 strDescription; // optional
740 RTTIMESPEC timestamp;
741
742 com::Utf8Str strStateFile; // for online snapshots only
743
744 Hardware hardware;
745 Storage storage;
746
747 SnapshotsList llChildSnapshots;
748};
749
750/**
751 * MachineConfigFile represents an XML machine configuration. All the machine settings
752 * that go out to the XML (or are read from it) are in here.
753 *
754 * NOTE: If you add any fields in here, you must update a) the constructor and b)
755 * the operator== which is used by Machine::saveSettings(), or otherwise your settings
756 * might never get saved.
757 */
758class MachineConfigFile : public ConfigFileBase
759{
760public:
761 MachineConfigFile(const com::Utf8Str *pstrFilename);
762
763 bool operator==(const MachineConfigFile &m) const;
764
765 void readNetworkAdapters(const xml::ElementNode &elmHardware, NetworkAdaptersList &ll);
766 void readCpuIdTree(const xml::ElementNode &elmCpuid, CpuIdLeafsList &ll);
767 void readCpuTree(const xml::ElementNode &elmCpu, CpuList &ll);
768 void readSerialPorts(const xml::ElementNode &elmUART, SerialPortsList &ll);
769 void readParallelPorts(const xml::ElementNode &elmLPT, ParallelPortsList &ll);
770 void readGuestProperties(const xml::ElementNode &elmGuestProperties, Hardware &hw);
771 void readStorageControllerAttributes(const xml::ElementNode &elmStorageController, StorageController &sctl);
772 void readHardware(const xml::ElementNode &elmHardware, Hardware &hw, Storage &strg);
773 void readHardDiskAttachments_pre1_7(const xml::ElementNode &elmHardDiskAttachments, Storage &strg);
774 void readStorageControllers(const xml::ElementNode &elmStorageControllers, Storage &strg);
775 void readDVDAndFloppies_pre1_9(const xml::ElementNode &elmHardware, Storage &strg);
776 void readSnapshot(const xml::ElementNode &elmSnapshot, Snapshot &snap);
777 void convertOldOSType_pre1_5(com::Utf8Str &str);
778 void readMachine(const xml::ElementNode &elmMachine);
779
780 void writeHardware(xml::ElementNode &elmParent, const Hardware &hw, const Storage &strg);
781 void writeStorageControllers(xml::ElementNode &elmParent, const Storage &st);
782 void writeSnapshot(xml::ElementNode &elmParent, const Snapshot &snap);
783 void bumpSettingsVersionIfNeeded();
784 void write(const com::Utf8Str &strFilename);
785
786 com::Guid uuid;
787 com::Utf8Str strName;
788 bool fNameSync;
789 com::Utf8Str strDescription;
790 com::Utf8Str strOsType;
791 com::Utf8Str strStateFile;
792 com::Guid uuidCurrentSnapshot;
793 com::Utf8Str strSnapshotFolder;
794 bool fTeleporterEnabled;
795 uint32_t uTeleporterPort;
796 com::Utf8Str strTeleporterAddress;
797 com::Utf8Str strTeleporterPassword;
798 bool fRTCUseUTC;
799
800 bool fCurrentStateModified; // optional, default is true
801 RTTIMESPEC timeLastStateChange; // optional, defaults to now
802 bool fAborted; // optional, default is false
803
804 Hardware hardwareMachine;
805 Storage storageMachine;
806
807 ExtraDataItemsMap mapExtraDataItems;
808
809 SnapshotsList llFirstSnapshot; // first snapshot or empty list if there's none
810};
811
812} // namespace settings
813
814
815#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