Changeset 40418 in vbox for trunk/src/VBox/Main/include
- Timestamp:
- Mar 9, 2012 10:00:56 PM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 76749
- Location:
- trunk/src/VBox/Main/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/MachineImpl.h
r40084 r40418 1 1 /* $Id$ */ 2 2 /** @file 3 * VirtualBox COM class implementation3 * Implementation of IMachine in VBoxSVC - Header. 4 4 */ 5 5 6 6 /* 7 * Copyright (C) 2006-201 1Oracle Corporation7 * Copyright (C) 2006-2012 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 297 297 typedef std::list<ComObjPtr<PciDeviceAttachment> > PciDeviceAssignmentList; 298 298 PciDeviceAssignmentList mPciDeviceAssignments; 299 300 settings::Debugging mDebugging; 299 301 }; 300 302 … … 468 470 STDMETHOD(COMGETTER(PciDeviceAssignments))(ComSafeArrayOut(IPciDeviceAttachment *, aAssignments)); 469 471 STDMETHOD(COMGETTER(BandwidthControl))(IBandwidthControl **aBandwidthControl); 472 STDMETHOD(COMGETTER(TracingEnabled))(BOOL *pfEnabled); 473 STDMETHOD(COMSETTER(TracingEnabled))(BOOL fEnabled); 474 STDMETHOD(COMGETTER(TracingConfig))(BSTR *pbstrConfig); 475 STDMETHOD(COMSETTER(TracingConfig))(IN_BSTR bstrConfig); 476 STDMETHOD(COMGETTER(AllowTracingToAccessVM))(BOOL *pfAllow); 477 STDMETHOD(COMSETTER(AllowTracingToAccessVM))(BOOL fAllow); 470 478 471 479 // IMachine methods … … 786 794 const Guid &aCurSnapshotId, 787 795 Snapshot *aParentSnapshot); 788 HRESULT loadHardware(const settings::Hardware &data); 796 HRESULT loadHardware(const settings::Hardware &data, const settings::Debugging *pDbg); 797 HRESULT loadDebugging(const settings::Debugging *pDbg); 789 798 HRESULT loadStorageControllers(const settings::Storage &data, 790 799 const Guid *puuidRegistry, … … 826 835 void copyMachineDataToSettings(settings::MachineConfigFile &config); 827 836 HRESULT saveAllSnapshots(settings::MachineConfigFile &config); 828 HRESULT saveHardware(settings::Hardware &data );837 HRESULT saveHardware(settings::Hardware &data, settings::Debugging *pDbg); 829 838 HRESULT saveStorageControllers(settings::Storage &data); 830 839 HRESULT saveStorageDevices(ComObjPtr<StorageController> aStorageController, … … 1195 1204 IN_GUID aSnapshotId, 1196 1205 const Utf8Str &aStateFilePath); 1197 HRESULT init(Machine *aMachine, 1198 const settings::Hardware &hardware, 1199 const settings::Storage &storage, 1200 IN_GUID aSnapshotId, 1201 const Utf8Str &aStateFilePath); 1206 HRESULT initFromSettings(Machine *aMachine, 1207 const settings::Hardware &hardware, 1208 const settings::Debugging *pDbg, 1209 const settings::Storage &storage, 1210 IN_GUID aSnapshotId, 1211 const Utf8Str &aStateFilePath); 1202 1212 void uninit(); 1203 1213 -
trunk/src/VBox/Main/include/VirtualBoxBase.h
r38533 r40418 351 351 352 352 /** 353 * Checks that the string argument is not a NULL or empty string and returns 354 * E_INVALIDARG + extended error info on failure. 355 * @param arg Input string argument (BSTR etc.). 356 */ 357 #define CheckComArgStrNotEmptyOrNull(arg) \ 358 do { \ 359 if (RT_UNLIKELY((arg) == NULL || *(arg) == '\0')) \ 360 return setError(E_INVALIDARG, \ 361 tr("Argument %s is empty or NULL"), #arg); \ 353 * Checks that a string input argument is valid (not NULL or obviously invalid 354 * pointer), returning E_INVALIDARG + extended error info if invalid. 355 * @param a_bstrIn Input string argument (IN_BSTR). 356 */ 357 #define CheckComArgStr(a_bstrIn) \ 358 do { \ 359 IN_BSTR const bstrInCheck = (a_bstrIn); /* type check */ \ 360 if (RT_UNLIKELY(!RT_VALID_PTR(bstrInCheck))) \ 361 return setError(E_INVALIDARG, tr("Argument %s is an invalid pointer"), #a_bstrIn); \ 362 } while (0) 363 /** 364 * Checks that the string argument is not a NULL, a invalid pointer or an empty 365 * string, returning E_INVALIDARG + extended error info on failure. 366 * @param a_bstrIn Input string argument (BSTR etc.). 367 */ 368 #define CheckComArgStrNotEmptyOrNull(a_bstrIn) \ 369 do { \ 370 IN_BSTR const bstrInCheck = (a_bstrIn); /* type check */ \ 371 if (RT_UNLIKELY(!RT_VALID_PTR(bstrInCheck) || *(bstrInCheck) == '\0')) \ 372 return setError(E_INVALIDARG, tr("Argument %s is empty or an invalid pointer"), #a_bstrIn); \ 362 373 } while (0) 363 374 … … 959 970 * Stores the current data pointer in the backup area, allocates new data 960 971 * using the copy constructor on current data and makes new data active. 972 * 973 * @deprecated Use backupEx to avoid throwing wild out-of-memory exceptions. 961 974 */ 962 975 void backup() … … 969 982 this->mData = pNewData; 970 983 } 984 } 985 986 /** 987 * Stores the current data pointer in the backup area, allocates new data 988 * using the copy constructor on current data and makes new data active. 989 * 990 * @returns S_OK, E_OUTOFMEMORY or E_FAIL (internal error). 991 */ 992 HRESULT backupEx() 993 { 994 AssertMsgReturn(this->mData, ("data must not be NULL"), E_FAIL); 995 if (this->mData && !mBackupData) 996 { 997 try 998 { 999 D *pNewData = new D(*this->mData); 1000 mBackupData = this->mData; 1001 this->mData = pNewData; 1002 } 1003 catch (std::bad_alloc &) 1004 { 1005 return E_OUTOFMEMORY; 1006 } 1007 } 1008 return S_OK; 971 1009 } 972 1010
Note:
See TracChangeset
for help on using the changeset viewer.