Changeset 13950 in vbox
- Timestamp:
- Nov 7, 2008 11:23:23 AM (16 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp
r13851 r13950 2835 2835 ComSafeArrayAsOutParam (propertyDefaults))); 2836 2836 2837 RTPrintf (" config=(");2837 RTPrintf (" properties=("); 2838 2838 if (propertyNames.size() > 0) 2839 2839 { 2840 2840 for (size_t a = 0; a < propertyNames.size(); ++ a) 2841 2841 { 2842 RTPrintf ("key='%ls' desc='%ls' type=", Bstr (propertyNames [a]).raw(), Bstr (propertyDescriptions [a]).raw()); 2842 RTPrintf ("\n name='%ls' desc='%ls' type=", 2843 Bstr (propertyNames [a]).raw(), Bstr (propertyDescriptions [a]).raw()); 2843 2844 switch (propertyTypes [a]) 2844 2845 { 2845 case DataType_Int32 Type: RTPrintf ("int"); break;2846 case DataType_Int8 Type: RTPrintf ("byte"); break;2847 case DataType_String Type: RTPrintf ("string"); break;2846 case DataType_Int32: RTPrintf ("int"); break; 2847 case DataType_Int8: RTPrintf ("byte"); break; 2848 case DataType_String: RTPrintf ("string"); break; 2848 2849 } 2849 2850 RTPrintf (" flags=%#04x", propertyFlags [a]); 2850 2851 RTPrintf (" default='%ls'", Bstr (propertyDefaults [a]).raw()); 2851 2852 if (a != propertyNames.size()-1) 2852 RTPrintf (", ");2853 RTPrintf (", "); 2853 2854 } 2854 2855 } -
trunk/src/VBox/Frontends/VirtualBox4/include/VBoxGlobal.h
r13601 r13950 865 865 bool aRecursive = false); 866 866 867 static QList < QPair<QString, QString> > HDDBackends();867 static QList <QPair <QString, QString> > HDDBackends(); 868 868 869 869 /* Qt 4.2.0 support function */ -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxGlobal.cpp
r13844 r13950 4694 4694 4695 4695 /** 4696 * Automatically figure out which hdd backends are currently support by vbox.4696 * Figures out which hard disk formats are currently supported by VirtualBox. 4697 4697 * Returned is a list of pairs with the form 4698 * <"Backend Name", "*.suffix1 *.suffix2 ...">.4698 * <tt>{"Backend Name", "*.suffix1 .suffix2 ..."}</tt>. 4699 4699 */ 4700 4700 /* static */ 4701 QList < QPair<QString, QString> > VBoxGlobal::HDDBackends()4701 QList <QPair <QString, QString> > VBoxGlobal::HDDBackends() 4702 4702 { 4703 4703 CSystemProperties systemProperties = vboxGlobal().virtualBox().GetSystemProperties(); -
trunk/src/VBox/Main/HardDiskFormatImpl.cpp
r13845 r13950 85 85 while (pa->pszKey != NULL) 86 86 { 87 Utf8Str default s("");87 Utf8Str defaultValue (""); 88 88 DataType_T dt; 89 89 /* Check for the configure data type */ … … 91 91 { 92 92 case VDCFGVALUETYPE_INTEGER: 93 { 94 dt = DataType_Int32; 95 /* If there is a default value get them in the right format */ 96 if (pa->pDefaultValue) 97 defaultValue = 98 Utf8StrFmt ("%d", pa->pDefaultValue->Integer.u64); 99 break; 100 } 101 case VDCFGVALUETYPE_BYTES: 102 { 103 dt = DataType_Int8; 104 /* If there is a default value get them in the right format */ 105 if (pa->pDefaultValue) 93 106 { 94 dt = DataType_Int32Type;95 /* If there is a default value get them in the right format */96 if (pa->pDefaultValue)97 defaults = Utf8StrFmt ("%d", pa->pDefaultValue->Integer.u64);98 break;107 /* Copy the bytes over */ 108 defaultValue.alloc (pa->pDefaultValue->Bytes.cb + 1); 109 memcpy (defaultValue.mutableRaw(), pa->pDefaultValue->Bytes.pv, 110 pa->pDefaultValue->Bytes.cb); 111 defaultValue.mutableRaw() [defaultValue.length()] = 0; 99 112 } 100 case VDCFGVALUETYPE_BYTES: 101 { 102 dt = DataType_Int8Type; 103 /* If there is a default value get them in the right format */ 104 if (pa->pDefaultValue) 105 { 106 /* Copy the bytes over */ 107 defaults.alloc (pa->pDefaultValue->Bytes.cb + 1); 108 memcpy (defaults.mutableRaw(), pa->pDefaultValue->Bytes.pv, pa->pDefaultValue->Bytes.cb); 109 defaults.mutableRaw() [defaults.length()] = 0; 110 } 111 break; 112 } 113 break; 114 } 113 115 case VDCFGVALUETYPE_STRING: 114 115 dt = DataType_StringType;116 117 118 defaults= pa->pDefaultValue->String.psz;119 120 116 { 117 dt = DataType_String; 118 /* If there is a default value get them in the right format */ 119 if (pa->pDefaultValue) 120 defaultValue = pa->pDefaultValue->String.psz; 121 break; 122 } 121 123 } 124 125 /// @todo add extendedFlags to Property when we reach the 32 bit 126 /// limit (or make the argument ULONG64 after checking that COM is 127 /// capable of defining enums (used to represent bit flags) that 128 /// contain 64-bit values) 129 ComAssertRet (pa->uKeyFlags == ((ULONG) pa->uKeyFlags), E_FAIL); 130 122 131 /* Create one property structure */ 123 132 const Property prop = { Utf8Str (pa->pszKey), 124 133 Utf8Str (""), 125 134 dt, 126 static_cast <unsigned int> (pa->uKeyFlags),127 default s};135 static_cast <ULONG> (pa->uKeyFlags), 136 defaultValue }; 128 137 unconst (mData.properties).push_back (prop); 129 138 ++ pa; … … 251 260 com::SafeArray <ULONG> propertyFlags (mData.properties.size()); 252 261 com::SafeArray <BSTR> propertyDefaults (mData.properties.size()); 262 253 263 int i = 0; 254 264 for (PropertyList::const_iterator it = mData.properties.begin(); … … 260 270 propertyTypes [i] = prop.type; 261 271 propertyFlags [i] = prop.flags; 262 prop.default s.cloneTo (&propertyDefaults [i]);272 prop.defaultValue.cloneTo (&propertyDefaults [i]); 263 273 } 274 264 275 propertyNames.detachTo (ComSafeArrayOutArg (aNames)); 265 276 propertyDescriptions.detachTo (ComSafeArrayOutArg (aDescriptions)); -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r13844 r13950 794 794 <li><link to="DeviceType::HardDisk"/>: the media is a hard disk 795 795 that, if registered, can be obtained using the 796 <link to="IVirtualBox::getHardDisk "/> call.</li>796 <link to="IVirtualBox::getHardDisk2()"/> call.</li> 797 797 <li><link to="DeviceType::DVD"/>: the media is a CD/DVD image 798 798 that, if registered, can be obtained using the 799 <link to="IVirtualBox::getDVDImage "/> call.</li>799 <link to="IVirtualBox::getDVDImage()"/> call.</li> 800 800 <li><link to="DeviceType::Floppy"/>: the media is a Floppy image 801 801 that, if registered, can be obtained using the 802 <link to="IVirtualBox::getFloppyImage "/> call.</li>802 <link to="IVirtualBox::getFloppyImage()"/> call.</li> 803 803 </ul> 804 804 … … 947 947 948 948 To enumerate all the virtual machines on the host, use the 949 <link to="IVirtualBox::machines "/> attribute.949 <link to="IVirtualBox::machines2"/> attribute. 950 950 </desc> 951 951 … … 1376 1376 </ul> 1377 1377 1378 Some hard disk attributes, such as <link to=" id"/>, may remain1378 Some hard disk attributes, such as <link to="#id"/>, may remain 1379 1379 uninitialized until the hard disk storage unit is successfully created 1380 1380 by one of the above methods. … … 1382 1382 After the storage unit is successfully created, the hard disk gets 1383 1383 remembered by this VirtualBox installation and will be accessible 1384 trhough <link to="#getHardDisk2 "/> and <link to="#findHardDisk2"/>1384 trhough <link to="#getHardDisk2()"/> and <link to="#findHardDisk2()"/> 1385 1385 methods. Remembered root (base) hard disks are also returned as part of 1386 1386 the <link to="#hardDisks2"/> array. See IHardDisk2 for more details. … … 1552 1552 1553 1553 The search is done by comparing the value of the @a location argument to 1554 the <link to="IMedi a::location"/> attribute of each known CD/DVD image.1554 the <link to="IMedium::location"/> attribute of each known CD/DVD image. 1555 1555 1556 1556 The requested location can be a path relative to the … … 1579 1579 accessible trhough <link to="#getFloppyImage()"/> and 1580 1580 <link to="#findFloppyImage()"/> methods. Remembered images are also 1581 returned as part of the <link to="# FloppyImages"/> array and can be1581 returned as part of the <link to="#floppyImages"/> array and can be 1582 1582 mounted to virtual machines. See IMedium for more details. 1583 1583 … … 1631 1631 1632 1632 The search is done by comparing the value of the @a location argument to 1633 the <link to="IMedi a::location"/> attribute of each known floppy image.1633 the <link to="IMedium::location"/> attribute of each known floppy image. 1634 1634 1635 1635 The requested location can be a path relative to the … … 2545 2545 This interface is used in two contexts. First of all, a collection of 2546 2546 objects implementing this interface is stored in the 2547 <link to="IVirtualBox::machines "/> attribute which lists all the virtual2547 <link to="IVirtualBox::machines2"/> attribute which lists all the virtual 2548 2548 machines that are currently registered with this VirtualBox 2549 2549 installation. Also, once a session has been opened for the given virtual … … 2555 2555 machine and provide methods to change various aspects of the virtual 2556 2556 machine's configuration. For machine objects stored in the 2557 <link to="IVirtualBox::machines "/> collection, all attributes are2557 <link to="IVirtualBox::machines2"/> collection, all attributes are 2558 2558 read-only unless explicitly stated otherwise in individual attribute 2559 2559 and method descriptions. In order to change a machine setting, a session … … 4688 4688 <note> 4689 4689 Child hard disks of all normal hard disks of the discarded snapshot 4690 must be <link to="IHardDisk::accessible">accessible</link>for this4690 must be accessible (see <link to="IMedium::state"/>) for this 4691 4691 operation to succeed. In particular, this means that all virtual 4692 4692 machines, whose hard disks are directly or indirectly based on the … … 5835 5835 Snapshots can be chained. Chained snapshots form a branch where 5836 5836 every next snapshot is based on the previous one. This chaining is 5837 mostly related to hard disk branching (see <link to="IHardDisk "/>5837 mostly related to hard disk branching (see <link to="IHardDisk2"/> 5838 5838 description). This means that every time a new snapshot is created, 5839 5839 a new differencing hard disk is implicitly created for all normal … … 6456 6456 its methods or attributes will fail with the <tt>"Object not ready" 6457 6457 (E_ACCESSDENIED)</tt> error. 6458 6459 <see>#deleteStorage()</see>6460 6458 </desc> 6461 6459 </method> … … 6511 6509 6512 6510 The array of hard disk attachments is returned by 6513 <link to="IMachine::hardDisk Attachments"/>.6511 <link to="IMachine::hardDisk2Attachments"/>. 6514 6512 6515 6513 <note> … … 6606 6604 <ul> 6607 6605 <li><link to="#deleteStorage()"/></li> 6608 <li><link to="#mergeToParent()"/></li> 6609 <li><link to="#mergeToAncestor()"/></li> 6606 <li><link to="#mergeTo()"/></li> 6610 6607 </ul> 6611 6608 … … 7208 7205 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7" 7209 7206 > 7210 <const name="Int32 Type" value="0"/>7211 <const name="Int8 Type" value="1"/>7212 <const name="String Type" value="2"/>7207 <const name="Int32" value="0"/> 7208 <const name="Int8" value="1"/> 7209 <const name="String" value="2"/> 7213 7210 </enum> 7214 7211 … … 7217 7214 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60" 7218 7215 > 7219 <const name="None Flag" value="0x00"/>7220 <const name="Mandatory Flag" value="0x01"/>7221 <const name="Expert Flag" value="0x02"/>7216 <const name="None" value="0x00"/> 7217 <const name="Mandatory" value="0x01"/> 7218 <const name="Expert" value="0x02"/> 7222 7219 <const name="FlagMask" value="0x03"/> 7223 7220 </enum> … … 7228 7225 > 7229 7226 <desc> 7230 Hard disk format capability flags.7227 Hard disk format capability flags. 7231 7228 </desc> 7232 7229 7233 <const name="Uuid Capability" value="0x01">7230 <const name="Uuid" value="0x01"> 7234 7231 <desc> 7235 7232 Supports UUIDs as expected by VirtualBox code. … … 7237 7234 </const> 7238 7235 7239 <const name="CreateFixed Capability" value="0x02">7236 <const name="CreateFixed" value="0x02"> 7240 7237 <desc> 7241 7238 Supports creating fixed size images, allocating all space instantly. … … 7243 7240 </const> 7244 7241 7245 <const name="CreateDynamic Capability" value="0x04">7242 <const name="CreateDynamic" value="0x04"> 7246 7243 <desc> 7247 7244 Supports creating dynamically growing images, allocating space on … … 7250 7247 </const> 7251 7248 7252 <const name="CreateSplit2G Capability" value="0x08">7253 <desc> 7254 Supports creating images split in chunks of a bit less than 2 GBytes.7249 <const name="CreateSplit2G" value="0x08"> 7250 <desc> 7251 Supports creating images split in chunks of a bit less than 2 GBytes. 7255 7252 </desc> 7256 7253 </const> 7257 7254 7258 <const name="DiffCapability" value="0x10"> 7259 <desc> 7260 Supports being used as differencing image format backend. 7255 <const name="Differencing" value="0x10"> 7256 <desc> 7257 Supports being used as a format for differencing hard disks (see <link 7258 to="IHardDisk2::createDiffStorage"/>). 7261 7259 </desc> 7262 7260 </const> 7263 7261 7264 <const name="A SyncCapability" value="0x20">7262 <const name="Asynchronous" value="0x20"> 7265 7263 <desc> 7266 7264 Supports asynchronous I/O operations for at least some configurations. … … 7268 7266 </const> 7269 7267 7270 <const name="FileCapability" value="0x40"> 7271 <desc> 7272 The backend operates on files. The caller needs to know to handle the 7273 location appropriately. For a list of supported file extentions see 7268 <const name="File" value="0x40"> 7269 <desc> 7270 The format backend operates on files. The <link to="IMedium::location"/> 7271 attribute of the hard disk specifies a file used to store hard disk 7272 data. For a list of supported file extentions see 7274 7273 <link to="IHardDiskFormat::fileExtensions"/>. 7275 7274 </desc> 7276 7275 </const> 7277 7276 7278 <const name=" ConfigCapability" value="0x80">7279 <desc> 7280 The backend uses the config interface. The caller needs to know how to7281 provide the mandatory configuration parts this way.7282 7283 <see>IHardDiskFormat::describeProperties</see>7277 <const name="Properties" value="0x80"> 7278 <desc> 7279 The format backend uses the property interface to configure the storage 7280 location and properties. The <link to="IHardDiskFormat::describeProperties"/> 7281 method is used to get access to poperties supported by the given hard 7282 disk format. 7284 7283 </desc> 7285 7284 </const> … … 7346 7345 <attribute name="capabilities" type="unsigned long" readonly="yes"> 7347 7346 <desc> 7348 The capabilities of the backend as a bitmask.7349 7350 For the meaning of the different capabilities see7347 Capabilities of the format as a set of bit flags. 7348 7349 For the meaning of individual capabilitiy flags see 7351 7350 <link to="HardDiskFormatCapabilities"/>. 7352 7351 </desc> … … 7355 7354 <method name="describeProperties"> 7356 7355 <desc> 7357 Return several lists for the configuration description of this backend. 7358 7359 This is non empty only if HardDiskFormatCapabilities::ConfigCapability 7360 is set. 7356 Returns several arrays describing the properties supported by this 7357 format. 7358 7359 An element with the given index in each array describes one 7360 property. Thus, the number of elements in each returned array is the 7361 same and corresponds to the number of supported properties. 7362 7363 The returned arrays are not empty only if the 7364 <link to="HardDiskFormatCapabilities::Properties"/> flag is set. 7365 7361 7366 <see>DataType</see> 7362 7367 <see>DataFlags</see> 7363 7368 </desc> 7364 7369 7365 <param name="names" type="wstring" safearray="yes" dir="out"/> 7366 <param name="description" type="wstring" safearray="yes" dir="out"/> 7367 <param name="types" type="unsigned long" safearray="yes" dir="out"/> 7368 <param name="flags" type="unsigned long" safearray="yes" dir="out"/> 7369 <param name="defaults" type="wstring" safearray="yes" dir="out"/> 7370 <param name="names" type="wstring" safearray="yes" dir="out"> 7371 <desc>Array of property names.</desc> 7372 </param> 7373 <param name="description" type="wstring" safearray="yes" dir="out"> 7374 <desc>Array of property descriptions.</desc> 7375 </param> 7376 <param name="types" type="unsigned long" safearray="yes" dir="out"> 7377 <desc>Array of property types.</desc> 7378 </param> 7379 <param name="flags" type="unsigned long" safearray="yes" dir="out"> 7380 <desc>Array of property flags.</desc> 7381 </param> 7382 <param name="defaults" type="wstring" safearray="yes" dir="out"> 7383 <desc>Array of default property values.</desc> 7384 </param> 7370 7385 </method> 7371 7386 -
trunk/src/VBox/Main/include/HardDiskFormatImpl.h
r13844 r13950 94 94 DataType_T type; 95 95 ULONG flags; 96 Bstr default s;96 Bstr defaultValue; 97 97 }; 98 98 typedef std::list <Property> PropertyList;
Note:
See TracChangeset
for help on using the changeset viewer.