Changeset 49038 in vbox for trunk/src/VBox
- Timestamp:
- Oct 10, 2013 6:21:26 PM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 89815
- Location:
- trunk/src/VBox
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageAppliance.cpp
r46658 r49038 1051 1051 break; 1052 1052 1053 com::SafeArray<ExportOptions_T> options; 1054 if (fManifest) 1055 options.push_back(ExportOptions_CreateManifest); 1056 1053 1057 ComPtr<IProgress> progress; 1054 1058 CHECK_ERROR_BREAK(pAppliance, Write(Bstr(strOvfFormat).raw(), 1055 fManifest,1059 ComSafeArrayAsInParam(options), 1056 1060 Bstr(pszAbsFilePath).raw(), 1057 1061 progress.asOutParam())); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportApp.cpp
r45424 r49038 7 7 8 8 /* 9 * Copyright (C) 2009-201 2Oracle Corporation9 * Copyright (C) 2009-2013 Oracle Corporation 10 10 * 11 11 * This file is part of VirtualBox Open Source Edition (OSE), as … … 139 139 { 140 140 /* Write the appliance: */ 141 CProgress progress = appliance.Write(field("format").toString(), field("manifestSelected").toBool() /* fManifest */, uri()); 141 QVector<KExportOptions> options; 142 if (field("manifestSelected").toBool()) 143 options.append(KExportOptions_CreateManifest); 144 CProgress progress = appliance.Write(field("format").toString(), options, uri()); 142 145 bool fResult = appliance.isOk(); 143 146 if (fResult) -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r49007 r49038 2797 2797 </enum> 2798 2798 2799 <enum 2800 name="ExportOptions" 2801 uuid="8f45eb08-fd34-41ee-af95-a880bdee5554" 2802 > 2803 2804 <desc> 2805 Export options, used with <link to="IAppliance::write" />. 2806 </desc> 2807 2808 <const name="CreateManifest" value="1"> 2809 <desc>Write the optional manifest file (.mf) which is used for integrity 2810 checks prior import.</desc> 2811 </const> 2812 <const name="ExportDVDImages" value="2"> 2813 <desc>Export DVD images. Default is not to export them as it is rarely 2814 needed for typical VMs.</desc> 2815 </const> 2816 2817 </enum> 2818 2799 2819 2800 2820 <!-- … … 3039 3059 </desc> 3040 3060 </param> 3041 <param name="manifest" type="boolean" dir="in"> 3042 <desc> 3043 Indicate if the optional manifest file (.mf) should be written. The manifest file 3044 is used for integrity checks prior import. 3045 </desc> 3061 <param name="options" type="ExportOptions" dir="in" safearray="yes"> 3062 <desc>Options for the exporting operation.</desc> 3046 3063 </param> 3047 3064 <param name="path" type="wstring" dir="in"> -
trunk/src/VBox/Main/include/ApplianceImpl.h
r48955 r49038 7 7 8 8 /* 9 * Copyright (C) 2006-201 2Oracle Corporation9 * Copyright (C) 2006-2013 Oracle Corporation 10 10 * 11 11 * This file is part of VirtualBox Open Source Edition (OSE), as … … 104 104 /* Export methods */ 105 105 STDMETHOD(CreateVFSExplorer)(IN_BSTR aURI, IVFSExplorer **aExplorer); 106 STDMETHOD(Write)(IN_BSTR format, BOOL fManifest, IN_BSTR path, IProgress **aProgress);106 STDMETHOD(Write)(IN_BSTR format, ComSafeArrayIn(ExportOptions_T, options), IN_BSTR path, IProgress **aProgress); 107 107 108 108 STDMETHOD(GetWarnings)(ComSafeArrayOut(BSTR, aWarnings)); -
trunk/src/VBox/Main/include/ApplianceImplPrivate.h
r48955 r49038 5 5 6 6 /* 7 * Copyright (C) 2006-201 2Oracle Corporation7 * Copyright (C) 2006-2013 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 79 79 Utf8Str strOVFSHADigest;//SHA digest of OVf file. It is stored here after reading OVF file (before import) 80 80 81 RTCList<ImportOptions_T> optList; 81 RTCList<ImportOptions_T> optListImport; 82 RTCList<ExportOptions_T> optListExport; 82 83 83 84 ovf::OVFReader *pReader; -
trunk/src/VBox/Main/src-server/ApplianceImplExport.cpp
r48955 r49038 579 579 * Public method implementation. 580 580 * @param format 581 * @param options 581 582 * @param path 582 583 * @param aProgress 583 584 * @return 584 585 */ 585 STDMETHODIMP Appliance::Write(IN_BSTR format, BOOL fManifest, IN_BSTR path, IProgress **aProgress)586 STDMETHODIMP Appliance::Write(IN_BSTR format, ComSafeArrayIn(ImportOptions_T, options), IN_BSTR path, IProgress **aProgress) 586 587 { 587 588 if (!path) return E_POINTER; … … 592 593 593 594 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 595 596 if (options != NULL) 597 m->optListExport = com::SafeArray<ExportOptions_T>(ComSafeArrayInArg(options)).toList(); 598 599 AssertReturn(!(m->optListExport.contains(ExportOptions_CreateManifest) && m->optListExport.contains(ExportOptions_ExportDVDImages)), E_INVALIDARG); 594 600 595 601 // do not allow entering this method if the appliance is busy reading or writing … … 604 610 tr("Appliance file must have .ovf or .ova extension")); 605 611 606 m->fManifest = !!fManifest;612 m->fManifest = m->optListExport.contains(ExportOptions_CreateManifest); 607 613 Utf8Str strFormat(format); 608 614 … … 886 892 { 887 893 rc = mVirtualBox->OpenMedium(bstrSrcFilePath.raw(), 888 889 890 891 894 DeviceType_HardDisk, 895 AccessMode_ReadWrite, 896 FALSE /* fForceNewUuid */, 897 pSourceDisk.asOutParam()); 892 898 if (FAILED(rc)) 893 899 throw rc; -
trunk/src/VBox/Main/src-server/ApplianceImplImport.cpp
r48955 r49038 770 770 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 771 771 772 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 773 772 774 if (options != NULL) 773 m->optList = com::SafeArray<ImportOptions_T>(ComSafeArrayInArg(options)).toList(); 774 775 AssertReturn(!(m->optList.contains(ImportOptions_KeepAllMACs) && m->optList.contains(ImportOptions_KeepNATMACs)), E_INVALIDARG); 776 777 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 775 m->optListImport = com::SafeArray<ImportOptions_T>(ComSafeArrayInArg(options)).toList(); 776 777 AssertReturn(!(m->optListImport.contains(ImportOptions_KeepAllMACs) && m->optListImport.contains(ImportOptions_KeepNATMACs)), E_INVALIDARG); 778 778 779 779 // do not allow entering this method if the appliance is busy reading or writing … … 3340 3340 /* First disable all network cards, they will be enabled below again. */ 3341 3341 settings::NetworkAdaptersList::iterator it1; 3342 bool fKeepAllMACs = m->optList .contains(ImportOptions_KeepAllMACs);3343 bool fKeepNATMACs = m->optList .contains(ImportOptions_KeepNATMACs);3342 bool fKeepAllMACs = m->optListImport.contains(ImportOptions_KeepAllMACs); 3343 bool fKeepNATMACs = m->optListImport.contains(ImportOptions_KeepNATMACs); 3344 3344 for (it1 = llNetworkAdapters.begin(); it1 != llNetworkAdapters.end(); ++it1) 3345 3345 {
Note:
See TracChangeset
for help on using the changeset viewer.