Changeset 84153 in vbox for trunk/src/VBox/Main
- Timestamp:
- May 5, 2020 8:00:32 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 137753
- Location:
- trunk/src/VBox/Main
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/idl/VirtualBox.xidl
r84092 r84153 3510 3510 addresses, if the import options are used to keep them.</desc> 3511 3511 </const> 3512 3512 3513 </enum> 3513 3514 … … 3633 3634 uuid="86a98347-7619-41aa-aece-b21ac5c1a7e6" 3634 3635 wsmap="managed" 3635 reservedMethods=" 6" reservedAttributes="8"3636 reservedMethods="7" reservedAttributes="8" 3636 3637 > 3637 3638 <desc> … … 3780 3781 </desc> 3781 3782 </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>3800 3783 3801 3784 <method name="read"> -
trunk/src/VBox/Main/include/ApplianceImpl.h
r84031 r84153 93 93 HRESULT getVirtualSystemDescriptions(std::vector<ComPtr<IVirtualSystemDescription> > &aVirtualSystemDescriptions); 94 94 HRESULT getMachines(std::vector<com::Utf8Str> &aMachines); 95 96 HRESULT getManifest(com::Utf8Str &aManifest, com::Utf8Str &aManifestName);97 95 98 96 // wrapped IAppliance methods -
trunk/src/VBox/Main/include/ApplianceImplPrivate.h
r84141 r84153 133 133 cbSignedDigest = 0; 134 134 } 135 136 135 if (fSignerCertLoaded) 137 136 { … … 149 148 ptrCertificateInfo.setNull(); 150 149 strCertError.setNull(); 151 strManifestName.setNull();152 150 } 153 151 … … 163 161 /** @name Write data 164 162 * @{ */ 165 bool fManifest; // Create a manifest file on export163 bool fManifest; // Create a manifest file on export 166 164 /** @} */ 167 165 … … 178 176 /** Memorized copy of the manifest file for signature checking purposes. */ 179 177 RTVFSFILE hMemFileTheirManifest; 180 /** The manifest filename. */181 Utf8Str strManifestName;182 178 183 179 /** The signer certificate from the signature file (.cert). -
trunk/src/VBox/Main/src-server/ApplianceImpl.cpp
r84141 r84153 505 505 * Public method implementation. 506 506 */ 507 HRESULT Appliance::getManifest(com::Utf8Str &aManifest, com::Utf8Str &aManifestName)508 {509 /* Write lock the appliance here as we don't want concurrent hMemFileTheirManifest510 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 */538 507 HRESULT Appliance::getDisks(std::vector<com::Utf8Str> &aDisks) 539 508 { -
trunk/src/VBox/Main/src-server/ApplianceImplImport.cpp
r84141 r84153 2561 2561 * reference is always consumed. 2562 2562 * @param pszSubFileNm The manifest filename (no path) for error 2563 * messages , logging and strManifestName.2563 * messages and logging. 2564 2564 * @returns COM status code, error info set. 2565 2565 * @throws Nothing … … 2568 2568 { 2569 2569 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);2574 2570 2575 2571 /* … … 2595 2591 RTVfsIoStrmRelease(hVfsIos); 2596 2592 if (RT_FAILURE(vrc)) 2597 returnsetErrorVrc(vrc, tr("Failed to parse manifest file '%s' for '%s' (%Rrc): %s"),2598 2593 throw setErrorVrc(vrc, tr("Failed to parse manifest file '%s' for '%s' (%Rrc): %s"), 2594 pszSubFileNm, pTask->locInfo.strPath.c_str(), vrc, szErr); 2599 2595 2600 2596 /*
Note:
See TracChangeset
for help on using the changeset viewer.