VirtualBox

Changeset 14437 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Nov 20, 2008 9:37:06 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
39691
Message:

FE/Qt4: 2883: Structure OS list. Feature request implemented in base designed variant.

Location:
trunk/src/VBox/Main
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/Global.cpp

    r12406 r14437  
    3434     * NOTE2: please use powers of 2 when specifying the size of harddisks since
    3535     *        '2GB' looks better than '1.95GB' (= 2000MB) */
    36     { SchemaDefs_OSTypeId_unknown,     "Other/Unknown",       VBOXOSTYPE_Unknown,      64,   4,  2 * _1K },
    37     { SchemaDefs_OSTypeId_dos,         "DOS",                 VBOXOSTYPE_DOS,          32,   4,      512 },
    38     { SchemaDefs_OSTypeId_win31,       "Windows 3.1",         VBOXOSTYPE_Win31,        32,   4,  1 * _1K },
    39     { SchemaDefs_OSTypeId_win95,       "Windows 95",          VBOXOSTYPE_Win95,        64,   4,  2 * _1K },
    40     { SchemaDefs_OSTypeId_win98,       "Windows 98",          VBOXOSTYPE_Win98,        64,   4,  2 * _1K },
    41     { SchemaDefs_OSTypeId_winme,       "Windows Me",          VBOXOSTYPE_WinMe,        64,   4,  4 * _1K },
    42     { SchemaDefs_OSTypeId_winnt4,      "Windows NT 4",        VBOXOSTYPE_WinNT4,      128,   4,  2 * _1K },
    43     { SchemaDefs_OSTypeId_win2k,       "Windows 2000",        VBOXOSTYPE_Win2k,       168,  12,  4 * _1K },
    44     { SchemaDefs_OSTypeId_winxp,       "Windows XP",          VBOXOSTYPE_WinXP,       192,  12, 10 * _1K },
    45     { SchemaDefs_OSTypeId_win2k3,      "Windows Server 2003", VBOXOSTYPE_Win2k3,      256,  12, 20 * _1K },
    46     { SchemaDefs_OSTypeId_winvista,    "Windows Vista",       VBOXOSTYPE_WinVista,    512,  12, 20 * _1K },
    47     { SchemaDefs_OSTypeId_win2k8,      "Windows Server 2008", VBOXOSTYPE_Win2k8,      512,  12, 20 * _1K },
    48 /* @todo missing VBOXOSTYPE_OS2 */
    49     { SchemaDefs_OSTypeId_os2warp3,    "OS/2 Warp 3",         VBOXOSTYPE_OS2Warp3,     48,   4,  1 * _1K },
    50     { SchemaDefs_OSTypeId_os2warp4,    "OS/2 Warp 4",         VBOXOSTYPE_OS2Warp4,     64,   4,  2 * _1K },
    51     { SchemaDefs_OSTypeId_os2warp45,   "OS/2 Warp 4.5",       VBOXOSTYPE_OS2Warp45,    96,   4,  2 * _1K },
    52     { SchemaDefs_OSTypeId_ecs,         "eComStation",         VBOXOSTYPE_ECS,          96,   4,  2 * _1K },
    53     { SchemaDefs_OSTypeId_linux22,     "Linux 2.2",           VBOXOSTYPE_Linux22,      64,   4,  2 * _1K },
    54     { SchemaDefs_OSTypeId_linux24,     "Linux 2.4",           VBOXOSTYPE_Linux24,     128,   4,  4 * _1K },
    55     { SchemaDefs_OSTypeId_linux26,     "Linux 2.6",           VBOXOSTYPE_Linux26,     256,   4,  8 * _1K },
    56     { SchemaDefs_OSTypeId_archlinux,   "Arch Linux",          VBOXOSTYPE_ArchLinux,   256,  12,  8 * _1K },
    57     { SchemaDefs_OSTypeId_debian,      "Debian",              VBOXOSTYPE_Debian,      256,  12,  8 * _1K },
    58     { SchemaDefs_OSTypeId_opensuse,    "openSUSE",            VBOXOSTYPE_OpenSUSE,    256,  12,  8 * _1K },
    59     { SchemaDefs_OSTypeId_fedoracore,  "Fedora",              VBOXOSTYPE_FedoraCore,  256,  12,  8 * _1K },
    60     { SchemaDefs_OSTypeId_gentoo,      "Gentoo Linux",        VBOXOSTYPE_Gentoo,      256,  12,  8 * _1K },
    61     { SchemaDefs_OSTypeId_mandriva,    "Mandriva",            VBOXOSTYPE_Mandriva,    256,  12,  8 * _1K },
    62     { SchemaDefs_OSTypeId_redhat,      "Red Hat",             VBOXOSTYPE_RedHat,      256,  12,  8 * _1K },
    63     { SchemaDefs_OSTypeId_ubuntu,      "Ubuntu",              VBOXOSTYPE_Ubuntu,      256,  12,  8 * _1K },
    64     { SchemaDefs_OSTypeId_xandros,     "Xandros",             VBOXOSTYPE_Xandros,     256,  12,  8 * _1K },
    65     { SchemaDefs_OSTypeId_freebsd,     "FreeBSD",             VBOXOSTYPE_FreeBSD,      64,   4,  2 * _1K },
    66     { SchemaDefs_OSTypeId_openbsd,     "OpenBSD",             VBOXOSTYPE_OpenBSD,      64,   4,  2 * _1K },
    67     { SchemaDefs_OSTypeId_netbsd,      "NetBSD",              VBOXOSTYPE_NetBSD,       64,   4,  2 * _1K },
    68     { SchemaDefs_OSTypeId_netware,     "Netware",             VBOXOSTYPE_Netware,     512,   4,  4 * _1K },
    69     { SchemaDefs_OSTypeId_solaris,     "Solaris",             VBOXOSTYPE_Solaris,     512,  12, 16 * _1K },
    70     { SchemaDefs_OSTypeId_opensolaris, "OpenSolaris",         VBOXOSTYPE_OpenSolaris, 512,  12, 16 * _1K },
    71     { SchemaDefs_OSTypeId_l4,          "L4",                  VBOXOSTYPE_L4,           64,   4,  2 * _1K }
     36    { "Other",   "Other",             SchemaDefs_OSTypeId_Other,           "Other/Unknown",
     37      VBOXOSTYPE_Unknown,         false,  64,   4,  2 * _1K },
     38    { "Other",   "Other",             SchemaDefs_OSTypeId_DOS,             "DOS",
     39      VBOXOSTYPE_DOS,             false,  32,   4,      512 },
     40    { "Other",   "Other",             SchemaDefs_OSTypeId_Netware,         "Netware",
     41      VBOXOSTYPE_Netware,         false, 512,   4,  4 * _1K },
     42    { "Other",   "Other",             SchemaDefs_OSTypeId_L4,              "L4",
     43      VBOXOSTYPE_L4,              false,  64,   4,  2 * _1K },
     44    { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_Windows31,       "Windows 3.1",
     45      VBOXOSTYPE_Win31,           false,  32,   4,  1 * _1K },
     46    { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_Windows95,       "Windows 95",
     47      VBOXOSTYPE_Win95,           false,  64,   4,  2 * _1K },
     48    { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_Windows98,       "Windows 98",
     49      VBOXOSTYPE_Win98,           false,  64,   4,  2 * _1K },
     50    { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_WindowsMe,       "Windows Me",
     51      VBOXOSTYPE_WinMe,           false,  64,   4,  4 * _1K },
     52    { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_WindowsNT4,      "Windows NT 4",
     53      VBOXOSTYPE_WinNT4,          false, 128,   4,  2 * _1K },
     54    { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_Windows2000,     "Windows 2000",
     55      VBOXOSTYPE_Win2k,           false, 168,  12,  4 * _1K },
     56    { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_WindowsXP,       "Windows XP",
     57      VBOXOSTYPE_WinXP,           false, 192,  12, 10 * _1K },
     58    { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_WindowsXP_64,    "Windows XP (64 bit)",
     59      VBOXOSTYPE_WinXP_x64,       true,  192,  12, 10 * _1K },
     60    { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_Windows2003,     "Windows 2003",
     61      VBOXOSTYPE_Win2k3,          false, 256,  12, 20 * _1K },
     62    { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_Windows2003_64,  "Windows 2003 (64 bit)",
     63      VBOXOSTYPE_Win2k3_x64,      true,  256,  12, 20 * _1K },
     64    { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_WindowsVista,    "Windows Vista",
     65      VBOXOSTYPE_WinVista,        false, 512,  12, 20 * _1K },
     66    { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_WindowsVista_64, "Windows Vista (64 bit)",
     67      VBOXOSTYPE_WinVista_x64,    true,  512,  12, 20 * _1K },
     68    { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_Windows2008,     "Windows 2008",
     69      VBOXOSTYPE_Win2k8,          false, 512,  12, 20 * _1K },
     70    { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_Windows2008_64,  "Windows 2008 (64 bit)",
     71      VBOXOSTYPE_Win2k8_x64,      true,  512,  12, 20 * _1K },
     72    { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_WindowsNT,       "Other Windows",
     73      VBOXOSTYPE_WinNT,           false, 512,  12, 20 * _1K },
     74    { "OS2",     "IBM OS/2",          SchemaDefs_OSTypeId_OS2Warp3,        "OS/2 Warp 3",
     75      VBOXOSTYPE_OS2Warp3,        false,  48,   4,  1 * _1K },
     76    { "OS2",     "IBM OS/2",          SchemaDefs_OSTypeId_OS2Warp4,        "OS/2 Warp 4",
     77      VBOXOSTYPE_OS2Warp4,        false,  64,   4,  2 * _1K },
     78    { "OS2",     "IBM OS/2",          SchemaDefs_OSTypeId_OS2Warp45,       "OS/2 Warp 4.5",
     79      VBOXOSTYPE_OS2Warp45,       false,  96,   4,  2 * _1K },
     80    { "OS2",     "IBM OS/2",          SchemaDefs_OSTypeId_OS2eCS,          "eComStation",
     81      VBOXOSTYPE_ECS,             false,  96,   4,  2 * _1K },
     82    { "OS2",     "IBM OS/2",          SchemaDefs_OSTypeId_OS2,             "Other OS/2",
     83      VBOXOSTYPE_OS2,             false,  96,   4,  2 * _1K },
     84    { "Linux",   "Linux",             SchemaDefs_OSTypeId_Linux22,         "Linux 2.2",
     85      VBOXOSTYPE_Linux22,         false,  64,   4,  2 * _1K },
     86    { "Linux",   "Linux",             SchemaDefs_OSTypeId_Linux24,         "Linux 2.4",
     87      VBOXOSTYPE_Linux24,         false, 128,   4,  4 * _1K },
     88    { "Linux",   "Linux",             SchemaDefs_OSTypeId_Linux24_64,      "Linux 2.4 (64 bit)",
     89      VBOXOSTYPE_Linux24_x64,     true,  128,   4,  4 * _1K },
     90    { "Linux",   "Linux",             SchemaDefs_OSTypeId_Linux26,         "Linux 2.6",
     91      VBOXOSTYPE_Linux26,         false, 256,   4,  8 * _1K },
     92    { "Linux",   "Linux",             SchemaDefs_OSTypeId_Linux26_64,      "Linux 2.6 (64 bit)",
     93      VBOXOSTYPE_Linux26_x64,     true,  256,   4,  8 * _1K },
     94    { "Linux",   "Linux",             SchemaDefs_OSTypeId_ArchLinux,       "Arch Linux",
     95      VBOXOSTYPE_ArchLinux,       false, 256,  12,  8 * _1K },
     96    { "Linux",   "Linux",             SchemaDefs_OSTypeId_ArchLinux_64,    "Arch Linux (64 bit)",
     97      VBOXOSTYPE_ArchLinux_x64,   true,  256,  12,  8 * _1K },
     98    { "Linux",   "Linux",             SchemaDefs_OSTypeId_Debian,          "Debian",
     99      VBOXOSTYPE_Debian,          false, 256,  12,  8 * _1K },
     100    { "Linux",   "Linux",             SchemaDefs_OSTypeId_Debian_64,       "Debian (64 bit)",
     101      VBOXOSTYPE_Debian_x64,      true,  256,  12,  8 * _1K },
     102    { "Linux",   "Linux",             SchemaDefs_OSTypeId_OpenSUSE,        "openSUSE",
     103      VBOXOSTYPE_OpenSUSE,        false, 256,  12,  8 * _1K },
     104    { "Linux",   "Linux",             SchemaDefs_OSTypeId_OpenSUSE_64,     "openSUSE (64 bit)",
     105      VBOXOSTYPE_OpenSUSE_x64,    true,  256,  12,  8 * _1K },
     106    { "Linux",   "Linux",             SchemaDefs_OSTypeId_Fedora,          "Fedora",
     107      VBOXOSTYPE_FedoraCore,      false, 256,  12,  8 * _1K },
     108    { "Linux",   "Linux",             SchemaDefs_OSTypeId_Fedora_64,       "Fedora (64 bit)",
     109      VBOXOSTYPE_FedoraCore_x64,  true,  256,  12,  8 * _1K },
     110    { "Linux",   "Linux",             SchemaDefs_OSTypeId_Gentoo,          "Gentoo",
     111      VBOXOSTYPE_Gentoo,          false, 256,  12,  8 * _1K },
     112    { "Linux",   "Linux",             SchemaDefs_OSTypeId_Gentoo_64,       "Gentoo (64 bit)",
     113      VBOXOSTYPE_Gentoo_x64,      true,  256,  12,  8 * _1K },
     114    { "Linux",   "Linux",             SchemaDefs_OSTypeId_Mandriva,        "Mandriva",
     115      VBOXOSTYPE_Mandriva,        false, 256,  12,  8 * _1K },
     116    { "Linux",   "Linux",             SchemaDefs_OSTypeId_Mandriva_64,     "Mandriva (64 bit)",
     117      VBOXOSTYPE_Mandriva_x64,    true,  256,  12,  8 * _1K },
     118    { "Linux",   "Linux",             SchemaDefs_OSTypeId_RedHat,          "Red Hat",
     119      VBOXOSTYPE_RedHat,          false, 256,  12,  8 * _1K },
     120    { "Linux",   "Linux",             SchemaDefs_OSTypeId_RedHat_64,       "Red Hat (64 bit)",
     121      VBOXOSTYPE_RedHat_x64,      true,  256,  12,  8 * _1K },
     122    { "Linux",   "Linux",             SchemaDefs_OSTypeId_Ubuntu,          "Ubuntu",
     123      VBOXOSTYPE_Ubuntu,          false, 256,  12,  8 * _1K },
     124    { "Linux",   "Linux",             SchemaDefs_OSTypeId_Ubuntu_64,       "Ubuntu (64 bit)",
     125      VBOXOSTYPE_Ubuntu_x64,      true,  256,  12,  8 * _1K },
     126    { "Linux",   "Linux",             SchemaDefs_OSTypeId_Xandros,         "Xandros",
     127      VBOXOSTYPE_Xandros,         false, 256,  12,  8 * _1K },
     128    { "Linux",   "Linux",             SchemaDefs_OSTypeId_Xandros_64,      "Xandros (64 bit)",
     129      VBOXOSTYPE_Xandros_x64,     true,  256,  12,  8 * _1K },
     130    { "Linux",   "Linux",             SchemaDefs_OSTypeId_Linux,           "Other Linux",
     131      VBOXOSTYPE_Linux,           false, 256,  12,  8 * _1K },
     132    { "BSD",     "BSD",               SchemaDefs_OSTypeId_FreeBSD,         "FreeBSD",
     133      VBOXOSTYPE_FreeBSD,         false,  64,   4,  2 * _1K },
     134    { "BSD",     "BSD",               SchemaDefs_OSTypeId_FreeBSD_64,      "FreeBSD (64 bit)",
     135      VBOXOSTYPE_FreeBSD_x64,     true,   64,   4,  2 * _1K },
     136    { "BSD",     "BSD",               SchemaDefs_OSTypeId_OpenBSD,         "OpenBSD",
     137      VBOXOSTYPE_OpenBSD,         false,  64,   4,  2 * _1K },
     138    { "BSD",     "BSD",               SchemaDefs_OSTypeId_OpenBSD_64,      "OpenBSD (64 bit)",
     139      VBOXOSTYPE_OpenBSD_x64,     true,   64,   4,  2 * _1K },
     140    { "BSD",     "BSD",               SchemaDefs_OSTypeId_NetBSD,          "NetBSD",
     141      VBOXOSTYPE_NetBSD,          false,  64,   4,  2 * _1K },
     142    { "BSD",     "BSD",               SchemaDefs_OSTypeId_NetBSD_64,       "NetBSD (64 bit)",
     143      VBOXOSTYPE_NetBSD_x64,      true,   64,   4,  2 * _1K },
     144    { "Solaris", "Solaris",           SchemaDefs_OSTypeId_Solaris,         "Solaris",
     145      VBOXOSTYPE_Solaris,         false, 512,  12, 16 * _1K },
     146    { "Solaris", "Solaris",           SchemaDefs_OSTypeId_Solaris_64,      "Solaris (64 bit)",
     147      VBOXOSTYPE_Solaris_x64,     true,  512,  12, 16 * _1K },
     148    { "Solaris", "Solaris",           SchemaDefs_OSTypeId_OpenSolaris,     "OpenSolaris",
     149      VBOXOSTYPE_OpenSolaris,     false, 512,  12, 16 * _1K },
     150    { "Solaris", "Solaris",           SchemaDefs_OSTypeId_OpenSolaris_64,  "OpenSolaris (64 bit)",
     151      VBOXOSTYPE_OpenSolaris_x64, true,  512,  12, 16 * _1K }
    72152};
    73153
  • trunk/src/VBox/Main/GuestOSTypeImpl.cpp

    r8155 r14437  
    2929GuestOSType::GuestOSType()
    3030    : mOSType (VBOXOSTYPE_Unknown)
     31    , mIs64Bit (false)
    3132    , mRAMSize (0), mVRAMSize (0)
    3233    , mHDDSize (0), mMonitorCount (0)
     
    5556 *
    5657 * @returns COM result indicator
    57  * @param aId          os short name string
    58  * @param aDescription os name string
    59  * @param aOSType      global OS type ID
    60  * @param aRAMSize     recommended RAM size in megabytes
    61  * @param aVRAMSize    recommended video memory size in megabytes
    62  * @param aHDDSize     recommended HDD size in megabytes
    63  */
    64 HRESULT GuestOSType::init (const char *aId, const char *aDescription, VBOXOSTYPE aOSType,
     58 * @param aFamilyId          os family short name string
     59 * @param aFamilyDescription os family name string
     60 * @param aId                os short name string
     61 * @param aDescription       os name string
     62 * @param aOSType            global OS type ID
     63 * @param aIs64Bit           returns true if the given OS is 64-bit
     64 * @param aRAMSize           recommended RAM size in megabytes
     65 * @param aVRAMSize          recommended video memory size in megabytes
     66 * @param aHDDSize           recommended HDD size in megabytes
     67 */
     68HRESULT GuestOSType::init (const char *aFamilyId, const char *aFamilyDescription,
     69                           const char *aId, const char *aDescription,
     70                           VBOXOSTYPE aOSType, bool aIs64Bit,
    6571                           uint32_t aRAMSize, uint32_t aVRAMSize, uint32_t aHDDSize)
    6672{
    67     LogFlowThisFunc (("aId='%s', aDescription='%s', aType=%d, "
     73    LogFlowThisFunc (("aFamilyId='%s', aFamilyDescription='%s', "
     74                      "aId='%s', aDescription='%s', "
     75                      "aType=%d, aIs64Bit=%d, "
    6876                      "aRAMSize=%d, aVRAMSize=%d, aHDDSize=%d\n",
    69                       aId, aDescription, aOSType,
     77                      aFamilyId, aFamilyDescription,
     78                      aId, aDescription,
     79                      aOSType, aIs64Bit,
    7080                      aRAMSize, aVRAMSize, aHDDSize));
    7181
    72     ComAssertRet (aId && aDescription, E_INVALIDARG);
     82    ComAssertRet (aFamilyId && aFamilyDescription && aId && aDescription, E_INVALIDARG);
    7383
    7484    /* Enclose the state transition NotReady->InInit->Ready */
     
    7686    AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
    7787
     88    unconst (mFamilyID) = aFamilyId;
     89    unconst (mFamilyDescription) = aFamilyDescription;
    7890    unconst (mID) = aId;
    7991    unconst (mDescription) = aDescription;
    8092    unconst (mOSType) = aOSType;
     93    unconst (mIs64Bit) = aIs64Bit;
    8194    unconst (mRAMSize) = aRAMSize;
    8295    unconst (mVRAMSize) = aVRAMSize;
     
    104117/////////////////////////////////////////////////////////////////////////////
    105118
     119STDMETHODIMP GuestOSType::COMGETTER(FamilyId) (BSTR *aFamilyId)
     120{
     121    if (!aFamilyId)
     122        return E_POINTER;
     123
     124    AutoCaller autoCaller (this);
     125    CheckComRCReturnRC (autoCaller.rc());
     126
     127    /* mFamilyID is constant during life time, no need to lock */
     128    mFamilyID.cloneTo (aFamilyId);
     129
     130    return S_OK;
     131}
     132
     133STDMETHODIMP GuestOSType::COMGETTER(FamilyDescription) (BSTR *aFamilyDescription)
     134{
     135    if (!aFamilyDescription)
     136        return E_POINTER;
     137
     138    AutoCaller autoCaller (this);
     139    CheckComRCReturnRC (autoCaller.rc());
     140
     141    /* mFamilyDescription is constant during life time, no need to lock */
     142    mFamilyDescription.cloneTo (aFamilyDescription);
     143
     144    return S_OK;
     145}
     146
    106147STDMETHODIMP GuestOSType::COMGETTER(Id) (BSTR *aId)
    107148{
     
    132173}
    133174
     175STDMETHODIMP GuestOSType::COMGETTER(Is64Bit) (BOOL *aIs64Bit)
     176{
     177    if (!aIs64Bit)
     178        return E_POINTER;
     179
     180    AutoCaller autoCaller (this);
     181    CheckComRCReturnRC (autoCaller.rc());
     182
     183    /* mIs64Bit is constant during life time, no need to lock */
     184    *aIs64Bit = mIs64Bit;
     185
     186    return S_OK;
     187}
     188
    134189STDMETHODIMP GuestOSType::COMGETTER(RecommendedRAM) (ULONG *aRAMSize)
    135190{
  • trunk/src/VBox/Main/MachineImpl.cpp

    r14315 r14437  
    50165016            }
    50175017
    5018             /* CPUCount(optional, default is 1) */
    5019             Key CPUCountNode = cpuNode.findKey ("CPUCount");
    5020             if (!CPUCountNode.isNull())
    5021             {
    5022                 mHWData->mCPUCount = CPUCountNode.value <ULONG> ("count");
    5023             }
     5018            /* CPUCount (optional, default is 1) */
     5019            mHWData->mCPUCount = cpuNode.value <ULONG> ("count");
    50245020        }
    50255021    }
     
    50725068
    50735069        mHWData->mVRAMSize      = displayNode.value <ULONG> ("VRAMSize");
    5074         mHWData->mMonitorCount  = displayNode.value <ULONG> ("MonitorCount");
    5075         mHWData->mAccelerate3DEnabled = displayNode.value <bool> ("Accelerate3D");
     5070        mHWData->mMonitorCount  = displayNode.value <ULONG> ("monitorCount");
     5071        mHWData->mAccelerate3DEnabled = displayNode.value <bool> ("accelerate3D");
    50765072    }
    50775073
     
    63956391
    63966392        /* CPU count */
    6397         Key CPUCountNode = cpuNode.createKey ("CPUCount");
    6398         CPUCountNode.setValue <ULONG> ("count", mHWData->mCPUCount);
     6393        cpuNode.setValue <ULONG> ("count", mHWData->mCPUCount);
    63996394    }
    64006395
     
    64406435        Key displayNode = aNode.createKey ("Display");
    64416436        displayNode.setValue <ULONG> ("VRAMSize", mHWData->mVRAMSize);
    6442         displayNode.setValue <ULONG> ("MonitorCount", mHWData->mMonitorCount);
    6443         displayNode.setValue <bool> ("Accelerate3D", !!mHWData->mAccelerate3DEnabled);
     6437        displayNode.setValue <ULONG> ("monitorCount", mHWData->mMonitorCount);
     6438        displayNode.setValue <bool> ("accelerate3D", !!mHWData->mAccelerate3DEnabled);
    64446439    }
    64456440
  • trunk/src/VBox/Main/VirtualBoxImpl.cpp

    r14381 r14437  
    262262                if (SUCCEEDED (rc))
    263263                {
    264                     rc = guestOSTypeObj->init (Global::sOSTypes [i].id,
     264                    rc = guestOSTypeObj->init (Global::sOSTypes [i].familyId,
     265                                               Global::sOSTypes [i].familyDescription,
     266                                               Global::sOSTypes [i].id,
    265267                                               Global::sOSTypes [i].description,
    266268                                               Global::sOSTypes [i].osType,
     269                                               Global::sOSTypes [i].is64Bit,
    267270                                               Global::sOSTypes [i].recommendedRAM,
    268271                                               Global::sOSTypes [i].recommendedVRAM,
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r14405 r14437  
    27432743    </attribute>
    27442744
    2745     <attribute name="Accelerate3DEnabled" type="boolean" default="false">
     2745    <attribute name="accelerate3DEnabled" type="boolean" default="false">
    27462746      <desc>
    27472747        This setting determines whether VirtualBox allows guests to make use
     
    27502750    </attribute>
    27512751
    2752     <attribute name="MonitorCount" type="unsigned long">
     2752    <attribute name="monitorCount" type="unsigned long">
    27532753      <desc>
    27542754        Number of virtual monitors.
     
    55345534    </desc>
    55355535
     5536    <attribute name="familyId" type="wstring" readonly="yes">
     5537      <desc>Guest OS family identifier string.</desc>
     5538    </attribute>
     5539
     5540    <attribute name="familyDescription" type="wstring" readonly="yes">
     5541      <desc>Human readable description of the guest OS family.</desc>
     5542    </attribute>
     5543
    55365544    <attribute name="id" type="wstring" readonly="yes">
    55375545      <desc>Guest OS identifier string.</desc>
     
    55405548    <attribute name="description" type="wstring" readonly="yes">
    55415549      <desc>Human readable description of the guest OS.</desc>
     5550    </attribute>
     5551
     5552    <attribute name="is64Bit" type="boolean" readonly="yes">
     5553      <desc>Returns @c true if the given OS is 64-bit</desc>
    55425554    </attribute>
    55435555
  • trunk/src/VBox/Main/include/Global.h

    r9361 r14437  
    4343    struct OSType
    4444    {
    45         const char    *id;          /* utf-8 */
    46         const char    *description; /* utf-8 */
    47         const VBOXOSTYPE osType;
    48         const uint32_t recommendedRAM;
    49         const uint32_t recommendedVRAM;
    50         const uint32_t recommendedHDD;
     45        const char       *familyId;          /* utf-8 */
     46        const char       *familyDescription; /* utf-8 */
     47        const char       *id;          /* utf-8 */
     48        const char       *description; /* utf-8 */
     49        const VBOXOSTYPE  osType;
     50        const bool        is64Bit;
     51        const uint32_t    recommendedRAM;
     52        const uint32_t    recommendedVRAM;
     53        const uint32_t    recommendedHDD;
    5154    };
    5255
  • trunk/src/VBox/Main/include/GuestOSTypeImpl.h

    r13580 r14437  
    5555
    5656    // public initializer/uninitializer for internal purposes only
    57     HRESULT init (const char *aId, const char *aDescription, VBOXOSTYPE aOSType,
     57    HRESULT init (const char *aFamilyId, const char *aFamilyDescription,
     58                  const char *aId, const char *aDescription,
     59                  VBOXOSTYPE aOSType, bool aIs64Bit,
    5860                  uint32_t aRAMSize, uint32_t aVRAMSize, uint32_t aHDDSize);
    5961    void uninit();
    6062
    6163    // IGuestOSType properties
     64    STDMETHOD(COMGETTER(FamilyId)) (BSTR *aFamilyId);
     65    STDMETHOD(COMGETTER(FamilyDescription)) (BSTR *aFamilyDescription);
    6266    STDMETHOD(COMGETTER(Id)) (BSTR *aId);
    6367    STDMETHOD(COMGETTER(Description)) (BSTR *aDescription);
     68    STDMETHOD(COMGETTER(Is64Bit)) (BOOL *aIs64Bit);
    6469    STDMETHOD(COMGETTER(RecommendedRAM)) (ULONG *aRAMSize);
    6570    STDMETHOD(COMGETTER(RecommendedVRAM)) (ULONG *aVRAMSize);
     
    7479private:
    7580
     81    const Bstr mFamilyID;
     82    const Bstr mFamilyDescription;
    7683    const Bstr mID;
    7784    const Bstr mDescription;
    7885    const VBOXOSTYPE mOSType;
     86    const bool mIs64Bit;
    7987    const uint32_t mRAMSize;
    8088    const uint32_t mVRAMSize;
  • trunk/src/VBox/Main/include/VirtualBoxXMLUtil.h

    r13580 r14437  
    2929
    3030/** VirtualBox XML settings version number substring ("x.y")  */
    31 #define VBOX_XML_VERSION        "1.4"
     31#define VBOX_XML_VERSION        "1.5"
    3232
    3333/** VirtualBox XML settings version platform substring */
  • trunk/src/VBox/Main/xml/SchemaDefs.xsl

    r13724 r14437  
    159159    <xsl:with-param name="member" select="'        MinCPUCount'"/>
    160160    <xsl:with-param name="select" select="
    161       xsd:complexType[@name='TCPUCount']/xsd:attribute[@name='count']//xsd:minInclusive/@value
     161      xsd:simpleType[@name='TCPUCount']//xsd:minInclusive/@value
    162162    "/>
    163163  </xsl:call-template>
     
    165165    <xsl:with-param name="member" select="'        MaxCPUCount'"/>
    166166    <xsl:with-param name="select" select="
    167       xsd:complexType[@name='TCPUCount']/xsd:attribute[@name='count']//xsd:maxInclusive/@value
     167      xsd:simpleType[@name='TCPUCount']//xsd:maxInclusive/@value
    168168    "/>
    169169  </xsl:call-template>
     
    172172    <xsl:with-param name="member" select="'        MaxGuestMonitors'"/>
    173173    <xsl:with-param name="select" select="
    174       xsd:complexType[@name='TDisplay']/xsd:attribute[@name='MonitorCount']//xsd:maxInclusive/@value
     174      xsd:complexType[@name='TDisplay']/xsd:attribute[@name='monitorCount']//xsd:maxInclusive/@value
    175175    "/>
    176176  </xsl:call-template>
  • trunk/src/VBox/Main/xml/SettingsConverter.xsl

    r13592 r14437  
    117117    <xsl:attribute name="version"><xsl:value-of select="concat('1.4','-',$curVerPlat)"/></xsl:attribute>
    118118    <xsl:apply-templates select="node()" mode="v1.4"/>
     119  </xsl:copy>
     120</xsl:template>
     121
     122<!-- 1.4 => 1.5 -->
     123<xsl:template match="/vb:VirtualBox[substring-before(@version,'-')='1.4']">
     124  <xsl:copy>
     125    <xsl:attribute name="version"><xsl:value-of select="concat('1.5','-',$curVerPlat)"/></xsl:attribute>
     126    <xsl:apply-templates select="node()" mode="v1.5"/>
    119127  </xsl:copy>
    120128</xsl:template>
     
    587595-->
    588596
     597<!--
     598 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     599 *  1.4 => 1.5
     600 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     601-->
     602
     603<!--
     604 *  all non-root elements that are not explicitly matched are copied as is
     605-->
     606<xsl:template match="@*|node()[../..]" mode="v1.5">
     607  <xsl:copy>
     608    <xsl:apply-templates select="@*|node()[../..]" mode="v1.5"/>
     609  </xsl:copy>
     610</xsl:template>
     611
     612<!--
     613 *  Global settings
     614-->
     615
     616<!--
     617 *  Machine settings
     618-->
     619
     620<xsl:template match="vb:VirtualBox[substring-before(@version,'-')='1.4']/
     621                     vb:Machine"
     622              mode="v1.5">
     623  <xsl:copy>
     624    <xsl:attribute name="OSType">
     625      <xsl:choose>
     626        <xsl:when test="@OSType='unknown'">Other</xsl:when>
     627        <xsl:when test="@OSType='dos'">DOS</xsl:when>
     628        <xsl:when test="@OSType='win31'">Windows31</xsl:when>
     629        <xsl:when test="@OSType='win95'">Windows95</xsl:when>
     630        <xsl:when test="@OSType='win98'">Windows98</xsl:when>
     631        <xsl:when test="@OSType='winme'">WindowsMe</xsl:when>
     632        <xsl:when test="@OSType='winnt4'">WindowsNT4</xsl:when>
     633        <xsl:when test="@OSType='win2k'">Windows2000</xsl:when>
     634        <xsl:when test="@OSType='winxp'">WindowsXP</xsl:when>
     635        <xsl:when test="@OSType='win2k3'">Windows2003</xsl:when>
     636        <xsl:when test="@OSType='winvista'">WindowsVista</xsl:when>
     637        <xsl:when test="@OSType='win2k8'">Windows2008</xsl:when>
     638        <xsl:when test="@OSType='os2warp3'">OS2Warp3</xsl:when>
     639        <xsl:when test="@OSType='os2warp4'">OS2Warp4</xsl:when>
     640        <xsl:when test="@OSType='os2warp45'">OS2Warp45</xsl:when>
     641        <xsl:when test="@OSType='ecs'">OS2eCS</xsl:when>
     642        <xsl:when test="@OSType='linux22'">Linux22</xsl:when>
     643        <xsl:when test="@OSType='linux24'">Linux24</xsl:when>
     644        <xsl:when test="@OSType='linux26'">Linux26</xsl:when>
     645        <xsl:when test="@OSType='archlinux'">ArchLinux</xsl:when>
     646        <xsl:when test="@OSType='debian'">Debian</xsl:when>
     647        <xsl:when test="@OSType='opensuse'">OpenSUSE</xsl:when>
     648        <xsl:when test="@OSType='fedoracore'">Fedora</xsl:when>
     649        <xsl:when test="@OSType='gentoo'">Gentoo</xsl:when>
     650        <xsl:when test="@OSType='mandriva'">Mandriva</xsl:when>
     651        <xsl:when test="@OSType='redhat'">RedHat</xsl:when>
     652        <xsl:when test="@OSType='ubuntu'">Ubuntu</xsl:when>
     653        <xsl:when test="@OSType='xandros'">Xandros</xsl:when>
     654        <xsl:when test="@OSType='freebsd'">FreeBSD</xsl:when>
     655        <xsl:when test="@OSType='openbsd'">OpenBSD</xsl:when>
     656        <xsl:when test="@OSType='netbsd'">NetBSD</xsl:when>
     657        <xsl:when test="@OSType='netware'">Netware</xsl:when>
     658        <xsl:when test="@OSType='solaris'">Solaris</xsl:when>
     659        <xsl:when test="@OSType='opensolaris'">OpenSolaris</xsl:when>
     660        <xsl:when test="@OSType='l4'">L4</xsl:when>
     661      </xsl:choose>
     662    </xsl:attribute>
     663    <xsl:apply-templates select="@*[name()!='OSType']" mode="v1.5"/>
     664    <xsl:apply-templates select="node()" mode="v1.5"/>
     665  </xsl:copy>
     666</xsl:template>
     667
     668<xsl:template match="vb:VirtualBox[substring-before(@version,'-')='1.4']/
     669                     vb:Machine//vb:Hardware/vb:Display"
     670              mode="v1.5">
     671  <xsl:copy>
     672    <xsl:apply-templates select="node()" mode="v1.5"/>
     673    <xsl:for-each select="@*">
     674      <xsl:choose>
     675        <xsl:when test="name()='MonitorCount'">
     676          <xsl:attribute name="monitorCount"><xsl:value-of select="."/></xsl:attribute>
     677        </xsl:when>
     678        <xsl:when test="name()='Accelerate3D'">
     679          <xsl:attribute name="accelerate3D"><xsl:value-of select="."/></xsl:attribute>
     680        </xsl:when>
     681        <xsl:otherwise>
     682          <xsl:apply-templates select="." mode="v1.5"/>
     683        </xsl:otherwise>
     684      </xsl:choose>
     685    </xsl:for-each>
     686  </xsl:copy>
     687</xsl:template>
     688
     689<!--
     690-->
     691
     692<xsl:template match="vb:VirtualBox[substring-before(@version,'-')='1.4']/
     693                     vb:Machine//vb:Hardware/vb:CPU"
     694              mode="v1.5">
     695  <xsl:copy>
     696    <xsl:attribute name="count"><xsl:value-of select="vb:CPUCount/@count"/></xsl:attribute>
     697    <xsl:apply-templates select="@*" mode="v1.5"/>
     698    <xsl:apply-templates select="node()[not(self::vb:CPUCount)]" mode="v1.5"/>
     699  </xsl:copy>
     700</xsl:template>
     701
    589702
    590703<!-- @todo add lastStateChange with the current timestamp if missing.
  • trunk/src/VBox/Main/xml/VirtualBox-settings-common.xsd

    r14224 r14437  
    135135<xsd:simpleType name="TGuestOSType">
    136136  <xsd:restriction base="xsd:string">
    137     <!-- @todo on next format change, rename dos to DOS, win2k3 to Win2003 and
    138     so on. Possibly also use prefixes that determine the platform family:
    139     Win_31, Win_Vista, Linux_ArchLinux, Unix_FreeBSD and so on. -->
    140     <xsd:enumeration value="unknown"/>
    141     <xsd:enumeration value="dos"/>
    142     <xsd:enumeration value="win31"/>
    143     <xsd:enumeration value="win95"/>
    144     <xsd:enumeration value="win98"/>
    145     <xsd:enumeration value="winme"/>
    146     <xsd:enumeration value="winnt4"/>
    147     <xsd:enumeration value="win2k"/>
    148     <xsd:enumeration value="winxp"/>
    149     <xsd:enumeration value="win2k3"/>
    150     <xsd:enumeration value="winvista"/>
    151     <xsd:enumeration value="win2k8"/>
    152     <xsd:enumeration value="os2warp3"/>
    153     <xsd:enumeration value="os2warp4"/>
    154     <xsd:enumeration value="os2warp45"/>
    155     <xsd:enumeration value="ecs"/>
    156     <xsd:enumeration value="linux22"/>
    157     <xsd:enumeration value="linux24"/>
    158     <xsd:enumeration value="linux26"/>
    159     <xsd:enumeration value="archlinux"/>
    160     <xsd:enumeration value="debian"/>
    161     <xsd:enumeration value="opensuse"/>
    162     <xsd:enumeration value="fedoracore"/>
    163     <xsd:enumeration value="gentoo"/>
    164     <xsd:enumeration value="mandriva"/>
    165     <xsd:enumeration value="redhat"/>
    166     <xsd:enumeration value="ubuntu"/>
    167     <xsd:enumeration value="xandros"/>
    168     <xsd:enumeration value="freebsd"/>
    169     <xsd:enumeration value="openbsd"/>
    170     <xsd:enumeration value="netbsd"/>
    171     <xsd:enumeration value="netware"/>
    172     <xsd:enumeration value="solaris"/>
    173     <xsd:enumeration value="opensolaris"/>
    174     <xsd:enumeration value="l4"/>
     137    <xsd:enumeration value="Other"/>
     138    <xsd:enumeration value="DOS"/>
     139    <xsd:enumeration value="Netware"/>
     140    <xsd:enumeration value="L4"/>
     141    <xsd:enumeration value="Windows31"/>
     142    <xsd:enumeration value="Windows95"/>
     143    <xsd:enumeration value="Windows98"/>
     144    <xsd:enumeration value="WindowsMe"/>
     145    <xsd:enumeration value="WindowsNT4"/>
     146    <xsd:enumeration value="Windows2000"/>
     147    <xsd:enumeration value="WindowsXP"/>
     148    <xsd:enumeration value="WindowsXP_64"/>
     149    <xsd:enumeration value="Windows2003"/>
     150    <xsd:enumeration value="Windows2003_64"/>
     151    <xsd:enumeration value="WindowsVista"/>
     152    <xsd:enumeration value="WindowsVista_64"/>
     153    <xsd:enumeration value="Windows2008"/>
     154    <xsd:enumeration value="Windows2008_64"/>
     155    <xsd:enumeration value="WindowsNT"/>
     156    <xsd:enumeration value="OS2Warp3"/>
     157    <xsd:enumeration value="OS2Warp4"/>
     158    <xsd:enumeration value="OS2Warp45"/>
     159    <xsd:enumeration value="OS2eCS"/>
     160    <xsd:enumeration value="OS2"/>
     161    <xsd:enumeration value="Linux22"/>
     162    <xsd:enumeration value="Linux24"/>
     163    <xsd:enumeration value="Linux24_64"/>
     164    <xsd:enumeration value="Linux26"/>
     165    <xsd:enumeration value="Linux26_64"/>
     166    <xsd:enumeration value="ArchLinux"/>
     167    <xsd:enumeration value="ArchLinux_64"/>
     168    <xsd:enumeration value="Debian"/>
     169    <xsd:enumeration value="Debian_64"/>
     170    <xsd:enumeration value="OpenSUSE"/>
     171    <xsd:enumeration value="OpenSUSE_64"/>
     172    <xsd:enumeration value="Fedora"/>
     173    <xsd:enumeration value="Fedora_64"/>
     174    <xsd:enumeration value="Gentoo"/>
     175    <xsd:enumeration value="Gentoo_64"/>
     176    <xsd:enumeration value="Mandriva"/>
     177    <xsd:enumeration value="Mandriva_64"/>
     178    <xsd:enumeration value="RedHat"/>
     179    <xsd:enumeration value="RedHat_64"/>
     180    <xsd:enumeration value="Ubuntu"/>
     181    <xsd:enumeration value="Ubuntu_64"/>
     182    <xsd:enumeration value="Xandros"/>
     183    <xsd:enumeration value="Xandros_64"/>
     184    <xsd:enumeration value="Linux"/>
     185    <xsd:enumeration value="FreeBSD"/>
     186    <xsd:enumeration value="FreeBSD_64"/>
     187    <xsd:enumeration value="OpenBSD"/>
     188    <xsd:enumeration value="OpenBSD_64"/>
     189    <xsd:enumeration value="NetBSD"/>
     190    <xsd:enumeration value="NetBSD_64"/>
     191    <xsd:enumeration value="Solaris"/>
     192    <xsd:enumeration value="Solaris_64"/>
     193    <xsd:enumeration value="OpenSolaris"/>
     194    <xsd:enumeration value="OpenSolaris_64"/>
    175195  </xsd:restriction>
    176196</xsd:simpleType>
     
    393413</xsd:complexType>
    394414
    395 <xsd:complexType name="TCPUCount">
    396   <xsd:attribute name="count">
    397     <xsd:simpleType>
    398       <xsd:restriction base="xsd:unsignedInt">
    399         <xsd:minInclusive value="1"/>
    400         <xsd:maxInclusive value="255"/>
    401       </xsd:restriction>
    402     </xsd:simpleType>
    403   </xsd:attribute>
    404 </xsd:complexType>
     415<xsd:simpleType name="TCPUCount">
     416  <xsd:restriction base="xsd:unsignedInt">
     417    <xsd:minInclusive value="1"/>
     418    <xsd:maxInclusive value="255"/>
     419  </xsd:restriction>
     420</xsd:simpleType>
    405421
    406422<xsd:complexType name="TCPU">
     
    410426    <xsd:element name="HardwareVirtExVPID" type="THWVirtExVPIDType" minOccurs="0"/>
    411427    <xsd:element name="PAE" type="TPAEType" minOccurs="0"/>
    412     <xsd:element name="CPUCount" type="TCPUCount" minOccurs="0"/>
    413   </xsd:sequence>
     428  </xsd:sequence>
     429  <xsd:attribute name="count" type="TCPUCount" default="1"/>
    414430</xsd:complexType>
    415431
     
    441457    </xsd:simpleType>
    442458  </xsd:attribute>
    443   <xsd:attribute name="MonitorCount" default="1">
     459  <xsd:attribute name="monitorCount" default="1">
    444460    <xsd:simpleType>
    445461      <xsd:restriction base="xsd:unsignedInt">
     
    448464    </xsd:simpleType>
    449465  </xsd:attribute>
    450   <xsd:attribute name="Accelerate3D" type="xsd:boolean" default="false"/>
     466  <xsd:attribute name="accelerate3D" type="xsd:boolean" default="false"/>
    451467</xsd:complexType>
    452468
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette