VirtualBox

Ignore:
Timestamp:
Feb 17, 2009 5:00:56 PM (16 years ago)
Author:
vboxsync
Message:

Main: rename IHardDiskImage2 to IHardDiskImage; rename IFloppyImage2 to IFloppyImage; rename all media-related methods with a '2' suffix

Location:
trunk/src/VBox/Frontends/VirtualBox
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxGlobal.h

    r16853 r16867  
    146146    }
    147147
    148     const CHardDisk2 &hardDisk() const { return mHardDisk; }
     148    const CHardDisk &hardDisk() const { return mHardDisk; }
    149149    const CDVDImage &dvdImage() const { return mDVDImage; }
    150     const CFloppyImage2 &floppyImage() const { return mFloppyImage; }
     150    const CFloppyImage &floppyImage() const { return mFloppyImage; }
    151151
    152152    QUuid id() const { return mId; }
     
    246246    COMResult mResult;
    247247
    248     CHardDisk2 mHardDisk;
     248    CHardDisk mHardDisk;
    249249    CDVDImage mDVDImage;
    250     CFloppyImage2 mFloppyImage;
     250    CFloppyImage mFloppyImage;
    251251
    252252    QUuid mId;
     
    613613     * normal hard disks that have a parent.
    614614     */
    615     QString hardDiskTypeString (const CHardDisk2 &aHD) const
     615    QString hardDiskTypeString (const CHardDisk &aHD) const
    616616    {
    617617        if (!aHD.GetParent().isNull())
     
    799799    /* details generators */
    800800
    801     QString details (const CHardDisk2 &aHD, bool aPredictDiff);
     801    QString details (const CHardDisk &aHD, bool aPredictDiff);
    802802
    803803    QString details (const CUSBDevice &aDevice) const;
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxNewHDWzd.h

    r13580 r16867  
    3939    VBoxNewHDWzd (QWidget *aParent = 0);
    4040
    41     CHardDisk2 hardDisk() { return mHD; }
     41    CHardDisk hardDisk() { return mHD; }
    4242    void setRecommendedFileName (const QString &aName);
    4343    void setRecommendedSize (quint64 aSize);
     
    6666
    6767    QIWidgetValidator *mWValNameAndSize;
    68     CHardDisk2         mHD;
     68    CHardDisk          mHD;
    6969    int                mSliderScale;
    7070    quint64            mMaxVDISize;
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxNewVMWzd.h

    r14437 r16867  
    6767    QIWidgetValidator *mWvalMemory;
    6868    QIWidgetValidator *mWvalHDD;
    69     CHardDisk2 mHardDisk;
     69    CHardDisk mHardDisk;
    7070    CMachine mMachine;
    7171};
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxProblemReporter.h

    r16617 r16867  
    264264    int confirmDeleteHardDiskStorage (QWidget *aParent,
    265265                                      const QString &aLocation);
    266     void cannotDeleteHardDiskStorage (QWidget *aParent, const CHardDisk2 &aHD,
     266    void cannotDeleteHardDiskStorage (QWidget *aParent, const CHardDisk &aHD,
    267267                                      const CProgress &aProgress);
    268268
     
    272272    void cannotCreateHardDiskStorage (QWidget *aParent, const CVirtualBox &aVBox,
    273273                                      const QString &aLocaiton,
    274                                       const CHardDisk2 &aHD,
     274                                      const CHardDisk &aHD,
    275275                                      const CProgress &aProgress);
    276276    void cannotAttachHardDisk (QWidget *aParent, const CMachine &aMachine,
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp

    r16853 r16867  
    19171917        QString data;
    19181918        bool hasDisks = false;
    1919         CHardDisk2AttachmentVector vec = cmachine.GetHardDisk2Attachments();
    1920         for (CHardDisk2AttachmentVector::ConstIterator hda = vec.begin();
     1919        CHardDiskAttachmentVector vec = cmachine.GetHardDiskAttachments();
     1920        for (CHardDiskAttachmentVector::ConstIterator hda = vec.begin();
    19211921             hda != vec.end(); ++ hda)
    19221922        {
    1923             CHardDisk2 hd = hda->GetHardDisk();
     1923            CHardDisk hd = hda->GetHardDisk();
    19241924            data += QString ("<br><nobr><b>%1 %2</b>: %3</nobr>")
    19251925                .arg (vboxGlobal().toString (hda->GetBus(), hda->GetChannel()))
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp

    r16853 r16867  
    219219         * to an item from VBoxGlobal::currentMediaList()) */
    220220
    221         CHardDisk2 parent = mHardDisk.GetParent();
     221        CHardDisk parent = mHardDisk.GetParent();
    222222        Assert (!parent.isNull() || mParent == NULL);
    223223
     
    19381938 *       @todo in VBoxMedium::details()).
    19391939 */
    1940 QString VBoxGlobal::details (const CHardDisk2 &aHD,
     1940QString VBoxGlobal::details (const CHardDisk &aHD,
    19411941                             bool aPredictDiff)
    19421942{
     
    21612161        int rows = 2; /* including section header and footer */
    21622162
    2163         CHardDisk2AttachmentVector vec = aMachine.GetHardDisk2Attachments();
     2163        CHardDiskAttachmentVector vec = aMachine.GetHardDiskAttachments();
    21642164        for (size_t i = 0; i < (size_t) vec.size(); ++ i)
    21652165        {
    2166             CHardDisk2Attachment hda = vec [i];
    2167             CHardDisk2 hd = hda.GetHardDisk();
     2166            CHardDiskAttachment hda = vec [i];
     2167            CHardDisk hd = hda.GetHardDisk();
    21682168
    21692169            /// @todo for the explaination of the below isOk() checks, see ***
     
    23322332            case KDriveState_ImageMounted:
    23332333            {
    2334                 CFloppyImage2 img = floppy.GetImage();
     2334                CFloppyImage img = floppy.GetImage();
    23352335                item = QString (sSectionItemTpl2)
    23362336                    .arg (tr ("Image", "details report (floppy)"),
     
    29152915 */
    29162916static
    2917 void AddHardDisksToList (const CHardDisk2Vector &aVector,
     2917void AddHardDisksToList (const CHardDiskVector &aVector,
    29182918                         VBoxMediaList &aList,
    29192919                         VBoxMediaList::iterator aWhere,
     
    29232923
    29242924    /* First pass: Add siblings sorted */
    2925     for (CHardDisk2Vector::ConstIterator it = aVector.begin();
     2925    for (CHardDiskVector::ConstIterator it = aVector.begin();
    29262926         it != aVector.end(); ++ it)
    29272927    {
     
    29452945    for (VBoxMediaList::iterator it = first; it != aWhere;)
    29462946    {
    2947         CHardDisk2Vector children = (*it).hardDisk().GetChildren();
     2947        CHardDiskVector children = (*it).hardDisk().GetChildren();
    29482948        VBoxMedium *parent = &(*it);
    29492949
     
    29972997    mMediaList.clear();
    29982998    {
    2999         AddHardDisksToList (mVBox.GetHardDisks2(), mMediaList, mMediaList.end());
     2999        AddHardDisksToList (mVBox.GetHardDisks(), mMediaList, mMediaList.end());
    30003000    }
    30013001    {
     
    30253025        VBoxMediaList::iterator first = mMediaList.end();
    30263026
    3027         CFloppyImage2Vector vec = mVBox.GetFloppyImages();
    3028         for (CFloppyImage2Vector::ConstIterator it = vec.begin();
     3027        CFloppyImageVector vec = mVBox.GetFloppyImages();
     3028        for (CFloppyImageVector::ConstIterator it = vec.begin();
    30293029             it != vec.end(); ++ it)
    30303030        {
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxMediaManagerDlg.cpp

    r16853 r16867  
    972972    if (dlg.exec() == QDialog::Accepted)
    973973    {
    974         CHardDisk2 hd = dlg.hardDisk();
     974        CHardDisk hd = dlg.hardDisk();
    975975        /* Select the newly created hard disk */
    976976        MediaItem *item = searchItem (mHardDiskView, hd.GetId());
     
    10941094            }
    10951095
    1096             CHardDisk2 hardDisk = item->medium().hardDisk();
     1096            CHardDisk hardDisk = item->medium().hardDisk();
    10971097
    10981098            if (deleteStorage)
     
    11341134        case VBoxDefs::MediaType_Floppy:
    11351135        {
    1136             CFloppyImage2 image = item->medium().floppyImage();
     1136            CFloppyImage image = item->medium().floppyImage();
    11371137            image.Close();
    11381138            result = image;
     
    12321232        case VBoxDefs::MediaType_HardDisk:
    12331233        {
    1234             CHardDisk2AttachmentVector vec =machine.GetHardDisk2Attachments();
     1234            CHardDiskAttachmentVector vec =machine.GetHardDiskAttachments();
    12351235            for (int i = 0; i < vec.size(); ++ i)
    12361236            {
    1237                 CHardDisk2Attachment hda = vec [i];
     1237                CHardDiskAttachment hda = vec [i];
    12381238                if (hda.GetHardDisk().GetId() == aMedium.id())
    12391239                {
    1240                     machine.DetachHardDisk2 (hda.GetBus(),
    1241                                              hda.GetChannel(),
    1242                                              hda.GetDevice());
     1240                    machine.DetachHardDisk(hda.GetBus(),
     1241                                           hda.GetChannel(),
     1242                                           hda.GetDevice());
    12431243                    if (!machine.isOk())
    12441244                    {
     
    15431543        case VBoxDefs::MediaType_HardDisk:
    15441544        {
    1545             CHardDisk2 hd = mVBox.OpenHardDisk2 (aLocation);
     1545            CHardDisk hd = mVBox.OpenHardDisk(aLocation);
    15461546            if (mVBox.isOk())
    15471547            {
     
    15651565        case VBoxDefs::MediaType_Floppy:
    15661566        {
    1567             CFloppyImage2 image = mVBox.OpenFloppyImage (aLocation, uuid);
     1567            CFloppyImage image = mVBox.OpenFloppyImage (aLocation, uuid);
    15681568            if (mVBox.isOk())
    15691569            {
     
    15911591    MediaItem *item = 0;
    15921592
    1593     CHardDisk2 parent = aMedium.hardDisk().GetParent();
     1593    CHardDisk parent = aMedium.hardDisk().GetParent();
    15941594    if (parent.isNull())
    15951595    {
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxNewHDWzd.cpp

    r14540 r16867  
    384384    CProgress progress;
    385385
    386     CHardDisk2 hd = vbox.CreateHardDisk2 (QString ("VDI"), loc);
     386    CHardDisk hd = vbox.CreateHardDisk(QString ("VDI"), loc);
    387387
    388388    if (!vbox.isOk())
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxNewVMWzd.cpp

    r16633 r16867  
    352352        {
    353353            CMachine m = session.GetMachine();
    354             m.AttachHardDisk2 (mHDCombo->id(), KStorageBus_IDE, 0, 0);
     354            m.AttachHardDisk(mHDCombo->id(), KStorageBus_IDE, 0, 0);
    355355            if (m.isOk())
    356356            {
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxProblemReporter.cpp

    r16656 r16867  
    12031203
    12041204void VBoxProblemReporter::cannotDeleteHardDiskStorage (QWidget *aParent,
    1205                                                        const CHardDisk2 &aHD,
     1205                                                       const CHardDisk &aHD,
    12061206                                                       const CProgress &aProgress)
    12071207{
    1208     /* below, we use CHardDisk2 (aHD) to preserve current error info
     1208    /* below, we use CHardDisk (aHD) to preserve current error info
    12091209     * for formatErrorInfo() */
    12101210
    12111211    message (aParent, Error,
    12121212        tr ("Failed to delete the storage unit of the hard disk <b>%1</b>.")
    1213             .arg (CHardDisk2 (aHD).GetLocation()),
     1213            .arg (CHardDisk (aHD).GetLocation()),
    12141214        !aHD.isOk() ? formatErrorInfo (aHD) :
    12151215        !aProgress.isOk() ? formatErrorInfo (aProgress) :
     
    12481248void VBoxProblemReporter::cannotCreateHardDiskStorage (
    12491249    QWidget *aParent, const CVirtualBox &aVBox, const QString &aLocation,
    1250     const CHardDisk2 &aHD, const CProgress &aProgress)
     1250    const CHardDisk &aHD, const CProgress &aProgress)
    12511251{
    12521252    message (aParent, Error,
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxSelectorWnd.cpp

    r16743 r16867  
    872872            CMachine machine = session.GetMachine();
    873873            /* Detach all attached Hard Disks */
    874             CHardDisk2AttachmentVector vec = machine.GetHardDisk2Attachments();
     874            CHardDiskAttachmentVector vec = machine.GetHardDiskAttachments();
    875875            for (int i = 0; i < vec.size(); ++ i)
    876876            {
    877                 CHardDisk2Attachment hda = vec [i];
    878                 machine.DetachHardDisk2 (hda.GetBus(), hda.GetChannel(), hda.GetDevice());
     877                CHardDiskAttachment hda = vec [i];
     878                machine.DetachHardDisk(hda.GetBus(), hda.GetChannel(), hda.GetDevice());
    879879                if (!machine.isOk())
    880880                    vboxProblem().cannotDetachHardDisk (this, machine,
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMFirstRunWzd.cpp

    r13580 r16867  
    3636
    3737    /* Hide unnecessary text labels */
    38     CHardDisk2AttachmentVector vec = mMachine.GetHardDisk2Attachments();
     38    CHardDiskAttachmentVector vec = mMachine.GetHardDiskAttachments();
    3939    if (vec.size() != 0)
    4040    {
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMInformationDlg.cpp

    r16087 r16867  
    467467
    468468        /* IDE Hard Disk (Primary Master) */
    469         if (!m.GetHardDisk2 (KStorageBus_IDE, 0, 0).isNull())
     469        if (!m.GetHardDisk(KStorageBus_IDE, 0, 0).isNull())
    470470        {
    471471            hdStat += formatHardDisk (KStorageBus_IDE, 0, 0, "IDE00");
     
    474474
    475475        /* IDE Hard Disk (Primary Slave) */
    476         if (!m.GetHardDisk2 (KStorageBus_IDE, 0, 1).isNull())
     476        if (!m.GetHardDisk(KStorageBus_IDE, 0, 1).isNull())
    477477        {
    478478            hdStat += formatHardDisk (KStorageBus_IDE, 0, 1, "IDE01");
     
    481481
    482482        /* IDE Hard Disk (Secondary Slave) */
    483         if (!m.GetHardDisk2 (KStorageBus_IDE, 1, 1).isNull())
     483        if (!m.GetHardDisk(KStorageBus_IDE, 1, 1).isNull())
    484484        {
    485485            hdStat += formatHardDisk (KStorageBus_IDE, 1, 1, "IDE11");
     
    490490        for (int i = 0; i < 30; ++ i)
    491491        {
    492             if (!m.GetHardDisk2 (KStorageBus_SATA, i, 0).isNull())
     492            if (!m.GetHardDisk(KStorageBus_SATA, i, 0).isNull())
    493493            {
    494494                hdStat += formatHardDisk (KStorageBus_SATA, i, 0,
     
    574574        return QString::null;
    575575
    576     CHardDisk2 hd = mSession.GetMachine().GetHardDisk2 (aBus, aChannel, aDevice);
     576    CHardDisk hd = mSession.GetMachine().GetHardDisk(aBus, aChannel, aDevice);
    577577    QString header = "<tr><td></td><td colspan=2><nobr><u>%1</u></nobr></td></tr>";
    578578    QString name = vboxGlobal().toFullString (aBus, aChannel, aDevice);
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMSettingsFD.cpp

    r14039 r16867  
    110110        case KDriveState_ImageMounted:
    111111        {
    112             CFloppyImage2 img = floppy.GetImage();
     112            CFloppyImage img = floppy.GetImage();
    113113            QString src = img.GetLocation();
    114114            AssertMsg (!src.isNull(), ("Image file must not be null"));
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMSettingsHD.cpp

    r13580 r16867  
    7777
    7878    VBoxMedium medium = vboxGlobal().getMedium (
    79         CMedium (vboxGlobal().virtualBox().GetHardDisk2 (aId)));
     79        CMedium (vboxGlobal().virtualBox().GetHardDisk(aId)));
    8080    medium.refresh();
    8181    bool noDiffs = !HDSettings::instance()->showDiffs();
     
    662662
    663663    /* Load attachments list */
    664     CHardDisk2AttachmentVector vec = mMachine.GetHardDisk2Attachments();
     664    CHardDiskAttachmentVector vec = mMachine.GetHardDiskAttachments();
    665665    for (int i = 0; i < vec.size(); ++ i)
    666666    {
    667         CHardDisk2Attachment hda = vec [i];
     667        CHardDiskAttachment hda = vec [i];
    668668        SlotValue slot (hda.GetBus(), hda.GetChannel(), hda.GetDevice());
    669669        DiskValue disk (hda.GetHardDisk().GetId());
     
    687687
    688688    /* Detach all attached Hard Disks */
    689     CHardDisk2AttachmentVector vec = mMachine.GetHardDisk2Attachments();
     689    CHardDiskAttachmentVector vec = mMachine.GetHardDiskAttachments();
    690690    for (int i = 0; i < vec.size(); ++ i)
    691691    {
    692         CHardDisk2Attachment hda = vec [i];
    693         mMachine.DetachHardDisk2 (hda.GetBus(), hda.GetChannel(), hda.GetDevice());
     692        CHardDiskAttachment hda = vec [i];
     693        mMachine.DetachHardDisk(hda.GetBus(), hda.GetChannel(), hda.GetDevice());
    694694
    695695        /* [dsen] check this */
     
    708708            maxSATAPort = maxSATAPort < (list [i].slot.channel + 1) ?
    709709                          (list [i].slot.channel + 1) : maxSATAPort;
    710         mMachine.AttachHardDisk2 (list [i].disk.id,
     710        mMachine.AttachHardDisk(list [i].disk.id,
    711711            list [i].slot.bus, list [i].slot.channel, list [i].slot.device);
    712712
     
    715715            vboxProblem().cannotAttachHardDisk (this, mMachine,
    716716                vboxGlobal().getMedium (CMedium (vboxGlobal().virtualBox()
    717                 .GetHardDisk2 (list [i].disk.id))).location(),
     717                .GetHardDisk(list [i].disk.id))).location(),
    718718                list [i].slot.bus, list [i].slot.channel, list [i].slot.device);
    719719    }
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