1 | /* $Id: GuestOSTypeImpl.h 93115 2022-01-01 11:31:46Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | *
|
---|
4 | * VirtualBox COM class implementation
|
---|
5 | */
|
---|
6 |
|
---|
7 | /*
|
---|
8 | * Copyright (C) 2006-2022 Oracle Corporation
|
---|
9 | *
|
---|
10 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
11 | * available from http://www.virtualbox.org. This file is free software;
|
---|
12 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
13 | * General Public License (GPL) as published by the Free Software
|
---|
14 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
15 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
16 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
17 | */
|
---|
18 |
|
---|
19 | #ifndef MAIN_INCLUDED_GuestOSTypeImpl_h
|
---|
20 | #define MAIN_INCLUDED_GuestOSTypeImpl_h
|
---|
21 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
22 | # pragma once
|
---|
23 | #endif
|
---|
24 |
|
---|
25 | #include "Global.h"
|
---|
26 | #include "GuestOSTypeWrap.h"
|
---|
27 |
|
---|
28 | class ATL_NO_VTABLE GuestOSType :
|
---|
29 | public GuestOSTypeWrap
|
---|
30 | {
|
---|
31 | public:
|
---|
32 |
|
---|
33 | DECLARE_COMMON_CLASS_METHODS(GuestOSType)
|
---|
34 |
|
---|
35 | HRESULT FinalConstruct();
|
---|
36 | void FinalRelease();
|
---|
37 |
|
---|
38 | // public initializer/uninitializer for internal purposes only
|
---|
39 | HRESULT init(const Global::OSType &ostype);
|
---|
40 | void uninit();
|
---|
41 |
|
---|
42 | // public methods only for internal purposes
|
---|
43 | const Utf8Str &i_id() const { return mID; }
|
---|
44 | const Utf8Str &i_familyId() const { return mFamilyID; }
|
---|
45 | bool i_is64Bit() const { return !!(mOSHint & VBOXOSHINT_64BIT); }
|
---|
46 | bool i_recommendedIOAPIC() const { return !!(mOSHint & VBOXOSHINT_IOAPIC); }
|
---|
47 | bool i_recommendedX2APIC() const { return !!(mOSHint & VBOXOSHINT_X2APIC); }
|
---|
48 | bool i_recommendedVirtEx() const { return !!(mOSHint & VBOXOSHINT_HWVIRTEX); }
|
---|
49 | bool i_recommendedEFI() const { return !!(mOSHint & VBOXOSHINT_EFI); }
|
---|
50 | bool i_recommendedEFISecureBoot() const { return !!(mOSHint & VBOXOSHINT_EFI_SECUREBOOT); }
|
---|
51 | bool i_recommendedTpm2() const { return !!(mOSHint & VBOXOSHINT_TPM2); }
|
---|
52 | NetworkAdapterType_T i_networkAdapterType() const { return mNetworkAdapterType; }
|
---|
53 | uint32_t i_numSerialEnabled() const { return mNumSerialEnabled; }
|
---|
54 |
|
---|
55 | private:
|
---|
56 |
|
---|
57 | // Wrapped IGuestOSType properties
|
---|
58 | HRESULT getFamilyId(com::Utf8Str &aFamilyId);
|
---|
59 | HRESULT getFamilyDescription(com::Utf8Str &aFamilyDescription);
|
---|
60 | HRESULT getId(com::Utf8Str &aId);
|
---|
61 | HRESULT getDescription(com::Utf8Str &aDescription);
|
---|
62 | HRESULT getIs64Bit(BOOL *aIs64Bit);
|
---|
63 | HRESULT getRecommendedIOAPIC(BOOL *aRecommendedIOAPIC);
|
---|
64 | HRESULT getRecommendedVirtEx(BOOL *aRecommendedVirtEx);
|
---|
65 | HRESULT getRecommendedRAM(ULONG *RAMSize);
|
---|
66 | HRESULT getRecommendedGraphicsController(GraphicsControllerType_T *aRecommendedGraphicsController);
|
---|
67 | HRESULT getRecommendedVRAM(ULONG *aVRAMSize);
|
---|
68 | HRESULT getRecommended2DVideoAcceleration(BOOL *aRecommended2DVideoAcceleration);
|
---|
69 | HRESULT getRecommended3DAcceleration(BOOL *aRecommended3DAcceleration);
|
---|
70 | HRESULT getRecommendedHDD(LONG64 *aHDDSize);
|
---|
71 | HRESULT getAdapterType(NetworkAdapterType_T *aNetworkAdapterType);
|
---|
72 | HRESULT getRecommendedPAE(BOOL *aRecommendedPAE);
|
---|
73 | HRESULT getRecommendedDVDStorageController(StorageControllerType_T *aStorageControllerType);
|
---|
74 | HRESULT getRecommendedFirmware(FirmwareType_T *aFirmwareType);
|
---|
75 | HRESULT getRecommendedDVDStorageBus(StorageBus_T *aStorageBusType);
|
---|
76 | HRESULT getRecommendedHDStorageController(StorageControllerType_T *aStorageControllerType);
|
---|
77 | HRESULT getRecommendedHDStorageBus(StorageBus_T *aStorageBusType);
|
---|
78 | HRESULT getRecommendedUSBHID(BOOL *aRecommendedUSBHID);
|
---|
79 | HRESULT getRecommendedHPET(BOOL *aRecommendedHPET);
|
---|
80 | HRESULT getRecommendedUSBTablet(BOOL *aRecommendedUSBTablet);
|
---|
81 | HRESULT getRecommendedRTCUseUTC(BOOL *aRecommendedRTCUseUTC);
|
---|
82 | HRESULT getRecommendedChipset(ChipsetType_T *aChipsetType);
|
---|
83 | HRESULT getRecommendedIommuType(IommuType_T *aIommuType);
|
---|
84 | HRESULT getRecommendedAudioController(AudioControllerType_T *aAudioController);
|
---|
85 | HRESULT getRecommendedAudioCodec(AudioCodecType_T *aAudioCodec);
|
---|
86 | HRESULT getRecommendedFloppy(BOOL *aRecommendedFloppy);
|
---|
87 | HRESULT getRecommendedUSB(BOOL *aRecommendedUSB);
|
---|
88 | HRESULT getRecommendedUSB3(BOOL *aRecommendedUSB3);
|
---|
89 | HRESULT getRecommendedTFReset(BOOL *aRecommendedTFReset);
|
---|
90 | HRESULT getRecommendedX2APIC(BOOL *aRecommendedX2APIC);
|
---|
91 | HRESULT getRecommendedCPUCount(ULONG *aRecommendedCPUCount);
|
---|
92 | HRESULT getRecommendedTpmType(TpmType_T *aRecommendedTpmType);
|
---|
93 | HRESULT getRecommendedSecureBoot(BOOL *aRecommendedSecureBoot);
|
---|
94 | HRESULT getRecommendedWDDMGraphics(BOOL *aRecommendedWDDMGraphics);
|
---|
95 |
|
---|
96 |
|
---|
97 | const Utf8Str mFamilyID;
|
---|
98 | const Utf8Str mFamilyDescription;
|
---|
99 | const Utf8Str mID;
|
---|
100 | const Utf8Str mDescription;
|
---|
101 | const VBOXOSTYPE mOSType;
|
---|
102 | const uint32_t mOSHint;
|
---|
103 | const uint32_t mRAMSize;
|
---|
104 | const uint32_t mCPUCount;
|
---|
105 | const GraphicsControllerType_T mGraphicsControllerType;
|
---|
106 | const uint32_t mVRAMSize;
|
---|
107 | const uint64_t mHDDSize;
|
---|
108 | const NetworkAdapterType_T mNetworkAdapterType;
|
---|
109 | const uint32_t mNumSerialEnabled;
|
---|
110 | const StorageControllerType_T mDVDStorageControllerType;
|
---|
111 | const StorageBus_T mDVDStorageBusType;
|
---|
112 | const StorageControllerType_T mHDStorageControllerType;
|
---|
113 | const StorageBus_T mHDStorageBusType;
|
---|
114 | const ChipsetType_T mChipsetType;
|
---|
115 | const IommuType_T mIommuType;
|
---|
116 | const AudioControllerType_T mAudioControllerType;
|
---|
117 | const AudioCodecType_T mAudioCodecType;
|
---|
118 | };
|
---|
119 |
|
---|
120 | #endif /* !MAIN_INCLUDED_GuestOSTypeImpl_h */
|
---|
121 | /* vi: set tabstop=4 shiftwidth=4 expandtab: */
|
---|