VirtualBox

Changeset 84153 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
May 5, 2020 8:00:32 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
137753
Message:

Main: Reverted r137602 & r137737 as the API is not actually needed. bugref:9699

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

Legend:

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

    r84092 r84153  
    35103510      addresses, if the import options are used to keep them.</desc>
    35113511    </const>
     3512
    35123513  </enum>
    35133514
     
    36333634    uuid="86a98347-7619-41aa-aece-b21ac5c1a7e6"
    36343635    wsmap="managed"
    3635     reservedMethods="6" reservedAttributes="8"
     3636    reservedMethods="7" reservedAttributes="8"
    36363637    >
    36373638    <desc>
     
    37803781      </desc>
    37813782    </attribute>
    3782 
    3783     <method name="getManifest">
    3784       <desc>
    3785         Return manifest represented in the OVF and type of digest used there.
    3786       </desc>
    3787       <param name="manifest" type="wstring" dir="out">
    3788         <desc>
    3789           The manifest represented in the OVF. Empty if not exist.
    3790           This is available after calling <link to="#read"/>.
    3791         </desc>
    3792       </param>
    3793       <param name="manifestName" type="wstring" dir="out">
    3794         <desc>
    3795           The manifest file name. Empty if not exist.
    3796         </desc>
    3797       </param>
    3798 
    3799     </method>
    38003783
    38013784    <method name="read">
  • trunk/src/VBox/Main/include/ApplianceImpl.h

    r84031 r84153  
    9393    HRESULT getVirtualSystemDescriptions(std::vector<ComPtr<IVirtualSystemDescription> > &aVirtualSystemDescriptions);
    9494    HRESULT getMachines(std::vector<com::Utf8Str> &aMachines);
    95 
    96     HRESULT getManifest(com::Utf8Str &aManifest, com::Utf8Str &aManifestName);
    9795
    9896    // wrapped IAppliance methods
  • trunk/src/VBox/Main/include/ApplianceImplPrivate.h

    r84141 r84153  
    133133            cbSignedDigest = 0;
    134134        }
    135 
    136135        if (fSignerCertLoaded)
    137136        {
     
    149148        ptrCertificateInfo.setNull();
    150149        strCertError.setNull();
    151         strManifestName.setNull();
    152150    }
    153151
     
    163161    /** @name Write data
    164162     * @{ */
    165     bool                fManifest;     // Create a manifest file on export
     163    bool                fManifest;      // Create a manifest file on export
    166164    /** @} */
    167165
     
    178176    /** Memorized copy of the manifest file for signature checking purposes. */
    179177    RTVFSFILE           hMemFileTheirManifest;
    180     /** The manifest filename. */
    181     Utf8Str             strManifestName;
    182178
    183179    /** The signer certificate from the signature file (.cert).
  • trunk/src/VBox/Main/src-server/ApplianceImpl.cpp

    r84141 r84153  
    505505 * Public method implementation.
    506506 */
    507 HRESULT Appliance::getManifest(com::Utf8Str &aManifest, com::Utf8Str &aManifestName)
    508 {
    509     /* Write lock the appliance here as we don't want concurrent hMemFileTheirManifest
    510        accesses (lazyness/paranoia). */
    511     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    512 
    513     Assert(aManifest.isEmpty());
    514     if (m->hMemFileTheirManifest != NIL_RTVFSFILE)
    515     {
    516         uint64_t cchManifest = 0;
    517         int rc = RTVfsFileQuerySize(m->hMemFileTheirManifest, &cchManifest);
    518         AssertRCReturn(rc, setErrorVrc(rc));
    519 
    520         rc = aManifest.reserveNoThrow(cchManifest + 1);
    521         AssertRCReturn(rc, setErrorVrc(rc));
    522 
    523         char *pszManifest = aManifest.mutableRaw();
    524         rc = RTVfsFileReadAt(m->hMemFileTheirManifest, 0, pszManifest, cchManifest, NULL);
    525         pszManifest[cchManifest] = '\0';
    526         AssertRCReturn(rc, setErrorVrc(rc));
    527         RTStrPurgeEncoding(pszManifest);
    528         aManifest.jolt();
    529     }
    530 
    531     aManifestName = m->strManifestName;
    532     return S_OK;
    533 }
    534 
    535 /**
    536  * Public method implementation.
    537  */
    538507HRESULT Appliance::getDisks(std::vector<com::Utf8Str> &aDisks)
    539508{
  • trunk/src/VBox/Main/src-server/ApplianceImplImport.cpp

    r84141 r84153  
    25612561 *                              reference is always consumed.
    25622562 * @param   pszSubFileNm        The manifest filename (no path) for error
    2563  *                              messages, logging and strManifestName.
     2563 *                              messages and logging.
    25642564 * @returns COM status code, error info set.
    25652565 * @throws  Nothing
     
    25682568{
    25692569    LogFlowFunc(("%s[%s]\n", pTask->locInfo.strPath.c_str(), pszSubFileNm));
    2570 
    2571     /* Remember the manifet file name */
    2572     HRESULT hrc = m->strManifestName.assignEx(pszSubFileNm);
    2573     AssertReturn(SUCCEEDED(hrc), hrc);
    25742570
    25752571    /*
     
    25952591    RTVfsIoStrmRelease(hVfsIos);
    25962592    if (RT_FAILURE(vrc))
    2597         return setErrorVrc(vrc, tr("Failed to parse manifest file '%s' for '%s' (%Rrc): %s"),
    2598                            pszSubFileNm, pTask->locInfo.strPath.c_str(), vrc, szErr);
     2593        throw setErrorVrc(vrc, tr("Failed to parse manifest file '%s' for '%s' (%Rrc): %s"),
     2594                          pszSubFileNm, pTask->locInfo.strPath.c_str(), vrc, szErr);
    25992595
    26002596    /*
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette