VirtualBox

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

Last change on this file since 101381 was 101215, checked in by vboxsync, 9 months ago

Main: Separated (renamed) the internal generic OS hint bits from the x86-specific ones. bugref:10384

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.9 KB
Line 
1/* $Id: GuestOSTypeImpl.h 101215 2023-09-21 08:53:19Z vboxsync $ */
2/** @file
3 *
4 * VirtualBox COM class implementation
5 */
6
7/*
8 * Copyright (C) 2006-2023 Oracle and/or its affiliates.
9 *
10 * This file is part of VirtualBox base platform packages, as
11 * available from https://www.virtualbox.org.
12 *
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License
15 * as published by the Free Software Foundation, in version 3 of the
16 * License.
17 *
18 * This program is distributed in the hope that it will be useful, but
19 * WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 * General Public License for more details.
22 *
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, see <https://www.gnu.org/licenses>.
25 *
26 * SPDX-License-Identifier: GPL-3.0-only
27 */
28
29#ifndef MAIN_INCLUDED_GuestOSTypeImpl_h
30#define MAIN_INCLUDED_GuestOSTypeImpl_h
31#ifndef RT_WITHOUT_PRAGMA_ONCE
32# pragma once
33#endif
34
35#include "Global.h"
36#include "GuestOSTypeWrap.h"
37
38class ATL_NO_VTABLE GuestOSType :
39 public GuestOSTypeWrap
40{
41public:
42
43 DECLARE_COMMON_CLASS_METHODS(GuestOSType)
44
45 HRESULT FinalConstruct();
46 void FinalRelease();
47
48 // public initializer/uninitializer for internal purposes only
49 HRESULT init(const Global::OSType &ostype);
50 void uninit();
51
52 // public methods only for internal purposes
53 const Utf8Str &i_id() const { return mID; }
54 const Utf8Str &i_familyId() const { return mFamilyID; }
55 const Utf8Str &i_variant() const { return mOSVariant; }
56 const Utf8Str &i_description() const { return mDescription; }
57 bool i_is64Bit() const { return !!(mOSHint & VBOXOSHINT_64BIT); }
58 PlatformArchitecture_T i_platformArchitecture() const;
59 bool i_recommendedIOAPIC() const { return !!(mOSHint & VBOXOSHINT_X86_IOAPIC); }
60 bool i_recommendedX2APIC() const { return !!(mOSHint & VBOXOSHINT_X86_X2APIC); }
61 bool i_recommendedVirtEx() const { return !!(mOSHint & VBOXOSHINT_X86_HWVIRTEX); }
62 bool i_recommendedEFI() const { return !!(mOSHint & VBOXOSHINT_EFI); }
63 bool i_recommendedEFISecureBoot() const { return !!(mOSHint & VBOXOSHINT_EFI_SECUREBOOT); }
64 bool i_recommendedTpm2() const { return !!(mOSHint & VBOXOSHINT_TPM2); }
65 NetworkAdapterType_T i_networkAdapterType() const { return mNetworkAdapterType; }
66 uint32_t i_numSerialEnabled() const { return mNumSerialEnabled; }
67
68private:
69
70 // Wrapped IGuestOSType properties
71 HRESULT getFamilyId(com::Utf8Str &aFamilyId);
72 HRESULT getFamilyDescription(com::Utf8Str &aFamilyDescription);
73 HRESULT getVariant(com::Utf8Str &aVariant);
74 HRESULT getId(com::Utf8Str &aId);
75 HRESULT getDescription(com::Utf8Str &aDescription);
76 HRESULT getIs64Bit(BOOL *aIs64Bit);
77 HRESULT getPlatformArchitecture(PlatformArchitecture_T *aPlatformArchitecture);
78 HRESULT getRecommendedIOAPIC(BOOL *aRecommendedIOAPIC);
79 HRESULT getRecommendedVirtEx(BOOL *aRecommendedVirtEx);
80 HRESULT getRecommendedRAM(ULONG *RAMSize);
81 HRESULT getRecommendedGraphicsController(GraphicsControllerType_T *aRecommendedGraphicsController);
82 HRESULT getRecommendedVRAM(ULONG *aVRAMSize);
83 HRESULT getRecommended2DVideoAcceleration(BOOL *aRecommended2DVideoAcceleration);
84 HRESULT getRecommended3DAcceleration(BOOL *aRecommended3DAcceleration);
85 HRESULT getRecommendedHDD(LONG64 *aHDDSize);
86 HRESULT getAdapterType(NetworkAdapterType_T *aNetworkAdapterType);
87 HRESULT getRecommendedPAE(BOOL *aRecommendedPAE);
88 HRESULT getRecommendedDVDStorageController(StorageControllerType_T *aStorageControllerType);
89 HRESULT getRecommendedFirmware(FirmwareType_T *aFirmwareType);
90 HRESULT getRecommendedDVDStorageBus(StorageBus_T *aStorageBusType);
91 HRESULT getRecommendedHDStorageController(StorageControllerType_T *aStorageControllerType);
92 HRESULT getRecommendedHDStorageBus(StorageBus_T *aStorageBusType);
93 HRESULT getRecommendedUSBHID(BOOL *aRecommendedUSBHID);
94 HRESULT getRecommendedHPET(BOOL *aRecommendedHPET);
95 HRESULT getRecommendedUSBTablet(BOOL *aRecommendedUSBTablet);
96 HRESULT getRecommendedRTCUseUTC(BOOL *aRecommendedRTCUseUTC);
97 HRESULT getRecommendedChipset(ChipsetType_T *aChipsetType);
98 HRESULT getRecommendedIommuType(IommuType_T *aIommuType);
99 HRESULT getRecommendedAudioController(AudioControllerType_T *aAudioController);
100 HRESULT getRecommendedAudioCodec(AudioCodecType_T *aAudioCodec);
101 HRESULT getRecommendedFloppy(BOOL *aRecommendedFloppy);
102 HRESULT getRecommendedUSB(BOOL *aRecommendedUSB);
103 HRESULT getRecommendedUSB3(BOOL *aRecommendedUSB3);
104 HRESULT getRecommendedTFReset(BOOL *aRecommendedTFReset);
105 HRESULT getRecommendedX2APIC(BOOL *aRecommendedX2APIC);
106 HRESULT getRecommendedCPUCount(ULONG *aRecommendedCPUCount);
107 HRESULT getRecommendedTpmType(TpmType_T *aRecommendedTpmType);
108 HRESULT getRecommendedSecureBoot(BOOL *aRecommendedSecureBoot);
109 HRESULT getRecommendedWDDMGraphics(BOOL *aRecommendedWDDMGraphics);
110
111
112 const Utf8Str mFamilyID;
113 const Utf8Str mFamilyDescription;
114 const Utf8Str mOSVariant;
115 const Utf8Str mID;
116 const Utf8Str mDescription;
117 const VBOXOSTYPE mOSType;
118 const uint32_t mOSHint;
119 const uint32_t mRAMSize;
120 const uint32_t mCPUCount;
121 const GraphicsControllerType_T mGraphicsControllerType;
122 const uint32_t mVRAMSize;
123 const uint64_t mHDDSize;
124 const NetworkAdapterType_T mNetworkAdapterType;
125 const uint32_t mNumSerialEnabled;
126 const StorageControllerType_T mDVDStorageControllerType;
127 const StorageBus_T mDVDStorageBusType;
128 const StorageControllerType_T mHDStorageControllerType;
129 const StorageBus_T mHDStorageBusType;
130 const ChipsetType_T mChipsetType;
131 const IommuType_T mIommuType;
132 const AudioControllerType_T mAudioControllerType;
133 const AudioCodecType_T mAudioCodecType;
134};
135
136#endif /* !MAIN_INCLUDED_GuestOSTypeImpl_h */
137/* vi: set tabstop=4 shiftwidth=4 expandtab: */
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use