1 | /* $Id: GuestOSTypeImpl.h 67793 2017-07-05 11:42:33Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | *
|
---|
4 | * VirtualBox COM class implementation
|
---|
5 | */
|
---|
6 |
|
---|
7 | /*
|
---|
8 | * Copyright (C) 2006-2016 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 ____H_GUESTOSTYPEIMPL
|
---|
20 | #define ____H_GUESTOSTYPEIMPL
|
---|
21 |
|
---|
22 | #include "Global.h"
|
---|
23 | #include "GuestOSTypeWrap.h"
|
---|
24 |
|
---|
25 | class ATL_NO_VTABLE GuestOSType :
|
---|
26 | public GuestOSTypeWrap
|
---|
27 | {
|
---|
28 | public:
|
---|
29 |
|
---|
30 | DECLARE_EMPTY_CTOR_DTOR(GuestOSType)
|
---|
31 |
|
---|
32 | HRESULT FinalConstruct();
|
---|
33 | void FinalRelease();
|
---|
34 |
|
---|
35 | // public initializer/uninitializer for internal purposes only
|
---|
36 | HRESULT init(const Global::OSType &ostype);
|
---|
37 | void uninit();
|
---|
38 |
|
---|
39 | // public methods only for internal purposes
|
---|
40 | const Utf8Str &i_id() const { return mID; }
|
---|
41 | const Utf8Str &i_familyId() const { return mFamilyID; }
|
---|
42 | bool i_is64Bit() const { return !!(mOSHint & VBOXOSHINT_64BIT); }
|
---|
43 | bool i_recommendedIOAPIC() const { return !!(mOSHint & VBOXOSHINT_IOAPIC); }
|
---|
44 | bool i_recommendedX2APIC() const { return !!(mOSHint & VBOXOSHINT_X2APIC); }
|
---|
45 | bool i_recommendedVirtEx() const { return !!(mOSHint & VBOXOSHINT_HWVIRTEX); }
|
---|
46 | bool i_recommendedEFI() const { return !!(mOSHint & VBOXOSHINT_EFI); }
|
---|
47 | NetworkAdapterType_T i_networkAdapterType() const { return mNetworkAdapterType; }
|
---|
48 | uint32_t i_numSerialEnabled() const { return mNumSerialEnabled; }
|
---|
49 |
|
---|
50 | private:
|
---|
51 |
|
---|
52 | // Wrapped IGuestOSType properties
|
---|
53 | HRESULT getFamilyId(com::Utf8Str &aFamilyId);
|
---|
54 | HRESULT getFamilyDescription(com::Utf8Str &aFamilyDescription);
|
---|
55 | HRESULT getId(com::Utf8Str &aId);
|
---|
56 | HRESULT getDescription(com::Utf8Str &aDescription);
|
---|
57 | HRESULT getIs64Bit(BOOL *aIs64Bit);
|
---|
58 | HRESULT getRecommendedIOAPIC(BOOL *aRecommendedIOAPIC);
|
---|
59 | HRESULT getRecommendedVirtEx(BOOL *aRecommendedVirtEx);
|
---|
60 | HRESULT getRecommendedRAM(ULONG *RAMSize);
|
---|
61 | HRESULT getRecommendedVRAM(ULONG *aVRAMSize);
|
---|
62 | HRESULT getRecommended2DVideoAcceleration(BOOL *aRecommended2DVideoAcceleration);
|
---|
63 | HRESULT getRecommended3DAcceleration(BOOL *aRecommended3DAcceleration);
|
---|
64 | HRESULT getRecommendedHDD(LONG64 *aHDDSize);
|
---|
65 | HRESULT getAdapterType(NetworkAdapterType_T *aNetworkAdapterType);
|
---|
66 | HRESULT getRecommendedPAE(BOOL *aRecommendedPAE);
|
---|
67 | HRESULT getRecommendedDVDStorageController(StorageControllerType_T *aStorageControllerType);
|
---|
68 | HRESULT getRecommendedFirmware(FirmwareType_T *aFirmwareType);
|
---|
69 | HRESULT getRecommendedDVDStorageBus(StorageBus_T *aStorageBusType);
|
---|
70 | HRESULT getRecommendedHDStorageController(StorageControllerType_T *aStorageControllerType);
|
---|
71 | HRESULT getRecommendedHDStorageBus(StorageBus_T *aStorageBusType);
|
---|
72 | HRESULT getRecommendedUSBHID(BOOL *aRecommendedUSBHID);
|
---|
73 | HRESULT getRecommendedHPET(BOOL *aRecommendedHPET);
|
---|
74 | HRESULT getRecommendedUSBTablet(BOOL *aRecommendedUSBTablet);
|
---|
75 | HRESULT getRecommendedRTCUseUTC(BOOL *aRecommendedRTCUseUTC);
|
---|
76 | HRESULT getRecommendedChipset(ChipsetType_T *aChipsetType);
|
---|
77 | HRESULT getRecommendedAudioController(AudioControllerType_T *aAudioController);
|
---|
78 | HRESULT getRecommendedAudioCodec(AudioCodecType_T *aAudioCodec);
|
---|
79 | HRESULT getRecommendedFloppy(BOOL *aRecommendedFloppy);
|
---|
80 | HRESULT getRecommendedUSB(BOOL *aRecommendedUSB);
|
---|
81 | HRESULT getRecommendedUSB3(BOOL *aRecommendedUSB3);
|
---|
82 | HRESULT getRecommendedTFReset(BOOL *aRecommendedTFReset);
|
---|
83 | HRESULT getRecommendedX2APIC(BOOL *aRecommendedX2APIC);
|
---|
84 |
|
---|
85 |
|
---|
86 | const Utf8Str mFamilyID;
|
---|
87 | const Utf8Str mFamilyDescription;
|
---|
88 | const Utf8Str mID;
|
---|
89 | const Utf8Str mDescription;
|
---|
90 | const VBOXOSTYPE mOSType;
|
---|
91 | const uint32_t mOSHint;
|
---|
92 | const uint32_t mRAMSize;
|
---|
93 | const uint32_t mVRAMSize;
|
---|
94 | const uint64_t mHDDSize;
|
---|
95 | const uint32_t mMonitorCount;
|
---|
96 | const NetworkAdapterType_T mNetworkAdapterType;
|
---|
97 | const uint32_t mNumSerialEnabled;
|
---|
98 | const StorageControllerType_T mDVDStorageControllerType;
|
---|
99 | const StorageBus_T mDVDStorageBusType;
|
---|
100 | const StorageControllerType_T mHDStorageControllerType;
|
---|
101 | const StorageBus_T mHDStorageBusType;
|
---|
102 | const ChipsetType_T mChipsetType;
|
---|
103 | const AudioControllerType_T mAudioControllerType;
|
---|
104 | const AudioCodecType_T mAudioCodecType;
|
---|
105 | };
|
---|
106 |
|
---|
107 | #endif // ____H_GUESTOSTYPEIMPL
|
---|
108 | /* vi: set tabstop=4 shiftwidth=4 expandtab: */
|
---|