VirtualBox

Ignore:
Timestamp:
Dec 21, 2010 12:52:38 PM (14 years ago)
Author:
vboxsync
Message:

IExtPackFile,IExtPackManager: Added progress and display info to the Install and Uninstall methods. No progress object will be returned in 4.0.0 as that is too risky.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageMisc.cpp

    r35100 r35273  
    859859        CHECK_ERROR2_RET(ptrExtPackMgr, OpenExtPackFile(bstrTarball.raw(), ptrExtPackFile.asOutParam()), RTEXITCODE_FAILURE);
    860860        CHECK_ERROR2_RET(ptrExtPackFile, COMGETTER(Name)(bstrName.asOutParam()), RTEXITCODE_FAILURE);
    861         CHECK_ERROR2_RET(ptrExtPackFile, Install(fReplace), RTEXITCODE_FAILURE);
     861        ComPtr<IProgress> ptrProgress;
     862        CHECK_ERROR2_RET(ptrExtPackFile, Install(fReplace, NULL, ptrProgress.asOutParam()), RTEXITCODE_FAILURE);
     863        if (!ptrProgress.isNull())
     864            CHECK_ERROR2_RET(ptrProgress, WaitForCompletion(-1), RTEXITCODE_FAILURE);
    862865        RTPrintf("Successfully installed \"%lS\".\n", bstrName.raw());
    863866    }
     
    895898
    896899        Bstr bstrName(pszName);
    897         CHECK_ERROR2_RET(ptrExtPackMgr, Uninstall(bstrName.raw(), fForced), RTEXITCODE_FAILURE);
     900        ComPtr<IProgress> ptrProgress;
     901        CHECK_ERROR2_RET(ptrExtPackMgr, Uninstall(bstrName.raw(), fForced, NULL, ptrProgress.asOutParam()), RTEXITCODE_FAILURE);
     902        if (!ptrProgress.isNull())
     903            CHECK_ERROR2_RET(ptrProgress, WaitForCompletion(-1), RTEXITCODE_FAILURE);
    898904        RTPrintf("Successfully uninstalled \"%s\".\n", pszName);
    899905    }
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