VirtualBox

Changeset 98352 in vbox for trunk/src


Ignore:
Timestamp:
Jan 30, 2023 7:44:51 PM (2 years ago)
Author:
vboxsync
Message:

Main: Fix identifiers containing an incorrect plural of "medium".

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r98351 r98352  
    32183218
    32193219    <method name="createMedium">
    3220       <rest name="create" request="post" path="/mediums/"/>
     3220      <rest name="create" request="post" path="/media/"/>
    32213221      <desc>
    32223222        Creates a new base medium object that will use the given storage
     
    82318231
    82328232    <method name="unmountMedium">
    8233       <rest name="unmount" request="post" path="/vms/{vmid}/mediums/{mediumid}/actions/"/>
     8233      <rest name="unmount" request="post" path="/vms/{vmid}/media/{mediumid}/actions/"/>
    82348234      <desc>
    82358235        Unmounts any currently mounted medium (<link to="IMedium" />,
     
    82848284
    82858285    <method name="mountMedium">
    8286       <rest name="mount" request="post" path="/vms/{vmid}/mediums/{mediumid}/actions/"/>
     8286      <rest name="mount" request="post" path="/vms/{vmid}/media/{mediumid}/actions/"/>
    82878287      <desc>
    82888288        Mounts a medium (<link to="IMedium" />, identified
     
    83398339
    83408340    <method name="getMedium" const="yes">
    8341       <rest name="find" request="get" path="/vms/{vmid}/mediums/{mediumid}/"/>
     8341      <rest name="find" request="get" path="/vms/{vmid}/media/{mediumid}/"/>
    83428342      <desc>
    83438343        Returns the virtual medium attached to a device slot of the specified
     
    1860018600
    1860118601    <method name="setIds" wrap-hint-server="passcaller">
    18602       <rest request="post" path="/mediums/{mediumid}/configuration/"/>
     18602      <rest request="post" path="/media/{mediumid}/configuration/"/>
    1860318603      <desc>
    1860418604        Changes the UUID and parent UUID for a hard disk medium.
     
    1863718637
    1863818638    <method name="refreshState" wrap-hint-server="passcaller">
    18639       <rest request="post" path="/mediums/{mediumid}/configuration/"/>
     18639      <rest request="post" path="/media/{mediumid}/configuration/"/>
    1864018640      <desc>
    1864118641        If the current medium state (see <link to="MediumState"/>) is one of
     
    1867418674
    1867518675    <method name="getSnapshotIds">
    18676       <rest request="get" path="/mediums/{mediumid}/configuration/"/>
     18676      <rest request="get" path="/media/{mediumid}/configuration/"/>
    1867718677      <desc>
    1867818678        Returns an array of UUIDs of all snapshots of the given machine where
     
    1870418704
    1870518705    <method name="lockRead">
    18706       <rest request="post" path="/mediums/{mediumid}/configuration/"/>
     18706      <rest request="post" path="/media/{mediumid}/configuration/"/>
    1870718707      <desc>
    1870818708        Locks this medium for reading.
     
    1876618766
    1876718767    <method name="lockWrite">
    18768       <rest request="post" path="/mediums/{mediumid}/configuration/"/>
     18768      <rest request="post" path="/media/{mediumid}/configuration/"/>
    1876918769      <desc>
    1877018770        Locks this medium for writing.
     
    1882018820
    1882118821    <method name="close" wrap-hint-server="passcaller">
    18822       <rest request="post" path="/mediums/{mediumid}/actions/"/>
     18822      <rest request="post" path="/media/{mediumid}/actions/"/>
    1882318823      <desc>
    1882418824        Closes this medium.
     
    1885918859
    1886018860    <method name="getProperty" const="yes">
    18861       <rest request="get" path="/mediums/{mediumid}/configuration/"/>
     18861      <rest request="get" path="/media/{mediumid}/configuration/"/>
    1886218862      <desc>
    1886318863        Returns the value of the custom medium property with the given name.
     
    1888318883
    1888418884    <method name="setProperty">
    18885       <rest request="post" path="/mediums/{mediumid}/configuration/"/>
     18885      <rest request="post" path="/media/{mediumid}/configuration/"/>
    1888618886      <desc>
    1888718887        Sets the value of the custom medium property with the given name.
     
    1890918909
    1891018910    <method name="getProperties" const="yes">
    18911       <rest request="get" path="/mediums/{mediumid}/configuration/"/>
     18911      <rest request="get" path="/media/{mediumid}/configuration/"/>
    1891218912      <desc>
    1891318913        Returns values for a group of properties in one call.
     
    1894618946
    1894718947    <method name="setProperties">
    18948       <rest request="post" path="/mediums/{mediumid}/configuration/"/>
     18948      <rest request="post" path="/media/{mediumid}/configuration/"/>
    1894918949      <desc>
    1895018950        Sets values for a group of properties in one call.
     
    1898118981
    1898218982    <method name="createBaseStorage">
    18983       <rest request="post" path="/mediums/{mediumid}/actions/"/>
     18983      <rest request="post" path="/media/{mediumid}/actions/"/>
    1898418984      <desc>
    1898518985        Starts creating a hard disk storage unit (fixed/dynamic, according
     
    1901619016
    1901719017    <method name="deleteStorage">
    19018       <rest request="post" path="/mediums/{mediumid}/actions/"/>
     19018      <rest request="post" path="/media/{mediumid}/actions/"/>
    1901919019      <desc>
    1902019020        Starts deleting the storage unit of this medium.
     
    1906319063
    1906419064    <method name="createDiffStorage" wrap-hint-server="passcaller">
    19065       <rest request="post" path="/mediums/{mediumid}/actions/"/>
     19065      <rest request="post" path="/media/{mediumid}/actions/"/>
    1906619066      <desc>
    1906719067        Starts creating an empty differencing storage unit based on this
     
    1910119101
    1910219102    <method name="mergeTo">
    19103       <rest request="post" path="/mediums/{mediumid}/actions/"/>
     19103      <rest request="post" path="/media/{mediumid}/actions/"/>
    1910419104      <desc>
    1910519105        Starts merging the contents of this medium and all intermediate
     
    1918419184
    1918519185    <method name="cloneTo">
    19186       <rest request="post" path="/mediums/{mediumid}/actions/"/>
     19186      <rest request="post" path="/media/{mediumid}/actions/"/>
    1918719187      <desc>
    1918819188        Starts creating a clone of this medium in the format and at the
     
    1923419234
    1923519235    <method name="cloneToBase">
    19236       <rest request="post" path="/mediums/{mediumid}/actions/"/>
     19236      <rest request="post" path="/media/{mediumid}/actions/"/>
    1923719237    <desc>
    1923819238    Starts creating a clone of this medium in the format and at the
     
    1928219282
    1928319283    <method name="moveTo" wrap-hint-server="passcaller">
    19284       <rest request="post" path="/mediums/{mediumid}/actions/"/>
     19284      <rest request="post" path="/media/{mediumid}/actions/"/>
    1928519285      <desc>
    1928619286        Changes the location of this medium. Some medium types may support
     
    1931919319
    1932019320    <method name="compact">
    19321       <rest request="post" path="/mediums/{mediumid}/actions/"/>
     19321      <rest request="post" path="/media/{mediumid}/actions/"/>
    1932219322      <desc>
    1932319323        Starts compacting of this medium. This means that the medium is
     
    1934619346
    1934719347    <method name="resize">
    19348       <rest request="post" path="/mediums/{mediumid}/actions/"/>
     19348      <rest request="post" path="/media/{mediumid}/actions/"/>
    1934919349      <desc>
    1935019350        Starts resizing this medium. This means that the nominal size of the
     
    1937819378
    1937919379    <method name="reset" wrap-hint-server="passcaller">
    19380       <rest request="post" path="/mediums/{mediumid}/actions/"/>
     19380      <rest request="post" path="/media/{mediumid}/actions/"/>
    1938119381      <desc>
    1938219382        Starts erasing the contents of this differencing medium.
     
    1940519405
    1940619406    <method name="changeEncryption">
    19407       <rest request="post" path="/mediums/{mediumid}/actions/"/>
     19407      <rest request="post" path="/media/{mediumid}/actions/"/>
    1940819408      <desc>
    1940919409        Starts encryption of this medium. This means that the stored data in the
     
    1944919449
    1945019450    <method name="getEncryptionSettings" const="yes" wrap-hint-server="passcaller">
    19451       <rest request="get" path="/mediums/{mediumid}/configuration/"/>
     19451      <rest request="get" path="/media/{mediumid}/configuration/"/>
    1945219452      <desc>
    1945319453        Returns the encryption settings for this medium.
     
    1946619466
    1946719467    <method name="checkEncryptionPassword" const="yes">
    19468       <rest request="get" path="/mediums/{mediumid}/configuration/"/>
     19468      <rest request="get" path="/media/{mediumid}/configuration/"/>
    1946919469      <desc>
    1947019470        Checks whether the supplied password is correct for the medium.
     
    1949919499
    1950019500    <method name="resizeAndCloneTo">
    19501       <rest request="post" path="/mediums/{mediumid}/actions/"/>
     19501      <rest request="post" path="/media/{mediumid}/actions/"/>
    1950219502
    1950319503      <desc>
  • trunk/src/VBox/Main/include/MachineImplMoveVM.h

    r98103 r98352  
    7777{
    7878    std::vector<ComObjPtr<Machine> >        machineList;
    79     RTCList<MEDIUMTASKCHAINMOVE>            m_llMedias;
     79    RTCList<MEDIUMTASKCHAINMOVE>            m_llMedia;
    8080    RTCList<SNAPFILETASKMOVE>               m_llSaveStateFiles;
    8181    RTCList<SNAPFILETASKMOVE>               m_llNVRAMFiles;
    82     std::map<Utf8Str, MEDIUMTASKMOVE>       m_finalMediumsMap;
     82    std::map<Utf8Str, MEDIUMTASKMOVE>       m_finalMediaMap;
    8383    std::map<Utf8Str, SNAPFILETASKMOVE>     m_finalSaveStateFilesMap;
    8484    std::map<Utf8Str, SNAPFILETASKMOVE>     m_finalNVRAMFilesMap;
     
    127127    HRESULT createMachineList(const ComPtr<ISnapshot> &pSnapshot);
    128128    inline HRESULT queryBaseName(const ComPtr<IMedium> &pMedium, Utf8Str &strBaseName) const;
    129     HRESULT queryMediasForAllStates();
     129    HRESULT queryMediaForAllStates();
    130130    void updateProgressStats(MEDIUMTASKCHAINMOVE &mtc, ULONG &uCount, ULONG &uTotalWeight) const;
    131131    HRESULT addSaveState(const ComObjPtr<Machine> &machine);
  • trunk/src/VBox/Main/src-server/MachineImpl.cpp

    r98351 r98352  
    53825382                     Progress *p,
    53835383                     const Utf8Str &t,
    5384                      const RTCList<ComPtr<IMedium> > &llMediums,
     5384                     const RTCList<ComPtr<IMedium> > &llMedia,
    53855385                     const StringsList &llFilesToDelete)
    53865386        : Task(m, p, t),
    5387           m_llMediums(llMediums),
     5387          m_llMedia(llMedia),
    53885388          m_llFilesToDelete(llFilesToDelete)
    53895389    {}
     
    54025402    }
    54035403
    5404     RTCList<ComPtr<IMedium> >   m_llMediums;
     5404    RTCList<ComPtr<IMedium> >   m_llMedia;
    54055405    StringsList                 m_llFilesToDelete;
    54065406
     
    54525452        i_setMachineState(MachineState_SettingUp);
    54535453        alock.release();
    5454         for (size_t i = 0; i < task.m_llMediums.size(); ++i)
    5455         {
    5456             ComObjPtr<Medium> pMedium = (Medium*)(IMedium*)(task.m_llMediums.at(i));
     5454        for (size_t i = 0; i < task.m_llMedia.size(); ++i)
     5455        {
     5456            ComObjPtr<Medium> pMedium = (Medium*)(IMedium*)(task.m_llMedia.at(i));
    54575457            {
    54585458                AutoCaller mac(pMedium);
     
    56015601        llFilesToDelete.push_back(strTmp);
    56025602
    5603     RTCList<ComPtr<IMedium> > llMediums;
     5603    RTCList<ComPtr<IMedium> > llMedia;
    56045604    for (size_t i = 0; i < aMedia.size(); ++i)
    56055605    {
     
    56155615         * deleted. */
    56165616        if (ids.size() < 1)
    5617             llMediums.append(pMedium);
     5617            llMedia.append(pMedium);
    56185618    }
    56195619
     
    56245624                          tr("Deleting files"),
    56255625                          true /* fCancellable */,
    5626                           (ULONG)(1 + llMediums.size() + llFilesToDelete.size() + 1),    // cOperations
     5626                          (ULONG)(1 + llMedia.size() + llFilesToDelete.size() + 1),    // cOperations
    56275627                          tr("Collecting file inventory"));
    56285628    if (FAILED(hrc))
     
    56315631    /* create and start the task on a separate thread (note that it will not
    56325632     * start working until we release alock) */
    5633     DeleteConfigTask *pTask = new DeleteConfigTask(this, pProgress, "DeleteVM", llMediums, llFilesToDelete);
     5633    DeleteConfigTask *pTask = new DeleteConfigTask(this, pProgress, "DeleteVM", llMedia, llFilesToDelete);
    56345634    hrc = pTask->createThread();
    56355635    pTask = NULL;
  • trunk/src/VBox/Main/src-server/MachineImplCloneVM.cpp

    r98351 r98352  
    121121    inline HRESULT addNVRAM(const ComObjPtr<Machine> &machine, bool fAttachCurrent, ULONG &uCount, ULONG &uTotalWeight);
    122122    inline HRESULT queryBaseName(const ComPtr<IMedium> &pMedium, Utf8Str &strBaseName) const;
    123     HRESULT queryMediasForMachineState(const RTCList<ComObjPtr<Machine> > &machineList,
    124                                        bool fAttachLinked, ULONG &uCount, ULONG &uTotalWeight);
    125     HRESULT queryMediasForMachineAndChildStates(const RTCList<ComObjPtr<Machine> > &machineList,
    126                                                 bool fAttachLinked, ULONG &uCount, ULONG &uTotalWeight);
    127     HRESULT queryMediasForAllStates(const RTCList<ComObjPtr<Machine> > &machineList, bool fAttachLinked, ULONG &uCount,
    128                                     ULONG &uTotalWeight);
     123    HRESULT queryMediaForMachineState(const RTCList<ComObjPtr<Machine> > &machineList,
     124                                      bool fAttachLinked, ULONG &uCount, ULONG &uTotalWeight);
     125    HRESULT queryMediaForMachineAndChildStates(const RTCList<ComObjPtr<Machine> > &machineList,
     126                                               bool fAttachLinked, ULONG &uCount, ULONG &uTotalWeight);
     127    HRESULT queryMediaForAllStates(const RTCList<ComObjPtr<Machine> > &machineList, bool fAttachLinked, ULONG &uCount,
     128                                   ULONG &uTotalWeight);
    129129
    130130    /* MachineCloneVM::run helper: */
     
    154154    CloneMode_T                 mode;
    155155    RTCList<CloneOptions_T>     options;
    156     RTCList<MEDIUMTASKCHAIN>    llMedias;
     156    RTCList<MEDIUMTASKCHAIN>    llMedia;
    157157    RTCList<FILECOPYTASK>       llSaveStateFiles; /* Snapshot UUID -> File path */
    158158    RTCList<FILECOPYTASK>       llNVRAMFiles; /* Snapshot UUID -> File path */
     
    299299}
    300300
    301 HRESULT MachineCloneVMPrivate::queryMediasForMachineState(const RTCList<ComObjPtr<Machine> > &machineList,
    302                                                           bool fAttachLinked, ULONG &uCount, ULONG &uTotalWeight)
     301HRESULT MachineCloneVMPrivate::queryMediaForMachineState(const RTCList<ComObjPtr<Machine> > &machineList,
     302                                                         bool fAttachLinked, ULONG &uCount, ULONG &uTotalWeight)
    303303{
    304304    /* This mode is pretty straightforward. We didn't need to know about any
     
    371371            updateProgressStats(mtc, fAttachLinked, uCount, uTotalWeight);
    372372            /* Append the list of images which have  to be cloned. */
    373             llMedias.append(mtc);
     373            llMedia.append(mtc);
    374374        }
    375375        /* Add the save state file of this machine if there is one. */
     
    384384}
    385385
    386 HRESULT MachineCloneVMPrivate::queryMediasForMachineAndChildStates(const RTCList<ComObjPtr<Machine> > &machineList,
    387                                                                    bool fAttachLinked, ULONG &uCount, ULONG &uTotalWeight)
     386HRESULT MachineCloneVMPrivate::queryMediaForMachineAndChildStates(const RTCList<ComObjPtr<Machine> > &machineList,
     387                                                                  bool fAttachLinked, ULONG &uCount, ULONG &uTotalWeight)
    388388{
    389389    /* This is basically a three step approach. First select all media
     
    480480            }
    481481
    482             llMedias.append(mtc);
     482            llMedia.append(mtc);
    483483        }
    484484        /* Add the save state file of this machine if there is one. */
     
    501501     * that in the previous loop, cause there we go from child -> parent and
    502502     * didn't know how many are between. */
    503     for (size_t i = 0; i < llMedias.size(); ++i)
     503    for (size_t i = 0; i < llMedia.size(); ++i)
    504504    {
    505505        uint32_t uIdx = 0;
    506         MEDIUMTASKCHAIN &mtc = llMedias.at(i);
     506        MEDIUMTASKCHAIN &mtc = llMedia.at(i);
    507507        for (size_t a = mtc.chain.size(); a > 0; --a)
    508508            mtc.chain[a - 1].uIdx = uIdx++;
     
    524524     * children knows of the new parent (which doesn't necessarily mean it
    525525     * is a direct children in the source chain). */
    526     for (size_t i = 0; i < llMedias.size(); ++i)
    527     {
    528         MEDIUMTASKCHAIN &mtc = llMedias.at(i);
     526    for (size_t i = 0; i < llMedia.size(); ++i)
     527    {
     528        MEDIUMTASKCHAIN &mtc = llMedia.at(i);
    529529        RTCList<MEDIUMTASK> newChain;
    530530        uint32_t used = 0;
     
    562562}
    563563
    564 HRESULT MachineCloneVMPrivate::queryMediasForAllStates(const RTCList<ComObjPtr<Machine> > &machineList,
    565                                                        bool fAttachLinked, ULONG &uCount, ULONG &uTotalWeight)
     564HRESULT MachineCloneVMPrivate::queryMediaForAllStates(const RTCList<ComObjPtr<Machine> > &machineList,
     565                                                      bool fAttachLinked, ULONG &uCount, ULONG &uTotalWeight)
    566566{
    567567    /* In this case we create a exact copy of the original VM. This means just
     
    633633            updateProgressStats(mtc, fAttachLinked, uCount, uTotalWeight);
    634634            /* Append the list of images which have  to be cloned. */
    635             llMedias.append(mtc);
     635            llMedia.append(mtc);
    636636        }
    637637        /* Add the save state file of this machine if there is one. */
     
    654654     * that in the previous loop, cause there we go from child -> parent and
    655655     * didn't know how many are between. */
    656     for (size_t i = 0; i < llMedias.size(); ++i)
     656    for (size_t i = 0; i < llMedia.size(); ++i)
    657657    {
    658658        uint32_t uIdx = 0;
    659         MEDIUMTASKCHAIN &mtc = llMedias.at(i);
     659        MEDIUMTASKCHAIN &mtc = llMedia.at(i);
    660660        for (size_t a = mtc.chain.size(); a > 0; --a)
    661661            mtc.chain[a - 1].uIdx = uIdx++;
     
    10271027        {
    10281028            case CloneMode_MachineState:
    1029                 d->queryMediasForMachineState(machineList, fAttachLinked, uCount, uTotalWeight);
     1029                d->queryMediaForMachineState(machineList, fAttachLinked, uCount, uTotalWeight);
    10301030                break;
    10311031            case CloneMode_MachineAndChildStates:
    1032                 d->queryMediasForMachineAndChildStates(machineList, fAttachLinked, uCount, uTotalWeight);
     1032                d->queryMediaForMachineAndChildStates(machineList, fAttachLinked, uCount, uTotalWeight);
    10331033                break;
    10341034            case CloneMode_AllStates:
    1035                 d->queryMediasForAllStates(machineList, fAttachLinked, uCount, uTotalWeight);
     1035                d->queryMediaForAllStates(machineList, fAttachLinked, uCount, uTotalWeight);
    10361036                break;
    10371037#ifdef VBOX_WITH_XPCOM_CPP_ENUM_HACK
     
    10951095    RTCList<ComObjPtr<Medium> > newMedia;   /* All created images */
    10961096    RTCList<Utf8Str> newFiles;              /* All extra created files (save states, ...) */
    1097     std::set<ComObjPtr<Medium> > pMediumsForNotify;
     1097    std::set<ComObjPtr<Medium> > pMediaForNotify;
    10981098    std::map<Guid, DeviceType_T> uIdsForNotify;
    10991099    try
     
    11901190        TStrMediumMap map;
    11911191        size_t cDisks = 0;
    1192         for (size_t i = 0; i < d->llMedias.size(); ++i)
    1193         {
    1194             const MEDIUMTASKCHAIN &mtc = d->llMedias.at(i);
     1192        for (size_t i = 0; i < d->llMedia.size(); ++i)
     1193        {
     1194            const MEDIUMTASKCHAIN &mtc = d->llMedia.at(i);
    11951195            ComObjPtr<Medium> pNewParent;
    11961196            uint32_t uSrcParentIdx = UINT32_MAX;
     
    12331233                        /* diff image has to be used... */
    12341234                        pNewParent = pDiff;
    1235                         pMediumsForNotify.insert(pDiff->i_getParent());
     1235                        pMediaForNotify.insert(pDiff->i_getParent());
    12361236                        uIdsForNotify[pDiff->i_getId()] = pDiff->i_getDeviceType();
    12371237                    }
     
    14351435                    /* diff image has to be used... */
    14361436                    pNewParent = pDiff;
    1437                     pMediumsForNotify.insert(pDiff->i_getParent());
     1437                    pMediaForNotify.insert(pDiff->i_getParent());
    14381438                    uIdsForNotify[pDiff->i_getId()] = pDiff->i_getDeviceType();
    14391439                }
     
    16731673            p->mParent->i_onMediumRegistered(it->first, it->second, TRUE);
    16741674        }
    1675         for (std::set<ComObjPtr<Medium> >::const_iterator it = pMediumsForNotify.begin();
    1676              it != pMediumsForNotify.end();
     1675        for (std::set<ComObjPtr<Medium> >::const_iterator it = pMediaForNotify.begin();
     1676             it != pMediaForNotify.end();
    16771677             ++it)
    16781678        {
  • trunk/src/VBox/Main/src-server/MachineImplMoveVM.cpp

    r98351 r98352  
    321321    ULONG uTotalWeight = 1;
    322322
    323     /* The lists m_llMedias, m_llSaveStateFiles and m_llNVRAMFiles are filled in the queryMediasForAllStates() */
    324     hrc = queryMediasForAllStates();
     323    /* The lists m_llMedia, m_llSaveStateFiles and m_llNVRAMFiles are filled in the queryMediaForAllStates() */
     324    hrc = queryMediaForAllStates();
    325325    if (FAILED(hrc))
    326326        return hrc;
    327327
    328     /* Calculate the total size of images. Fill m_finalMediumsMap */
     328    /* Calculate the total size of images. Fill m_finalMediaMap */
    329329    { /** The scope here for better reading, apart from that the variables have limited scope too */
    330         uint64_t totalMediumsSize = 0;
    331 
    332         for (size_t i = 0; i < m_llMedias.size(); ++i)
    333         {
    334             MEDIUMTASKCHAINMOVE &mtc = m_llMedias.at(i);
     330        uint64_t totalMediaSize = 0;
     331
     332        for (size_t i = 0; i < m_llMedia.size(); ++i)
     333        {
     334            MEDIUMTASKCHAINMOVE &mtc = m_llMedia.at(i);
    335335            for (size_t a = mtc.chain.size(); a > 0; --a)
    336336            {
     
    353353
    354354                    std::pair<std::map<Utf8Str, MEDIUMTASKMOVE>::iterator,bool> ret;
    355                     ret = m_finalMediumsMap.insert(std::make_pair(name, mtc.chain[a - 1]));
     355                    ret = m_finalMediaMap.insert(std::make_pair(name, mtc.chain[a - 1]));
    356356                    if (ret.second == true)
    357357                    {
     
    359359                        ++uCount;
    360360                        uTotalWeight += mtc.chain[a - 1].uWeight;
    361                         totalMediumsSize += (uint64_t)cbSize;
     361                        totalMediaSize += (uint64_t)cbSize;
    362362                        Log2(("Image %s was added into the moved list\n", name.c_str()));
    363363                    }
     
    366366        }
    367367
    368         Log2(("Total Size of images is %lld bytes\n", totalMediumsSize));
    369         neededFreeSpace += totalMediumsSize;
     368        Log2(("Total Size of images is %lld bytes\n", totalMediaSize));
     369        neededFreeSpace += totalMediaSize;
    370370    }
    371371
     
    666666    {
    667667        /* Move all disks */
    668         hrc = taskMoveVM->moveAllDisks(taskMoveVM->m_finalMediumsMap, strTargetFolder);
     668        hrc = taskMoveVM->moveAllDisks(taskMoveVM->m_finalMediaMap, strTargetFolder);
    669669        if (FAILED(hrc))
    670670            throw hrc;
     
    10081008                taskMoveVM->m_pProgress->SetNextOperation(BstrFmt(tr("Skip the empty operation %d..."), i + 1).raw(), 1);
    10091009
    1010             hrc = taskMoveVM->moveAllDisks(taskMoveVM->m_finalMediumsMap);
     1010            hrc = taskMoveVM->moveAllDisks(taskMoveVM->m_finalMediaMap);
    10111011            if (FAILED(hrc))
    10121012                throw hrc;
     
    10981098         * because we doubled the number of operations for rollback case.
    10991099         * But if we want to update the progress object corectly it's needed to add all medium moved by standard
    1100          * "move medium" logic (for us it's taskMoveVM->m_finalMediumsMap) to the current number of operation.
     1100         * "move medium" logic (for us it's taskMoveVM->m_finalMediaMap) to the current number of operation.
    11011101         */
    11021102
     
    11061106        hrc = taskMoveVM->m_pProgress->COMGETTER(Operation)(&operation);
    11071107
    1108         for (ULONG i = operation; i < operation + taskMoveVM->m_finalMediumsMap.size() - 1; ++i)
     1108        for (ULONG i = operation; i < operation + taskMoveVM->m_finalMediaMap.size() - 1; ++i)
    11091109            taskMoveVM->m_pProgress->SetNextOperation(BstrFmt(tr("Skip the empty operation %d..."), i).raw(), 1);
    11101110
     
    14361436}
    14371437
    1438 HRESULT MachineMoveVM::queryMediasForAllStates()
     1438HRESULT MachineMoveVM::queryMediaForAllStates()
    14391439{
    14401440    /* In this case we create a exact copy of the original VM. This means just
     
    15251525            }
    15261526
    1527             m_llMedias.append(mtc);
     1527            m_llMedia.append(mtc);
    15281528        }
    15291529
     
    15401540     * that in the previous loop, cause there we go from child -> parent and
    15411541     * didn't know how many are between. */
    1542     for (size_t i = 0; i < m_llMedias.size(); ++i)
     1542    for (size_t i = 0; i < m_llMedia.size(); ++i)
    15431543    {
    15441544        uint32_t uIdx = 0;
    1545         MEDIUMTASKCHAINMOVE &mtc = m_llMedias.at(i);
     1545        MEDIUMTASKCHAINMOVE &mtc = m_llMedia.at(i);
    15461546        for (size_t a = mtc.chain.size(); a > 0; --a)
    15471547            mtc.chain[a - 1].uIdx = uIdx++;
  • trunk/src/VBox/Main/src-server/MediumImpl.cpp

    r98351 r98352  
    95129512    HRESULT hrc2;
    95139513
    9514     std::set<ComObjPtr<Medium> > pMediumsForNotify;
     9514    std::set<ComObjPtr<Medium> > pMediaForNotify;
    95159515    std::map<Guid, DeviceType_T> uIdsForNotify;
    95169516
     
    95379537                i_deparent();
    95389538                if (task.NotifyAboutChanges())
    9539                     pMediumsForNotify.insert(task.mParentForTarget);
     9539                    pMediaForNotify.insert(task.mParentForTarget);
    95409540            }
    95419541
     
    95749574
    95759575                    if (task.NotifyAboutChanges())
    9576                         pMediumsForNotify.insert(pMedium);
     9576                        pMediaForNotify.insert(pMedium);
    95779577                }
    95789578            }
    9579             pMediumsForNotify.insert(pTarget);
     9579            pMediaForNotify.insert(pTarget);
    95809580        }
    95819581
     
    96669666    else if (task.NotifyAboutChanges())
    96679667    {
    9668         for (std::set<ComObjPtr<Medium> >::const_iterator it = pMediumsForNotify.begin();
    9669              it != pMediumsForNotify.end();
     9668        for (std::set<ComObjPtr<Medium> >::const_iterator it = pMediaForNotify.begin();
     9669             it != pMediaForNotify.end();
    96709670             ++it)
    96719671        {
  • trunk/src/VBox/Main/src-server/SnapshotImpl.cpp

    r98292 r98352  
    17631763    BOOL fSuspendedBySave     = FALSE;
    17641764
    1765     std::set<ComObjPtr<Medium> > pMediumsForNotify;
     1765    std::set<ComObjPtr<Medium> > pMediaForNotify;
    17661766    std::map<Guid, DeviceType_T> uIdsForNotify;
    17671767
     
    19491949                if (!fFound)
    19501950                {
    1951                     pMediumsForNotify.insert(pMedium->i_getParent());
     1951                    pMediaForNotify.insert(pMedium->i_getParent());
    19521952                    uIdsForNotify[pMedium->i_getId()] = pMedium->i_getDeviceType();
    19531953                }
     
    20652065        }
    20662066
    2067         for (std::set<ComObjPtr<Medium> >::const_iterator it = pMediumsForNotify.begin();
    2068              it != pMediumsForNotify.end();
     2067        for (std::set<ComObjPtr<Medium> >::const_iterator it = pMediaForNotify.begin();
     2068             it != pMediaForNotify.end();
    20692069             ++it)
    20702070        {
     
    23292329    HRESULT hrc = S_OK;
    23302330    Guid snapshotId;
    2331     std::set<ComObjPtr<Medium> > pMediumsForNotify;
     2331    std::set<ComObjPtr<Medium> > pMediaForNotify;
    23322332    std::map<Guid, std::pair<DeviceType_T, BOOL> > uIdsForNotify;
    23332333
     
    24612461                if (!fFound)
    24622462                {
    2463                     pMediumsForNotify.insert(pMedium->i_getParent());
     2463                    pMediaForNotify.insert(pMedium->i_getParent());
    24642464                    uIdsForNotify[pMedium->i_getId()] = std::pair<DeviceType_T, BOOL>(pMedium->i_getDeviceType(), TRUE);
    24652465                }
     
    25712571            if (SUCCEEDED(hrc2))
    25722572            {
    2573                 pMediumsForNotify.insert(pParent);
     2573                pMediaForNotify.insert(pParent);
    25742574                uIdsForNotify[id] = std::pair<DeviceType_T, BOOL>(pMedium->i_getDeviceType(), FALSE);
    25752575                pMedium->uninit();
     
    26092609            mParent->i_onMediumRegistered(it->first, it->second.first, it->second.second);
    26102610        }
    2611         for (std::set<ComObjPtr<Medium> >::const_iterator it = pMediumsForNotify.begin();
    2612              it != pMediumsForNotify.end();
     2611        for (std::set<ComObjPtr<Medium> >::const_iterator it = pMediaForNotify.begin();
     2612             it != pMediaForNotify.end();
    26132613             ++it)
    26142614        {
     
    29722972    MediumDeleteRecList toDelete;
    29732973    Guid snapshotId;
    2974     std::set<ComObjPtr<Medium> > pMediumsForNotify;
     2974    std::set<ComObjPtr<Medium> > pMediaForNotify;
    29752975    std::map<Guid,DeviceType_T> uIdsForNotify;
    29762976
     
    33453345                        throw hrc;
    33463346
    3347                     pMediumsForNotify.insert(pParent);
     3347                    pMediaForNotify.insert(pParent);
    33483348                    uIdsForNotify[uMedium] = uMediumType;
    33493349
     
    33563356                {
    33573357                    //store ids before merging for notify
    3358                     pMediumsForNotify.insert(it->mpTarget);
     3358                    pMediaForNotify.insert(it->mpTarget);
    33593359                    if (it->mfMergeForward)
    3360                         pMediumsForNotify.insert(it->mpSource->i_getParent());
     3360                        pMediaForNotify.insert(it->mpSource->i_getParent());
    33613361                    else
    33623362                    {
     
    33663366                             ++iit)
    33673367                        {
    3368                             pMediumsForNotify.insert(*iit);
     3368                            pMediaForNotify.insert(*iit);
    33693369                        }
    33703370                    }
     
    36053605            mParent->i_onMediumRegistered(it->first, it->second, FALSE);
    36063606        }
    3607         for (std::set<ComObjPtr<Medium> >::const_iterator it = pMediumsForNotify.begin();
    3608              it != pMediumsForNotify.end();
     3607        for (std::set<ComObjPtr<Medium> >::const_iterator it = pMediaForNotify.begin();
     3608             it != pMediaForNotify.end();
    36093609             ++it)
    36103610        {
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