Changeset 45660 in vbox
- Timestamp:
- Apr 22, 2013 8:43:37 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/settings.h
r45622 r45660 814 814 BootOrderMap mapBootOrder; // item 0 has highest priority 815 815 816 GraphicsControllerType_T graphicsControllerType; 816 817 uint32_t ulVRAMSizeMB; 817 818 uint32_t cMonitors; -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r45622 r45660 3783 3783 </interface> 3784 3784 3785 <interface 3786 name="IPCIAddress" extends="$unknown" 3787 uuid="D88B324F-DB19-4D3B-A1A9-BF5B127199A8" 3788 wsmap="struct" 3789 > 3790 3791 <desc> 3792 Address on the PCI bus. 3793 </desc> 3794 3795 <attribute name="bus" type="short"> 3796 <desc> 3797 Bus number. 3798 </desc> 3799 </attribute> 3800 3801 <attribute name="device" type="short"> 3802 <desc> 3803 Device number. 3804 </desc> 3805 </attribute> 3806 3807 <attribute name="devFunction" type="short"> 3808 <desc> 3809 Device function number. 3810 </desc> 3811 </attribute> 3812 3813 <method name="asLong"> 3814 <desc> 3815 Convert PCI address into long. 3816 </desc> 3817 <param name="result" type="long" dir="return" /> 3818 </method> 3819 3820 <method name="fromLong"> 3821 <desc> 3822 Make PCI address from long. 3823 </desc> 3824 <param name="number" type="long" dir="in" /> 3825 </method> 3826 </interface> 3827 3828 <interface 3829 name="IPCIDeviceAttachment" extends="$unknown" 3830 uuid="91f33d6f-e621-4f70-a77e-15f0e3c714d5" 3831 wsmap="struct" 3832 > 3833 3834 <desc> 3835 Information about PCI attachments. 3836 </desc> 3837 3838 <attribute name="name" type="wstring" readonly="yes"> 3839 <desc> 3840 Device name. 3841 </desc> 3842 </attribute> 3843 3844 <attribute name="isPhysicalDevice" type="boolean" readonly="yes"> 3845 <desc> 3846 If this is physical or virtual device. 3847 </desc> 3848 </attribute> 3849 3850 <attribute name="hostAddress" type="long" readonly="yes"> 3851 <desc> 3852 Address of device on the host, applicable only to host devices. 3853 </desc> 3854 </attribute> 3855 3856 <attribute name="guestAddress" type="long" readonly="yes"> 3857 <desc> 3858 Address of device on the guest. 3859 </desc> 3860 </attribute> 3861 3862 </interface> 3863 3864 <enum 3865 name="GraphicsControllerType" 3866 uuid="79c96ca0-9f39-4900-948e-68c41cbe127a" 3867 > 3868 <desc>Graphics controller type, used with <link to="IMachine::unregister" />. 3869 </desc> 3870 <const name="Null" value="0"> 3871 <desc>Reserved value, invalid.</desc> 3872 </const> 3873 <const name="VBoxVGA" value="1"> 3874 <desc>Default VirtualBox VGA device.</desc> 3875 </const> 3876 </enum> 3877 3785 3878 <enum 3786 3879 name="CleanupMode" … … 3803 3896 </enum> 3804 3897 3805 <interface3806 name="IPCIAddress" extends="$unknown"3807 uuid="D88B324F-DB19-4D3B-A1A9-BF5B127199A8"3808 wsmap="struct"3809 >3810 3811 <desc>3812 Address on the PCI bus.3813 </desc>3814 3815 <attribute name="bus" type="short">3816 <desc>3817 Bus number.3818 </desc>3819 </attribute>3820 3821 <attribute name="device" type="short">3822 <desc>3823 Device number.3824 </desc>3825 </attribute>3826 3827 <attribute name="devFunction" type="short">3828 <desc>3829 Device function number.3830 </desc>3831 </attribute>3832 3833 <method name="asLong">3834 <desc>3835 Convert PCI address into long.3836 </desc>3837 <param name="result" type="long" dir="return" />3838 </method>3839 3840 <method name="fromLong">3841 <desc>3842 Make PCI address from long.3843 </desc>3844 <param name="number" type="long" dir="in" />3845 </method>3846 </interface>3847 3848 <interface3849 name="IPCIDeviceAttachment" extends="$unknown"3850 uuid="91f33d6f-e621-4f70-a77e-15f0e3c714d5"3851 wsmap="struct"3852 >3853 3854 <desc>3855 Information about PCI attachments.3856 </desc>3857 3858 <attribute name="name" type="wstring" readonly="yes">3859 <desc>3860 Device name.3861 </desc>3862 </attribute>3863 3864 <attribute name="isPhysicalDevice" type="boolean" readonly="yes">3865 <desc>3866 If this is physical or virtual device.3867 </desc>3868 </attribute>3869 3870 <attribute name="hostAddress" type="long" readonly="yes">3871 <desc>3872 Address of device on the host, applicable only to host devices.3873 </desc>3874 </attribute>3875 3876 <attribute name="guestAddress" type="long" readonly="yes">3877 <desc>3878 Address of device on the guest.3879 </desc>3880 </attribute>3881 3882 </interface>3883 3884 3898 <enum 3885 3899 name="CloneMode" extends="$unknown" … … 3954 3968 <interface 3955 3969 name="IMachine" extends="$unknown" 3956 uuid=" 381e3f31-2b27-45b7-818a-30609ade86b3"3970 uuid="1af27b33-9e69-44a5-b6d2-d375dd329a73" 3957 3971 wsmap="managed" 3958 3972 > … … 4178 4192 fusion for this machine (64 bits host only). 4179 4193 </desc> 4194 </attribute> 4195 4196 <attribute name="graphicsControllerType" type="GraphicsControllerType"> 4197 <desc>Graphics controller type.</desc> 4180 4198 </attribute> 4181 4199 -
trunk/src/VBox/Main/include/MachineImpl.h
r45622 r45660 255 255 ULONG mMemoryBalloonSize; 256 256 BOOL mPageFusionEnabled; 257 GraphicsControllerType_T mGraphicsControllerType; 257 258 ULONG mVRAMSize; 258 259 ULONG mVideoCaptureWidth; … … 419 420 STDMETHOD(COMGETTER(PageFusionEnabled))(BOOL *enabled); 420 421 STDMETHOD(COMSETTER(PageFusionEnabled))(BOOL enabled); 422 STDMETHOD(COMGETTER(GraphicsControllerType))(GraphicsControllerType_T *aGraphicsController); 423 STDMETHOD(COMSETTER(GraphicsControllerType))(GraphicsControllerType_T aGraphicsController); 421 424 STDMETHOD(COMGETTER(VRAMSize))(ULONG *memorySize); 422 425 STDMETHOD(COMSETTER(VRAMSize))(ULONG memorySize); 426 STDMETHOD(COMGETTER(Accelerate3DEnabled))(BOOL *enabled); 427 STDMETHOD(COMSETTER(Accelerate3DEnabled))(BOOL enabled); 428 STDMETHOD(COMGETTER(Accelerate2DVideoEnabled))(BOOL *enabled); 429 STDMETHOD(COMSETTER(Accelerate2DVideoEnabled))(BOOL enabled); 430 STDMETHOD(COMGETTER(MonitorCount))(ULONG *monitorCount); 431 STDMETHOD(COMSETTER(MonitorCount))(ULONG monitorCount); 423 432 STDMETHOD(COMGETTER(VideoCaptureEnabled))(BOOL *u8VideoRecEnabled); 424 433 STDMETHOD(COMSETTER(VideoCaptureEnabled))(BOOL u8VideoRecEnabled); … … 429 438 STDMETHOD(COMGETTER(VideoCaptureHeight))(ULONG *u32VideoRecVertRes); 430 439 STDMETHOD(COMSETTER(VideoCaptureHeight))(ULONG u32VideoRecVertRes); 431 STDMETHOD(COMGETTER(MonitorCount))(ULONG *monitorCount);432 STDMETHOD(COMSETTER(MonitorCount))(ULONG monitorCount);433 STDMETHOD(COMGETTER(Accelerate3DEnabled))(BOOL *enabled);434 STDMETHOD(COMSETTER(Accelerate3DEnabled))(BOOL enabled);435 STDMETHOD(COMGETTER(Accelerate2DVideoEnabled))(BOOL *enabled);436 STDMETHOD(COMSETTER(Accelerate2DVideoEnabled))(BOOL enabled);437 440 STDMETHOD(COMGETTER(BIOSSettings))(IBIOSSettings **biosSettings); 438 441 STDMETHOD(COMGETTER(SnapshotFolder))(BSTR *aSavedStateFolder); -
trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp
r45622 r45660 1322 1322 * VGA. 1323 1323 */ 1324 InsertConfigNode(pDevices, "vga", &pDev); 1325 InsertConfigNode(pDev, "0", &pInst); 1326 InsertConfigInteger(pInst, "Trusted", 1); /* boolean */ 1327 1328 hrc = pBusMgr->assignPCIDevice("vga", pInst); H(); 1329 InsertConfigNode(pInst, "Config", &pCfg); 1330 ULONG cVRamMBs; 1331 hrc = pMachine->COMGETTER(VRAMSize)(&cVRamMBs); H(); 1332 InsertConfigInteger(pCfg, "VRamSize", cVRamMBs * _1M); 1333 ULONG cMonitorCount; 1334 hrc = pMachine->COMGETTER(MonitorCount)(&cMonitorCount); H(); 1335 InsertConfigInteger(pCfg, "MonitorCount", cMonitorCount); 1324 GraphicsControllerType_T graphicsController; 1325 hrc = pMachine->COMGETTER(GraphicsControllerType)(&graphicsController); H(); 1326 switch (graphicsController) 1327 { 1328 case GraphicsControllerType_VBoxVGA: 1329 InsertConfigNode(pDevices, "vga", &pDev); 1330 InsertConfigNode(pDev, "0", &pInst); 1331 InsertConfigInteger(pInst, "Trusted", 1); /* boolean */ 1332 1333 hrc = pBusMgr->assignPCIDevice("vga", pInst); H(); 1334 InsertConfigNode(pInst, "Config", &pCfg); 1335 ULONG cVRamMBs; 1336 hrc = pMachine->COMGETTER(VRAMSize)(&cVRamMBs); H(); 1337 InsertConfigInteger(pCfg, "VRamSize", cVRamMBs * _1M); 1338 ULONG cMonitorCount; 1339 hrc = pMachine->COMGETTER(MonitorCount)(&cMonitorCount); H(); 1340 InsertConfigInteger(pCfg, "MonitorCount", cMonitorCount); 1336 1341 #ifdef VBOX_WITH_2X_4GB_ADDR_SPACE 1337 InsertConfigInteger(pCfg, "R0Enabled", fHMEnabled);1342 InsertConfigInteger(pCfg, "R0Enabled", fHMEnabled); 1338 1343 #endif 1344 break; 1345 default: 1346 AssertMsgFailed(("Invalid graphicsController=%d\n", graphicsController)); 1347 return VMR3SetError(pUVM, VERR_INVALID_PARAMETER, RT_SRC_POS, 1348 N_("Invalid graphics controller type '%d'"), graphicsController); 1349 } 1339 1350 1340 1351 /* -
trunk/src/VBox/Main/xml/Settings.cpp
r45622 r45660 812 812 813 813 /** 814 * This is common version for reading NAT port forward rule in per-_machine's_adapter_ and 814 * This is common version for reading NAT port forward rule in per-_machine's_adapter_ and 815 815 * per-network approaches. 816 * Note: this function doesn't in fill given list from xml::ElementNodesList, because there is conflicting 817 * de aclration in ovmfreader.h.816 * Note: this function doesn't in fill given list from xml::ElementNodesList, because there is conflicting 817 * declaration in ovmfreader.h. 818 818 */ 819 819 void ConfigFileBase::readNATForwardRuleList(const xml::ElementNode &elmParent, NATRuleList &llRules) … … 1175 1175 for (NATRuleList::const_iterator r = natRuleList.begin(); 1176 1176 r != natRuleList.end(); ++r) 1177 1178 1179 1180 1177 { 1178 xml::ElementNode *pelmPF; 1179 pelmPF = elmParent.createChild("Forwarding"); 1180 if ((*r).strName.length()) 1181 1181 pelmPF->setAttribute("name", (*r).strName); 1182 1183 1182 pelmPF->setAttribute("proto", (*r).proto); 1183 if ((*r).strHostIP.length()) 1184 1184 pelmPF->setAttribute("hostip", (*r).strHostIP); 1185 1185 if ((*r).u16HostPort) 1186 1186 pelmPF->setAttribute("hostport", (*r).u16HostPort); 1187 1187 if ((*r).strGuestIP.length()) 1188 1188 pelmPF->setAttribute("guestip", (*r).strGuestIP); 1189 1189 if ((*r).u16GuestPort) 1190 1190 pelmPF->setAttribute("guestport", (*r).u16GuestPort); 1191 } 1192 } 1191 } 1192 } 1193 1193 1194 /** 1194 1195 * Cleans up memory allocated by the internal XML parser. To be called by … … 1334 1335 && (pelmNet->getAttributeValue("needDhcp", net.fNeedDhcpServer)) 1335 1336 ) 1336 1337 1338 1337 { 1338 const xml::ElementNode *pelmPortForwardRules4; 1339 if ((pelmPortForwardRules4 = pelmNet->findChildElement("PortForwarding4"))) 1339 1340 readNATForwardRuleList(*pelmPortForwardRules4, 1340 net.llPortForwardRules4);1341 1342 1343 1344 readNATForwardRuleList(*pelmPortForwardRules6, 1345 net.llPortForwardRules6);1346 1347 1348 1341 net.llPortForwardRules4); 1342 1343 const xml::ElementNode *pelmPortForwardRules6; 1344 if ((pelmPortForwardRules6 = pelmNet->findChildElement("PortForwarding6"))) 1345 readNATForwardRuleList(*pelmPortForwardRules6, 1346 net.llPortForwardRules6); 1347 1348 llNATNetworks.push_back(net); 1349 } 1349 1350 else 1350 1351 throw ConfigFileError(this, pelmNet, N_("Required NATNetwork/@networkName, @gateway, @network,@advertiseDefaultIpv6Route , @needDhcp or @enabled attribute is missing")); … … 1494 1495 pelmThis->setAttribute("enabled", (d.fEnabled) ? 1 : 0); // too bad we chose 1 vs. 0 here 1495 1496 } 1497 1496 1498 /* TODO: bump main version ? */ 1497 1499 xml::ElementNode *pelmNATNetworks; … … 1740 1742 ulCpuExecutionCap(100), 1741 1743 ulMemorySizeMB((uint32_t)-1), 1744 graphicsControllerType(GraphicsControllerType_VBoxVGA), 1742 1745 ulVRAMSizeMB(8), 1743 1746 cMonitors(1), … … 1810 1813 && (ulMemorySizeMB == h.ulMemorySizeMB) 1811 1814 && (mapBootOrder == h.mapBootOrder) 1815 && (graphicsControllerType == h.graphicsControllerType) 1812 1816 && (ulVRAMSizeMB == h.ulVRAMSizeMB) 1813 1817 && (cMonitors == h.cMonitors) … … 2211 2215 pelmTFTP->getAttributeValue("next-server", nic.nat.strTFTPNextServer); 2212 2216 } 2213 2217 2214 2218 readNATForwardRuleList(elmMode, nic.nat.llRules); 2215 2219 } … … 2688 2692 else if (pelmHwChild->nameEquals("Display")) 2689 2693 { 2694 Utf8Str strGraphicsControllerType; 2695 if (!pelmHwChild->getAttributeValue("controller", strGraphicsControllerType)) 2696 hw.graphicsControllerType = GraphicsControllerType_VBoxVGA; 2697 else 2698 { 2699 strGraphicsControllerType.toUpper(); 2700 GraphicsControllerType_T type; 2701 if (strGraphicsControllerType == "VBOXVGA") 2702 type = GraphicsControllerType_VBoxVGA; 2703 else 2704 throw ConfigFileError(this, pelmHwChild, N_("Invalid value '%s' in Display/@controller attribute"), strGraphicsControllerType.c_str()); 2705 hw.graphicsControllerType = type; 2706 } 2690 2707 pelmHwChild->getAttributeValue("VRAMSize", hw.ulVRAMSizeMB); 2691 2708 if (!pelmHwChild->getAttributeValue("monitorCount", hw.cMonitors))
Note:
See TracChangeset
for help on using the changeset viewer.