Changeset 17888 in vbox
- Timestamp:
- Mar 15, 2009 4:44:08 PM (16 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageList.cpp
r17886 r17888 780 780 RTPrintf("NetworkMask: %lS\n", netmask.raw()); 781 781 Bstr lowerIp; 782 svr->COMGETTER( FromIPAddress)(lowerIp.asOutParam());782 svr->COMGETTER(LowerIP)(lowerIp.asOutParam()); 783 783 RTPrintf("lowerIPAddress: %lS\n", lowerIp.raw()); 784 784 Bstr upperIp; 785 svr->COMGETTER( ToIPAddress)(upperIp.asOutParam());785 svr->COMGETTER(UpperIP)(upperIp.asOutParam()); 786 786 RTPrintf("upperIPAddress: %lS\n", upperIp.raw()); 787 787 RTPrintf("\n"); -
trunk/src/VBox/Main/DhcpServerImpl.cpp
r17887 r17888 42 42 } 43 43 44 void DhcpServer::uninit() 45 { 46 mVirtualBox->removeDependentChild (this); 47 } 48 44 49 HRESULT DhcpServer::init(VirtualBox *aVirtualBox, IN_BSTR aName) 45 50 { … … 56 61 m.networkMask = "0.0.0.0"; 57 62 m.enabled = FALSE; 58 m. FromIPAddress= "0.0.0.0";59 m. ToIPAddress= "0.0.0.0";63 m.lowerIP = "0.0.0.0"; 64 m.upperIP = "0.0.0.0"; 60 65 61 66 /* register with VirtualBox early, since uninit() will … … 86 91 m.networkMask = aNode.stringValue ("networkMask"); 87 92 m.enabled = aNode.value <BOOL> ("enabled"); 88 m. FromIPAddress = aNode.stringValue ("lowerIp");89 m. ToIPAddress = aNode.stringValue ("upperIp");93 m.lowerIP = aNode.stringValue ("lowerIP"); 94 m.upperIP = aNode.stringValue ("upperIP"); 90 95 91 96 autoInitSpan.setSucceeded(); … … 110 115 aNode.setValue <Bstr> ("IPAddress", m.IPAddress); 111 116 aNode.setValue <Bstr> ("networkMask", m.networkMask); 112 aNode.setValue <Bstr> ("FromIPAddress", m.FromIPAddress); 113 aNode.setValue <Bstr> ("ToIPAddress", m.ToIPAddress); 117 aNode.setValue <Bstr> ("lowerIP", m.lowerIP); 118 aNode.setValue <Bstr> ("upperIP", m.upperIP); 119 aNode.setValue <BOOL> ("enabled", m.enabled); 114 120 115 121 return S_OK; … … 183 189 } 184 190 185 STDMETHODIMP DhcpServer::COMGETTER( FromIPAddress) (BSTR *aIPAddress)191 STDMETHODIMP DhcpServer::COMGETTER(LowerIP) (BSTR *aIPAddress) 186 192 { 187 193 CheckComArgOutPointerValid(aIPAddress); … … 190 196 CheckComRCReturnRC (autoCaller.rc()); 191 197 192 m. FromIPAddress.cloneTo(aIPAddress);193 194 return S_OK; 195 196 } 197 198 STDMETHODIMP DhcpServer::COMGETTER( ToIPAddress) (BSTR *aIPAddress)198 m.lowerIP.cloneTo(aIPAddress); 199 200 return S_OK; 201 202 } 203 204 STDMETHODIMP DhcpServer::COMGETTER(UpperIP) (BSTR *aIPAddress) 199 205 { 200 206 CheckComArgOutPointerValid(aIPAddress); … … 203 209 CheckComRCReturnRC (autoCaller.rc()); 204 210 205 m. ToIPAddress.cloneTo(aIPAddress);206 207 return S_OK; 208 209 } 210 211 STDMETHODIMP DhcpServer::SetConfiguration (IN_BSTR aIPAddress, IN_BSTR aNetworkMask, IN_BSTR a FromIPAddress, IN_BSTR aToIPAddress)211 m.upperIP.cloneTo(aIPAddress); 212 213 return S_OK; 214 215 } 216 217 STDMETHODIMP DhcpServer::SetConfiguration (IN_BSTR aIPAddress, IN_BSTR aNetworkMask, IN_BSTR aLowerIP, IN_BSTR aUpperIP) 212 218 { 213 219 AssertReturn (aIPAddress != NULL, E_INVALIDARG); 214 220 AssertReturn (aNetworkMask != NULL, E_INVALIDARG); 215 AssertReturn (a FromIPAddress!= NULL, E_INVALIDARG);216 AssertReturn (a ToIPAddress!= NULL, E_INVALIDARG);221 AssertReturn (aLowerIP != NULL, E_INVALIDARG); 222 AssertReturn (aUpperIP != NULL, E_INVALIDARG); 217 223 218 224 AutoCaller autoCaller (this); … … 224 230 m.IPAddress = aIPAddress; 225 231 m.networkMask = aNetworkMask; 226 m. FromIPAddress = aFromIPAddress;227 m. ToIPAddress = aToIPAddress;232 m.lowerIP = aLowerIP; 233 m.upperIP = aUpperIP; 228 234 229 235 HRESULT rc = mVirtualBox->saveSettings(); 230 236 231 return rc;232 } 237 return S_OK; 238 } -
trunk/src/VBox/Main/VirtualBoxImpl.cpp
r17886 r17888 4778 4778 return E_INVALIDARG; 4779 4779 } 4780 rc = S_OK; 4780 4781 4781 4782 mData.mDhcpServers.push_back (aDhcpServer); -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r17879 r17888 1220 1220 <interface 1221 1221 name="IDhcpServer" extends="$unknown" 1222 uuid=" f6de19f7-f4b5-4d93-b3de-664729267a53"1222 uuid="ed5c8393-e245-476d-a272-b65063a5d542" 1223 1223 wsmap="managed" 1224 1224 > … … 1254 1254 </attribute> 1255 1255 1256 <attribute name=" FromIPAddress" type="wstring" readonly="yes">1256 <attribute name="lowerIP" type="wstring" readonly="yes"> 1257 1257 <desc> 1258 1258 specifies from IP adrres in server address range … … 1260 1260 </attribute> 1261 1261 1262 <attribute name=" ToIPAddress" type="wstring" readonly="yes">1262 <attribute name="upperIP" type="wstring" readonly="yes"> 1263 1263 <desc> 1264 1264 specifies to IP adrres in server address range -
trunk/src/VBox/Main/include/DhcpServerImpl.h
r17887 r17888 64 64 HRESULT saveSettings (settings::Key &aParentNode); 65 65 66 void uninit(); 67 66 68 // IDhcpServer properties 67 69 STDMETHOD(COMGETTER(NetworkName)) (BSTR *aName); … … 70 72 STDMETHOD(COMGETTER(IPAddress)) (BSTR *aIPAddress); 71 73 STDMETHOD(COMGETTER(NetworkMask)) (BSTR *aNetworkMask); 72 STDMETHOD(COMGETTER( FromIPAddress)) (BSTR *aIPAddress);73 STDMETHOD(COMGETTER( ToIPAddress)) (BSTR *aIPAddress);74 STDMETHOD(COMGETTER(LowerIP)) (BSTR *aIPAddress); 75 STDMETHOD(COMGETTER(UpperIP)) (BSTR *aIPAddress); 74 76 75 77 STDMETHOD(SetConfiguration) (IN_BSTR aIPAddress, IN_BSTR aNetworkMask, IN_BSTR aFromIPAddress, IN_BSTR aToIPAddress); … … 90 92 Bstr IPAddress; 91 93 Bstr networkMask; 92 Bstr FromIPAddress;93 Bstr ToIPAddress;94 Bstr lowerIP; 95 Bstr upperIP; 94 96 BOOL enabled; 95 97 } m; -
trunk/src/VBox/Main/xml/VirtualBox-settings-common.xsd
r17881 r17888 257 257 <xsd:complexType name="TDhcpServer"> 258 258 <xsd:attribute name="networkName" type="xsd:string" use="required"/> 259 <xsd:attribute name="lowerI p" type="xsd:string" use="required"/>260 <xsd:attribute name="upperI p" type="xsd:string" use="required"/>259 <xsd:attribute name="lowerIP" type="xsd:string" use="required"/> 260 <xsd:attribute name="upperIP" type="xsd:string" use="required"/> 261 261 <xsd:attribute name="IPAddress" type="xsd:string" use="required"/> 262 262 <xsd:attribute name="networkMask" type="xsd:string" use="required"/>
Note:
See TracChangeset
for help on using the changeset viewer.