Index: trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp	(revision 51051)
+++ trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp	(revision 51053)
@@ -215,6 +215,6 @@
     /* Prepare extra-data event-handler: */
     prepareExtraDataEventHandler();
-    /* Prepare extra-data map: */
-    prepareExtraDataMap();
+    /* Prepare global extra-data map: */
+    prepareGlobalExtraDataMap();
 }
 
@@ -277,26 +277,12 @@
 }
 
-void UIExtraDataManager::prepareExtraDataMap()
+void UIExtraDataManager::prepareGlobalExtraDataMap()
 {
     /* Get CVirtualBox: */
     CVirtualBox vbox = vboxGlobal().virtualBox();
-    /* Load extra-data map: */
-    if (!vboxGlobal().isVMConsoleProcess())
-    {
-        /* From CVirtualBox for Selector UI: */
-        foreach (const QString &strKey, vbox.GetExtraDataKeys())
-            m_data[strKey] = vbox.GetExtraData(strKey);
-    }
-    else
-    {
-        /* From CMachine for Runtime UI: */
-        const QString strMachineID = vboxGlobal().managedVMUuid();
-        CMachine machine = vbox.FindMachine(strMachineID);
-        AssertMsgReturnVoid(vbox.isOk() && !machine.isNull(),
-                            ("Machine with ID={%s} was not found!\n",
-                             strMachineID.toAscii().constData()));
-        foreach (const QString &strKey, machine.GetExtraDataKeys())
-            m_data[strKey] = machine.GetExtraData(strKey);
-    }
+
+    /* Load global extra-data map: */
+    foreach (const QString &strKey, vbox.GetExtraDataKeys())
+        m_data[QString()][strKey] = vbox.GetExtraData(strKey);
 }
 
@@ -314,4 +300,81 @@
 }
 
+void UIExtraDataManager::hotloadMachineExtraDataMap(const QString &strID) const
+{
+    /* Make sure it is not yet loaded: */
+    AssertReturnVoid(!strID.isNull() && !m_data.contains(strID));
+
+    /* Search for corresponding machine: */
+    CVirtualBox vbox = vboxGlobal().virtualBox();
+    CMachine machine = vbox.FindMachine(strID);
+    AssertReturnVoid(vbox.isOk() && !machine.isNull());
+
+    /* Make sure at least empty map is created: */
+    m_data[strID] = ExtraDataMap();
+
+    /* Do not handle inaccessible machine: */
+    if (!machine.GetAccessible())
+        return;
+
+    /* Load machine extra-data map: */
+    foreach (const QString &strKey, machine.GetExtraDataKeys())
+        m_data[strID][strKey] = machine.GetExtraData(strKey);
+}
+
+bool UIExtraDataManager::isFeatureAllowed(const QString &strKey, const QString &strID /* = QString() */) const
+{
+    /* Hot-load machine extra-data map if necessary: */
+    if (!strID.isNull() && !m_data.contains(strID))
+        hotloadMachineExtraDataMap(strID);
+
+    /* Access corresponding map: */
+    ExtraDataMap &data = m_data[strID];
+
+    /* 'false' if value was not set: */
+    if (!data.contains(strKey))
+        return false;
+
+    /* Check corresponding value: */
+    const QString &strValue = data[strKey];
+    return    strValue.compare("true", Qt::CaseInsensitive) == 0
+           || strValue.compare("yes", Qt::CaseInsensitive) == 0
+           || strValue.compare("on", Qt::CaseInsensitive) == 0
+           || strValue == "1";
+}
+
+QString UIExtraDataManager::extraDataString(const QString &strKey, const QString &strID /* = QString() */) const
+{
+    /* Hot-load machine extra-data map if necessary: */
+    if (!strID.isNull() && !m_data.contains(strID))
+        hotloadMachineExtraDataMap(strID);
+
+    /* Access corresponding map: */
+    ExtraDataMap &data = m_data[strID];
+
+    /* QString() if value was not set: */
+    if (!data.contains(strKey))
+        return QString();
+
+    /* Returns corresponding value: */
+    return data[strKey];
+}
+
+QStringList UIExtraDataManager::extraDataStringList(const QString &strKey, const QString &strID /* = QString() */) const
+{
+    /* Hot-load machine extra-data map if necessary: */
+    if (!strID.isNull() && !m_data.contains(strID))
+        hotloadMachineExtraDataMap(strID);
+
+    /* Access corresponding map: */
+    ExtraDataMap &data = m_data[strID];
+
+    /* QStringList() if machine value was not set: */
+    if (!data.contains(strKey))
+        return QStringList();
+
+    /* Returns corresponding value: */
+    return data[strKey].split(',', QString::SkipEmptyParts);
+}
+
 #include "UIExtraDataManager.moc"
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h	(revision 51051)
+++ trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h	(revision 51053)
@@ -27,4 +27,7 @@
 /* Forward declarations: */
 class UIExtraDataEventHandler;
+
+/* Type definitions: */
+typedef QMap<QString, QString> ExtraDataMap;
 
 /** Singleton QObject extension
@@ -75,6 +78,6 @@
     /** Prepare extra-data event-handler. */
     void prepareExtraDataEventHandler();
-    /** Prepare extra-data map. */
-    void prepareExtraDataMap();
+    /** Prepare global extra-data map. */
+    void prepareGlobalExtraDataMap();
 
     /** Cleanup Extra-data Manager. */
@@ -87,4 +90,19 @@
     // void cleanupExtraDataMap();
 
+    /** Hot-load machine extra-data map. */
+    void hotloadMachineExtraDataMap(const QString &strID) const;
+
+    /** Determines whether feature corresponding to passed @a strKey is allowed.
+      * If valid @a strID is set => applies to machine extra-data, otherwise => to global one. */
+    bool isFeatureAllowed(const QString &strKey, const QString &strID = QString()) const;
+
+    /** Returns extra-data value corresponding to passed @a strKey as QString.
+      * If valid @a strID is set => applies to machine extra-data, otherwise => to global one. */
+    QString extraDataString(const QString &strKey, const QString &strID = QString()) const;
+
+    /** Returns extra-data value corresponding to passed @a strKey as QStringList.
+      * If valid @a strID is set => applies to machine extra-data, otherwise => to global one. */
+    QStringList extraDataStringList(const QString &strKey, const QString &strID = QString()) const;
+
     /** Singleton Extra-data Manager instance. */
     static UIExtraDataManager *m_pInstance;
@@ -96,5 +114,5 @@
 
     /** Extra-data map. */
-    QMap<QString, QString> m_data;
+    mutable QMap<QString, ExtraDataMap> m_data;
 };
 
