VirtualBox

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

Last change on this file since 26239 was 26156, checked in by vboxsync, 15 years ago

Main: get rid of isReallyChanged() voodoo in Machine and subclasses; instead check in the XML classes whether things really changed via operator==; documentation, cleanup

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Revision Author Id
File size: 24.8 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(false),
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(4),
377 ulIRQ(0x3f8),
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 * Representation of Machine hardware; this is used in the MachineConfigFile.hardwareMachine
545 * field.
546 *
547 * NOTE: If you add any fields in here, you must update a) the constructor and b)
548 * the operator== which is used by MachineConfigFile::operator==(), or otherwise
549 * your settings might never get saved.
550 */
551struct Hardware
552{
553 Hardware();
554
555 bool operator==(const Hardware&) const;
556
557 com::Utf8Str strVersion; // hardware version, optional
558 com::Guid uuid; // hardware uuid, optional (null).
559
560 bool fHardwareVirt,
561 fHardwareVirtExclusive,
562 fNestedPaging,
563 fVPID,
564 fSyntheticCpu,
565 fPAE;
566 uint32_t cCPUs;
567 bool fCpuHotPlug; // requires settings version 1.11 (VirtualBox 3.2)
568 CpuList llCpus; // requires settings version 1.11 (VirtualBox 3.2)
569 CpuIdLeafsList llCpuIdLeafs;
570
571 uint32_t ulMemorySizeMB;
572
573 BootOrderMap mapBootOrder; // item 0 has highest priority
574
575 uint32_t ulVRAMSizeMB;
576 uint32_t cMonitors;
577 bool fAccelerate3D,
578 fAccelerate2DVideo; // requires settings version 1.8 (VirtualBox 3.1)
579 FirmwareType_T firmwareType; // requires settings version 1.9 (VirtualBox 3.1)
580
581 VRDPSettings vrdpSettings;
582
583 BIOSSettings biosSettings;
584 USBController usbController;
585 NetworkAdaptersList llNetworkAdapters;
586 SerialPortsList llSerialPorts;
587 ParallelPortsList llParallelPorts;
588 AudioAdapter audioAdapter;
589
590 // technically these two have no business in the hardware section, but for some
591 // clever reason <Hardware> is where they are in the XML....
592 SharedFoldersList llSharedFolders;
593 ClipboardMode_T clipboardMode;
594
595 uint32_t ulMemoryBalloonSize;
596 uint32_t ulStatisticsUpdateInterval;
597
598 GuestPropertiesList llGuestProperties;
599 com::Utf8Str strNotificationPatterns;
600};
601
602/**
603 * A device attached to a storage controller. This can either be a
604 * hard disk or a DVD drive or a floppy drive and also specifies
605 * which medium is "in" the drive; as a result, this is a combination
606 * of the Main IMedium and IMediumAttachment interfaces.
607 *
608 * NOTE: If you add any fields in here, you must update a) the constructor and b)
609 * the operator== which is used by MachineConfigFile::operator==(), or otherwise
610 * your settings might never get saved.
611 */
612struct AttachedDevice
613{
614 AttachedDevice()
615 : deviceType(DeviceType_Null),
616 fPassThrough(false),
617 lPort(0),
618 lDevice(0)
619 {}
620
621 bool operator==(const AttachedDevice &a) const;
622
623 DeviceType_T deviceType; // only HardDisk, DVD or Floppy are allowed
624
625 // DVDs can be in pass-through mode:
626 bool fPassThrough;
627
628 int32_t lPort;
629 int32_t lDevice;
630
631 // if an image file is attached to the device (ISO, RAW, or hard disk image such as VDI),
632 // this is its UUID; it depends on deviceType which media registry this then needs to
633 // be looked up in. If no image file (only permitted for DVDs and floppies), then the UUID is NULL
634 com::Guid uuid;
635
636 // for DVDs and floppies, the attachment can also be a host device:
637 com::Utf8Str strHostDriveSrc; // if != NULL, value of <HostDrive>/@src
638};
639typedef std::list<AttachedDevice> AttachedDevicesList;
640
641/**
642 * NOTE: If you add any fields in here, you must update a) the constructor and b)
643 * the operator== which is used by MachineConfigFile::operator==(), or otherwise
644 * your settings might never get saved.
645 */
646struct StorageController
647{
648 StorageController()
649 : storageBus(StorageBus_IDE),
650 controllerType(StorageControllerType_PIIX3),
651 ulPortCount(2),
652 ulInstance(0),
653 lIDE0MasterEmulationPort(0),
654 lIDE0SlaveEmulationPort(0),
655 lIDE1MasterEmulationPort(0),
656 lIDE1SlaveEmulationPort(0)
657 {}
658
659 bool operator==(const StorageController &s) const;
660
661 com::Utf8Str strName;
662 StorageBus_T storageBus; // _SATA, _SCSI, _IDE
663 StorageControllerType_T controllerType;
664 uint32_t ulPortCount;
665 uint32_t ulInstance;
666
667 // only for when controllerType == StorageControllerType_IntelAhci:
668 int32_t lIDE0MasterEmulationPort,
669 lIDE0SlaveEmulationPort,
670 lIDE1MasterEmulationPort,
671 lIDE1SlaveEmulationPort;
672
673 AttachedDevicesList llAttachedDevices;
674};
675typedef std::list<StorageController> StorageControllersList;
676
677/**
678 * We wrap the storage controllers list into an extra struct so we can
679 * use an undefined struct without needing std::list<> in all the headers.
680 *
681 * NOTE: If you add any fields in here, you must update a) the constructor and b)
682 * the operator== which is used by MachineConfigFile::operator==(), or otherwise
683 * your settings might never get saved.
684 */
685struct Storage
686{
687 bool operator==(const Storage &s) const;
688
689 StorageControllersList llStorageControllers;
690};
691
692struct Snapshot;
693typedef std::list<Snapshot> SnapshotsList;
694
695/**
696 * NOTE: If you add any fields in here, you must update a) the constructor and b)
697 * the operator== which is used by MachineConfigFile::operator==(), or otherwise
698 * your settings might never get saved.
699 */
700struct Snapshot
701{
702 bool operator==(const Snapshot &s) const;
703
704 com::Guid uuid;
705 com::Utf8Str strName,
706 strDescription; // optional
707 RTTIMESPEC timestamp;
708
709 com::Utf8Str strStateFile; // for online snapshots only
710
711 Hardware hardware;
712 Storage storage;
713
714 SnapshotsList llChildSnapshots;
715};
716
717/**
718 * MachineConfigFile represents an XML machine configuration. All the machine settings
719 * that go out to the XML (or are read from it) are in here.
720 *
721 * NOTE: If you add any fields in here, you must update a) the constructor and b)
722 * the operator== which is used by Machine::saveSettings(), or otherwise your settings
723 * might never get saved.
724 */
725class MachineConfigFile : public ConfigFileBase
726{
727public:
728 MachineConfigFile(const com::Utf8Str *pstrFilename);
729
730 bool operator==(const MachineConfigFile &m) const;
731
732 void readNetworkAdapters(const xml::ElementNode &elmHardware, NetworkAdaptersList &ll);
733 void readCpuIdTree(const xml::ElementNode &elmCpuid, CpuIdLeafsList &ll);
734 void readCpuTree(const xml::ElementNode &elmCpu, CpuList &ll);
735 void readSerialPorts(const xml::ElementNode &elmUART, SerialPortsList &ll);
736 void readParallelPorts(const xml::ElementNode &elmLPT, ParallelPortsList &ll);
737 void readGuestProperties(const xml::ElementNode &elmGuestProperties, Hardware &hw);
738 void readStorageControllerAttributes(const xml::ElementNode &elmStorageController, StorageController &sctl);
739 void readHardware(const xml::ElementNode &elmHardware, Hardware &hw, Storage &strg);
740 void readHardDiskAttachments_pre1_7(const xml::ElementNode &elmHardDiskAttachments, Storage &strg);
741 void readStorageControllers(const xml::ElementNode &elmStorageControllers, Storage &strg);
742 void readDVDAndFloppies_pre1_9(const xml::ElementNode &elmHardware, Storage &strg);
743 void readSnapshot(const xml::ElementNode &elmSnapshot, Snapshot &snap);
744 void convertOldOSType_pre1_5(com::Utf8Str &str);
745 void readMachine(const xml::ElementNode &elmMachine);
746
747 void writeHardware(xml::ElementNode &elmParent, const Hardware &hw, const Storage &strg);
748 void writeStorageControllers(xml::ElementNode &elmParent, const Storage &st);
749 void writeSnapshot(xml::ElementNode &elmParent, const Snapshot &snap);
750 void bumpSettingsVersionIfNeeded();
751 void write(const com::Utf8Str &strFilename);
752
753 com::Guid uuid;
754 com::Utf8Str strName;
755 bool fNameSync;
756 com::Utf8Str strDescription;
757 com::Utf8Str strOsType;
758 com::Utf8Str strStateFile;
759 com::Guid uuidCurrentSnapshot;
760 com::Utf8Str strSnapshotFolder;
761 bool fTeleporterEnabled;
762 uint32_t uTeleporterPort;
763 com::Utf8Str strTeleporterAddress;
764 com::Utf8Str strTeleporterPassword;
765 bool fRTCUseUTC;
766
767 bool fCurrentStateModified; // optional, default is true
768 RTTIMESPEC timeLastStateChange; // optional, defaults to now
769 bool fAborted; // optional, default is false
770
771 Hardware hardwareMachine;
772 Storage storageMachine;
773
774 ExtraDataItemsMap mapExtraDataItems;
775
776 SnapshotsList llFirstSnapshot; // first snapshot or empty list if there's none
777};
778
779} // namespace settings
780
781
782#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