VirtualBox

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

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

Added large page property.

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