VirtualBox

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

File:
1 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;
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