- Timestamp:
- Sep 17, 2007 3:26:03 PM (17 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/MachineImpl.cpp
r4655 r4859 3799 3799 } 3800 3800 3801 /* Guest node (optional) */3802 {3803 CFGNODE GuestNode = 0;3804 CFGLDRGetChildNode (machineNode, "Guest", 0, &GuestNode);3805 if (GuestNode)3806 {3807 uint32_t memoryBalloonSize = 0;3808 CFGLDRQueryUInt32 (GuestNode, "MemoryBalloonSize", &memoryBalloonSize);3809 mHWData->mMemoryBalloonSize = memoryBalloonSize;3810 3811 uint32_t statisticsUpdateInterval = 0;3812 CFGLDRQueryUInt32 (GuestNode, "StatisticsUpdateInterval", &statisticsUpdateInterval);3813 mHWData->mStatisticsUpdateInterval = statisticsUpdateInterval;3814 3815 CFGLDRReleaseNode (GuestNode);3816 }3817 }3818 3819 3801 /* 3820 3802 * NOTE: the assignment below must be the last thing to do, … … 3908 3890 while (0); 3909 3891 3910 /* Guest node (optional) */3911 {3912 CFGNODE GuestNode = 0;3913 CFGLDRGetChildNode (aNode, "Guest", 0, &GuestNode);3914 if (GuestNode)3915 {3916 uint32_t memoryBalloonSize = 0;3917 CFGLDRQueryUInt32 (GuestNode, "MemoryBalloonSize", &memoryBalloonSize);3918 mHWData->mMemoryBalloonSize = memoryBalloonSize;3919 3920 uint32_t statisticsUpdateInterval = 0;3921 CFGLDRQueryUInt32 (GuestNode, "StatisticsUpdateInterval", &statisticsUpdateInterval);3922 mHWData->mStatisticsUpdateInterval = statisticsUpdateInterval;3923 3924 CFGLDRReleaseNode (GuestNode);3925 }3926 }3927 3892 CFGLDRReleaseNode (hardwareNode); 3928 3893 } … … 4637 4602 } 4638 4603 4604 /* Guest node (optional) */ 4605 /// @todo (dmik) make required on next format change! 4606 { 4607 CFGNODE guestNode = 0; 4608 CFGLDRGetChildNode (aNode, "Guest", 0, &guestNode); 4609 if (guestNode) 4610 { 4611 uint32_t memoryBalloonSize = 0; 4612 CFGLDRQueryUInt32 (guestNode, "MemoryBalloonSize", 4613 &memoryBalloonSize); 4614 mHWData->mMemoryBalloonSize = memoryBalloonSize; 4615 4616 uint32_t statisticsUpdateInterval = 0; 4617 CFGLDRQueryUInt32 (guestNode, "StatisticsUpdateInterval", 4618 &statisticsUpdateInterval); 4619 mHWData->mStatisticsUpdateInterval = statisticsUpdateInterval; 4620 4621 CFGLDRReleaseNode (guestNode); 4622 } 4623 } 4624 4639 4625 return S_OK; 4640 4626 } … … 5501 5487 } 5502 5488 5503 /* Guest node (optional) */5504 {5505 CFGNODE GuestNode = 0;5506 CFGLDRGetChildNode (machineNode, "Guest", 0, &GuestNode);5507 /* first, delete the entire node if exists */5508 if (GuestNode)5509 CFGLDRDeleteNode (GuestNode);5510 /* then recreate it */5511 GuestNode = 0;5512 CFGLDRCreateChildNode (machineNode, "Guest", &GuestNode);5513 if (GuestNode)5514 {5515 CFGLDRSetUInt32 (GuestNode, "MemoryBalloonSize", mHWData->mMemoryBalloonSize);5516 CFGLDRSetUInt32 (GuestNode, "StatisticsUpdateInterval", mHWData->mStatisticsUpdateInterval);5517 CFGLDRReleaseNode (GuestNode);5518 }5519 }5520 5521 5489 /* update all snapshots if requested */ 5522 5490 if (updateAllSnapshots) … … 5899 5867 if (FAILED (rc)) 5900 5868 return rc; 5901 }5902 5903 /* Guest node (optional) */5904 {5905 CFGNODE GuestNode = 0;5906 CFGLDRGetChildNode (aNode, "Guest", 0, &GuestNode);5907 /* first, delete the entire node if exists */5908 if (GuestNode)5909 CFGLDRDeleteNode (GuestNode);5910 /* then recreate it */5911 GuestNode = 0;5912 CFGLDRCreateChildNode (aNode, "Guest", &GuestNode);5913 if (GuestNode)5914 {5915 CFGLDRSetUInt32 (GuestNode, "MemoryBalloonSize", mHWData->mMemoryBalloonSize);5916 CFGLDRSetUInt32 (GuestNode, "StatisticsUpdateInterval", mHWData->mStatisticsUpdateInterval);5917 CFGLDRReleaseNode (GuestNode);5918 }5919 5869 } 5920 5870 } … … 6496 6446 } 6497 6447 6448 /* Guest */ 6449 { 6450 CFGNODE guestNode = 0; 6451 CFGLDRGetChildNode (aNode, "Guest", 0, &guestNode); 6452 /* first, delete the entire node if exists */ 6453 if (guestNode) 6454 CFGLDRDeleteNode (guestNode); 6455 /* then recreate it */ 6456 guestNode = 0; 6457 CFGLDRCreateChildNode (aNode, "Guest", &guestNode); 6458 6459 CFGLDRSetUInt32 (guestNode, "MemoryBalloonSize", 6460 mHWData->mMemoryBalloonSize); 6461 CFGLDRSetUInt32 (guestNode, "StatisticsUpdateInterval", 6462 mHWData->mStatisticsUpdateInterval); 6463 6464 CFGLDRReleaseNode (guestNode); 6465 } 6466 6498 6467 return rc; 6499 6468 } -
trunk/src/VBox/Main/xml/VirtualBox-settings-common.xsd
r4654 r4859 383 383 </xsd:complexType> 384 384 385 <xsd:complexType name="TGuest">386 <xsd:attribute name="MemoryBalloonSize" type="xsd:unsignedInt" default="0"/>387 <xsd:attribute name="StatisticsUpdateInterval" type="xsd:unsignedInt" default="0"/>388 </xsd:complexType>389 390 385 <xsd:complexType name="TBoot"> 391 386 <xsd:sequence> … … 611 606 <xsd:complexType name="TClipboard"> 612 607 <xsd:attribute name="mode" type="TClipboardMode" use="required"/> 608 </xsd:complexType> 609 610 <xsd:complexType name="TGuest"> 611 <xsd:attribute name="MemoryBalloonSize" type="xsd:unsignedInt" default="0"/> 612 <xsd:attribute name="StatisticsUpdateInterval" type="xsd:unsignedInt" default="0"/> 613 613 </xsd:complexType> 614 614 … … 655 655 </xsd:unique> 656 656 </xsd:element> 657 <!--- @todo (dmik) remove minOccurs="0" from SharedFolderson next format change! -->657 <!--- @todo (dmik) remove minOccurs="0" on next format change! --> 658 658 <xsd:element name="Clipboard" type="TClipboard" minOccurs="0"/> 659 <!--- @todo (dmik) remove minOccurs="0" on next format change! --> 660 <xsd:element name="Guest" type="TGuest" minOccurs="0"/> 659 661 </xsd:all> 660 662 </xsd:complexType> … … 667 669 <xsd:element name="ExtraData" type="TExtraData" minOccurs="0"/> 668 670 <xsd:element name="Snapshot" type="TSnapshot" minOccurs="0"/> 669 <xsd:element name="Guest" type="TGuest" minOccurs="0"/>670 671 </xsd:all> 671 672 <xsd:attribute name="name" type="TNonEmptyString" use="required"/> … … 694 695 </xsd:complexType> 695 696 </xsd:element> 696 <xsd:element name="Guest" type="TGuest" minOccurs="0"/>697 697 </xsd:all> 698 698 <xsd:attribute name="name" type="xsd:token" use="required"/>
Note:
See TracChangeset
for help on using the changeset viewer.