Changeset 27900 in vbox for trunk/src/VBox/Main/ApplianceImpl.cpp
- Timestamp:
- Mar 31, 2010 2:07:18 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 59590
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ApplianceImpl.cpp
r27895 r27900 420 420 } 421 421 422 /**423 * Public method implementation.424 * @param path425 * @return426 */427 STDMETHODIMP Appliance::Read(IN_BSTR path, IProgress **aProgress)428 {429 if (!path) return E_POINTER;430 CheckComArgOutPointerValid(aProgress);431 432 AutoCaller autoCaller(this);433 if (FAILED(autoCaller.rc())) return autoCaller.rc();434 435 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);436 437 if (!isApplianceIdle())438 return E_ACCESSDENIED;439 440 if (m->pReader)441 {442 delete m->pReader;443 m->pReader = NULL;444 }445 446 // see if we can handle this file; for now we insist it has an ".ovf" extension447 Utf8Str strPath (path);448 if (!strPath.endsWith(".ovf", Utf8Str::CaseInsensitive))449 return setError(VBOX_E_FILE_ERROR,450 tr("Appliance file must have .ovf extension"));451 452 ComObjPtr<Progress> progress;453 HRESULT rc = S_OK;454 try455 {456 /* Parse all necessary info out of the URI */457 parseURI(strPath, m->locInfo);458 rc = readImpl(m->locInfo, progress);459 }460 catch (HRESULT aRC)461 {462 rc = aRC;463 }464 465 if (SUCCEEDED(rc))466 /* Return progress to the caller */467 progress.queryInterfaceTo(aProgress);468 469 return S_OK;470 }471 472 422 STDMETHODIMP Appliance::CreateVFSExplorer(IN_BSTR aURI, IVFSExplorer **aExplorer) 473 423 {
Note:
See TracChangeset
for help on using the changeset viewer.