VirtualBox

Changeset 81393 in vbox for trunk/src/VBox/Main/include


Ignore:
Timestamp:
Oct 21, 2019 8:33:26 AM (5 years ago)
Author:
vboxsync
Message:

Main/MachineImplMoveVM: many cleanups including removal of unused code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/MachineImplMoveVM.h

    r79955 r81393  
    4949typedef struct
    5050{
    51     RTCList<MEDIUMTASKMOVE>     chain;
     51    RTCList<MEDIUMTASKMOVE> chain;
    5252    DeviceType_T            devType;
    5353    bool                    fCreateDiffs;
     
    6666class MachineMoveVM : public ThreadTask
    6767{
    68     struct ErrorInfoItem
    69     {
    70         ErrorInfoItem(HRESULT aCode, const char* aDescription)
    71             : m_code(aCode)
    72             , m_description(aDescription == NULL ? "There is no description" : aDescription)
    73         {
    74         }
    75 
    76 #ifdef DEBUG
    77         void logItem() const;
    78 #endif
    79 
    80         HRESULT m_code;
    81         Utf8Str m_description;
    82     };
    83 
    8468    RTCList<MEDIUMTASKCHAINMOVE>            m_llMedias;
    8569    RTCList<SAVESTATETASKMOVE>              m_llSaveStateFiles;
     
    9175    ComObjPtr<Progress> m_pProgress;
    9276    ComObjPtr<Progress> m_pRollBackProgress;
    93     ComPtr<ISession>    m_pSession;
    94     ComPtr<IMachine>    m_pSessionMachine;
    9577    Utf8Str             m_targetPath;
    9678    Utf8Str             m_type;
     
    11698
    11799    HRESULT init();
     100private:
    118101    static DECLCALLBACK(int) updateProgress(unsigned uPercent, void *pvUser);
    119102    static DECLCALLBACK(int) copyFileProgress(unsigned uPercentage, void *pvUser);
    120     static void i_MoveVMThreadTask(MachineMoveVM* task);
     103    static void i_MoveVMThreadTask(MachineMoveVM *task);
    121104
     105public:
    122106    void handler()
    123107    {
     
    125109    }
    126110
    127     HRESULT createMachineList(const ComPtr<ISnapshot> &pSnapshot, std::vector< ComObjPtr<Machine> > &aMachineList) const;
     111private:
     112    HRESULT createMachineList(const ComPtr<ISnapshot> &pSnapshot, std::vector<ComObjPtr<Machine> > &aMachineList) const;
    128113    inline HRESULT queryBaseName(const ComPtr<IMedium> &pMedium, Utf8Str &strBaseName) const;
    129114    HRESULT queryMediasForAllStates(const std::vector<ComObjPtr<Machine> > &aMachineList);
     
    131116    HRESULT addSaveState(const ComObjPtr<Machine> &machine);
    132117    void printStateFile(settings::SnapshotsList &snl);
    133     HRESULT getFilesList(const Utf8Str& strRootFolder, fileList_t &filesList);
    134     HRESULT getFolderSize(const Utf8Str& strRootFolder, uint64_t& size);
    135     HRESULT deleteFiles(const RTCList<Utf8Str>& listOfFiles);
    136     HRESULT updatePathsToStateFiles(const std::map<Utf8Str, SAVESTATETASKMOVE>& listOfFiles,
    137                                     const Utf8Str& sourcePath, const Utf8Str& targetPath);
    138     HRESULT moveAllDisks(const std::map<Utf8Str, MEDIUMTASKMOVE>& listOfDisks, const Utf8Str* strTargetFolder = NULL);
    139     HRESULT restoreAllDisks(const std::map<Utf8Str, MEDIUMTASKMOVE>& listOfDisks);
     118    HRESULT getFilesList(const Utf8Str &strRootFolder, fileList_t &filesList);
     119    HRESULT getFolderSize(const Utf8Str &strRootFolder, uint64_t &size);
     120    HRESULT deleteFiles(const RTCList<Utf8Str> &listOfFiles);
     121    HRESULT updatePathsToStateFiles(const std::map<Utf8Str, SAVESTATETASKMOVE> &listOfFiles,
     122                                    const Utf8Str &sourcePath, const Utf8Str &targetPath);
     123    HRESULT moveAllDisks(const std::map<Utf8Str, MEDIUMTASKMOVE> &listOfDisks, const Utf8Str &strTargetFolder = Utf8Str::Empty);
     124    HRESULT restoreAllDisks(const std::map<Utf8Str, MEDIUMTASKMOVE> &listOfDisks);
    140125    HRESULT isMediumTypeSupportedForMoving(const ComPtr<IMedium> &pMedium);
    141126};
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