VirtualBox

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


Ignore:
Timestamp:
Apr 24, 2018 6:48:25 AM (7 years ago)
Author:
vboxsync
Message:

bugref:8345. Added a new internal class ErrorInfoItem and a list errorsList. The list is used to store a chain of the errors and to get the initial error if it's needed.

File:
1 edited

Legend:

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

    r71581 r71990  
    6363class MachineMoveVM : public ThreadTask
    6464{
     65    struct ErrorInfoItem
     66    {
     67        ErrorInfoItem(unsigned int aCode, const char* aDescription):
     68            m_code(aCode),
     69            m_description(aDescription == NULL ? "There is no description" : aDescription)
     70        {
     71        }
     72
     73        void printItem(bool fLog) const;
     74
     75        HRESULT m_code;
     76        Utf8Str m_description;
     77    };
     78
     79    RTCList<MEDIUMTASKCHAINMOVE>    llMedias;
     80    RTCList<SAVESTATETASKMOVE>      llSaveStateFiles;
     81    std::map<Utf8Str, MEDIUMTASKMOVE>     finalMediumsMap;
     82    std::map<Utf8Str, SAVESTATETASKMOVE>  finalSaveStateFilesMap;
     83    std::map<VBoxFolder_t, Utf8Str> vmFolders;
     84    std::list<ErrorInfoItem> errorsList;
     85
     86    ComObjPtr<Machine>  m_pMachine;
     87    ComObjPtr<Progress> m_pProgress;
     88    ComObjPtr<Progress> m_pRollBackProgress;
     89    ComPtr<ISession>    m_pSession;
     90    ComPtr<IMachine>    m_pSessionMachine;
     91    Utf8Str             m_targetPath;
     92    Utf8Str             m_type;
     93    HRESULT             result;
     94
    6595public:
    66 
    6796    MachineMoveVM(ComObjPtr<Machine> aMachine,
    6897                  const com::Utf8Str &aTargetPath,
     
    73102        m_pProgress(aProgress),
    74103        m_targetPath(aTargetPath),
    75         m_type(aType),
     104        m_type (aType),
    76105        result(S_OK)
    77106    {
     
    86115    static DECLCALLBACK(int) copyFileProgress(unsigned uPercentage, void *pvUser);
    87116    static void i_MoveVMThreadTask(MachineMoveVM* task);
    88 
    89     RTCList<MEDIUMTASKCHAINMOVE>    llMedias;
    90     RTCList<SAVESTATETASKMOVE>      llSaveStateFiles;
    91     std::map<Utf8Str, MEDIUMTASKMOVE>     finalMediumsMap;
    92     std::map<Utf8Str, SAVESTATETASKMOVE>  finalSaveStateFilesMap;
    93     std::map<VBoxFolder_t, Utf8Str> vmFolders;
    94 
    95     ComObjPtr<Machine>  m_pMachine;
    96     ComObjPtr<Progress> m_pProgress;
    97     ComObjPtr<Progress> m_pRollBackProgress;
    98     ComPtr<ISession>    m_pSession;
    99     ComPtr<IMachine>    m_pSessionMachine;
    100     Utf8Str             m_targetPath;
    101     Utf8Str             m_type;
    102     HRESULT             result;
    103117
    104118    void handler()
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