VirtualBox

Changeset 17685 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Mar 11, 2009 12:22:40 PM (16 years ago)
Author:
vboxsync
Message:

Main: Rename the port paramter of the AttachHardDisk, GetHardDisk, DetachHardDisk methods to controllerPort because the name clashes with a class member in the java bindings

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

Legend:

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

    r17670 r17685  
    18861886
    18871887STDMETHODIMP Machine::AttachHardDisk(IN_GUID aId,
    1888                                      IN_BSTR aControllerName, LONG aPort,
     1888                                     IN_BSTR aControllerName, LONG aControllerPort,
    18891889                                     LONG aDevice)
    18901890{
     
    19271927    CheckComRCReturnRC(rc);
    19281928
    1929     if (   (aPort < 0) || (aPort >= portCount)
     1929    if (   (aControllerPort < 0) || (aControllerPort >= portCount)
    19301930        || (aDevice < 0) || (aDevice >= devicesPerPort))
    19311931        return setError (E_INVALIDARG,
     
    19371937        std::find_if (mHDData->mAttachments.begin(),
    19381938                      mHDData->mAttachments.end(),
    1939                       HardDiskAttachment::EqualsTo (aControllerName, aPort, aDevice));
     1939                      HardDiskAttachment::EqualsTo (aControllerName, aControllerPort, aDevice));
    19401940
    19411941    if (it != mHDData->mAttachments.end())
     
    19461946            tr ("Hard disk '%ls' is already attached to device slot %d on "
    19471947                "port %d of controller '%ls' of this virtual machine"),
    1948             hd->locationFull().raw(), aDevice, aPort, aControllerName);
     1948            hd->locationFull().raw(), aDevice, aControllerPort, aControllerName);
    19491949    }
    19501950
     
    19931993                /* see if it's the same bus/channel/device */
    19941994                if ((*it)->device() == aDevice &&
    1995                     (*it)->port() == aPort &&
     1995                    (*it)->port() == aControllerPort &&
    19961996                    (*it)->controller() == aControllerName)
    19971997                {
     
    20512051                         */
    20522052                        if ((*it)->device() == aDevice &&
    2053                             (*it)->port() == aPort &&
     2053                            (*it)->port() == aControllerPort &&
    20542054                            (*it)->controller() == aControllerName)
    20552055                        {
     
    21112111                         */
    21122112                        if ((*it)->device() == aDevice &&
    2113                             (*it)->port() == aPort &&
     2113                            (*it)->port() == aControllerPort &&
    21142114                            (*it)->controller() == aControllerName)
    21152115                        {
     
    21872187    ComObjPtr<HardDiskAttachment> attachment;
    21882188    attachment.createObject();
    2189     rc = attachment->init (hd, aControllerName, aPort, aDevice, indirect);
     2189    rc = attachment->init (hd, aControllerName, aControllerPort, aDevice, indirect);
    21902190    CheckComRCReturnRC (rc);
    21912191
     
    22062206}
    22072207
    2208 STDMETHODIMP Machine::GetHardDisk(IN_BSTR aControllerName, LONG aPort,
     2208STDMETHODIMP Machine::GetHardDisk(IN_BSTR aControllerName, LONG aControllerPort,
    22092209                                  LONG aDevice, IHardDisk **aHardDisk)
    22102210{
     
    22252225        std::find_if (mHDData->mAttachments.begin(),
    22262226                      mHDData->mAttachments.end(),
    2227                       HardDiskAttachment::EqualsTo (aControllerName, aPort, aDevice));
     2227                      HardDiskAttachment::EqualsTo (aControllerName, aControllerPort, aDevice));
    22282228
    22292229    if (it == mHDData->mAttachments.end())
    22302230        return setError (VBOX_E_OBJECT_NOT_FOUND,
    22312231            tr ("No hard disk attached to device slot %d on port %d of controller '%ls'"),
    2232             aDevice, aPort, aControllerName);
     2232            aDevice, aControllerPort, aControllerName);
    22332233
    22342234    (*it)->hardDisk().queryInterfaceTo (aHardDisk);
     
    22372237}
    22382238
    2239 STDMETHODIMP Machine::DetachHardDisk(IN_BSTR aControllerName, LONG aPort,
     2239STDMETHODIMP Machine::DetachHardDisk(IN_BSTR aControllerName, LONG aControllerPort,
    22402240                                     LONG aDevice)
    22412241{
     
    22622262        std::find_if (mHDData->mAttachments.begin(),
    22632263                      mHDData->mAttachments.end(),
    2264                       HardDiskAttachment::EqualsTo (aControllerName, aPort, aDevice));
     2264                      HardDiskAttachment::EqualsTo (aControllerName, aControllerPort, aDevice));
    22652265
    22662266    if (it == mHDData->mAttachments.end())
    22672267        return setError (VBOX_E_OBJECT_NOT_FOUND,
    22682268            tr ("No hard disk attached to device slot %d on port %d of controller '%ls'"),
    2269             aDevice, aPort, aControllerName);
     2269            aDevice, aControllerPort, aControllerName);
    22702270
    22712271    ComObjPtr<HardDiskAttachment> hda = *it;
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r17684 r17685  
    43234323        <desc>Name of the storage controller to attach the hard disk to.</desc>
    43244324      </param>
    4325       <param name="port" type="long" dir="in">
     4325      <param name="controllerPort" type="long" dir="in">
    43264326        <desc>Port to attach the hard disk to.</desc>
    43274327      </param>
     
    43524352        <desc>Name of the storage controller the hard disk is attached to.</desc>
    43534353      </param>
    4354       <param name="port" type="long" dir="in">
     4354      <param name="controllerPort" type="long" dir="in">
    43554355        <desc>Port to query.</desc>
    43564356      </param>
     
    44014401        <desc>name of the storage controller to detach the hard disk from.</desc>
    44024402      </param>
    4403       <param name="port" type="long" dir="in">
     4403      <param name="controllerPort" type="long" dir="in">
    44044404        <desc>Port number to detach the hard disk from.</desc>
    44054405      </param>
  • trunk/src/VBox/Main/include/MachineImpl.h

    r17684 r17685  
    540540    STDMETHOD(GetBootOrder)(ULONG aPosition, DeviceType_T *aDevice);
    541541    STDMETHOD(AttachHardDisk)(IN_GUID aId, IN_BSTR aControllerName,
    542                               LONG aPort, LONG aDevice);
    543     STDMETHOD(GetHardDisk)(IN_BSTR aControllerName, LONG aPort, LONG aDevice,
     542                              LONG aControllerPort, LONG aDevice);
     543    STDMETHOD(GetHardDisk)(IN_BSTR aControllerName, LONG aControllerPort, LONG aDevice,
    544544                           IHardDisk **aHardDisk);
    545     STDMETHOD(DetachHardDisk)(IN_BSTR aControllerName, LONG aPort, LONG aDevice);
     545    STDMETHOD(DetachHardDisk)(IN_BSTR aControllerName, LONG aControllerPort, LONG aDevice);
    546546    STDMETHOD(GetSerialPort) (ULONG slot, ISerialPort **port);
    547547    STDMETHOD(GetParallelPort) (ULONG slot, IParallelPort **port);
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