summaryrefslogtreecommitdiff
path: root/src/VBox/Main/xml/ovfreader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/VBox/Main/xml/ovfreader.cpp')
-rw-r--r--src/VBox/Main/xml/ovfreader.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/VBox/Main/xml/ovfreader.cpp b/src/VBox/Main/xml/ovfreader.cpp
index be4a05cbf..0d8af9ceb 100644
--- a/src/VBox/Main/xml/ovfreader.cpp
+++ b/src/VBox/Main/xml/ovfreader.cpp
@@ -1,8 +1,8 @@
-/* $Id: ovfreader.cpp $ */
+/* $Id: ovfreader.cpp 37869 2011-07-11 12:42:46Z vboxsync $ */
/** @file
+ * OVF reader declarations.
*
- * OVF reader declarations. Depends only on IPRT, including the iprt::MiniString
- * and IPRT XML classes.
+ * Depends only on IPRT, including the RTCString and IPRT XML classes.
*/
/*
@@ -20,7 +20,6 @@
#include "ovfreader.h"
using namespace std;
-using namespace iprt;
using namespace ovf;
////////////////////////////////////////////////////////////////////////////////
@@ -36,7 +35,7 @@ using namespace ovf;
* @param cbSize the size of the memory buffer
* @param path path to a filename for error messages.
*/
-OVFReader::OVFReader(const void *pvBuf, size_t cbSize, const MiniString &path)
+OVFReader::OVFReader(const void *pvBuf, size_t cbSize, const RTCString &path)
: m_strPath(path)
{
xml::XmlMemParser parser;
@@ -52,7 +51,7 @@ OVFReader::OVFReader(const void *pvBuf, size_t cbSize, const MiniString &path)
* on XML or OVF invalidity.
* @param path
*/
-OVFReader::OVFReader(const MiniString &path)
+OVFReader::OVFReader(const RTCString &path)
: m_strPath(path)
{
xml::XmlFileParser parser;
@@ -508,7 +507,7 @@ void OVFReader::HandleVirtualSystemContent(const xml::ElementNode *pelmVirtualSy
i.ullVirtualQuantity,
UINT16_MAX,
i.ulLineNumber);
- break;
+ break;
case ResourceType_Memory: // 4
if ( (i.strAllocationUnits == "MegaBytes") // found in OVF created by OVF toolkit
@@ -521,7 +520,7 @@ void OVFReader::HandleVirtualSystemContent(const xml::ElementNode *pelmVirtualSy
m_strPath.c_str(),
i.strAllocationUnits.c_str(),
i.ulLineNumber);
- break;
+ break;
case ResourceType_IDEController: // 5
{
@@ -570,8 +569,8 @@ void OVFReader::HandleVirtualSystemContent(const xml::ElementNode *pelmVirtualSy
vsys.mapControllers[i.ulInstanceID] = hdc;
if (!pPrimaryIDEController)
pPrimaryIDEController = &vsys.mapControllers[i.ulInstanceID];
+ break;
}
- break;
case ResourceType_ParallelSCSIHBA: // 6 SCSI controller
{
@@ -589,8 +588,8 @@ void OVFReader::HandleVirtualSystemContent(const xml::ElementNode *pelmVirtualSy
hdc.strControllerType = i.strResourceSubType;
vsys.mapControllers[i.ulInstanceID] = hdc;
+ break;
}
- break;
case ResourceType_EthernetAdapter: // 10
{
@@ -615,12 +614,12 @@ void OVFReader::HandleVirtualSystemContent(const xml::ElementNode *pelmVirtualSy
ea.strAdapterType = i.strResourceSubType;
ea.strNetworkName = i.strConnection;
vsys.llEthernetAdapters.push_back(ea);
+ break;
}
- break;
case ResourceType_FloppyDrive: // 14
vsys.fHasFloppyDrive = true; // we have no additional information
- break;
+ break;
case ResourceType_CDDrive: // 15
/* <Item ovf:required="false">
@@ -635,11 +634,11 @@ void OVFReader::HandleVirtualSystemContent(const xml::ElementNode *pelmVirtualSy
// but then the ovftool dies with "Device backing not supported". So I guess if
// VMware can't export ISOs, then we don't need to be able to import them right now.
vsys.fHasCdromDrive = true; // we have no additional information
- break;
+ break;
case ResourceType_HardDisk: // 17
// handled separately in second loop below
- break;
+ break;
case ResourceType_OtherStorageDevice: // 20 SATA controller
{
@@ -652,8 +651,8 @@ void OVFReader::HandleVirtualSystemContent(const xml::ElementNode *pelmVirtualSy
<rasd:Address>0</rasd:Address>
<rasd:BusNumber>0</rasd:BusNumber>
</Item> */
- if ( i.strCaption.startsWith("sataController", MiniString::CaseInsensitive)
- && !i.strResourceSubType.compare("AHCI", MiniString::CaseInsensitive)
+ if ( i.strCaption.startsWith("sataController", RTCString::CaseInsensitive)
+ && !i.strResourceSubType.compare("AHCI", RTCString::CaseInsensitive)
)
{
HardDiskController hdc;
@@ -668,8 +667,8 @@ void OVFReader::HandleVirtualSystemContent(const xml::ElementNode *pelmVirtualSy
m_strPath.c_str(),
ResourceType_OtherStorageDevice,
i.ulLineNumber);
+ break;
}
- break;
case ResourceType_USBController: // 23
/* <Item ovf:required="false">
@@ -681,7 +680,7 @@ void OVFReader::HandleVirtualSystemContent(const xml::ElementNode *pelmVirtualSy
<rasd:BusNumber>0</rasd:BusNumber>
</Item> */
vsys.fHasUsbController = true; // we have no additional information
- break;
+ break;
case ResourceType_SoundCard: // 35
/* <Item ovf:required="false">
@@ -694,7 +693,7 @@ void OVFReader::HandleVirtualSystemContent(const xml::ElementNode *pelmVirtualSy
<rasd:AddressOnParent>3</rasd:AddressOnParent>
</Item> */
vsys.strSoundCardType = i.strResourceSubType;
- break;
+ break;
default:
{
@@ -767,9 +766,10 @@ void OVFReader::HandleVirtualSystemContent(const xml::ElementNode *pelmVirtualSy
i.ulLineNumber);
vsys.mapVirtualDisks[vd.strDiskId] = vd;
+ break;
}
- break;
- default: break;
+ default:
+ break;
}
}
}