VirtualBox

Changeset 17865 in vbox


Ignore:
Timestamp:
Mar 14, 2009 10:05:29 AM (16 years ago)
Author:
vboxsync
Message:

Main/dhcp API, E_NOTIMPL yet

Location:
trunk/src/VBox/Main
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/HostNetworkInterfaceImpl.cpp

    r17835 r17865  
    381381}
    382382
     383STDMETHODIMP HostNetworkInterface::COMGETTER(NetworkName) (BSTR *aNetworkName)
     384{
     385    return E_NOTIMPL;
     386}
     387
    383388STDMETHODIMP HostNetworkInterface::EnableStaticIpConfig (IN_BSTR aIPAddress, IN_BSTR aNetMask)
    384389{
  • trunk/src/VBox/Main/Makefile.kmk

    r17804 r17865  
    282282        HostFloppyDriveImpl.cpp \
    283283        HostNetworkInterfaceImpl.cpp \
     284        DhcpServerImpl.cpp \
    284285        GuestOSTypeImpl.cpp \
    285286        NetworkAdapterImpl.cpp \
  • trunk/src/VBox/Main/VirtualBoxImpl.cpp

    r17810 r17865  
    6262#include "GuestOSTypeImpl.h"
    6363#include "Version.h"
     64#include "DhcpServerImpl.h"
    6465
    6566#include "VirtualBoxXMLUtil.h"
     
    734735    ReturnComNotImplemented();
    735736#endif /* !VBOX_WITH_RESOURCE_USAGE_API */
     737}
     738
     739STDMETHODIMP
     740VirtualBox::COMGETTER(DhcpServers) (ComSafeArrayOut (IDhcpServer *, aDhcpServers))
     741{
     742    return E_NOTIMPL;
    736743}
    737744
     
    45594566    return NULL;
    45604567}
     4568
     4569//STDMETHODIMP VirtualBox::CreateDhcpServerForInterface (/*IHostNetworkInterface * aIinterface,*/ IDhcpServer ** aServer)
     4570//{
     4571//    return E_NOTIMPL;
     4572//}
     4573
     4574STDMETHODIMP VirtualBox::CreateDhcpServer (IN_BSTR aName, IDhcpServer ** aServer)
     4575{
     4576    return E_NOTIMPL;
     4577}
     4578
     4579//STDMETHODIMP VirtualBox::FindDhcpServerForInterface (IHostNetworkInterface * aIinterface, IDhcpServer ** aServer)
     4580//{
     4581//    return E_NOTIMPL;
     4582//}
     4583
     4584STDMETHODIMP VirtualBox::FindDhcpServerByName (IN_BSTR aName, IDhcpServer ** aServer)
     4585{
     4586    return E_NOTIMPL;
     4587}
     4588
     4589STDMETHODIMP VirtualBox::RemoveDhcpServer (IDhcpServer * aServer)
     4590{
     4591    return E_NOTIMPL;
     4592}
     4593
    45614594/* vi: set tabstop=4 shiftwidth=4 expandtab: */
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r17836 r17865  
    12171217
    12181218  </interface>
     1219 
     1220  <interface
     1221    name="IDhcpServer" extends="$dispatched"
     1222    uuid="f6de19f7-f4b5-4d93-b3de-664729267a53"
     1223    wsmap="managed"
     1224  >
     1225    <desc>
     1226      The IDhcpServer interface represents the vbox dhcp server configuration.
     1227
     1228      To enumerate all the dhcp servers on the host, use the
     1229      <link to="IVirtualBox::dhcpServers"/> attribute.
     1230    </desc>
     1231
     1232    <attribute name="enabled" type="boolean">
     1233      <desc>
     1234        specifies if the dhcp server is enabled
     1235      </desc>
     1236    </attribute>
     1237   
     1238    <attribute name="IPAddress" type="wstring" readonly="yes">
     1239      <desc>
     1240        specifies server IP
     1241      </desc>
     1242    </attribute>
     1243
     1244    <attribute name="networkMask" type="wstring" readonly="yes">
     1245      <desc>
     1246        specifies server network mask
     1247      </desc>
     1248    </attribute>
     1249
     1250    <attribute name="networkName" type="wstring" readonly="yes">
     1251      <desc>
     1252        specifies internal network name the server is used for
     1253      </desc>
     1254    </attribute>
     1255
     1256    <attribute name="FromIPAddress" type="wstring" readonly="yes">
     1257      <desc>
     1258        specifies from IP adrres in server address range
     1259      </desc>
     1260    </attribute>
     1261
     1262    <attribute name="ToIPAddress" type="wstring" readonly="yes">
     1263      <desc>
     1264        specifies to IP adrres in server address range
     1265      </desc>
     1266    </attribute>
     1267   
     1268    <method name="setConfiguration">
     1269      <desc>
     1270        configures the server
     1271        <result name="E_INVALIDARG">
     1272          invalid configuration supplied
     1273        </result>
     1274      </desc>
     1275      <param name="IPAddress" type="wstring" dir="in">
     1276        <desc>
     1277          server IP address
     1278        </desc>
     1279      </param>
     1280      <param name="networkMask" type="wstring" dir="in">
     1281        <desc>
     1282          server network mask
     1283      </desc>
     1284      </param>
     1285      <param name="FromIPAddress" type="wstring" dir="in">
     1286        <desc>
     1287          server From IP address for address range
     1288        </desc>
     1289      </param>
     1290      <param name="ToIPAddress" type="wstring" dir="in">
     1291        <desc>
     1292          server To IP address for address range
     1293        </desc>
     1294      </param>
     1295    </method>
     1296  </interface>
    12191297
    12201298  <interface
    12211299    name="IVirtualBox" extends="$dispatched"
    1222     uuid="18c00639-2bc0-4d5f-93a0-5f20372f9914"
     1300    uuid="779264f4-65ed-48ed-be39-518ca549e296"
    12231301    wsmap="managed"
    12241302  >
     
    14011479      <desc>
    14021480        Associated performance collector object.
     1481      </desc>
     1482    </attribute>
     1483   
     1484    <attribute name="dhcpServers" type="IDhcpServer" safearray="yes" readonly="yes">
     1485      <desc>
     1486        dhcp server settings.
    14031487      </desc>
    14041488    </attribute>
     
    26672751      <param name="bakFileName" type="wstring" dir="return">
    26682752        <desc>Full path to the created backup copy.</desc>
     2753      </param>
     2754    </method>
     2755
     2756    <!--method name="createDhcpServerForInterface">
     2757      <desc>
     2758        Creates a dhcp server settings to be used for the given interface
     2759        <result name="E_INVALIDARG">
     2760          Host network interface @a name already exists.
     2761        </result>
     2762      </desc>
     2763      <param name="interface" type="IHostNetworkInterface" dir="in">
     2764        <desc>Network Interface</desc>
     2765      </param>
     2766      <param name="server" type="IDhcpServer" dir="out">
     2767        <desc>Dhcp server settings</desc>
     2768      </param>
     2769    </method-->
     2770   
     2771    <method name="createDhcpServer">
     2772      <desc>
     2773        Creates a dhcp server settings to be used for the given internal network name
     2774        <result name="E_INVALIDARG">
     2775          Host network interface @a name already exists.
     2776        </result>
     2777      </desc>
     2778      <param name="name" type="wstring" dir="in">
     2779        <desc>server name</desc>
     2780      </param>
     2781      <param name="server" type="IDhcpServer" dir="out">
     2782        <desc>Dhcp server settings</desc>
     2783      </param>
     2784    </method>
     2785   
     2786    <method name="findDhcpServerByName">
     2787      <desc>
     2788        Searches a dhcp server settings to be used for the given internal network name
     2789        <result name="E_INVALIDARG">
     2790          Host network interface @a name already exists.
     2791        </result>
     2792       
     2793      </desc>
     2794      <param name="name" type="wstring" dir="in">
     2795        <desc>server name</desc>
     2796      </param>
     2797      <param name="server" type="IDhcpServer" dir="out">
     2798        <desc>Dhcp server settings</desc>
     2799      </param>
     2800    </method>
     2801   
     2802    <!--method name="findDhcpServerForInterface">
     2803      <desc>
     2804        Searches a dhcp server settings to be used for the given interface
     2805        <result name="E_INVALIDARG">
     2806          Host network interface @a name already exists.
     2807        </result>
     2808      </desc>
     2809      <param name="interface" type="IHostNetworkInterface" dir="in">
     2810        <desc>Network Interface</desc>
     2811      </param>
     2812      <param name="server" type="IDhcpServer" dir="out">
     2813        <desc>Dhcp server settings</desc>
     2814      </param>
     2815    </method-->
     2816
     2817    <method name="removeDhcpServer">
     2818      <desc>
     2819        Removes the dhcp server settings
     2820        <result name="E_INVALIDARG">
     2821          Host network interface @a name already exists.
     2822        </result>
     2823      </desc>
     2824      <param name="server" type="IDhcpServer" dir="in">
     2825        <desc>Dhcp server settings to be removed</desc>
    26692826      </param>
    26702827    </method>
     
    65376694  <interface
    65386695     name="IHostNetworkInterface" extends="$unknown"
    6539      uuid="bcc99385-71ad-4887-90fc-15a3f2cad0a5"
     6696     uuid="88adaf3f-166b-4542-9457-0f1323507fae"
    65406697     wsmap="managed"
    65416698     >
     
    65546711    </attribute>
    65556712
     6713    <attribute name="networkName" type="wstring" readonly="yes">
     6714      <desc>Returns the name of a virtual network the interface gets attached to.</desc>
     6715    </attribute>
     6716   
    65566717    <attribute name="dhcpEnabled" type="boolean" readonly="yes">
    65576718      <desc>Specifies whether the DHCP is enabled for the interface.</desc>
  • trunk/src/VBox/Main/include/HostNetworkInterfaceImpl.h

    r17835 r17865  
    8080    STDMETHOD(COMGETTER(Status)) (HostNetworkInterfaceStatus_T *aStatus);
    8181    STDMETHOD(COMGETTER(InterfaceType)) (HostNetworkInterfaceType_T *aType);
     82    STDMETHOD(COMGETTER(NetworkName)) (BSTR *aNetworkName);
    8283
    8384    STDMETHOD(EnableStaticIpConfig) (IN_BSTR aIPAddress, IN_BSTR aNetworkMask);
  • trunk/src/VBox/Main/include/VirtualBoxImpl.h

    r17737 r17865  
    133133    STDMETHOD(COMGETTER(SharedFolders)) (ComSafeArrayOut (ISharedFolder *, aSharedFolders));
    134134    STDMETHOD(COMGETTER(PerformanceCollector)) (IPerformanceCollector **aPerformanceCollector);
     135    STDMETHOD(COMGETTER(DhcpServers)) (ComSafeArrayOut (IDhcpServer *, aDhcpServers));
    135136
    136137    /* IVirtualBox methods */
     
    183184    STDMETHOD(SaveSettings)();
    184185    STDMETHOD(SaveSettingsWithBackup) (BSTR *aBakFileName);
     186
     187//    STDMETHOD(CreateDhcpServerForInterface) (/*IHostNetworkInterface * aIinterface, */IDhcpServer ** aServer);
     188    STDMETHOD(CreateDhcpServer) (IN_BSTR aName, IDhcpServer ** aServer);
     189//    STDMETHOD(FindDhcpServerForInterface) (IHostNetworkInterface * aIinterface, IDhcpServer ** aServer);
     190    STDMETHOD(FindDhcpServerByName) (IN_BSTR aName, IDhcpServer ** aServer);
     191    STDMETHOD(RemoveDhcpServer) (IDhcpServer * aServer);
    185192
    186193    /* public methods only for internal purposes */
  • trunk/src/VBox/Main/xpcom/server.cpp

    r17684 r17865  
    111111#include <ParallelPortImpl.h>
    112112#include <USBControllerImpl.h>
     113#include "DhcpServerImpl.h"
    113114#ifdef VBOX_WITH_USB
    114115# include <HostUSBDeviceImpl.h>
     
    193194NS_DECL_CLASSINFO(HostNetworkInterface)
    194195NS_IMPL_THREADSAFE_ISUPPORTS1_CI(HostNetworkInterface, IHostNetworkInterface)
     196
     197NS_DECL_CLASSINFO(DhcpServer)
     198NS_IMPL_THREADSAFE_ISUPPORTS1_CI(DhcpServer, IDhcpServer)
    195199
    196200NS_DECL_CLASSINFO(GuestOSType)
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette