VirtualBox

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

Last change on this file was 101685, checked in by vboxsync, 6 months ago

Main/Unattended|GuestOSType: Add an entry in the guest OS type to indicate the name of the additions install package instead of hardcoding it in the templates. Allows easy adaption if something changes and makes it possible to auto install guest additions for linux.arm64 guests, bugref:10542 [missing files]

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 6.0 KB
Line 
1/* $Id: GuestOSTypeImpl.h 101685 2023-10-31 12:40:20Z 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_subtype() const { return mOSSubtype; }
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 getSubtype(com::Utf8Str &aSubtype);
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 HRESULT getGuestAdditionsInstallPackageName(com::Utf8Str &aGuestAdditionsInstallPkgName);
111
112
113 const Utf8Str mFamilyID;
114 const Utf8Str mFamilyDescription;
115 const Utf8Str mOSSubtype;
116 const Utf8Str mID;
117 const Utf8Str mDescription;
118 const Utf8Str mGuestAdditionsInstallPackageName;
119 const VBOXOSTYPE mOSType;
120 const uint32_t mOSHint;
121 const uint32_t mRAMSize;
122 const uint32_t mCPUCount;
123 const GraphicsControllerType_T mGraphicsControllerType;
124 const uint32_t mVRAMSize;
125 const uint64_t mHDDSize;
126 const NetworkAdapterType_T mNetworkAdapterType;
127 const uint32_t mNumSerialEnabled;
128 const StorageControllerType_T mDVDStorageControllerType;
129 const StorageBus_T mDVDStorageBusType;
130 const StorageControllerType_T mHDStorageControllerType;
131 const StorageBus_T mHDStorageBusType;
132 const ChipsetType_T mChipsetType;
133 const IommuType_T mIommuType;
134 const AudioControllerType_T mAudioControllerType;
135 const AudioCodecType_T mAudioCodecType;
136};
137
138#endif /* !MAIN_INCLUDED_GuestOSTypeImpl_h */
139/* vi: set tabstop=4 shiftwidth=4 expandtab: */
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use