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 allows us to finally make the XML reader
|
---|
6 | * version-independent and read VirtualBox XML files from earlier versions without
|
---|
7 | * requiring complicated, tedious and error-prone XSLT conversions.
|
---|
8 | *
|
---|
9 | * Note: Headers in Main code have been tweaked to only declare the structures
|
---|
10 | * defined here so that this header need only be included from code files that
|
---|
11 | * actually use these structures.
|
---|
12 | */
|
---|
13 |
|
---|
14 | /*
|
---|
15 | * Copyright (C) 2007-2009 Sun Microsystems, Inc.
|
---|
16 | *
|
---|
17 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
18 | * available from http://www.virtualbox.org. This file is free software;
|
---|
19 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
20 | * General Public License (GPL) as published by the Free Software
|
---|
21 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
22 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
23 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
24 | *
|
---|
25 | * The contents of this file may alternatively be used under the terms
|
---|
26 | * of the Common Development and Distribution License Version 1.0
|
---|
27 | * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
|
---|
28 | * VirtualBox OSE distribution, in which case the provisions of the
|
---|
29 | * CDDL are applicable instead of those of the GPL.
|
---|
30 | *
|
---|
31 | * You may elect to license modified versions of this file under the
|
---|
32 | * terms and conditions of either the GPL or the CDDL or both.
|
---|
33 | *
|
---|
34 | * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
|
---|
35 | * Clara, CA 95054 USA or visit http://www.sun.com if you need
|
---|
36 | * additional information or have any questions.
|
---|
37 | */
|
---|
38 |
|
---|
39 | #ifndef ___VBox_settings_h
|
---|
40 | #define ___VBox_settings_h
|
---|
41 |
|
---|
42 | #include <iprt/time.h>
|
---|
43 |
|
---|
44 | #include "VBox/com/VirtualBox.h"
|
---|
45 |
|
---|
46 | #include <VBox/com/Guid.h>
|
---|
47 | #include <VBox/com/string.h>
|
---|
48 |
|
---|
49 | #include <list>
|
---|
50 | #include <map>
|
---|
51 | #include <vector>
|
---|
52 |
|
---|
53 | namespace xml
|
---|
54 | {
|
---|
55 | class ElementNode;
|
---|
56 | }
|
---|
57 |
|
---|
58 | namespace settings
|
---|
59 | {
|
---|
60 |
|
---|
61 | class ConfigFileError;
|
---|
62 |
|
---|
63 | ////////////////////////////////////////////////////////////////////////////////
|
---|
64 | //
|
---|
65 | // Helper classes
|
---|
66 | //
|
---|
67 | ////////////////////////////////////////////////////////////////////////////////
|
---|
68 |
|
---|
69 | // ExtraDataItem (used by both VirtualBox.xml and machines XML)
|
---|
70 | typedef std::map<com::Utf8Str, com::Utf8Str> ExtraDataItemsMap;
|
---|
71 | struct USBDeviceFilter;
|
---|
72 | typedef std::list<USBDeviceFilter> USBDeviceFiltersList;
|
---|
73 |
|
---|
74 | /**
|
---|
75 | * Common base class for both MainConfigFile and MachineConfigFile
|
---|
76 | * which contains some common logic for both.
|
---|
77 | */
|
---|
78 | class ConfigFileBase
|
---|
79 | {
|
---|
80 | public:
|
---|
81 | bool fileExists();
|
---|
82 |
|
---|
83 | protected:
|
---|
84 | ConfigFileBase(const com::Utf8Str *pstrFilename);
|
---|
85 | ~ConfigFileBase();
|
---|
86 |
|
---|
87 | void parseUUID(com::Guid &guid,
|
---|
88 | const com::Utf8Str &strUUID) const;
|
---|
89 | void parseTimestamp(RTTIMESPEC ×tamp,
|
---|
90 | const com::Utf8Str &str) const;
|
---|
91 |
|
---|
92 | com::Utf8Str makeString(const RTTIMESPEC &tm);
|
---|
93 | com::Utf8Str makeString(const com::Guid &guid);
|
---|
94 |
|
---|
95 | void readExtraData(const xml::ElementNode &elmExtraData,
|
---|
96 | ExtraDataItemsMap &map);
|
---|
97 | void readUSBDeviceFilters(const xml::ElementNode &elmDeviceFilters,
|
---|
98 | USBDeviceFiltersList &ll);
|
---|
99 |
|
---|
100 | void createStubDocument();
|
---|
101 |
|
---|
102 | void writeExtraData(xml::ElementNode &elmParent, const ExtraDataItemsMap &me);
|
---|
103 | void writeUSBDeviceFilters(xml::ElementNode &elmParent,
|
---|
104 | const USBDeviceFiltersList &ll,
|
---|
105 | bool fHostMode);
|
---|
106 |
|
---|
107 | void clearDocument();
|
---|
108 |
|
---|
109 | struct Data;
|
---|
110 | Data *m;
|
---|
111 |
|
---|
112 | friend class ConfigFileError;
|
---|
113 | };
|
---|
114 |
|
---|
115 | ////////////////////////////////////////////////////////////////////////////////
|
---|
116 | //
|
---|
117 | // VirtualBox.xml structures
|
---|
118 | //
|
---|
119 | ////////////////////////////////////////////////////////////////////////////////
|
---|
120 |
|
---|
121 | struct USBDeviceFilter
|
---|
122 | {
|
---|
123 | USBDeviceFilter()
|
---|
124 | : fActive(false),
|
---|
125 | action(USBDeviceFilterAction_Null),
|
---|
126 | ulMaskedInterfaces(0)
|
---|
127 | {}
|
---|
128 |
|
---|
129 | com::Utf8Str strName;
|
---|
130 | bool fActive;
|
---|
131 | com::Utf8Str strVendorId,
|
---|
132 | strProductId,
|
---|
133 | strRevision,
|
---|
134 | strManufacturer,
|
---|
135 | strProduct,
|
---|
136 | strSerialNumber,
|
---|
137 | strPort;
|
---|
138 | USBDeviceFilterAction_T action; // only used with host USB filters
|
---|
139 | com::Utf8Str strRemote; // irrelevant for host USB objects
|
---|
140 | uint32_t ulMaskedInterfaces; // irrelevant for host USB objects
|
---|
141 | };
|
---|
142 |
|
---|
143 | struct Host
|
---|
144 | {
|
---|
145 | USBDeviceFiltersList llUSBDeviceFilters;
|
---|
146 | };
|
---|
147 |
|
---|
148 | struct SystemProperties
|
---|
149 | {
|
---|
150 | SystemProperties()
|
---|
151 | : ulLogHistoryCount(3)
|
---|
152 | {}
|
---|
153 |
|
---|
154 | com::Utf8Str strDefaultMachineFolder;
|
---|
155 | com::Utf8Str strDefaultHardDiskFolder;
|
---|
156 | com::Utf8Str strDefaultHardDiskFormat;
|
---|
157 | com::Utf8Str strRemoteDisplayAuthLibrary;
|
---|
158 | com::Utf8Str strWebServiceAuthLibrary;
|
---|
159 | uint32_t ulLogHistoryCount;
|
---|
160 | };
|
---|
161 |
|
---|
162 | typedef std::map<com::Utf8Str, com::Utf8Str> PropertiesMap;
|
---|
163 |
|
---|
164 | struct Medium;
|
---|
165 | typedef std::list<Medium> MediaList;
|
---|
166 |
|
---|
167 | struct Medium
|
---|
168 | {
|
---|
169 | com::Guid uuid;
|
---|
170 | com::Utf8Str strLocation;
|
---|
171 | com::Utf8Str strDescription;
|
---|
172 |
|
---|
173 | // the following are for hard disks only:
|
---|
174 | com::Utf8Str strFormat;
|
---|
175 | bool fAutoReset; // optional, only for diffs, default is false
|
---|
176 | PropertiesMap properties;
|
---|
177 | HardDiskType_T hdType;
|
---|
178 |
|
---|
179 | MediaList llChildren; // only used with hard disks
|
---|
180 | };
|
---|
181 |
|
---|
182 | struct MachineRegistryEntry
|
---|
183 | {
|
---|
184 | com::Guid uuid;
|
---|
185 | com::Utf8Str strSettingsFile;
|
---|
186 | };
|
---|
187 | typedef std::list<MachineRegistryEntry> MachinesRegistry;
|
---|
188 |
|
---|
189 | struct DHCPServer
|
---|
190 | {
|
---|
191 | com::Utf8Str strNetworkName,
|
---|
192 | strIPAddress,
|
---|
193 | strIPNetworkMask,
|
---|
194 | strIPLower,
|
---|
195 | strIPUpper;
|
---|
196 | bool fEnabled;
|
---|
197 | };
|
---|
198 | typedef std::list<DHCPServer> DHCPServersList;
|
---|
199 |
|
---|
200 | class MainConfigFile : public ConfigFileBase
|
---|
201 | {
|
---|
202 | public:
|
---|
203 | MainConfigFile(const com::Utf8Str *pstrFilename);
|
---|
204 |
|
---|
205 | typedef enum {Error, HardDisk, DVDImage, FloppyImage} MediaType;
|
---|
206 | void readMedium(MediaType t, const xml::ElementNode &elmMedium, MediaList &llMedia);
|
---|
207 | void readMediaRegistry(const xml::ElementNode &elmMediaRegistry);
|
---|
208 | void readMachineRegistry(const xml::ElementNode &elmMachineRegistry);
|
---|
209 | void readDHCPServers(const xml::ElementNode &elmDHCPServers);
|
---|
210 |
|
---|
211 | void writeHardDisk(xml::ElementNode &elmMedium,
|
---|
212 | const Medium &m,
|
---|
213 | uint32_t level);
|
---|
214 | void write(const com::Utf8Str strFilename);
|
---|
215 |
|
---|
216 | Host host;
|
---|
217 | SystemProperties systemProperties;
|
---|
218 | MediaList llHardDisks,
|
---|
219 | llDvdImages,
|
---|
220 | llFloppyImages;
|
---|
221 | MachinesRegistry llMachines;
|
---|
222 | DHCPServersList llDhcpServers;
|
---|
223 | ExtraDataItemsMap mapExtraDataItems;
|
---|
224 | };
|
---|
225 |
|
---|
226 | ////////////////////////////////////////////////////////////////////////////////
|
---|
227 | //
|
---|
228 | // Machine XML structures
|
---|
229 | //
|
---|
230 | ////////////////////////////////////////////////////////////////////////////////
|
---|
231 |
|
---|
232 | struct VRDPSettings
|
---|
233 | {
|
---|
234 | VRDPSettings()
|
---|
235 | : fEnabled(true),
|
---|
236 | ulPort(0),
|
---|
237 | authType(VRDPAuthType_Null),
|
---|
238 | ulAuthTimeout(5000),
|
---|
239 | fAllowMultiConnection(false),
|
---|
240 | fReuseSingleConnection(false)
|
---|
241 | {}
|
---|
242 |
|
---|
243 | bool fEnabled;
|
---|
244 | uint32_t ulPort;
|
---|
245 | com::Utf8Str strNetAddress;
|
---|
246 | VRDPAuthType_T authType;
|
---|
247 | uint32_t ulAuthTimeout;
|
---|
248 | bool fAllowMultiConnection,
|
---|
249 | fReuseSingleConnection;
|
---|
250 | };
|
---|
251 |
|
---|
252 | struct BIOSSettings
|
---|
253 | {
|
---|
254 | BIOSSettings()
|
---|
255 | : fACPIEnabled(true),
|
---|
256 | fIOAPICEnabled(false),
|
---|
257 | fLogoFadeIn(true),
|
---|
258 | fLogoFadeOut(false),
|
---|
259 | ulLogoDisplayTime(0),
|
---|
260 | biosBootMenuMode(BIOSBootMenuMode_MessageAndMenu),
|
---|
261 | fPXEDebugEnabled(false),
|
---|
262 | llTimeOffset(0)
|
---|
263 | {}
|
---|
264 |
|
---|
265 | bool fACPIEnabled,
|
---|
266 | fIOAPICEnabled,
|
---|
267 | fLogoFadeIn,
|
---|
268 | fLogoFadeOut;
|
---|
269 | uint32_t ulLogoDisplayTime;
|
---|
270 | com::Utf8Str strLogoImagePath;
|
---|
271 | BIOSBootMenuMode_T biosBootMenuMode;
|
---|
272 | bool fPXEDebugEnabled;
|
---|
273 | int64_t llTimeOffset;
|
---|
274 | };
|
---|
275 |
|
---|
276 | struct DVDDrive
|
---|
277 | {
|
---|
278 | DVDDrive()
|
---|
279 | : fPassThrough(false)
|
---|
280 | {}
|
---|
281 |
|
---|
282 | bool fPassThrough;
|
---|
283 | com::Guid uuid; // if != NULL, UUID of mounted ISO image
|
---|
284 | com::Utf8Str strHostDriveSrc; // if != NULL, value of <HostDrive>/@src
|
---|
285 | };
|
---|
286 |
|
---|
287 | struct FloppyDrive
|
---|
288 | {
|
---|
289 | FloppyDrive()
|
---|
290 | : fEnabled(true)
|
---|
291 | {}
|
---|
292 |
|
---|
293 | bool fEnabled; // optional, defaults to true
|
---|
294 | com::Guid uuid; // if != NULL, UUID of mounted ISO image
|
---|
295 | com::Utf8Str strHostDriveSrc; // if != NULL, value of <HostDrive>/@src
|
---|
296 | };
|
---|
297 |
|
---|
298 | struct USBController
|
---|
299 | {
|
---|
300 | USBController()
|
---|
301 | : fEnabled(false),
|
---|
302 | fEnabledEHCI(false)
|
---|
303 | {}
|
---|
304 |
|
---|
305 | bool fEnabled;
|
---|
306 | bool fEnabledEHCI;
|
---|
307 | USBDeviceFiltersList llDeviceFilters;
|
---|
308 | };
|
---|
309 |
|
---|
310 | struct NetworkAdapter
|
---|
311 | {
|
---|
312 | NetworkAdapter()
|
---|
313 | : ulSlot(0),
|
---|
314 | type(NetworkAdapterType_Am79C970A),
|
---|
315 | fEnabled(false),
|
---|
316 | fCableConnected(false),
|
---|
317 | ulLineSpeed(0),
|
---|
318 | fTraceEnabled(false),
|
---|
319 | mode(NetworkAttachmentType_Null)
|
---|
320 | {}
|
---|
321 |
|
---|
322 | uint32_t ulSlot;
|
---|
323 |
|
---|
324 | NetworkAdapterType_T type;
|
---|
325 | bool fEnabled;
|
---|
326 | com::Utf8Str strMACAddress;
|
---|
327 | bool fCableConnected;
|
---|
328 | uint32_t ulLineSpeed;
|
---|
329 | bool fTraceEnabled;
|
---|
330 | com::Utf8Str strTraceFile;
|
---|
331 |
|
---|
332 | NetworkAttachmentType_T mode;
|
---|
333 | com::Utf8Str strName; // with NAT: nat network or empty;
|
---|
334 | // with bridged: host interface or empty;
|
---|
335 | // otherwise: network name (required)
|
---|
336 | };
|
---|
337 | typedef std::list<NetworkAdapter> NetworkAdaptersList;
|
---|
338 |
|
---|
339 | struct SerialPort
|
---|
340 | {
|
---|
341 | SerialPort()
|
---|
342 | : fEnabled(false),
|
---|
343 | ulIOBase(0),
|
---|
344 | ulIRQ(0),
|
---|
345 | portMode(PortMode_Disconnected),
|
---|
346 | fServer(false)
|
---|
347 | {}
|
---|
348 |
|
---|
349 | uint32_t ulSlot;
|
---|
350 |
|
---|
351 | bool fEnabled;
|
---|
352 | uint32_t ulIOBase;
|
---|
353 | uint32_t ulIRQ;
|
---|
354 | PortMode_T portMode;
|
---|
355 | com::Utf8Str strPath;
|
---|
356 | bool fServer;
|
---|
357 | };
|
---|
358 | typedef std::list<SerialPort> SerialPortsList;
|
---|
359 |
|
---|
360 | struct ParallelPort
|
---|
361 | {
|
---|
362 | ParallelPort()
|
---|
363 | : fEnabled(false),
|
---|
364 | ulIOBase(0),
|
---|
365 | ulIRQ(0)
|
---|
366 | {}
|
---|
367 |
|
---|
368 | uint32_t ulSlot;
|
---|
369 |
|
---|
370 | bool fEnabled;
|
---|
371 | uint32_t ulIOBase;
|
---|
372 | uint32_t ulIRQ;
|
---|
373 | com::Utf8Str strPath;
|
---|
374 | };
|
---|
375 | typedef std::list<ParallelPort> ParallelPortsList;
|
---|
376 |
|
---|
377 | struct AudioAdapter
|
---|
378 | {
|
---|
379 | AudioAdapter()
|
---|
380 | : fEnabled(true),
|
---|
381 | controllerType(AudioControllerType_AC97),
|
---|
382 | driverType(AudioDriverType_Null)
|
---|
383 | {}
|
---|
384 |
|
---|
385 | bool fEnabled;
|
---|
386 | AudioControllerType_T controllerType;
|
---|
387 | AudioDriverType_T driverType;
|
---|
388 | };
|
---|
389 |
|
---|
390 | struct SharedFolder
|
---|
391 | {
|
---|
392 | SharedFolder()
|
---|
393 | : fWritable(false)
|
---|
394 | {}
|
---|
395 |
|
---|
396 | com::Utf8Str strName,
|
---|
397 | strHostPath;
|
---|
398 | bool fWritable;
|
---|
399 | };
|
---|
400 | typedef std::list<SharedFolder> SharedFoldersList;
|
---|
401 |
|
---|
402 | struct GuestProperty
|
---|
403 | {
|
---|
404 | GuestProperty()
|
---|
405 | : timestamp(0)
|
---|
406 | {};
|
---|
407 |
|
---|
408 | com::Utf8Str strName,
|
---|
409 | strValue;
|
---|
410 | uint64_t timestamp;
|
---|
411 | com::Utf8Str strFlags;
|
---|
412 | };
|
---|
413 | typedef std::list<GuestProperty> GuestPropertiesList;
|
---|
414 |
|
---|
415 | typedef std::map<uint32_t, DeviceType_T> BootOrderMap;
|
---|
416 |
|
---|
417 | struct Hardware
|
---|
418 | {
|
---|
419 | Hardware();
|
---|
420 |
|
---|
421 | com::Utf8Str strVersion; // hardware version, optional
|
---|
422 |
|
---|
423 | bool fHardwareVirt,
|
---|
424 | fNestedPaging,
|
---|
425 | fVPID,
|
---|
426 | fPAE;
|
---|
427 | uint32_t cCPUs;
|
---|
428 |
|
---|
429 | uint32_t ulMemorySizeMB;
|
---|
430 |
|
---|
431 | BootOrderMap mapBootOrder; // item 0 has highest priority
|
---|
432 |
|
---|
433 | uint32_t ulVRAMSizeMB;
|
---|
434 | uint32_t cMonitors;
|
---|
435 | bool fAccelerate3D,
|
---|
436 | fAccelerate2DVideo; // requires settings version 1.8 (VirtualBox 3.1)
|
---|
437 | uint32_t cFirmwareType; // ditto
|
---|
438 |
|
---|
439 | VRDPSettings vrdpSettings;
|
---|
440 |
|
---|
441 | BIOSSettings biosSettings;
|
---|
442 | DVDDrive dvdDrive;
|
---|
443 | FloppyDrive floppyDrive;
|
---|
444 | USBController usbController;
|
---|
445 | NetworkAdaptersList llNetworkAdapters;
|
---|
446 | SerialPortsList llSerialPorts;
|
---|
447 | ParallelPortsList llParallelPorts;
|
---|
448 | AudioAdapter audioAdapter;
|
---|
449 |
|
---|
450 | // technically these two have no business in the hardware section, but for some
|
---|
451 | // clever reason <Hardware> is where they are in the XML....
|
---|
452 | SharedFoldersList llSharedFolders;
|
---|
453 | ClipboardMode_T clipboardMode;
|
---|
454 |
|
---|
455 | uint32_t ulMemoryBalloonSize;
|
---|
456 | uint32_t ulStatisticsUpdateInterval;
|
---|
457 |
|
---|
458 | GuestPropertiesList llGuestProperties;
|
---|
459 | com::Utf8Str strNotificationPatterns;
|
---|
460 | };
|
---|
461 |
|
---|
462 | struct AttachedDevice
|
---|
463 | {
|
---|
464 | AttachedDevice()
|
---|
465 | : type(HardDisk),
|
---|
466 | lPort(0),
|
---|
467 | lDevice(0)
|
---|
468 | {}
|
---|
469 |
|
---|
470 | enum { HardDisk } type; // @todo: implement DVD attachments here
|
---|
471 | int32_t lPort;
|
---|
472 | int32_t lDevice;
|
---|
473 | com::Guid uuid;
|
---|
474 | };
|
---|
475 | typedef std::list<AttachedDevice> AttachedDevicesList;
|
---|
476 |
|
---|
477 | struct StorageController
|
---|
478 | {
|
---|
479 | StorageController()
|
---|
480 | : storageBus(StorageBus_IDE),
|
---|
481 | controllerType(StorageControllerType_PIIX3),
|
---|
482 | ulPortCount(2),
|
---|
483 | lIDE0MasterEmulationPort(0),
|
---|
484 | lIDE0SlaveEmulationPort(0),
|
---|
485 | lIDE1MasterEmulationPort(0),
|
---|
486 | lIDE1SlaveEmulationPort(0)
|
---|
487 | {}
|
---|
488 |
|
---|
489 | com::Utf8Str strName;
|
---|
490 | StorageBus_T storageBus; // _SATA, _SCSI, _IDE
|
---|
491 | StorageControllerType_T controllerType;
|
---|
492 | uint32_t ulPortCount;
|
---|
493 |
|
---|
494 | // only for when controllerType == StorageControllerType_IntelAhci:
|
---|
495 | int32_t lIDE0MasterEmulationPort,
|
---|
496 | lIDE0SlaveEmulationPort,
|
---|
497 | lIDE1MasterEmulationPort,
|
---|
498 | lIDE1SlaveEmulationPort;
|
---|
499 |
|
---|
500 | AttachedDevicesList llAttachedDevices;
|
---|
501 | };
|
---|
502 | typedef std::list<StorageController> StorageControllersList;
|
---|
503 |
|
---|
504 | // wrap the list into an extra struct so we can use the struct without
|
---|
505 | // having to define the typedef above in headers
|
---|
506 | struct Storage
|
---|
507 | {
|
---|
508 | StorageControllersList llStorageControllers;
|
---|
509 | };
|
---|
510 |
|
---|
511 | struct Snapshot;
|
---|
512 | typedef std::list<Snapshot> SnapshotsList;
|
---|
513 |
|
---|
514 | struct Snapshot
|
---|
515 | {
|
---|
516 | com::Guid uuid;
|
---|
517 | com::Utf8Str strName,
|
---|
518 | strDescription; // optional
|
---|
519 | RTTIMESPEC timestamp;
|
---|
520 |
|
---|
521 | com::Utf8Str strStateFile; // for online snapshots only
|
---|
522 |
|
---|
523 | Hardware hardware;
|
---|
524 | Storage storage;
|
---|
525 |
|
---|
526 | SnapshotsList llChildSnapshots;
|
---|
527 | };
|
---|
528 |
|
---|
529 |
|
---|
530 | class MachineConfigFile : public ConfigFileBase
|
---|
531 | {
|
---|
532 | public:
|
---|
533 | MachineConfigFile(const com::Utf8Str *pstrFilename);
|
---|
534 |
|
---|
535 | void readNetworkAdapters(const xml::ElementNode &elmHardware, NetworkAdaptersList &ll);
|
---|
536 | void readSerialPorts(const xml::ElementNode &elmUART, SerialPortsList &ll);
|
---|
537 | void readParallelPorts(const xml::ElementNode &elmLPT, ParallelPortsList &ll);
|
---|
538 | void readGuestProperties(const xml::ElementNode &elmGuestProperties, Hardware &hw);
|
---|
539 | void readStorageControllerAttributes(const xml::ElementNode &elmStorageController, StorageController &sctl);
|
---|
540 | void readHardware(const xml::ElementNode &elmHardware, Hardware &hw, Storage &strg);
|
---|
541 | void readHardDiskAttachments_pre1_7(const xml::ElementNode &elmHardDiskAttachments, Storage &strg);
|
---|
542 | void readStorageControllers(const xml::ElementNode &elmStorageControllers, Storage &strg);
|
---|
543 | void readSnapshot(const xml::ElementNode &elmSnapshot, Snapshot &snap);
|
---|
544 | void readMachine(const xml::ElementNode &elmMachine);
|
---|
545 |
|
---|
546 | void writeHardware(xml::ElementNode &elmParent, const Hardware &hw);
|
---|
547 | void writeStorageControllers(xml::ElementNode &elmParent, const Storage &st);
|
---|
548 | void writeSnapshot(xml::ElementNode &elmParent, const Snapshot &snap);
|
---|
549 | void write(const com::Utf8Str &strFilename);
|
---|
550 |
|
---|
551 | com::Guid uuid;
|
---|
552 | com::Utf8Str strName;
|
---|
553 | bool fNameSync;
|
---|
554 | com::Utf8Str strDescription;
|
---|
555 | com::Utf8Str strOsType;
|
---|
556 | com::Utf8Str strStateFile;
|
---|
557 | com::Guid uuidCurrentSnapshot;
|
---|
558 | com::Utf8Str strSnapshotFolder;
|
---|
559 |
|
---|
560 | bool fCurrentStateModified; // optional, default is true
|
---|
561 | RTTIMESPEC timeLastStateChange; // optional, defaults to now
|
---|
562 | bool fAborted; // optional, default is false
|
---|
563 |
|
---|
564 | Hardware hardwareMachine;
|
---|
565 | Storage storageMachine;
|
---|
566 |
|
---|
567 | ExtraDataItemsMap mapExtraDataItems;
|
---|
568 |
|
---|
569 | SnapshotsList llFirstSnapshot; // first snapshot or empty list if there's none
|
---|
570 | };
|
---|
571 |
|
---|
572 | } // namespace settings
|
---|
573 |
|
---|
574 |
|
---|
575 | #endif /* ___VBox_settings_h */
|
---|