Changeset 32894 in vbox
- Timestamp:
- Oct 5, 2010 9:03:39 AM (14 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 3 edited
-
GuestOSTypeImpl.cpp (modified) (4 diffs)
-
VirtualBoxImpl.cpp (modified) (1 diff)
-
include/GuestOSTypeImpl.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/GuestOSTypeImpl.cpp
r32531 r32894 70 70 * @param aHDDSize recommended HDD size in bytes 71 71 */ 72 HRESULT GuestOSType::init(const char *aFamilyId, const char *aFamilyDescription,72 HRESULT GuestOSType::init(const Global::OSType &ostype)/*const char *aFamilyId, const char *aFamilyDescription, 73 73 const char *aId, const char *aDescription, 74 74 VBOXOSTYPE aOSType, uint32_t aOSHint, … … 80 80 StorageControllerType_T aHdStorageControllerType, 81 81 StorageBus_T aHdStorageBusType, 82 ChipsetType_T aChipsetType )82 ChipsetType_T aChipsetType*/ 83 83 { 84 84 #if 0 … … 98 98 #endif 99 99 100 ComAssertRet( aFamilyId && aFamilyDescription && aId && aDescription, E_INVALIDARG);100 ComAssertRet(ostype.familyId && ostype.familyDescription && ostype.id && ostype.description, E_INVALIDARG); 101 101 102 102 /* Enclose the state transition NotReady->InInit->Ready */ … … 104 104 AssertReturn(autoInitSpan.isOk(), E_FAIL); 105 105 106 unconst(mFamilyID) = aFamilyId;107 unconst(mFamilyDescription) = aFamilyDescription;108 unconst(mID) = aId;109 unconst(mDescription) = aDescription;110 unconst(mOSType) = aOSType;111 unconst(mOSHint) = aOSHint;112 unconst(mRAMSize) = aRAMSize;113 unconst(mVRAMSize) = aVRAMSize;114 unconst(mHDDSize) = aHDDSize;115 unconst(mNetworkAdapterType) = aNetworkAdapterType;116 unconst(mNumSerialEnabled) = aNumSerialEnabled;117 unconst(mDvdStorageControllerType) = aDvdStorageControllerType;118 unconst(mDvdStorageBusType) = aDvdStorageBusType;119 unconst(mHdStorageControllerType) = aHdStorageControllerType;120 unconst(mHdStorageBusType) = aHdStorageBusType;121 unconst(mChipsetType) = aChipsetType;106 unconst(mFamilyID) = ostype.familyId; 107 unconst(mFamilyDescription) = ostype.familyDescription; 108 unconst(mID) = ostype.id; 109 unconst(mDescription) = ostype.description; 110 unconst(mOSType) = ostype.osType; 111 unconst(mOSHint) = ostype.osHint; 112 unconst(mRAMSize) = ostype.recommendedRAM; 113 unconst(mVRAMSize) = ostype.recommendedVRAM; 114 unconst(mHDDSize) = ostype.recommendedHDD; 115 unconst(mNetworkAdapterType) = ostype.networkAdapterType; 116 unconst(mNumSerialEnabled) = ostype.numSerialEnabled; 117 unconst(mDvdStorageControllerType) = ostype.dvdStorageControllerType; 118 unconst(mDvdStorageBusType) = ostype.dvdStorageBusType; 119 unconst(mHdStorageControllerType) = ostype.hdStorageControllerType; 120 unconst(mHdStorageBusType) = ostype.hdStorageBusType; 121 unconst(mChipsetType) = ostype.chipsetType; 122 122 123 123 /* Confirm a successful initialization when it's the case */ -
trunk/src/VBox/Main/VirtualBoxImpl.cpp
r32727 r32894 442 442 443 443 /* guest OS type objects, needed by machines */ 444 for (size_t i = 0; i < RT_ELEMENTS(Global::sOSTypes); ++ i)445 { 446 ComObjPtr <GuestOSType> guestOSTypeObj;444 for (size_t i = 0; i < RT_ELEMENTS(Global::sOSTypes); ++i) 445 { 446 ComObjPtr<GuestOSType> guestOSTypeObj; 447 447 rc = guestOSTypeObj.createObject(); 448 448 if (SUCCEEDED(rc)) 449 449 { 450 rc = guestOSTypeObj->init(Global::sOSTypes[i].familyId, 451 Global::sOSTypes[i].familyDescription, 452 Global::sOSTypes[i].id, 453 Global::sOSTypes[i].description, 454 Global::sOSTypes[i].osType, 455 Global::sOSTypes[i].osHint, 456 Global::sOSTypes[i].recommendedRAM, 457 Global::sOSTypes[i].recommendedVRAM, 458 Global::sOSTypes[i].recommendedHDD, 459 Global::sOSTypes[i].networkAdapterType, 460 Global::sOSTypes[i].numSerialEnabled, 461 Global::sOSTypes[i].dvdStorageControllerType, 462 Global::sOSTypes[i].dvdStorageBusType, 463 Global::sOSTypes[i].hdStorageControllerType, 464 Global::sOSTypes[i].hdStorageBusType, 465 Global::sOSTypes[i].chipsetType); 450 rc = guestOSTypeObj->init(Global::sOSTypes[i]); 466 451 if (SUCCEEDED(rc)) 467 452 m->allGuestOSTypes.addChild(guestOSTypeObj); -
trunk/src/VBox/Main/include/GuestOSTypeImpl.h
r32531 r32894 47 47 48 48 // public initializer/uninitializer for internal purposes only 49 HRESULT init(const char *aFamilyId, const char *aFamilyDescription, 50 const char *aId, const char *aDescription, 51 VBOXOSTYPE aOSType, uint32_t aOSHint, 52 uint32_t aRAMSize, uint32_t aVRAMSize, uint64_t aHDDSize, 53 NetworkAdapterType_T aNetworkAdapterType, uint32_t numSerialEnabled, 54 StorageControllerType_T aDvdStorageControllerType, 55 StorageBus_T aDvdStorageBusType, 56 StorageControllerType_T aHdStorageControllerType, 57 StorageBus_T aHdStorageBusType, 58 ChipsetType_T aChipsetType); 49 HRESULT init(const Global::OSType &ostype); 59 50 void uninit(); 60 51
Note:
See TracChangeset
for help on using the changeset viewer.

