Index: trunk/src/VBox/Frontends/VirtualBox/src/globals/COMDefs.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/globals/COMDefs.h	(revision 30025)
+++ trunk/src/VBox/Frontends/VirtualBox/src/globals/COMDefs.h	(revision 30026)
@@ -78,6 +78,8 @@
 /* Qt includes */
 #include <QString>
+#include <QRect>
 #include <QUuid>
 #include <QVector>
+#include <QList>
 #include <QMetaType>
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/globals/COMWrappers.xsl
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/globals/COMWrappers.xsl	(revision 30025)
+++ trunk/src/VBox/Frontends/VirtualBox/src/globals/COMWrappers.xsl	(revision 30026)
@@ -379,4 +379,25 @@
 </xsl:template>
 
+<xsl:template name="declareExtraDataHelpers">
+
+<xsl:text>    void SetExtraDataBool(const QString &amp;strKey, bool fValue);
+    bool GetExtraDataBool(const QString &amp;strKey, bool fDef = true);
+
+    void SetExtraDataInt(const QString &amp;strKey, int value);
+    int GetExtraDataInt(const QString &amp;strKey, int def = 0);
+
+    void SetExtraDataRect(const QString &amp;strKey, const QRect &amp;value);
+    QRect GetExtraDataRect(const QString &amp;strKey, const QRect &amp;def = QRect());
+
+    void SetExtraDataStringList(const QString &amp;strKey, const QStringList &amp;value);
+    QStringList GetExtraDataStringList(const QString &amp;strKey);
+
+    void SetExtraDataIntList(const QString &amp;strKey, const QList&lt;int&gt; &amp;value);
+    QList&lt;int&gt; GetExtraDataIntList(const QString &amp;strKey);
+
+</xsl:text>
+
+</xsl:template>
+
 <xsl:template name="declareMembers">
 
@@ -476,4 +497,11 @@
     <xsl:with-param name="iface" select="."/>
   </xsl:call-template>
+
+  <xsl:if test="@name='IVirtualBox' or @name='IMachine'">
+    <xsl:text>    // ExtraData helpers&#x0A;&#x0A;</xsl:text>
+    <xsl:call-template name="declareExtraDataHelpers">
+      <xsl:with-param name="iface" select="."/>
+    </xsl:call-template>
+  </xsl:if>
 
   <xsl:text>    // friend wrappers&#x0A;&#x0A;</xsl:text>
@@ -651,4 +679,151 @@
 </xsl:template>
 
+<xsl:template name="defineExtraDataHelpers">
+
+  <xsl:param name="iface"/>
+
+  <xsl:text>void C</xsl:text>
+  <xsl:value-of select="substring(@name,2)"/>
+  <xsl:text>::SetExtraDataBool(const QString &amp;strKey, bool fValue)</xsl:text>
+<xsl:text>
+{
+    SetExtraData(strKey, fValue == true ? "true" : "false");
+}
+
+</xsl:text>
+
+  <xsl:text>bool C</xsl:text>
+  <xsl:value-of select="substring(@name,2)"/>
+  <xsl:text>::GetExtraDataBool(const QString &amp;strKey, bool fDef /* = true */)</xsl:text>
+<xsl:text>
+{
+    bool fResult = fDef;
+    QString value = GetExtraData(strKey);
+    if (   value == "true" 
+        || value == "on"
+        || value == "yes")
+        fResult = true;
+    else if (   value == "false"
+             || value == "off"
+             || value == "no")
+             fResult = false;
+    return fResult;
+}
+
+</xsl:text>
+
+  <xsl:text>void C</xsl:text>
+  <xsl:value-of select="substring(@name,2)"/>
+  <xsl:text>::SetExtraDataInt(const QString &amp;strKey, int value)</xsl:text>
+<xsl:text>
+{
+    SetExtraData(strKey, QString::number(value));
+}
+
+</xsl:text>
+
+  <xsl:text>int C</xsl:text>
+  <xsl:value-of select="substring(@name,2)"/>
+  <xsl:text>::GetExtraDataInt(const QString &amp;strKey, int def /* = 0 */)</xsl:text>
+<xsl:text>
+{
+    QString value = GetExtraData(strKey);
+    bool fOk;
+    int result = value.toInt(&amp;fOk);
+    if (fOk)
+        return result;
+    return def;
+}
+
+</xsl:text>
+
+  <xsl:text>void C</xsl:text>
+  <xsl:value-of select="substring(@name,2)"/>
+  <xsl:text>::SetExtraDataRect(const QString &amp;strKey, const QRect &amp;value)</xsl:text>
+<xsl:text>
+{
+    SetExtraData(strKey, QString("%1,%2,%3,%4")
+                         .arg(value.x())
+                         .arg(value.y())
+                         .arg(value.width())
+                         .arg(value.height()));
+}
+
+</xsl:text>
+
+  <xsl:text>QRect C</xsl:text>
+  <xsl:value-of select="substring(@name,2)"/>
+  <xsl:text>::GetExtraDataRect(const QString &amp;strKey, const QRect &amp;def /* = QRect() */)</xsl:text>
+<xsl:text>
+{
+    QRect result = def;
+    QList&lt;int&gt; intList = GetExtraDataIntList(strKey);
+    if (intList.size() == 4)
+    {
+        result.setRect(intList.at(0),
+                       intList.at(1),
+                       intList.at(2),
+                       intList.at(3));
+    }
+    return result;
+}
+
+</xsl:text>
+
+  <xsl:text>void C</xsl:text>
+  <xsl:value-of select="substring(@name,2)"/>
+  <xsl:text>::SetExtraDataStringList(const QString &amp;strKey, const QStringList &amp;value)</xsl:text>
+<xsl:text>
+{
+    SetExtraData(strKey, value.join(","));
+}
+
+</xsl:text>
+
+  <xsl:text>QStringList C</xsl:text>
+  <xsl:value-of select="substring(@name,2)"/>
+  <xsl:text>::GetExtraDataStringList(const QString &amp;strKey)</xsl:text>
+<xsl:text>
+{
+    return GetExtraData(strKey).split(",");
+}
+
+</xsl:text>
+
+  <xsl:text>void C</xsl:text>
+  <xsl:value-of select="substring(@name,2)"/>
+  <xsl:text>::SetExtraDataIntList(const QString &amp;strKey, const QList&lt;int&gt; &amp;value)</xsl:text>
+<xsl:text>
+{
+    QStringList strList;
+    for (int i=0; i &lt; value.size(); ++i)
+        strList &lt;&lt; QString::number(value.at(i));
+    SetExtraDataStringList(strKey, strList);
+}
+
+</xsl:text>
+
+  <xsl:text>QList&lt;int&gt; C</xsl:text>
+  <xsl:value-of select="substring(@name,2)"/>
+  <xsl:text>::GetExtraDataIntList(const QString &amp;strKey)</xsl:text>
+<xsl:text>
+{
+    bool fOk;
+    QList&lt;int&gt; intList;
+    QStringList strList = GetExtraDataStringList(strKey);
+    for (int i=0; i &lt; strList.size(); ++i)
+    {
+        intList &lt;&lt; strList.at(i).toInt(&amp;fOk);
+        if (!fOk)
+            return QList&lt;int&gt;();
+
+    }
+    return intList;
+}
+
+</xsl:text>
+
+</xsl:template>
+
 <xsl:template name="defineMembers">
   <xsl:call-template name="defineAttributes">
@@ -658,4 +833,10 @@
     <xsl:with-param name="iface" select="."/>
   </xsl:call-template>
+  <xsl:if test="@name='IVirtualBox' or @name='IMachine'">
+    <xsl:text>// ExtraData helpers&#x0A;&#x0A;</xsl:text>
+    <xsl:call-template name="defineExtraDataHelpers">
+      <xsl:with-param name="iface" select="."/>
+    </xsl:call-template>
+  </xsl:if>
 </xsl:template>
 
