VirtualBox

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

Last change on this file since 96407 was 96407, checked in by vboxsync, 22 months ago

scm copyright and license note update

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.5 KB
Line 
1/* $Id: GuestOSTypeImpl.h 96407 2022-08-22 17:43:14Z vboxsync $ */
2/** @file
3 *
4 * VirtualBox COM class implementation
5 */
6
7/*
8 * Copyright (C) 2006-2022 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 bool i_is64Bit() const { return !!(mOSHint & VBOXOSHINT_64BIT); }
56 bool i_recommendedIOAPIC() const { return !!(mOSHint & VBOXOSHINT_IOAPIC); }
57 bool i_recommendedX2APIC() const { return !!(mOSHint & VBOXOSHINT_X2APIC); }
58 bool i_recommendedVirtEx() const { return !!(mOSHint & VBOXOSHINT_HWVIRTEX); }
59 bool i_recommendedEFI() const { return !!(mOSHint & VBOXOSHINT_EFI); }
60 bool i_recommendedEFISecureBoot() const { return !!(mOSHint & VBOXOSHINT_EFI_SECUREBOOT); }
61 bool i_recommendedTpm2() const { return !!(mOSHint & VBOXOSHINT_TPM2); }
62 NetworkAdapterType_T i_networkAdapterType() const { return mNetworkAdapterType; }
63 uint32_t i_numSerialEnabled() const { return mNumSerialEnabled; }
64
65private:
66
67 // Wrapped IGuestOSType properties
68 HRESULT getFamilyId(com::Utf8Str &aFamilyId);
69 HRESULT getFamilyDescription(com::Utf8Str &aFamilyDescription);
70 HRESULT getId(com::Utf8Str &aId);
71 HRESULT getDescription(com::Utf8Str &aDescription);
72 HRESULT getIs64Bit(BOOL *aIs64Bit);
73 HRESULT getRecommendedIOAPIC(BOOL *aRecommendedIOAPIC);
74 HRESULT getRecommendedVirtEx(BOOL *aRecommendedVirtEx);
75 HRESULT getRecommendedRAM(ULONG *RAMSize);
76 HRESULT getRecommendedGraphicsController(GraphicsControllerType_T *aRecommendedGraphicsController);
77 HRESULT getRecommendedVRAM(ULONG *aVRAMSize);
78 HRESULT getRecommended2DVideoAcceleration(BOOL *aRecommended2DVideoAcceleration);
79 HRESULT getRecommended3DAcceleration(BOOL *aRecommended3DAcceleration);
80 HRESULT getRecommendedHDD(LONG64 *aHDDSize);
81 HRESULT getAdapterType(NetworkAdapterType_T *aNetworkAdapterType);
82 HRESULT getRecommendedPAE(BOOL *aRecommendedPAE);
83 HRESULT getRecommendedDVDStorageController(StorageControllerType_T *aStorageControllerType);
84 HRESULT getRecommendedFirmware(FirmwareType_T *aFirmwareType);
85 HRESULT getRecommendedDVDStorageBus(StorageBus_T *aStorageBusType);
86 HRESULT getRecommendedHDStorageController(StorageControllerType_T *aStorageControllerType);
87 HRESULT getRecommendedHDStorageBus(StorageBus_T *aStorageBusType);
88 HRESULT getRecommendedUSBHID(BOOL *aRecommendedUSBHID);
89 HRESULT getRecommendedHPET(BOOL *aRecommendedHPET);
90 HRESULT getRecommendedUSBTablet(BOOL *aRecommendedUSBTablet);
91 HRESULT getRecommendedRTCUseUTC(BOOL *aRecommendedRTCUseUTC);
92 HRESULT getRecommendedChipset(ChipsetType_T *aChipsetType);
93 HRESULT getRecommendedIommuType(IommuType_T *aIommuType);
94 HRESULT getRecommendedAudioController(AudioControllerType_T *aAudioController);
95 HRESULT getRecommendedAudioCodec(AudioCodecType_T *aAudioCodec);
96 HRESULT getRecommendedFloppy(BOOL *aRecommendedFloppy);
97 HRESULT getRecommendedUSB(BOOL *aRecommendedUSB);
98 HRESULT getRecommendedUSB3(BOOL *aRecommendedUSB3);
99 HRESULT getRecommendedTFReset(BOOL *aRecommendedTFReset);
100 HRESULT getRecommendedX2APIC(BOOL *aRecommendedX2APIC);
101 HRESULT getRecommendedCPUCount(ULONG *aRecommendedCPUCount);
102 HRESULT getRecommendedTpmType(TpmType_T *aRecommendedTpmType);
103 HRESULT getRecommendedSecureBoot(BOOL *aRecommendedSecureBoot);
104 HRESULT getRecommendedWDDMGraphics(BOOL *aRecommendedWDDMGraphics);
105
106
107 const Utf8Str mFamilyID;
108 const Utf8Str mFamilyDescription;
109 const Utf8Str mID;
110 const Utf8Str mDescription;
111 const VBOXOSTYPE mOSType;
112 const uint32_t mOSHint;
113 const uint32_t mRAMSize;
114 const uint32_t mCPUCount;
115 const GraphicsControllerType_T mGraphicsControllerType;
116 const uint32_t mVRAMSize;
117 const uint64_t mHDDSize;
118 const NetworkAdapterType_T mNetworkAdapterType;
119 const uint32_t mNumSerialEnabled;
120 const StorageControllerType_T mDVDStorageControllerType;
121 const StorageBus_T mDVDStorageBusType;
122 const StorageControllerType_T mHDStorageControllerType;
123 const StorageBus_T mHDStorageBusType;
124 const ChipsetType_T mChipsetType;
125 const IommuType_T mIommuType;
126 const AudioControllerType_T mAudioControllerType;
127 const AudioCodecType_T mAudioCodecType;
128};
129
130#endif /* !MAIN_INCLUDED_GuestOSTypeImpl_h */
131/* vi: set tabstop=4 shiftwidth=4 expandtab: */
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use