Changeset 16237 in vbox
- Timestamp:
- Jan 26, 2009 3:06:34 PM (16 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ApplianceImpl.cpp
r16234 r16237 808 808 } 809 809 810 rc = construeAppliance();811 if (FAILED(rc))812 return rc;813 814 810 /* Confirm a successful initialization */ 815 811 autoInitSpan.setSucceeded(); … … 1017 1013 } 1018 1014 1019 HRESULT Appliance::construeAppliance()1015 STDMETHODIMP Appliance::Interpret() 1020 1016 { 1021 1017 // @todo: -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r16235 r16237 2882 2882 <link to="IVirtualBox::openAppliance" />. 2883 2883 2884 Opening an appliance is a t wo-step process with VirtualBox: first2884 Opening an appliance is a three-step process with VirtualBox: first 2885 2885 <link to="IVirtualBox::openAppliance" /> is called, which succeeds if the 2886 2886 appliance file is syntactically valid, irrespective of whether VirtualBox 2887 2887 can handle the appliance. 2888 2888 2889 Once that method has returned an IAppliance instance, one can inspect the 2890 member data of that instance to determine whether VirtualBox can handle 2891 the requirements of that appliance and create local virtual machines 2892 accordingly. 2889 As a second step, the caller should then invoke <link to="IAppliance::interpret" />, 2890 which analyzes the OVF data and sets up the contents of the IAppliance attributes 2891 accordingly. These can be inspected by a VirtualBox front-end such as the GUI, 2892 and the suggestions can be displayed to the user. For example, the virtual system 2893 will contain the virtual hardware prescribed by the OVF (network and hardware 2894 adapters, virtual disk images, memory size and so on), and the GUI can then give 2895 the user the option to confirm and/or change these suggestions. 2896 2897 As a third step, the caller should invoke <link to="#Import" />, which will create 2898 virtual machines in VirtualBox as instances of <link to="IMachine" /> that match the 2899 information in the virtual system descriptions. 2893 2900 </desc> 2894 2901 … … 2899 2906 2900 2907 <attribute name="virtualSystemDescriptions" type="IVirtualSystemDescription" readonly="yes" safearray="yes"> 2901 <desc></desc> 2902 </attribute> 2908 <desc> 2909 Array of virtual system descriptions. One such description gets created by 2910 <link to="#interpret" /> for each virtual system found in the OVF. 2911 </desc> 2912 </attribute> 2913 2914 <method name="interpret"> 2915 <desc> 2916 Interprets the OVF data that was read when the appliance was constructed. After 2917 calling this method, one can call 2918 <link to="#getDisks" /> to retrieve disk information and also inspect the 2919 <link to="#virtualSystemDescriptions" /> array attribute, which will then contain 2920 one <link to="IVirtualSystemDescription" /> for each virtual machine found in 2921 the appliance. 2922 </desc> 2923 </method> 2903 2924 2904 2925 <method name="getDisks"> -
trunk/src/VBox/Main/include/ApplianceImpl.h
r16218 r16237 57 57 void FinalRelease() { uninit(); } 58 58 59 HRESULT init 59 HRESULT init(VirtualBox *aVirtualBox, IN_BSTR &path); 60 60 void uninit(); 61 61 … … 64 64 65 65 /* IAppliance properties */ 66 STDMETHOD(COMGETTER(Path)) (BSTR *aPath); 66 STDMETHOD(COMGETTER(Path))(BSTR *aPath); 67 68 STDMETHOD(COMGETTER(VirtualSystemDescriptions))(ComSafeArrayOut (IVirtualSystemDescription*, aVirtualSystemDescriptions)); 67 69 68 70 /* IAppliance methods */ 71 /* void interpret (); */ 72 STDMETHOD(Interpret)(void); 73 69 74 /* void getDisks (out unsigned long aDisksSize, [array, size_is (aDisksSize)] out wstring aDisks, [retval] out unsigned long cDisks); */ 70 STDMETHOD(GetDisks) (ComSafeArrayOut(BSTR, aDisks), ULONG *cDisks); 71 72 STDMETHOD (COMGETTER (VirtualSystemDescriptions)) (ComSafeArrayOut (IVirtualSystemDescription*, aVirtualSystemDescriptions)); 75 STDMETHOD(GetDisks)(ComSafeArrayOut(BSTR, aDisks), ULONG *cDisks); 73 76 74 77 /* public methods only for internal purposes */ 75 STDMETHOD 78 STDMETHOD(ImportAppliance)(); 76 79 77 80 /* private instance data */ … … 88 91 HRESULT HandleVirtualSystemContent(const char *pcszPath, const xml::Node *pContentElem); 89 92 90 HRESULT construeAppliance();91 93 HRESULT searchUniqueVMName (std::string& aName); 92 94 }; … … 151 153 /* private instance data */ 152 154 private: 153 void addEntry 154 std::list<VirtualSystemDescriptionEntry> findByType 155 void addEntry(VirtualSystemDescriptionType_T aType, ULONG aRef, std::string aOrigValue, std::string aAutoValue); 156 std::list<VirtualSystemDescriptionEntry> findByType(VirtualSystemDescriptionType_T aType); 155 157 156 158 struct Data;
Note:
See TracChangeset
for help on using the changeset viewer.