VirtualBox

source: vbox/trunk/src/VBox/Main/include/GuestOSTypeImpl.h@ 16560

Last change on this file since 16560 was 15064, checked in by vboxsync, 15 years ago

Added QNX guest OS type. Cleaned up the guest OS table.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.6 KB
Line 
1/** @file
2 *
3 * VirtualBox COM class implementation
4 */
5
6/*
7 * Copyright (C) 2006-2007 Sun Microsystems, Inc.
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 *
17 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
18 * Clara, CA 95054 USA or visit http://www.sun.com if you need
19 * additional information or have any questions.
20 */
21
22#ifndef ____H_GUESTOSTYPEIMPL
23#define ____H_GUESTOSTYPEIMPL
24
25#include "VirtualBoxBase.h"
26#include "Collection.h"
27#include "Global.h"
28
29#include <VBox/ostypes.h>
30
31class ATL_NO_VTABLE GuestOSType :
32 public VirtualBoxBaseNEXT,
33 public VirtualBoxSupportErrorInfoImpl <GuestOSType, IGuestOSType>,
34 public VirtualBoxSupportTranslation <GuestOSType>,
35 public IGuestOSType
36{
37public:
38
39 VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT (GuestOSType)
40
41 DECLARE_NOT_AGGREGATABLE(GuestOSType)
42
43 DECLARE_PROTECT_FINAL_CONSTRUCT()
44
45 BEGIN_COM_MAP(GuestOSType)
46 COM_INTERFACE_ENTRY(ISupportErrorInfo)
47 COM_INTERFACE_ENTRY(IGuestOSType)
48 END_COM_MAP()
49
50 NS_DECL_ISUPPORTS
51
52 DECLARE_EMPTY_CTOR_DTOR (GuestOSType)
53
54 HRESULT FinalConstruct();
55 void FinalRelease();
56
57 // public initializer/uninitializer for internal purposes only
58 HRESULT init (const char *aFamilyId, const char *aFamilyDescription,
59 const char *aId, const char *aDescription,
60 VBOXOSTYPE aOSType, uint32_t aOSHint,
61 uint32_t aRAMSize, uint32_t aVRAMSize, uint32_t aHDDSize,
62 NetworkAdapterType_T aNetworkAdapterType);
63 void uninit();
64
65 // IGuestOSType properties
66 STDMETHOD(COMGETTER(FamilyId)) (BSTR *aFamilyId);
67 STDMETHOD(COMGETTER(FamilyDescription)) (BSTR *aFamilyDescription);
68 STDMETHOD(COMGETTER(Id)) (BSTR *aId);
69 STDMETHOD(COMGETTER(Description)) (BSTR *aDescription);
70 STDMETHOD(COMGETTER(Is64Bit)) (BOOL *aIs64Bit);
71 STDMETHOD(COMGETTER(RecommendedIOAPIC)) (BOOL *aRecommendedIOAPIC);
72 STDMETHOD(COMGETTER(RecommendedVirtEx)) (BOOL *aRecommendedVirtEx);
73 STDMETHOD(COMGETTER(RecommendedRAM)) (ULONG *aRAMSize);
74 STDMETHOD(COMGETTER(RecommendedVRAM)) (ULONG *aVRAMSize);
75 STDMETHOD(COMGETTER(RecommendedHDD)) (ULONG *aHDDSize);
76 STDMETHOD(COMGETTER(AdapterType)) (NetworkAdapterType_T *aNetworkAdapterType);
77
78 // public methods only for internal purposes
79 const Bstr &id() const { return mID; }
80 bool is64Bit() const { return !!(mOSHint & VBOXOSHINT_64BIT); }
81 bool recommendedIOAPIC() const { return !!(mOSHint & VBOXOSHINT_IOAPIC); }
82 bool recommendedVirtEx() const { return !!(mOSHint & VBOXOSHINT_HWVIRTEX); }
83 NetworkAdapterType_T networkAdapterType() const { return mNetworkAdapterType; }
84
85 // for VirtualBoxSupportErrorInfoImpl
86 static const wchar_t *getComponentName() { return L"GuestOSType"; }
87
88private:
89
90 const Bstr mFamilyID;
91 const Bstr mFamilyDescription;
92 const Bstr mID;
93 const Bstr mDescription;
94 const VBOXOSTYPE mOSType;
95 const uint32_t mOSHint;
96 const uint32_t mRAMSize;
97 const uint32_t mVRAMSize;
98 const uint32_t mHDDSize;
99 const uint32_t mMonitorCount;
100 const NetworkAdapterType_T mNetworkAdapterType;
101};
102
103COM_DECL_READONLY_ENUM_AND_COLLECTION (GuestOSType)
104
105#endif // ____H_GUESTOSTYPEIMPL
106/* vi: set tabstop=4 shiftwidth=4 expandtab: */
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use