Changeset 51612 in vbox for trunk/src/VBox
- Timestamp:
- Jun 12, 2014 4:46:20 PM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 94351
- Location:
- trunk/src/VBox/Main
- Files:
-
- 25 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/BusAssignmentManager.h
r42551 r51612 7 7 8 8 /* 9 * Copyright (C) 2010-201 2Oracle Corporation9 * Copyright (C) 2010-2014 Oracle Corporation 10 10 * 11 11 * This file is part of VirtualBox Open Source Edition (OSE), as … … 23 23 #include "VBox/pci.h" 24 24 #include "VirtualBoxBase.h" 25 #include <vector> 25 26 26 27 class BusAssignmentManager … … 33 34 virtual ~BusAssignmentManager(); 34 35 35 HRESULT assignPCIDeviceImpl(const char* pszDevName, PCFGMNODE pCfg, PCIBusAddress& GuestAddress, PCIBusAddress HostAddress, bool fGuestAddressRequired = false); 36 HRESULT assignPCIDeviceImpl(const char* pszDevName, PCFGMNODE pCfg, PCIBusAddress& GuestAddress, 37 PCIBusAddress HostAddress, bool fGuestAddressRequired = false); 36 38 37 39 public: … … 40 42 virtual void Release(); 41 43 42 virtual HRESULT assignHostPCIDevice(const char* pszDevName, PCFGMNODE pCfg, PCIBusAddress HostAddress, PCIBusAddress& GuestAddress, bool fAddressRequired = false) 44 virtual HRESULT assignHostPCIDevice(const char* pszDevName, PCFGMNODE pCfg, PCIBusAddress HostAddress, 45 PCIBusAddress& GuestAddress, bool fAddressRequired = false) 43 46 { 44 47 return assignPCIDeviceImpl(pszDevName, pCfg, GuestAddress, HostAddress, fAddressRequired); … … 63 66 return findPCIAddress(pszDevName, iInstance, Address); 64 67 } 65 virtual void listAttachedPCIDevices( ComSafeArrayOut(IPCIDeviceAttachment*, aAttached));68 virtual void listAttachedPCIDevices(std::vector<ComPtr<IPCIDeviceAttachment> > &aAttached); 66 69 }; 67 70 -
trunk/src/VBox/Main/include/ConsoleImpl.h
r51476 r51612 22 22 #include "VBox/com/array.h" 23 23 #include "EventImpl.h" 24 #include "ConsoleWrap.h" 24 25 25 26 class Guest; … … 97 98 { 98 99 public: 99 virtual VMMDevMouseInterface * getVMMDevMouseInterface() = 0;100 virtual DisplayMouseInterface * getDisplayMouseInterface() = 0;101 virtual void onMouseCapabilityChange(BOOL supportsAbsolute,102 BOOL supportsRelative,103 BOOL supportsMT,104 BOOL needsHostCursor) = 0;100 virtual VMMDevMouseInterface *i_getVMMDevMouseInterface(){return NULL;} 101 virtual DisplayMouseInterface *i_getDisplayMouseInterface(){return NULL;} 102 virtual void i_onMouseCapabilityChange(BOOL supportsAbsolute, 103 BOOL supportsRelative, 104 BOOL supportsMT, 105 BOOL needsHostCursor){NOREF(supportsAbsolute); NOREF(supportsRelative); NOREF(supportsMT); NOREF(needsHostCursor);} 105 106 }; 106 107 107 108 /** IConsole implementation class */ 108 109 class ATL_NO_VTABLE Console : 109 public VirtualBoxBase,110 VBOX_SCRIPTABLE_IMPL(IConsole),public ConsoleMouseInterface110 public ConsoleWrap, 111 public ConsoleMouseInterface 111 112 { 112 Q_OBJECT113 113 114 114 public: 115 115 116 VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(Console, IConsole) 117 118 DECLARE_NOT_AGGREGATABLE(Console) 119 120 DECLARE_PROTECT_FINAL_CONSTRUCT() 121 122 BEGIN_COM_MAP(Console) 123 VBOX_DEFAULT_INTERFACE_ENTRIES(IConsole) 124 END_COM_MAP() 125 126 Console(); 127 ~Console(); 116 DECLARE_EMPTY_CTOR_DTOR(Console) 128 117 129 118 HRESULT FinalConstruct(); … … 134 123 void uninit(); 135 124 136 // IConsole properties137 STDMETHOD(COMGETTER(Machine))(IMachine **aMachine);138 STDMETHOD(COMGETTER(State))(MachineState_T *aMachineState);139 STDMETHOD(COMGETTER(Guest))(IGuest **aGuest);140 STDMETHOD(COMGETTER(Keyboard))(IKeyboard **aKeyboard);141 STDMETHOD(COMGETTER(Mouse))(IMouse **aMouse);142 STDMETHOD(COMGETTER(Display))(IDisplay **aDisplay);143 STDMETHOD(COMGETTER(Debugger))(IMachineDebugger **aDebugger);144 STDMETHOD(COMGETTER(USBDevices))(ComSafeArrayOut(IUSBDevice *, aUSBDevices));145 STDMETHOD(COMGETTER(RemoteUSBDevices))(ComSafeArrayOut(IHostUSBDevice *, aRemoteUSBDevices));146 STDMETHOD(COMGETTER(VRDEServerInfo))(IVRDEServerInfo **aVRDEServerInfo);147 STDMETHOD(COMGETTER(SharedFolders))(ComSafeArrayOut(ISharedFolder *, aSharedFolders));148 STDMETHOD(COMGETTER(EventSource)) (IEventSource ** aEventSource);149 STDMETHOD(COMGETTER(AttachedPCIDevices))(ComSafeArrayOut(IPCIDeviceAttachment *, aAttachments));150 STDMETHOD(COMGETTER(UseHostClipboard))(BOOL *aUseHostClipboard);151 STDMETHOD(COMSETTER(UseHostClipboard))(BOOL aUseHostClipboard);152 STDMETHOD(COMGETTER(EmulatedUSB))(IEmulatedUSB **aEmulatedUSB);153 154 // IConsole methods155 STDMETHOD(PowerUp)(IProgress **aProgress);156 STDMETHOD(PowerUpPaused)(IProgress **aProgress);157 STDMETHOD(PowerDown)(IProgress **aProgress);158 STDMETHOD(Reset)();159 STDMETHOD(Pause)();160 STDMETHOD(Resume)();161 STDMETHOD(PowerButton)();162 STDMETHOD(SleepButton)();163 STDMETHOD(GetPowerButtonHandled)(BOOL *aHandled);164 STDMETHOD(GetGuestEnteredACPIMode)(BOOL *aEntered);165 STDMETHOD(SaveState)(IProgress **aProgress);166 STDMETHOD(AdoptSavedState)(IN_BSTR aSavedStateFile);167 STDMETHOD(DiscardSavedState)(BOOL aRemoveFile);168 STDMETHOD(GetDeviceActivity)(DeviceType_T aDeviceType,169 DeviceActivity_T *aDeviceActivity);170 STDMETHOD(AttachUSBDevice)(IN_BSTR aId);171 STDMETHOD(DetachUSBDevice)(IN_BSTR aId, IUSBDevice **aDevice);172 STDMETHOD(FindUSBDeviceByAddress)(IN_BSTR aAddress, IUSBDevice **aDevice);173 STDMETHOD(FindUSBDeviceById)(IN_BSTR aId, IUSBDevice **aDevice);174 STDMETHOD(CreateSharedFolder)(IN_BSTR aName, IN_BSTR aHostPath, BOOL aWritable, BOOL aAutoMount);175 STDMETHOD(RemoveSharedFolder)(IN_BSTR aName);176 STDMETHOD(TakeSnapshot)(IN_BSTR aName, IN_BSTR aDescription,177 IProgress **aProgress);178 STDMETHOD(DeleteSnapshot)(IN_BSTR aId, IProgress **aProgress);179 STDMETHOD(DeleteSnapshotAndAllChildren)(IN_BSTR aId, IProgress **aProgress);180 STDMETHOD(DeleteSnapshotRange)(IN_BSTR aStartId, IN_BSTR aEndId, IProgress **aProgress);181 STDMETHOD(RestoreSnapshot)(ISnapshot *aSnapshot, IProgress **aProgress);182 STDMETHOD(Teleport)(IN_BSTR aHostname, ULONG aPort, IN_BSTR aPassword, ULONG aMaxDowntime, IProgress **aProgress);183 125 184 126 // public methods for internal purposes only … … 189 131 */ 190 132 191 Guest * getGuest() const { return mGuest; }192 Keyboard * getKeyboard() const { return mKeyboard; }193 Mouse * getMouse() const { return mMouse; }194 Display * getDisplay() const { return mDisplay; }195 MachineDebugger * getMachineDebugger() const { return mDebugger; }133 Guest *i_getGuest() const { return mGuest; } 134 Keyboard *i_getKeyboard() const { return mKeyboard; } 135 Mouse *i_getMouse() const { return mMouse; } 136 Display *i_getDisplay() const { return mDisplay; } 137 MachineDebugger *i_getMachineDebugger() const { return mDebugger; } 196 138 #ifdef VBOX_WITH_PDM_AUDIO_DRIVER 197 AudioVRDE * getAudioVRDE() const { return mAudioVRDE; }139 AudioVRDE *i_getAudioVRDE() const { return mAudioVRDE; } 198 140 #else 199 AudioSniffer * getAudioSniffer() const { return mAudioSniffer; }200 #endif 201 202 const ComPtr<IMachine> & machine() const { return mMachine; }203 204 bool useHostClipboard() { return mfUseHostClipboard; }141 AudioSniffer *i_getAudioSniffer() const { return mAudioSniffer; } 142 #endif 143 144 const ComPtr<IMachine> &i_machine() const { return mMachine; } 145 146 bool i_useHostClipboard() { return mfUseHostClipboard; } 205 147 206 148 /** Method is called only from ConsoleVRDPServer */ 207 IVRDEServer * getVRDEServer() const { return mVRDEServer; }208 209 ConsoleVRDPServer * consoleVRDPServer() const { return mConsoleVRDPServer; }210 211 HRESULT updateMachineState(MachineState_T aMachineState);149 IVRDEServer *i_getVRDEServer() const { return mVRDEServer; } 150 151 ConsoleVRDPServer *i_consoleVRDPServer() const { return mConsoleVRDPServer; } 152 153 HRESULT i_updateMachineState(MachineState_T aMachineState); 212 154 213 155 // events from IInternalSessionControl 214 HRESULT onNetworkAdapterChange(INetworkAdapter *aNetworkAdapter, BOOL changeAdapter);215 HRESULT onSerialPortChange(ISerialPort *aSerialPort);216 HRESULT onParallelPortChange(IParallelPort *aParallelPort);217 HRESULT onStorageControllerChange();218 HRESULT onMediumChange(IMediumAttachment *aMediumAttachment, BOOL aForce);219 HRESULT onCPUChange(ULONG aCPU, BOOL aRemove);220 HRESULT onCPUExecutionCapChange(ULONG aExecutionCap);221 HRESULT onClipboardModeChange(ClipboardMode_T aClipboardMode);222 HRESULT onDnDModeChange(DnDMode_T aDnDMode);223 HRESULT onVRDEServerChange(BOOL aRestart);224 HRESULT onVideoCaptureChange();225 HRESULT onUSBControllerChange();226 HRESULT onSharedFolderChange(BOOL aGlobal);227 HRESULT onUSBDeviceAttach(IUSBDevice *aDevice, IVirtualBoxErrorInfo *aError, ULONG aMaskedIfs);228 HRESULT onUSBDeviceDetach(IN_BSTR aId, IVirtualBoxErrorInfo *aError);229 HRESULT onBandwidthGroupChange(IBandwidthGroup *aBandwidthGroup);230 HRESULT onStorageDeviceChange(IMediumAttachment *aMediumAttachment, BOOL aRemove, BOOL aSilent);231 HRESULT onExtraDataChange(IN_BSTR aMachineId, IN_BSTR aKey, IN_BSTR aVal);232 233 HRESULT getGuestProperty(IN_BSTR aKey, BSTR *aValue, LONG64 *aTimestamp, BSTR *aFlags);234 HRESULT setGuestProperty(IN_BSTR aKey, IN_BSTR aValue, IN_BSTR aFlags);235 HRESULT enumerateGuestProperties(IN_BSTR aPatterns,236 ComSafeArrayOut(BSTR, aNames),237 ComSafeArrayOut(BSTR, aValues),238 ComSafeArrayOut(LONG64, aTimestamps),239 ComSafeArrayOut(BSTR, aFlags));240 HRESULT onlineMergeMedium(IMediumAttachment *aMediumAttachment,241 ULONG aSourceIdx, ULONG aTargetIdx,242 IProgress *aProgress);243 int hgcmLoadService(const char *pszServiceLibrary, const char *pszServiceName);244 VMMDev * getVMMDev() { return m_pVMMDev; }156 HRESULT i_onNetworkAdapterChange(INetworkAdapter *aNetworkAdapter, BOOL changeAdapter); 157 HRESULT i_onSerialPortChange(ISerialPort *aSerialPort); 158 HRESULT i_onParallelPortChange(IParallelPort *aParallelPort); 159 HRESULT i_onStorageControllerChange(); 160 HRESULT i_onMediumChange(IMediumAttachment *aMediumAttachment, BOOL aForce); 161 HRESULT i_onCPUChange(ULONG aCPU, BOOL aRemove); 162 HRESULT i_onCPUExecutionCapChange(ULONG aExecutionCap); 163 HRESULT i_onClipboardModeChange(ClipboardMode_T aClipboardMode); 164 HRESULT i_onDnDModeChange(DnDMode_T aDnDMode); 165 HRESULT i_onVRDEServerChange(BOOL aRestart); 166 HRESULT i_onVideoCaptureChange(); 167 HRESULT i_onUSBControllerChange(); 168 HRESULT i_onSharedFolderChange(BOOL aGlobal); 169 HRESULT i_onUSBDeviceAttach(IUSBDevice *aDevice, IVirtualBoxErrorInfo *aError, ULONG aMaskedIfs); 170 HRESULT i_onUSBDeviceDetach(IN_BSTR aId, IVirtualBoxErrorInfo *aError); 171 HRESULT i_onBandwidthGroupChange(IBandwidthGroup *aBandwidthGroup); 172 HRESULT i_onStorageDeviceChange(IMediumAttachment *aMediumAttachment, BOOL aRemove, BOOL aSilent); 173 HRESULT i_onExtraDataChange(IN_BSTR aMachineId, IN_BSTR aKey, IN_BSTR aVal); 174 175 HRESULT i_getGuestProperty(IN_BSTR aKey, BSTR *aValue, LONG64 *aTimestamp, BSTR *aFlags); 176 HRESULT i_setGuestProperty(IN_BSTR aKey, IN_BSTR aValue, IN_BSTR aFlags); 177 HRESULT i_enumerateGuestProperties(IN_BSTR aPatterns, 178 ComSafeArrayOut(BSTR, aNames), 179 ComSafeArrayOut(BSTR, aValues), 180 ComSafeArrayOut(LONG64, aTimestamps), 181 ComSafeArrayOut(BSTR, aFlags)); 182 HRESULT i_onlineMergeMedium(IMediumAttachment *aMediumAttachment, 183 ULONG aSourceIdx, ULONG aTargetIdx, 184 IProgress *aProgress); 185 int i_hgcmLoadService(const char *pszServiceLibrary, const char *pszServiceName); 186 VMMDev *i_getVMMDev() { return m_pVMMDev; } 245 187 #ifdef VBOX_WITH_PDM_AUDIO_DRIVER 246 AudioVRDE * getAudioVRDE() { return mAudioVRDE; }188 AudioVRDE *i_getAudioVRDE() { return mAudioVRDE; } 247 189 #else 248 AudioSniffer * getAudioSniffer() { return mAudioSniffer; }190 AudioSniffer *i_getAudioSniffer() { return mAudioSniffer; } 249 191 #endif 250 192 251 193 #ifdef VBOX_WITH_EXTPACK 252 ExtPackManager * getExtPackManager();253 #endif 254 EventSource * getEventSource() { return mEventSource; }194 ExtPackManager *i_getExtPackManager(); 195 #endif 196 EventSource *i_getEventSource() { return mEventSource; } 255 197 #ifdef VBOX_WITH_USB_CARDREADER 256 UsbCardReader * getUsbCardReader() { return mUsbCardReader; }257 #endif 258 259 int VRDPClientLogon(uint32_t u32ClientId, const char *pszUser, const char *pszPassword, const char *pszDomain);260 void VRDPClientStatusChange(uint32_t u32ClientId, const char *pszStatus);261 void VRDPClientConnect(uint32_t u32ClientId);262 void VRDPClientDisconnect(uint32_t u32ClientId, uint32_t fu32Intercepted);263 void VRDPInterceptAudio(uint32_t u32ClientId);264 void VRDPInterceptUSB(uint32_t u32ClientId, void **ppvIntercept);265 void VRDPInterceptClipboard(uint32_t u32ClientId);266 267 void processRemoteUSBDevices(uint32_t u32ClientId, VRDEUSBDEVICEDESC *pDevList, uint32_t cbDevList, bool fDescExt);268 void reportVmStatistics(ULONG aValidStats, ULONG aCpuUser,269 270 271 272 273 274 275 198 UsbCardReader *i_getUsbCardReader() { return mUsbCardReader; } 199 #endif 200 201 int i_VRDPClientLogon(uint32_t u32ClientId, const char *pszUser, const char *pszPassword, const char *pszDomain); 202 void i_VRDPClientStatusChange(uint32_t u32ClientId, const char *pszStatus); 203 void i_VRDPClientConnect(uint32_t u32ClientId); 204 void i_VRDPClientDisconnect(uint32_t u32ClientId, uint32_t fu32Intercepted); 205 void i_VRDPInterceptAudio(uint32_t u32ClientId); 206 void i_VRDPInterceptUSB(uint32_t u32ClientId, void **ppvIntercept); 207 void i_VRDPInterceptClipboard(uint32_t u32ClientId); 208 209 void i_processRemoteUSBDevices(uint32_t u32ClientId, VRDEUSBDEVICEDESC *pDevList, uint32_t cbDevList, bool fDescExt); 210 void i_reportVmStatistics(ULONG aValidStats, ULONG aCpuUser, 211 ULONG aCpuKernel, ULONG aCpuIdle, 212 ULONG aMemTotal, ULONG aMemFree, 213 ULONG aMemBalloon, ULONG aMemShared, 214 ULONG aMemCache, ULONG aPageTotal, 215 ULONG aAllocVMM, ULONG aFreeVMM, 216 ULONG aBalloonedVMM, ULONG aSharedVMM, 217 ULONG aVmNetRx, ULONG aVmNetTx) 276 218 { 277 219 mControl->ReportVmStatistics(aValidStats, aCpuUser, aCpuKernel, aCpuIdle, … … 280 222 aBalloonedVMM, aSharedVMM, aVmNetRx, aVmNetTx); 281 223 } 282 void enableVMMStatistics(BOOL aEnable);283 284 HRESULT pause(Reason_T aReason);285 HRESULT resume(Reason_T aReason);286 HRESULT saveState(Reason_T aReason, IProgress **aProgress);224 void i_enableVMMStatistics(BOOL aEnable); 225 226 HRESULT i_pause(Reason_T aReason); 227 HRESULT i_resume(Reason_T aReason); 228 HRESULT i_saveState(Reason_T aReason, IProgress **aProgress); 287 229 288 230 // callback callers (partly; for some events console callbacks are notified 289 231 // directly from IInternalSessionControl event handlers declared above) 290 void onMousePointerShapeChange(bool fVisible, bool fAlpha,291 uint32_t xHot, uint32_t yHot,292 uint32_t width, uint32_t height,293 ComSafeArrayIn(uint8_t, aShape));294 void onMouseCapabilityChange(BOOL supportsAbsolute, BOOL supportsRelative,295 BOOL supportsMT, BOOL needsHostCursor);296 void onStateChange(MachineState_T aMachineState);297 void onAdditionsStateChange();298 void onAdditionsOutdated();299 void onKeyboardLedsChange(bool fNumLock, bool fCapsLock, bool fScrollLock);300 void onUSBDeviceStateChange(IUSBDevice *aDevice, bool aAttached,301 IVirtualBoxErrorInfo *aError);302 void onRuntimeError(BOOL aFatal, IN_BSTR aErrorID, IN_BSTR aMessage);303 HRESULT onShowWindow(BOOL aCheck, BOOL *aCanShow, LONG64 *aWinId);304 void onVRDEServerInfoChange();232 void i_onMousePointerShapeChange(bool fVisible, bool fAlpha, 233 uint32_t xHot, uint32_t yHot, 234 uint32_t width, uint32_t height, 235 ComSafeArrayIn(uint8_t, aShape)); 236 void i_onMouseCapabilityChange(BOOL supportsAbsolute, BOOL supportsRelative, 237 BOOL supportsMT, BOOL needsHostCursor); 238 void i_onStateChange(MachineState_T aMachineState); 239 void i_onAdditionsStateChange(); 240 void i_onAdditionsOutdated(); 241 void i_onKeyboardLedsChange(bool fNumLock, bool fCapsLock, bool fScrollLock); 242 void i_onUSBDeviceStateChange(IUSBDevice *aDevice, bool aAttached, 243 IVirtualBoxErrorInfo *aError); 244 void i_onRuntimeError(BOOL aFatal, IN_BSTR aErrorID, IN_BSTR aMessage); 245 HRESULT i_onShowWindow(BOOL aCheck, BOOL *aCanShow, LONG64 *aWinId); 246 void i_onVRDEServerInfoChange(); 305 247 306 248 static const PDMDRVREG DrvStatusReg; 307 249 308 static HRESULT setErrorStatic(HRESULT aResultCode, const char *pcsz, ...);309 HRESULT setInvalidMachineStateError();310 311 static const char * convertControllerTypeToDev(StorageControllerType_T enmCtrlType);312 static HRESULT convertBusPortDeviceToLun(StorageBus_T enmBus, LONG port, LONG device, unsigned &uLun);250 static HRESULT i_setErrorStatic(HRESULT aResultCode, const char *pcsz, ...); 251 HRESULT i_setInvalidMachineStateError(); 252 253 static const char *i_convertControllerTypeToDev(StorageControllerType_T enmCtrlType); 254 static HRESULT i_convertBusPortDeviceToLun(StorageBus_T enmBus, LONG port, LONG device, unsigned &uLun); 313 255 // Called from event listener 314 HRESULT onNATRedirectRuleChange(ULONG ulInstance, BOOL aNatRuleRemove,315 NATProtocol_T aProto, IN_BSTR aHostIp, LONG aHostPort, IN_BSTR aGuestIp, LONG aGuestPort);256 HRESULT i_onNATRedirectRuleChange(ULONG ulInstance, BOOL aNatRuleRemove, 257 NATProtocol_T aProto, IN_BSTR aHostIp, LONG aHostPort, IN_BSTR aGuestIp, LONG aGuestPort); 316 258 317 259 // Mouse interface 318 VMMDevMouseInterface * getVMMDevMouseInterface();319 DisplayMouseInterface * getDisplayMouseInterface();320 321 EmulatedUSB * getEmulatedUSB(void) { return mEmulatedUSB; }260 VMMDevMouseInterface *i_getVMMDevMouseInterface(); 261 DisplayMouseInterface *i_getDisplayMouseInterface(); 262 263 EmulatedUSB *i_getEmulatedUSB(void) { return mEmulatedUSB; } 322 264 323 265 /** … … 335 277 * - dek: The data encryption key in base64 encoding 336 278 */ 337 HRESULT setDiskEncryptionKeys(const Utf8Str &strCfg);279 HRESULT i_setDiskEncryptionKeys(const Utf8Str &strCfg); 338 280 339 281 private: 282 283 // wraped IConsole properties 284 HRESULT getMachine(ComPtr<IMachine> &aMachine); 285 HRESULT getState(MachineState_T *aState); 286 HRESULT getGuest(ComPtr<IGuest> &aGuest); 287 HRESULT getKeyboard(ComPtr<IKeyboard> &aKeyboard); 288 HRESULT getMouse(ComPtr<IMouse> &aMouse); 289 HRESULT getDisplay(ComPtr<IDisplay> &aDisplay); 290 HRESULT getDebugger(ComPtr<IMachineDebugger> &aDebugger); 291 HRESULT getUSBDevices(std::vector<ComPtr<IUSBDevice> > &aUSBDevices); 292 HRESULT getRemoteUSBDevices(std::vector<ComPtr<IHostUSBDevice> > &aRemoteUSBDevices); 293 HRESULT getSharedFolders(std::vector<ComPtr<ISharedFolder> > &aSharedFolders); 294 HRESULT getVRDEServerInfo(ComPtr<IVRDEServerInfo> &aVRDEServerInfo); 295 HRESULT getEventSource(ComPtr<IEventSource> &aEventSource); 296 HRESULT getAttachedPCIDevices(std::vector<ComPtr<IPCIDeviceAttachment> > &aAttachedPCIDevices); 297 HRESULT getUseHostClipboard(BOOL *aUseHostClipboard); 298 HRESULT setUseHostClipboard(BOOL aUseHostClipboard); 299 HRESULT getEmulatedUSB(ComPtr<IEmulatedUSB> &aEmulatedUSB); 300 301 // wraped IConsole methods 302 HRESULT powerUp(ComPtr<IProgress> &aProgress); 303 HRESULT powerUpPaused(ComPtr<IProgress> &aProgress); 304 HRESULT powerDown(ComPtr<IProgress> &aProgress); 305 HRESULT reset(); 306 HRESULT pause(); 307 HRESULT resume(); 308 HRESULT powerButton(); 309 HRESULT sleepButton(); 310 HRESULT getPowerButtonHandled(BOOL *aHandled); 311 HRESULT getGuestEnteredACPIMode(BOOL *aEntered); 312 HRESULT saveState(ComPtr<IProgress> &aProgress); 313 HRESULT adoptSavedState(const com::Utf8Str &aSavedStateFile); 314 HRESULT discardSavedState(BOOL aFRemoveFile); 315 HRESULT getDeviceActivity(DeviceType_T aType, 316 DeviceActivity_T *aActivity); 317 HRESULT attachUSBDevice(const com::Guid &aId); 318 HRESULT detachUSBDevice(const com::Guid &aId, 319 ComPtr<IUSBDevice> &aDevice); 320 HRESULT findUSBDeviceByAddress(const com::Utf8Str &aName, 321 ComPtr<IUSBDevice> &aDevice); 322 HRESULT findUSBDeviceById(const com::Guid &aId, 323 ComPtr<IUSBDevice> &aDevice); 324 HRESULT createSharedFolder(const com::Utf8Str &aName, 325 const com::Utf8Str &aHostPath, 326 BOOL aWritable, 327 BOOL aAutomount); 328 HRESULT removeSharedFolder(const com::Utf8Str &aName); 329 HRESULT takeSnapshot(const com::Utf8Str &aName, 330 const com::Utf8Str &aDescription, 331 ComPtr<IProgress> &aProgress); 332 HRESULT deleteSnapshot(const com::Guid &aId, 333 ComPtr<IProgress> &aProgress); 334 HRESULT deleteSnapshotAndAllChildren(const com::Guid &aId, 335 ComPtr<IProgress> &aProgress); 336 HRESULT deleteSnapshotRange(const com::Guid &aStartId, 337 const com::Guid &aEndId, 338 ComPtr<IProgress> &aProgress); 339 HRESULT restoreSnapshot(const ComPtr<ISnapshot> &aSnapshot, 340 ComPtr<IProgress> &aProgress); 341 HRESULT teleport(const com::Utf8Str &aHostname, 342 ULONG aTcpport, 343 const com::Utf8Str &aPassword, 344 ULONG aMaxDowntime, 345 ComPtr<IProgress> &aProgress); 340 346 341 347 /** … … 350 356 { 351 357 Assert(aThat); 352 mRC = aThat-> addVMCaller(taQuiet, taAllowNullVM);358 mRC = aThat->i_addVMCaller(taQuiet, taAllowNullVM); 353 359 } 354 360 ~AutoVMCallerBase() … … 367 373 { 368 374 AssertReturnVoid(!SUCCEEDED(mRC)); 369 mRC = mThat-> addVMCaller(taQuiet, taAllowNullVM);375 mRC = mThat->i_addVMCaller(taQuiet, taAllowNullVM); 370 376 } 371 377 /** Returns the result of Console::addVMCaller() */ … … 379 385 if (SUCCEEDED(mRC)) 380 386 { 381 mThat-> releaseVMCaller();387 mThat->i_releaseVMCaller(); 382 388 mRC = E_FAIL; 383 389 } … … 447 453 { 448 454 if (Base::isOk()) 449 mRC = aThat-> safeVMPtrRetainer(&mpUVM, taQuiet);455 mRC = aThat->i_safeVMPtrRetainer(&mpUVM, taQuiet); 450 456 } 451 457 ~SafeVMPtrBase() … … 472 478 if (SUCCEEDED(mRC)) 473 479 { 474 Base::mThat-> safeVMPtrReleaser(&mpUVM);480 Base::mThat->i_safeVMPtrReleaser(&mpUVM); 475 481 mRC = E_FAIL; 476 482 } … … 571 577 typedef std::list <ComObjPtr<RemoteUSBDevice> > RemoteUSBDeviceList; 572 578 573 HRESULT addVMCaller(bool aQuiet = false, bool aAllowNullVM = false);574 void releaseVMCaller();575 HRESULT safeVMPtrRetainer(PUVM *a_ppUVM, bool aQuiet);576 void safeVMPtrReleaser(PUVM *a_ppUVM);577 578 HRESULT consoleInitReleaseLog(const ComPtr<IMachine> aMachine);579 580 HRESULT powerUp(IProgress **aProgress, bool aPaused);581 HRESULT powerDown(IProgress *aProgress = NULL);579 HRESULT i_addVMCaller(bool aQuiet = false, bool aAllowNullVM = false); 580 void i_releaseVMCaller(); 581 HRESULT i_safeVMPtrRetainer(PUVM *a_ppUVM, bool aQuiet); 582 void i_safeVMPtrReleaser(PUVM *a_ppUVM); 583 584 HRESULT i_consoleInitReleaseLog(const ComPtr<IMachine> aMachine); 585 586 HRESULT i_powerUp(IProgress **aProgress, bool aPaused); 587 HRESULT i_powerDown(IProgress *aProgress = NULL); 582 588 583 589 /* Note: FreeBSD needs this whether netflt is used or not. */ 584 590 #if ((defined(RT_OS_LINUX) && !defined(VBOX_WITH_NETFLT)) || defined(RT_OS_FREEBSD)) 585 HRESULT attachToTapInterface(INetworkAdapter *networkAdapter);586 HRESULT detachFromTapInterface(INetworkAdapter *networkAdapter);587 #endif 588 HRESULT powerDownHostInterfaces();589 590 HRESULT setMachineState(MachineState_T aMachineState, bool aUpdateServer = true);591 HRESULT setMachineStateLocally(MachineState_T aMachineState)591 HRESULT i_attachToTapInterface(INetworkAdapter *networkAdapter); 592 HRESULT i_detachFromTapInterface(INetworkAdapter *networkAdapter); 593 #endif 594 HRESULT i_powerDownHostInterfaces(); 595 596 HRESULT i_setMachineState(MachineState_T aMachineState, bool aUpdateServer = true); 597 HRESULT i_setMachineStateLocally(MachineState_T aMachineState) 592 598 { 593 return setMachineState(aMachineState, false /* aUpdateServer */);599 return i_setMachineState(aMachineState, false /* aUpdateServer */); 594 600 } 595 601 596 HRESULT findSharedFolder(const Utf8Str &strName, 597 ComObjPtr<SharedFolder> &aSharedFolder, 598 bool aSetError = false); 599 600 HRESULT fetchSharedFolders(BOOL aGlobal); 601 bool findOtherSharedFolder(const Utf8Str &straName, 602 SharedFolderDataMap::const_iterator &aIt); 603 604 HRESULT createSharedFolder(const Utf8Str &strName, const SharedFolderData &aData); 605 HRESULT removeSharedFolder(const Utf8Str &strName); 606 607 HRESULT suspendBeforeConfigChange(PUVM pUVM, AutoWriteLock *pAlock, bool *pfResume); 608 void resumeAfterConfigChange(PUVM pUVM); 609 610 static DECLCALLBACK(int) configConstructor(PUVM pUVM, PVM pVM, void *pvConsole); 611 int configConstructorInner(PUVM pUVM, PVM pVM, AutoWriteLock *pAlock); 612 int configCfgmOverlay(PCFGMNODE pRoot, IVirtualBox *pVirtualBox, IMachine *pMachine); 613 int configDumpAPISettingsTweaks(IVirtualBox *pVirtualBox, IMachine *pMachine); 614 615 int configGraphicsController(PCFGMNODE pDevices, 616 const GraphicsControllerType_T graphicsController, 617 BusAssignmentManager *pBusMgr, 618 const ComPtr<IMachine> &pMachine, 619 const ComPtr<IBIOSSettings> &biosSettings, 620 bool fHMEnabled); 621 int configMediumAttachment(PCFGMNODE pCtlInst, 622 const char *pcszDevice, 623 unsigned uInstance, 624 StorageBus_T enmBus, 625 bool fUseHostIOCache, 626 bool fBuiltinIoCache, 627 bool fSetupMerge, 628 unsigned uMergeSource, 629 unsigned uMergeTarget, 630 IMediumAttachment *pMediumAtt, 631 MachineState_T aMachineState, 632 HRESULT *phrc, 633 bool fAttachDetach, 634 bool fForceUnmount, 635 bool fHotplug, 636 PUVM pUVM, 637 DeviceType_T *paLedDevType, 638 PCFGMNODE *ppLunL0); 639 int configMedium(PCFGMNODE pLunL0, 640 bool fPassthrough, 641 DeviceType_T enmType, 642 bool fUseHostIOCache, 643 bool fBuiltinIoCache, 644 bool fSetupMerge, 645 unsigned uMergeSource, 646 unsigned uMergeTarget, 647 const char *pcszBwGroup, 648 bool fDiscard, 649 IMedium *pMedium, 650 MachineState_T aMachineState, 651 HRESULT *phrc); 652 static DECLCALLBACK(int) reconfigureMediumAttachment(Console *pThis, 653 PUVM pUVM, 654 const char *pcszDevice, 655 unsigned uInstance, 656 StorageBus_T enmBus, 657 bool fUseHostIOCache, 658 bool fBuiltinIoCache, 659 bool fSetupMerge, 660 unsigned uMergeSource, 661 unsigned uMergeTarget, 662 IMediumAttachment *aMediumAtt, 663 MachineState_T aMachineState, 664 HRESULT *phrc); 665 static DECLCALLBACK(int) changeRemovableMedium(Console *pThis, 602 HRESULT i_findSharedFolder(const Utf8Str &strName, 603 ComObjPtr<SharedFolder> &aSharedFolder, 604 bool aSetError = false); 605 606 HRESULT i_fetchSharedFolders(BOOL aGlobal); 607 bool i_findOtherSharedFolder(const Utf8Str &straName, 608 SharedFolderDataMap::const_iterator &aIt); 609 610 HRESULT i_createSharedFolder(const Utf8Str &strName, const SharedFolderData &aData); 611 HRESULT i_removeSharedFolder(const Utf8Str &strName); 612 613 HRESULT i_suspendBeforeConfigChange(PUVM pUVM, AutoWriteLock *pAlock, bool *pfResume); 614 void i_resumeAfterConfigChange(PUVM pUVM); 615 616 static DECLCALLBACK(int) i_configConstructor(PUVM pUVM, PVM pVM, void *pvConsole); 617 int i_configConstructorInner(PUVM pUVM, PVM pVM, AutoWriteLock *pAlock); 618 int i_configCfgmOverlay(PCFGMNODE pRoot, IVirtualBox *pVirtualBox, IMachine *pMachine); 619 int i_configDumpAPISettingsTweaks(IVirtualBox *pVirtualBox, IMachine *pMachine); 620 621 int i_configGraphicsController(PCFGMNODE pDevices, 622 const GraphicsControllerType_T graphicsController, 623 BusAssignmentManager *pBusMgr, 624 const ComPtr<IMachine> &pMachine, 625 const ComPtr<IBIOSSettings> &biosSettings, 626 bool fHMEnabled); 627 int i_configMediumAttachment(PCFGMNODE pCtlInst, 628 const char *pcszDevice, 629 unsigned uInstance, 630 StorageBus_T enmBus, 631 bool fUseHostIOCache, 632 bool fBuiltinIoCache, 633 bool fSetupMerge, 634 unsigned uMergeSource, 635 unsigned uMergeTarget, 636 IMediumAttachment *pMediumAtt, 637 MachineState_T aMachineState, 638 HRESULT *phrc, 639 bool fAttachDetach, 640 bool fForceUnmount, 641 bool fHotplug, 642 PUVM pUVM, 643 DeviceType_T *paLedDevType, 644 PCFGMNODE *ppLunL0); 645 int i_configMedium(PCFGMNODE pLunL0, 646 bool fPassthrough, 647 DeviceType_T enmType, 648 bool fUseHostIOCache, 649 bool fBuiltinIoCache, 650 bool fSetupMerge, 651 unsigned uMergeSource, 652 unsigned uMergeTarget, 653 const char *pcszBwGroup, 654 bool fDiscard, 655 IMedium *pMedium, 656 MachineState_T aMachineState, 657 HRESULT *phrc); 658 static DECLCALLBACK(int) i_reconfigureMediumAttachment(Console *pThis, 659 PUVM pUVM, 660 const char *pcszDevice, 661 unsigned uInstance, 662 StorageBus_T enmBus, 663 bool fUseHostIOCache, 664 bool fBuiltinIoCache, 665 bool fSetupMerge, 666 unsigned uMergeSource, 667 unsigned uMergeTarget, 668 IMediumAttachment *aMediumAtt, 669 MachineState_T aMachineState, 670 HRESULT *phrc); 671 static DECLCALLBACK(int) i_changeRemovableMedium(Console *pThis, 672 PUVM pUVM, 673 const char *pcszDevice, 674 unsigned uInstance, 675 StorageBus_T enmBus, 676 bool fUseHostIOCache, 677 IMediumAttachment *aMediumAtt, 678 bool fForce); 679 680 HRESULT i_attachRawPCIDevices(PUVM pUVM, BusAssignmentManager *BusMgr, PCFGMNODE pDevices); 681 void i_attachStatusDriver(PCFGMNODE pCtlInst, PPDMLED *papLeds, 682 uint64_t uFirst, uint64_t uLast, 683 Console::MediumAttachmentMap *pmapMediumAttachments, 684 const char *pcszDevice, unsigned uInstance); 685 686 int i_configNetwork(const char *pszDevice, unsigned uInstance, unsigned uLun, 687 INetworkAdapter *aNetworkAdapter, PCFGMNODE pCfg, 688 PCFGMNODE pLunL0, PCFGMNODE pInst, 689 bool fAttachDetach, bool fIgnoreConnectFailure); 690 691 static DECLCALLBACK(int) i_configGuestProperties(void *pvConsole, PUVM pUVM); 692 static DECLCALLBACK(int) i_configGuestControl(void *pvConsole); 693 static DECLCALLBACK(void) i_vmstateChangeCallback(PUVM pUVM, VMSTATE enmState, VMSTATE enmOldState, void *pvUser); 694 static DECLCALLBACK(int) i_unplugCpu(Console *pThis, PUVM pUVM, VMCPUID idCpu); 695 static DECLCALLBACK(int) i_plugCpu(Console *pThis, PUVM pUVM, VMCPUID idCpu); 696 HRESULT i_doMediumChange(IMediumAttachment *aMediumAttachment, bool fForce, PUVM pUVM); 697 HRESULT i_doCPURemove(ULONG aCpu, PUVM pUVM); 698 HRESULT i_doCPUAdd(ULONG aCpu, PUVM pUVM); 699 700 HRESULT i_doNetworkAdapterChange(PUVM pUVM, const char *pszDevice, unsigned uInstance, 701 unsigned uLun, INetworkAdapter *aNetworkAdapter); 702 static DECLCALLBACK(int) i_changeNetworkAttachment(Console *pThis, PUVM pUVM, const char *pszDevice, 703 unsigned uInstance, unsigned uLun, 704 INetworkAdapter *aNetworkAdapter); 705 706 void i_changeClipboardMode(ClipboardMode_T aClipboardMode); 707 int i_changeDnDMode(DnDMode_T aDnDMode); 708 709 #ifdef VBOX_WITH_USB 710 HRESULT i_attachUSBDevice(IUSBDevice *aHostDevice, ULONG aMaskedIfs); 711 HRESULT i_detachUSBDevice(const ComObjPtr<OUSBDevice> &aHostDevice); 712 713 static DECLCALLBACK(int) i_usbAttachCallback(Console *that, PUVM pUVM, IUSBDevice *aHostDevice, PCRTUUID aUuid, 714 bool aRemote, const char *aAddress, void *pvRemoteBackend, 715 USHORT aPortVersion, ULONG aMaskedIfs); 716 static DECLCALLBACK(int) i_usbDetachCallback(Console *that, PUVM pUVM, PCRTUUID aUuid); 717 #endif 718 719 static DECLCALLBACK(int) i_attachStorageDevice(Console *pThis, 666 720 PUVM pUVM, 667 721 const char *pcszDevice, … … 670 724 bool fUseHostIOCache, 671 725 IMediumAttachment *aMediumAtt, 672 bool fForce); 673 674 HRESULT attachRawPCIDevices(PUVM pUVM, BusAssignmentManager *BusMgr, PCFGMNODE pDevices); 675 void attachStatusDriver(PCFGMNODE pCtlInst, PPDMLED *papLeds, 676 uint64_t uFirst, uint64_t uLast, 677 Console::MediumAttachmentMap *pmapMediumAttachments, 678 const char *pcszDevice, unsigned uInstance); 679 680 int configNetwork(const char *pszDevice, unsigned uInstance, unsigned uLun, 681 INetworkAdapter *aNetworkAdapter, PCFGMNODE pCfg, 682 PCFGMNODE pLunL0, PCFGMNODE pInst, 683 bool fAttachDetach, bool fIgnoreConnectFailure); 684 685 static DECLCALLBACK(int) configGuestProperties(void *pvConsole, PUVM pUVM); 686 static DECLCALLBACK(int) configGuestControl(void *pvConsole); 687 static DECLCALLBACK(void) vmstateChangeCallback(PUVM pUVM, VMSTATE enmState, VMSTATE enmOldState, void *pvUser); 688 static DECLCALLBACK(int) unplugCpu(Console *pThis, PUVM pUVM, VMCPUID idCpu); 689 static DECLCALLBACK(int) plugCpu(Console *pThis, PUVM pUVM, VMCPUID idCpu); 690 HRESULT doMediumChange(IMediumAttachment *aMediumAttachment, bool fForce, PUVM pUVM); 691 HRESULT doCPURemove(ULONG aCpu, PUVM pUVM); 692 HRESULT doCPUAdd(ULONG aCpu, PUVM pUVM); 693 694 HRESULT doNetworkAdapterChange(PUVM pUVM, const char *pszDevice, unsigned uInstance, 695 unsigned uLun, INetworkAdapter *aNetworkAdapter); 696 static DECLCALLBACK(int) changeNetworkAttachment(Console *pThis, PUVM pUVM, const char *pszDevice, 697 unsigned uInstance, unsigned uLun, 698 INetworkAdapter *aNetworkAdapter); 699 700 void changeClipboardMode(ClipboardMode_T aClipboardMode); 701 int changeDnDMode(DnDMode_T aDnDMode); 702 703 #ifdef VBOX_WITH_USB 704 HRESULT attachUSBDevice(IUSBDevice *aHostDevice, ULONG aMaskedIfs); 705 HRESULT detachUSBDevice(const ComObjPtr<OUSBDevice> &aHostDevice); 706 707 static DECLCALLBACK(int) usbAttachCallback(Console *that, PUVM pUVM, IUSBDevice *aHostDevice, PCRTUUID aUuid, 708 bool aRemote, const char *aAddress, void *pvRemoteBackend, USHORT aPortVersion, ULONG aMaskedIfs); 709 static DECLCALLBACK(int) usbDetachCallback(Console *that, PUVM pUVM, PCRTUUID aUuid); 710 #endif 711 712 static DECLCALLBACK(int) attachStorageDevice(Console *pThis, 713 PUVM pUVM, 714 const char *pcszDevice, 715 unsigned uInstance, 716 StorageBus_T enmBus, 717 bool fUseHostIOCache, 718 IMediumAttachment *aMediumAtt, 719 bool fSilent); 720 static DECLCALLBACK(int) detachStorageDevice(Console *pThis, 721 PUVM pUVM, 722 const char *pcszDevice, 723 unsigned uInstance, 724 StorageBus_T enmBus, 725 IMediumAttachment *aMediumAtt, 726 bool fSilent); 727 HRESULT doStorageDeviceAttach(IMediumAttachment *aMediumAttachment, PUVM pUVM, bool fSilent); 728 HRESULT doStorageDeviceDetach(IMediumAttachment *aMediumAttachment, PUVM pUVM, bool fSilent); 729 730 static DECLCALLBACK(int) fntTakeSnapshotWorker(RTTHREAD Thread, void *pvUser); 731 732 static DECLCALLBACK(int) stateProgressCallback(PUVM pUVM, unsigned uPercent, void *pvUser); 733 734 static DECLCALLBACK(void) genericVMSetErrorCallback(PUVM pUVM, void *pvUser, int rc, RT_SRC_POS_DECL, 735 const char *pszErrorFmt, va_list va); 736 737 void setVMRuntimeErrorCallbackF(uint32_t fFatal, const char *pszErrorId, const char *pszFormat, ...); 738 static DECLCALLBACK(void) setVMRuntimeErrorCallback(PUVM pUVM, void *pvUser, uint32_t fFatal, 739 const char *pszErrorId, const char *pszFormat, va_list va); 740 741 HRESULT captureUSBDevices(PUVM pUVM); 742 void detachAllUSBDevices(bool aDone); 743 744 static DECLCALLBACK(int) powerUpThread(RTTHREAD Thread, void *pvUser); 745 static DECLCALLBACK(int) saveStateThread(RTTHREAD Thread, void *pvUser); 746 static DECLCALLBACK(int) powerDownThread(RTTHREAD Thread, void *pvUser); 747 748 static DECLCALLBACK(int) vmm2User_SaveState(PCVMM2USERMETHODS pThis, PUVM pUVM); 749 static DECLCALLBACK(void) vmm2User_NotifyEmtInit(PCVMM2USERMETHODS pThis, PUVM pUVM, PUVMCPU pUVCpu); 750 static DECLCALLBACK(void) vmm2User_NotifyEmtTerm(PCVMM2USERMETHODS pThis, PUVM pUVM, PUVMCPU pUVCpu); 751 static DECLCALLBACK(void) vmm2User_NotifyPdmtInit(PCVMM2USERMETHODS pThis, PUVM pUVM); 752 static DECLCALLBACK(void) vmm2User_NotifyPdmtTerm(PCVMM2USERMETHODS pThis, PUVM pUVM); 753 static DECLCALLBACK(void) vmm2User_NotifyResetTurnedIntoPowerOff(PCVMM2USERMETHODS pThis, PUVM pUVM); 754 755 static DECLCALLBACK(void *) drvStatus_QueryInterface(PPDMIBASE pInterface, const char *pszIID); 756 static DECLCALLBACK(void) drvStatus_UnitChanged(PPDMILEDCONNECTORS pInterface, unsigned iLUN); 757 static DECLCALLBACK(int) drvStatus_MediumEjected(PPDMIMEDIANOTIFY pInterface, unsigned iLUN); 758 static DECLCALLBACK(void) drvStatus_Destruct(PPDMDRVINS pDrvIns); 759 static DECLCALLBACK(int) drvStatus_Construct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags); 726 bool fSilent); 727 static DECLCALLBACK(int) i_detachStorageDevice(Console *pThis, 728 PUVM pUVM, 729 const char *pcszDevice, 730 unsigned uInstance, 731 StorageBus_T enmBus, 732 IMediumAttachment *aMediumAtt, 733 bool fSilent); 734 HRESULT i_doStorageDeviceAttach(IMediumAttachment *aMediumAttachment, PUVM pUVM, bool fSilent); 735 HRESULT i_doStorageDeviceDetach(IMediumAttachment *aMediumAttachment, PUVM pUVM, bool fSilent); 736 737 static DECLCALLBACK(int) i_fntTakeSnapshotWorker(RTTHREAD Thread, void *pvUser); 738 739 static DECLCALLBACK(int) i_stateProgressCallback(PUVM pUVM, unsigned uPercent, void *pvUser); 740 741 static DECLCALLBACK(void) i_genericVMSetErrorCallback(PUVM pUVM, void *pvUser, int rc, RT_SRC_POS_DECL, 742 const char *pszErrorFmt, va_list va); 743 744 void i_setVMRuntimeErrorCallbackF(uint32_t fFatal, const char *pszErrorId, const char *pszFormat, ...); 745 static DECLCALLBACK(void) i_setVMRuntimeErrorCallback(PUVM pUVM, void *pvUser, uint32_t fFatal, 746 const char *pszErrorId, const char *pszFormat, va_list va); 747 748 HRESULT i_captureUSBDevices(PUVM pUVM); 749 void i_detachAllUSBDevices(bool aDone); 750 751 static DECLCALLBACK(int) i_powerUpThread(RTTHREAD Thread, void *pvUser); 752 static DECLCALLBACK(int) i_saveStateThread(RTTHREAD Thread, void *pvUser); 753 static DECLCALLBACK(int) i_powerDownThread(RTTHREAD Thread, void *pvUser); 754 755 static DECLCALLBACK(int) i_vmm2User_SaveState(PCVMM2USERMETHODS pThis, PUVM pUVM); 756 static DECLCALLBACK(void) i_vmm2User_NotifyEmtInit(PCVMM2USERMETHODS pThis, PUVM pUVM, PUVMCPU pUVCpu); 757 static DECLCALLBACK(void) i_vmm2User_NotifyEmtTerm(PCVMM2USERMETHODS pThis, PUVM pUVM, PUVMCPU pUVCpu); 758 static DECLCALLBACK(void) i_vmm2User_NotifyPdmtInit(PCVMM2USERMETHODS pThis, PUVM pUVM); 759 static DECLCALLBACK(void) i_vmm2User_NotifyPdmtTerm(PCVMM2USERMETHODS pThis, PUVM pUVM); 760 static DECLCALLBACK(void) i_vmm2User_NotifyResetTurnedIntoPowerOff(PCVMM2USERMETHODS pThis, PUVM pUVM); 761 762 static DECLCALLBACK(void *) i_drvStatus_QueryInterface(PPDMIBASE pInterface, const char *pszIID); 763 static DECLCALLBACK(void) i_drvStatus_UnitChanged(PPDMILEDCONNECTORS pInterface, unsigned iLUN); 764 static DECLCALLBACK(int) i_drvStatus_MediumEjected(PPDMIMEDIANOTIFY pInterface, unsigned iLUN); 765 static DECLCALLBACK(void) i_drvStatus_Destruct(PPDMDRVINS pDrvIns); 766 static DECLCALLBACK(int) i_drvStatus_Construct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags); 760 767 761 768 int mcAudioRefs; … … 767 774 static uint32_t sSSMConsoleVer; 768 775 769 HRESULT loadDataFromSavedState();770 int loadStateFileExecInternal(PSSMHANDLE pSSM, uint32_t u32Version);771 772 static DECLCALLBACK(void) saveStateFileExec(PSSMHANDLE pSSM, void *pvUser);773 static DECLCALLBACK(int) loadStateFileExec(PSSMHANDLE pSSM, void *pvUser, uint32_t uVersion, uint32_t uPass);776 HRESULT i_loadDataFromSavedState(); 777 int i_loadStateFileExecInternal(PSSMHANDLE pSSM, uint32_t u32Version); 778 779 static DECLCALLBACK(void) i_saveStateFileExec(PSSMHANDLE pSSM, void *pvUser); 780 static DECLCALLBACK(int) i_loadStateFileExec(PSSMHANDLE pSSM, void *pvUser, uint32_t uVersion, uint32_t uPass); 774 781 775 782 #ifdef VBOX_WITH_GUEST_PROPS 776 static DECLCALLBACK(int) doGuestPropNotification(void *pvExtension, uint32_t, void *pvParms, uint32_t cbParms);777 HRESULT doEnumerateGuestProperties(CBSTR aPatterns,778 ComSafeArrayOut(BSTR, aNames),779 ComSafeArrayOut(BSTR, aValues),780 ComSafeArrayOut(LONG64, aTimestamps),781 ComSafeArrayOut(BSTR, aFlags));782 783 void guestPropertiesHandleVMReset(void);784 bool guestPropertiesVRDPEnabled(void);785 void guestPropertiesVRDPUpdateLogon(uint32_t u32ClientId, const char *pszUser, const char *pszDomain);786 void guestPropertiesVRDPUpdateActiveClient(uint32_t u32ClientId);787 void guestPropertiesVRDPUpdateClientAttach(uint32_t u32ClientId, bool fAttached);788 void guestPropertiesVRDPUpdateNameChange(uint32_t u32ClientId, const char *pszName);789 void guestPropertiesVRDPUpdateIPAddrChange(uint32_t u32ClientId, const char *pszIPAddr);790 void guestPropertiesVRDPUpdateLocationChange(uint32_t u32ClientId, const char *pszLocation);791 void guestPropertiesVRDPUpdateOtherInfoChange(uint32_t u32ClientId, const char *pszOtherInfo);792 void guestPropertiesVRDPUpdateDisconnect(uint32_t u32ClientId);793 #endif 794 795 bool i sResetTurnedIntoPowerOff(void);783 static DECLCALLBACK(int) i_doGuestPropNotification(void *pvExtension, uint32_t, void *pvParms, uint32_t cbParms); 784 HRESULT i_doEnumerateGuestProperties(CBSTR aPatterns, 785 ComSafeArrayOut(BSTR, aNames), 786 ComSafeArrayOut(BSTR, aValues), 787 ComSafeArrayOut(LONG64, aTimestamps), 788 ComSafeArrayOut(BSTR, aFlags)); 789 790 void i_guestPropertiesHandleVMReset(void); 791 bool i_guestPropertiesVRDPEnabled(void); 792 void i_guestPropertiesVRDPUpdateLogon(uint32_t u32ClientId, const char *pszUser, const char *pszDomain); 793 void i_guestPropertiesVRDPUpdateActiveClient(uint32_t u32ClientId); 794 void i_guestPropertiesVRDPUpdateClientAttach(uint32_t u32ClientId, bool fAttached); 795 void i_guestPropertiesVRDPUpdateNameChange(uint32_t u32ClientId, const char *pszName); 796 void i_guestPropertiesVRDPUpdateIPAddrChange(uint32_t u32ClientId, const char *pszIPAddr); 797 void i_guestPropertiesVRDPUpdateLocationChange(uint32_t u32ClientId, const char *pszLocation); 798 void i_guestPropertiesVRDPUpdateOtherInfoChange(uint32_t u32ClientId, const char *pszOtherInfo); 799 void i_guestPropertiesVRDPUpdateDisconnect(uint32_t u32ClientId); 800 #endif 801 802 bool i_isResetTurnedIntoPowerOff(void); 796 803 797 804 /** @name Disk encryption support 798 805 * @{ */ 799 HRESULT consoleParseDiskEncryption(const char *psz, const char **ppszEnd);800 HRESULT configureEncryptionForDisk(const char *pszUuid, const uint8_t *pbKey, size_t cbKey);801 int consoleParseKeyValue(const char *psz, const char **ppszEnd,802 char **ppszKey, char **ppszVal);806 HRESULT i_consoleParseDiskEncryption(const char *psz, const char **ppszEnd); 807 HRESULT i_configureEncryptionForDisk(const char *pszUuid, const uint8_t *pbKey, size_t cbKey); 808 int i_consoleParseKeyValue(const char *psz, const char **ppszEnd, 809 char **ppszKey, char **ppszVal); 803 810 /** @} */ 804 811 805 812 /** @name Teleporter support 806 813 * @{ */ 807 static DECLCALLBACK(int) teleporterSrcThreadWrapper(RTTHREAD hThread, void *pvUser);808 HRESULT teleporterSrc(TeleporterStateSrc *pState);809 HRESULT teleporterSrcReadACK(TeleporterStateSrc *pState, const char *pszWhich, const char *pszNAckMsg = NULL);810 HRESULT teleporterSrcSubmitCommand(TeleporterStateSrc *pState, const char *pszCommand, bool fWaitForAck = true);811 HRESULT teleporterTrg(PUVM pUVM, IMachine *pMachine, Utf8Str *pErrorMsg, bool fStartPaused,814 static DECLCALLBACK(int) i_teleporterSrcThreadWrapper(RTTHREAD hThread, void *pvUser); 815 HRESULT i_teleporterSrc(TeleporterStateSrc *pState); 816 HRESULT i_teleporterSrcReadACK(TeleporterStateSrc *pState, const char *pszWhich, const char *pszNAckMsg = NULL); 817 HRESULT i_teleporterSrcSubmitCommand(TeleporterStateSrc *pState, const char *pszCommand, bool fWaitForAck = true); 818 HRESULT i_teleporterTrg(PUVM pUVM, IMachine *pMachine, Utf8Str *pErrorMsg, bool fStartPaused, 812 819 Progress *pProgress, bool *pfPowerOffOnFailure); 813 static DECLCALLBACK(int) teleporterTrgServeConnection(RTSOCKET Sock, void *pvUser);820 static DECLCALLBACK(int) i_teleporterTrgServeConnection(RTSOCKET Sock, void *pvUser); 814 821 /** @} */ 815 822 -
trunk/src/VBox/Main/src-all/ExtPackManagerImpl.cpp
r50914 r51612 5 5 6 6 /* 7 * Copyright (C) 2010-201 3Oracle Corporation7 * Copyright (C) 2010-2014 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 1551 1551 1552 1552 Console *pCon = (Console *)pConsole; 1553 return pCon-> hgcmLoadService(pszServiceLibrary, pszServiceName);1553 return pCon->i_hgcmLoadService(pszServiceLibrary, pszServiceName); 1554 1554 #else 1555 1555 NOREF(pHlp); NOREF(pConsole); NOREF(pszServiceLibrary); NOREF(pszServiceName); -
trunk/src/VBox/Main/src-client/AudioSnifferInterface.cpp
r45029 r51612 100 100 */ 101 101 VRDEAUDIOFORMAT format = VRDE_AUDIO_FMT_MAKE(samplesPerSec, nChannels, bitsPerSample, !fUnsigned); 102 pDrv->pAudioSniffer->getParent()-> consoleVRDPServer()->SendAudioSamples(pvSamples, cSamples, format);102 pDrv->pAudioSniffer->getParent()->i_consoleVRDPServer()->SendAudioSamples(pvSamples, cSamples, format); 103 103 } 104 104 … … 110 110 * Just call the VRDP server with the data. 111 111 */ 112 pDrv->pAudioSniffer->getParent()-> consoleVRDPServer()->SendAudioVolume(left, right);112 pDrv->pAudioSniffer->getParent()->i_consoleVRDPServer()->SendAudioVolume(left, right); 113 113 } 114 114 … … 123 123 PDRVAUDIOSNIFFER pDrv = PDMIAUDIOSNIFFERCONNECTOR_2_MAINAUDIOSNIFFER(pInterface); 124 124 125 return pDrv->pAudioSniffer->getParent()-> consoleVRDPServer()->SendAudioInputBegin(ppvUserCtx,125 return pDrv->pAudioSniffer->getParent()->i_consoleVRDPServer()->SendAudioInputBegin(ppvUserCtx, 126 126 pvContext, 127 127 cSamples, … … 136 136 PDRVAUDIOSNIFFER pDrv = PDMIAUDIOSNIFFERCONNECTOR_2_MAINAUDIOSNIFFER(pInterface); 137 137 138 pDrv->pAudioSniffer->getParent()-> consoleVRDPServer()->SendAudioInputEnd(pvUserCtx);138 pDrv->pAudioSniffer->getParent()->i_consoleVRDPServer()->SendAudioInputEnd(pvUserCtx); 139 139 } 140 140 -
trunk/src/VBox/Main/src-client/BusAssignmentManager.cpp
r50721 r51612 7 7 8 8 /* 9 * Copyright (C) 2010-201 3Oracle Corporation9 * Copyright (C) 2010-2014 Oracle Corporation 10 10 * 11 11 * This file is part of VirtualBox Open Source Edition (OSE), as … … 269 269 const char* findAlias(const char* pszName); 270 270 void addMatchingRules(const char* pszName, PCIRulesList& aList); 271 void listAttachedPCIDevices( ComSafeArrayOut(IPCIDeviceAttachment*, aAttached));271 void listAttachedPCIDevices(std::vector<ComPtr<IPCIDeviceAttachment> > &aAttached); 272 272 }; 273 273 … … 395 395 } 396 396 397 398 void BusAssignmentManager::State::listAttachedPCIDevices(ComSafeArrayOut(IPCIDeviceAttachment*, aAttached)) 399 { 400 com::SafeIfaceArray<IPCIDeviceAttachment> result(mPCIMap.size()); 401 402 size_t iIndex = 0; 397 void BusAssignmentManager::State::listAttachedPCIDevices(std::vector<ComPtr<IPCIDeviceAttachment> > &aAttached) 398 { 399 aAttached.resize(mPCIMap.size()); 400 401 size_t i = 0; 403 402 ComObjPtr<PCIDeviceAttachment> dev; 404 for (PCIMap::const_iterator it = mPCIMap.begin(); it != mPCIMap.end(); ++it )403 for (PCIMap::const_iterator it = mPCIMap.begin(); it != mPCIMap.end(); ++it, ++i) 405 404 { 406 405 dev.createObject(); … … 409 408 it->second.HostAddress.valid() ? it->second.HostAddress.asLong() : -1, 410 409 it->first.asLong(), it->second.HostAddress.valid()); 411 result.setElement(iIndex++, dev); 412 } 413 414 result.detachTo(ComSafeArrayOutArg(aAttached)); 410 dev.queryInterfaceTo(aAttached[i].asOutParam()); 411 } 415 412 } 416 413 … … 508 505 return pState->findPCIAddress(pszDevName, iInstance, Address); 509 506 } 510 511 void BusAssignmentManager::listAttachedPCIDevices(ComSafeArrayOut(IPCIDeviceAttachment*, aAttached)) 512 { 513 pState->listAttachedPCIDevices(ComSafeArrayOutArg(aAttached)); 514 } 507 void BusAssignmentManager::listAttachedPCIDevices(std::vector<ComPtr<IPCIDeviceAttachment> > &aAttached) 508 { 509 pState->listAttachedPCIDevices(aAttached); 510 } -
trunk/src/VBox/Main/src-client/ConsoleImpl.cpp
r51552 r51612 317 317 { 318 318 Bstr id; 319 ComPtr<IMachine> pMachine = mConsole-> machine();319 ComPtr<IMachine> pMachine = mConsole->i_machine(); 320 320 ComPtr<INATRedirectEvent> pNREv = aEvent; 321 321 HRESULT rc = E_FAIL; … … 346 346 if (FAILED(rc)) 347 347 break; 348 mConsole-> onNATRedirectRuleChange(ulSlot, fRemove, proto, hostIp.raw(), hostPort, guestIp.raw(), guestPort);348 mConsole->i_onNATRedirectRuleChange(ulSlot, fRemove, proto, hostIp.raw(), hostPort, guestIp.raw(), guestPort); 349 349 } 350 350 break; … … 373 373 if (FAILED(hrc)) break; 374 374 375 mConsole-> onExtraDataChange(strMachineId.raw(), strKey.raw(), strVal.raw());375 mConsole->i_onExtraDataChange(strMachineId.raw(), strKey.raw(), strVal.raw()); 376 376 break; 377 377 } … … 448 448 pVmm2UserMethods->u32Magic = VMM2USERMETHODS_MAGIC; 449 449 pVmm2UserMethods->u32Version = VMM2USERMETHODS_VERSION; 450 pVmm2UserMethods->pfnSaveState = Console:: vmm2User_SaveState;451 pVmm2UserMethods->pfnNotifyEmtInit = Console:: vmm2User_NotifyEmtInit;452 pVmm2UserMethods->pfnNotifyEmtTerm = Console:: vmm2User_NotifyEmtTerm;453 pVmm2UserMethods->pfnNotifyPdmtInit = Console:: vmm2User_NotifyPdmtInit;454 pVmm2UserMethods->pfnNotifyPdmtTerm = Console:: vmm2User_NotifyPdmtTerm;455 pVmm2UserMethods->pfnNotifyResetTurnedIntoPowerOff = Console:: vmm2User_NotifyResetTurnedIntoPowerOff;450 pVmm2UserMethods->pfnSaveState = Console::i_vmm2User_SaveState; 451 pVmm2UserMethods->pfnNotifyEmtInit = Console::i_vmm2User_NotifyEmtInit; 452 pVmm2UserMethods->pfnNotifyEmtTerm = Console::i_vmm2User_NotifyEmtTerm; 453 pVmm2UserMethods->pfnNotifyPdmtInit = Console::i_vmm2User_NotifyPdmtInit; 454 pVmm2UserMethods->pfnNotifyPdmtTerm = Console::i_vmm2User_NotifyPdmtTerm; 455 pVmm2UserMethods->pfnNotifyResetTurnedIntoPowerOff = Console::i_vmm2User_NotifyResetTurnedIntoPowerOff; 456 456 pVmm2UserMethods->u32EndMagic = VMM2USERMETHODS_MAGIC; 457 457 pVmm2UserMethods->pConsole = this; … … 542 542 /* Grab global and machine shared folder lists */ 543 543 544 rc = fetchSharedFolders(true /* aGlobal */);544 rc = i_fetchSharedFolders(true /* aGlobal */); 545 545 AssertComRCReturnRC(rc); 546 rc = fetchSharedFolders(false /* aGlobal */);546 rc = i_fetchSharedFolders(false /* aGlobal */); 547 547 AssertComRCReturnRC(rc); 548 548 … … 671 671 if (mpUVM) 672 672 { 673 powerDown();673 i_powerDown(); 674 674 Assert(mpUVM == NULL); 675 675 } … … 803 803 * back into the VM process and the HGCM service.) 804 804 */ 805 void Console:: guestPropertiesHandleVMReset(void)805 void Console::i_guestPropertiesHandleVMReset(void) 806 806 { 807 807 com::SafeArray<BSTR> arrNames; … … 809 809 com::SafeArray<LONG64> arrTimestamps; 810 810 com::SafeArray<BSTR> arrFlags; 811 HRESULT hrc = enumerateGuestProperties(Bstr("*").raw(),812 ComSafeArrayAsOutParam(arrNames),813 ComSafeArrayAsOutParam(arrValues),814 ComSafeArrayAsOutParam(arrTimestamps),815 ComSafeArrayAsOutParam(arrFlags));811 HRESULT hrc = i_enumerateGuestProperties(Bstr("*").raw(), 812 ComSafeArrayAsOutParam(arrNames), 813 ComSafeArrayAsOutParam(arrValues), 814 ComSafeArrayAsOutParam(arrTimestamps), 815 ComSafeArrayAsOutParam(arrFlags)); 816 816 if (SUCCEEDED(hrc)) 817 817 { … … 832 832 } 833 833 834 bool Console:: guestPropertiesVRDPEnabled(void)834 bool Console::i_guestPropertiesVRDPEnabled(void) 835 835 { 836 836 Bstr value; … … 843 843 } 844 844 845 void Console:: guestPropertiesVRDPUpdateLogon(uint32_t u32ClientId, const char *pszUser, const char *pszDomain)846 { 847 if (! guestPropertiesVRDPEnabled())845 void Console::i_guestPropertiesVRDPUpdateLogon(uint32_t u32ClientId, const char *pszUser, const char *pszDomain) 846 { 847 if (!i_guestPropertiesVRDPEnabled()) 848 848 return; 849 849 … … 880 880 } 881 881 882 void Console:: guestPropertiesVRDPUpdateActiveClient(uint32_t u32ClientId)883 { 884 if (! guestPropertiesVRDPEnabled())882 void Console::i_guestPropertiesVRDPUpdateActiveClient(uint32_t u32ClientId) 883 { 884 if (!i_guestPropertiesVRDPEnabled()) 885 885 return; 886 886 … … 899 899 } 900 900 901 void Console:: guestPropertiesVRDPUpdateNameChange(uint32_t u32ClientId, const char *pszName)902 { 903 if (! guestPropertiesVRDPEnabled())901 void Console::i_guestPropertiesVRDPUpdateNameChange(uint32_t u32ClientId, const char *pszName) 902 { 903 if (!i_guestPropertiesVRDPEnabled()) 904 904 return; 905 905 … … 918 918 } 919 919 920 void Console:: guestPropertiesVRDPUpdateIPAddrChange(uint32_t u32ClientId, const char *pszIPAddr)921 { 922 if (! guestPropertiesVRDPEnabled())920 void Console::i_guestPropertiesVRDPUpdateIPAddrChange(uint32_t u32ClientId, const char *pszIPAddr) 921 { 922 if (!i_guestPropertiesVRDPEnabled()) 923 923 return; 924 924 … … 937 937 } 938 938 939 void Console:: guestPropertiesVRDPUpdateLocationChange(uint32_t u32ClientId, const char *pszLocation)940 { 941 if (! guestPropertiesVRDPEnabled())939 void Console::i_guestPropertiesVRDPUpdateLocationChange(uint32_t u32ClientId, const char *pszLocation) 940 { 941 if (!i_guestPropertiesVRDPEnabled()) 942 942 return; 943 943 … … 956 956 } 957 957 958 void Console:: guestPropertiesVRDPUpdateOtherInfoChange(uint32_t u32ClientId, const char *pszOtherInfo)959 { 960 if (! guestPropertiesVRDPEnabled())958 void Console::i_guestPropertiesVRDPUpdateOtherInfoChange(uint32_t u32ClientId, const char *pszOtherInfo) 959 { 960 if (!i_guestPropertiesVRDPEnabled()) 961 961 return; 962 962 … … 975 975 } 976 976 977 void Console:: guestPropertiesVRDPUpdateClientAttach(uint32_t u32ClientId, bool fAttached)978 { 979 if (! guestPropertiesVRDPEnabled())977 void Console::i_guestPropertiesVRDPUpdateClientAttach(uint32_t u32ClientId, bool fAttached) 978 { 979 if (!i_guestPropertiesVRDPEnabled()) 980 980 return; 981 981 … … 994 994 } 995 995 996 void Console:: guestPropertiesVRDPUpdateDisconnect(uint32_t u32ClientId)997 { 998 if (! guestPropertiesVRDPEnabled())996 void Console::i_guestPropertiesVRDPUpdateDisconnect(uint32_t u32ClientId) 997 { 998 if (!i_guestPropertiesVRDPEnabled()) 999 999 return; 1000 1000 … … 1031 1031 #endif /* VBOX_WITH_GUEST_PROPS */ 1032 1032 1033 bool Console::i sResetTurnedIntoPowerOff(void)1033 bool Console::i_isResetTurnedIntoPowerOff(void) 1034 1034 { 1035 1035 Bstr value; … … 1048 1048 * @returns The extension pack manager. 1049 1049 */ 1050 ExtPackManager *Console:: getExtPackManager()1050 ExtPackManager *Console::i_getExtPackManager() 1051 1051 { 1052 1052 return mptrExtPackManager; … … 1055 1055 1056 1056 1057 int Console:: VRDPClientLogon(uint32_t u32ClientId, const char *pszUser, const char *pszPassword, const char *pszDomain)1057 int Console::i_VRDPClientLogon(uint32_t u32ClientId, const char *pszUser, const char *pszPassword, const char *pszDomain) 1058 1058 { 1059 1059 LogFlowFuncEnter(); … … 1249 1249 1250 1250 #ifdef VBOX_WITH_GUEST_PROPS 1251 guestPropertiesVRDPUpdateLogon(u32ClientId, pszUser, pszDomain);1251 i_guestPropertiesVRDPUpdateLogon(u32ClientId, pszUser, pszDomain); 1252 1252 #endif /* VBOX_WITH_GUEST_PROPS */ 1253 1253 … … 1265 1265 Bstr flags; 1266 1266 1267 hrc = getGuestProperty(Bstr("/VirtualBox/GuestInfo/OS/NoLoggedInUsers").raw(),1268 noLoggedInUsersValue.asOutParam(), &ul64Timestamp, flags.asOutParam());1267 hrc = i_getGuestProperty(Bstr("/VirtualBox/GuestInfo/OS/NoLoggedInUsers").raw(), 1268 noLoggedInUsersValue.asOutParam(), &ul64Timestamp, flags.asOutParam()); 1269 1269 1270 1270 if (SUCCEEDED(hrc) && noLoggedInUsersValue != Bstr("false")) … … 1296 1296 } 1297 1297 1298 void Console:: VRDPClientStatusChange(uint32_t u32ClientId, const char *pszStatus)1298 void Console::i_VRDPClientStatusChange(uint32_t u32ClientId, const char *pszStatus) 1299 1299 { 1300 1300 LogFlowFuncEnter(); … … 1309 1309 if (RTStrICmp(pszStatus, "ATTACH") == 0) 1310 1310 { 1311 guestPropertiesVRDPUpdateClientAttach(u32ClientId, true);1311 i_guestPropertiesVRDPUpdateClientAttach(u32ClientId, true); 1312 1312 } 1313 1313 else if (RTStrICmp(pszStatus, "DETACH") == 0) 1314 1314 { 1315 guestPropertiesVRDPUpdateClientAttach(u32ClientId, false);1315 i_guestPropertiesVRDPUpdateClientAttach(u32ClientId, false); 1316 1316 } 1317 1317 else if (RTStrNICmp(pszStatus, "NAME=", strlen("NAME=")) == 0) 1318 1318 { 1319 guestPropertiesVRDPUpdateNameChange(u32ClientId, pszStatus + strlen("NAME="));1319 i_guestPropertiesVRDPUpdateNameChange(u32ClientId, pszStatus + strlen("NAME=")); 1320 1320 } 1321 1321 else if (RTStrNICmp(pszStatus, "CIPA=", strlen("CIPA=")) == 0) 1322 1322 { 1323 guestPropertiesVRDPUpdateIPAddrChange(u32ClientId, pszStatus + strlen("CIPA="));1323 i_guestPropertiesVRDPUpdateIPAddrChange(u32ClientId, pszStatus + strlen("CIPA=")); 1324 1324 } 1325 1325 else if (RTStrNICmp(pszStatus, "CLOCATION=", strlen("CLOCATION=")) == 0) 1326 1326 { 1327 guestPropertiesVRDPUpdateLocationChange(u32ClientId, pszStatus + strlen("CLOCATION="));1327 i_guestPropertiesVRDPUpdateLocationChange(u32ClientId, pszStatus + strlen("CLOCATION=")); 1328 1328 } 1329 1329 else if (RTStrNICmp(pszStatus, "COINFO=", strlen("COINFO=")) == 0) 1330 1330 { 1331 guestPropertiesVRDPUpdateOtherInfoChange(u32ClientId, pszStatus + strlen("COINFO="));1331 i_guestPropertiesVRDPUpdateOtherInfoChange(u32ClientId, pszStatus + strlen("COINFO=")); 1332 1332 } 1333 1333 #endif … … 1336 1336 } 1337 1337 1338 void Console:: VRDPClientConnect(uint32_t u32ClientId)1338 void Console::i_VRDPClientConnect(uint32_t u32ClientId) 1339 1339 { 1340 1340 LogFlowFuncEnter(); … … 1347 1347 PPDMIVMMDEVPORT pPort; 1348 1348 if ( (u32Clients == 1) 1349 && ((pDev = getVMMDev()))1349 && ((pDev = i_getVMMDev())) 1350 1350 && ((pPort = pDev->getVMMDevPort())) 1351 1351 ) … … 1360 1360 1361 1361 #ifdef VBOX_WITH_GUEST_PROPS 1362 guestPropertiesVRDPUpdateActiveClient(u32ClientId);1362 i_guestPropertiesVRDPUpdateActiveClient(u32ClientId); 1363 1363 #endif /* VBOX_WITH_GUEST_PROPS */ 1364 1364 … … 1367 1367 } 1368 1368 1369 void Console:: VRDPClientDisconnect(uint32_t u32ClientId,1370 uint32_t fu32Intercepted)1369 void Console::i_VRDPClientDisconnect(uint32_t u32ClientId, 1370 uint32_t fu32Intercepted) 1371 1371 { 1372 1372 LogFlowFuncEnter(); … … 1382 1382 1383 1383 if ( (u32Clients == 0) 1384 && ((pDev = getVMMDev()))1384 && ((pDev = i_getVMMDev())) 1385 1385 && ((pPort = pDev->getVMMDevPort())) 1386 1386 ) … … 1434 1434 1435 1435 #ifdef VBOX_WITH_GUEST_PROPS 1436 guestPropertiesVRDPUpdateDisconnect(u32ClientId);1436 i_guestPropertiesVRDPUpdateDisconnect(u32ClientId); 1437 1437 if (u32Clients == 0) 1438 guestPropertiesVRDPUpdateActiveClient(0);1438 i_guestPropertiesVRDPUpdateActiveClient(0); 1439 1439 #endif /* VBOX_WITH_GUEST_PROPS */ 1440 1440 … … 1446 1446 } 1447 1447 1448 void Console:: VRDPInterceptAudio(uint32_t u32ClientId)1448 void Console::i_VRDPInterceptAudio(uint32_t u32ClientId) 1449 1449 { 1450 1450 LogFlowFuncEnter(); … … 1478 1478 } 1479 1479 1480 void Console:: VRDPInterceptUSB(uint32_t u32ClientId, void **ppvIntercept)1480 void Console::i_VRDPInterceptUSB(uint32_t u32ClientId, void **ppvIntercept) 1481 1481 { 1482 1482 LogFlowFuncEnter(); … … 1493 1493 } 1494 1494 1495 void Console:: VRDPInterceptClipboard(uint32_t u32ClientId)1495 void Console::i_VRDPInterceptClipboard(uint32_t u32ClientId) 1496 1496 { 1497 1497 LogFlowFuncEnter(); … … 1548 1548 * @note The caller must lock this object for writing. 1549 1549 */ 1550 HRESULT Console:: loadDataFromSavedState()1550 HRESULT Console::i_loadDataFromSavedState() 1551 1551 { 1552 1552 if (mMachineState != MachineState_Saved || mSavedStateDataLoaded) … … 1567 1567 { 1568 1568 if (RT_SUCCESS(vrc)) 1569 vrc = loadStateFileExecInternal(ssm, version);1569 vrc = i_loadStateFileExecInternal(ssm, version); 1570 1570 else if (vrc == VERR_SSM_UNIT_NOT_FOUND) 1571 1571 vrc = VINF_SUCCESS; … … 1596 1596 */ 1597 1597 //static 1598 DECLCALLBACK(void) 1599 Console::saveStateFileExec(PSSMHANDLE pSSM, void *pvUser) 1598 DECLCALLBACK(void) Console::i_saveStateFileExec(PSSMHANDLE pSSM, void *pvUser) 1600 1599 { 1601 1600 LogFlowFunc(("\n")); … … 1655 1654 //static 1656 1655 DECLCALLBACK(int) 1657 Console:: loadStateFileExec(PSSMHANDLE pSSM, void *pvUser, uint32_t uVersion, uint32_t uPass)1656 Console::i_loadStateFileExec(PSSMHANDLE pSSM, void *pvUser, uint32_t uVersion, uint32_t uPass) 1658 1657 { 1659 1658 LogFlowFunc(("\n")); … … 1680 1679 * @note Locks the Console object for writing. 1681 1680 */ 1682 int 1683 Console::loadStateFileExecInternal(PSSMHANDLE pSSM, uint32_t u32Version) 1681 int Console::i_loadStateFileExecInternal(PSSMHANDLE pSSM, uint32_t u32Version) 1684 1682 { 1685 1683 AutoCaller autoCaller(this); … … 1745 1743 1746 1744 // static 1747 DECLCALLBACK(int) Console:: doGuestPropNotification(void *pvExtension,1748 uint32_t u32Function,1749 void *pvParms,1750 uint32_t cbParms)1745 DECLCALLBACK(int) Console::i_doGuestPropNotification(void *pvExtension, 1746 uint32_t u32Function, 1747 void *pvParms, 1748 uint32_t cbParms) 1751 1749 { 1752 1750 using namespace guestProp; … … 1784 1782 } 1785 1783 1786 HRESULT Console:: doEnumerateGuestProperties(CBSTR aPatterns,1787 ComSafeArrayOut(BSTR, aNames),1788 ComSafeArrayOut(BSTR, aValues),1789 ComSafeArrayOut(LONG64, aTimestamps),1790 ComSafeArrayOut(BSTR, aFlags))1784 HRESULT Console::i_doEnumerateGuestProperties(CBSTR aPatterns, 1785 ComSafeArrayOut(BSTR, aNames), 1786 ComSafeArrayOut(BSTR, aValues), 1787 ComSafeArrayOut(LONG64, aTimestamps), 1788 ComSafeArrayOut(BSTR, aFlags)) 1791 1789 { 1792 1790 AssertReturn(m_pVMMDev, E_FAIL); … … 1888 1886 // IConsole properties 1889 1887 ///////////////////////////////////////////////////////////////////////////// 1890 1891 STDMETHODIMP Console::COMGETTER(Machine)(IMachine **aMachine) 1892 { 1893 CheckComArgOutPointerValid(aMachine); 1894 1895 AutoCaller autoCaller(this); 1896 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 1897 1888 HRESULT Console::getMachine(ComPtr<IMachine> &aMachine) 1889 { 1898 1890 /* mMachine is constant during life time, no need to lock */ 1899 mMachine.queryInterfaceTo(aMachine );1891 mMachine.queryInterfaceTo(aMachine.asOutParam()); 1900 1892 1901 1893 /* callers expect to get a valid reference, better fail than crash them */ … … 1906 1898 } 1907 1899 1908 STDMETHODIMP Console::COMGETTER(State)(MachineState_T *aMachineState) 1909 { 1910 CheckComArgOutPointerValid(aMachineState); 1911 1912 AutoCaller autoCaller(this); 1913 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 1914 1900 HRESULT Console::getState(MachineState_T *aState) 1901 { 1915 1902 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 1916 1903 1917 1904 /* we return our local state (since it's always the same as on the server) */ 1918 *a MachineState = mMachineState;1905 *aState = mMachineState; 1919 1906 1920 1907 return S_OK; 1921 1908 } 1922 1909 1923 STDMETHODIMP Console::COMGETTER(Guest)(IGuest **aGuest) 1924 { 1925 CheckComArgOutPointerValid(aGuest); 1926 1927 AutoCaller autoCaller(this); 1928 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 1929 1910 HRESULT Console::getGuest(ComPtr<IGuest> &aGuest) 1911 { 1930 1912 /* mGuest is constant during life time, no need to lock */ 1931 mGuest.queryInterfaceTo(aGuest );1913 mGuest.queryInterfaceTo(aGuest.asOutParam()); 1932 1914 1933 1915 return S_OK; 1934 1916 } 1935 1917 1936 STDMETHODIMP Console::COMGETTER(Keyboard)(IKeyboard **aKeyboard) 1937 { 1938 CheckComArgOutPointerValid(aKeyboard); 1939 1940 AutoCaller autoCaller(this); 1941 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 1942 1918 HRESULT Console::getKeyboard(ComPtr<IKeyboard> &aKeyboard) 1919 { 1943 1920 /* mKeyboard is constant during life time, no need to lock */ 1944 mKeyboard.queryInterfaceTo(aKeyboard );1921 mKeyboard.queryInterfaceTo(aKeyboard.asOutParam()); 1945 1922 1946 1923 return S_OK; 1947 1924 } 1948 1925 1949 STDMETHODIMP Console::COMGETTER(Mouse)(IMouse **aMouse) 1950 { 1951 CheckComArgOutPointerValid(aMouse); 1952 1953 AutoCaller autoCaller(this); 1954 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 1955 1926 HRESULT Console::getMouse(ComPtr<IMouse> &aMouse) 1927 { 1956 1928 /* mMouse is constant during life time, no need to lock */ 1957 mMouse.queryInterfaceTo(aMouse );1929 mMouse.queryInterfaceTo(aMouse.asOutParam()); 1958 1930 1959 1931 return S_OK; 1960 1932 } 1961 1933 1962 STDMETHODIMP Console::COMGETTER(Display)(IDisplay **aDisplay) 1963 { 1964 CheckComArgOutPointerValid(aDisplay); 1965 1966 AutoCaller autoCaller(this); 1967 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 1968 1934 HRESULT Console::getDisplay(ComPtr<IDisplay> &aDisplay) 1935 { 1969 1936 /* mDisplay is constant during life time, no need to lock */ 1970 mDisplay.queryInterfaceTo(aDisplay );1937 mDisplay.queryInterfaceTo(aDisplay.asOutParam()); 1971 1938 1972 1939 return S_OK; 1973 1940 } 1974 1941 1975 STDMETHODIMP Console::COMGETTER(Debugger)(IMachineDebugger **aDebugger) 1976 { 1977 CheckComArgOutPointerValid(aDebugger); 1978 1979 AutoCaller autoCaller(this); 1980 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 1981 1942 HRESULT Console::getDebugger(ComPtr<IMachineDebugger> &aDebugger) 1943 { 1982 1944 /* we need a write lock because of the lazy mDebugger initialization*/ 1983 1945 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); … … 1990 1952 } 1991 1953 1992 mDebugger.queryInterfaceTo(aDebugger );1954 mDebugger.queryInterfaceTo(aDebugger.asOutParam()); 1993 1955 1994 1956 return S_OK; 1995 1957 } 1996 1958 1997 STDMETHODIMP Console::COMGETTER(USBDevices)(ComSafeArrayOut(IUSBDevice *, aUSBDevices)) 1998 { 1999 CheckComArgOutSafeArrayPointerValid(aUSBDevices); 2000 2001 AutoCaller autoCaller(this); 2002 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 2003 1959 HRESULT Console::getUSBDevices(std::vector<ComPtr<IUSBDevice> > &aUSBDevices) 1960 { 2004 1961 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 2005 1962 2006 SafeIfaceArray<IUSBDevice> collection(mUSBDevices); 2007 collection.detachTo(ComSafeArrayOutArg(aUSBDevices)); 1963 size_t i = 0; 1964 for (USBDeviceList::const_iterator it = mUSBDevices.begin(); it != mUSBDevices.end(); ++i, ++it) 1965 (*it).queryInterfaceTo(aUSBDevices[i].asOutParam()); 2008 1966 2009 1967 return S_OK; 2010 1968 } 2011 1969 2012 STDMETHODIMP Console::COMGETTER(RemoteUSBDevices)(ComSafeArrayOut(IHostUSBDevice *, aRemoteUSBDevices)) 2013 { 2014 CheckComArgOutSafeArrayPointerValid(aRemoteUSBDevices); 2015 2016 AutoCaller autoCaller(this); 2017 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 2018 1970 1971 HRESULT Console::getRemoteUSBDevices(std::vector<ComPtr<IHostUSBDevice> > &aRemoteUSBDevices) 1972 { 2019 1973 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 2020 1974 2021 SafeIfaceArray<IHostUSBDevice> collection(mRemoteUSBDevices); 2022 collection.detachTo(ComSafeArrayOutArg(aRemoteUSBDevices)); 1975 size_t i = 0; 1976 for (RemoteUSBDeviceList::const_iterator it = mRemoteUSBDevices.begin(); it != mRemoteUSBDevices.end(); ++i, ++it) 1977 (*it).queryInterfaceTo(aRemoteUSBDevices[i].asOutParam()); 2023 1978 2024 1979 return S_OK; 2025 1980 } 2026 1981 2027 STDMETHODIMP Console::COMGETTER(VRDEServerInfo)(IVRDEServerInfo **aVRDEServerInfo) 2028 { 2029 CheckComArgOutPointerValid(aVRDEServerInfo); 2030 2031 AutoCaller autoCaller(this); 2032 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 2033 1982 HRESULT Console::getVRDEServerInfo(ComPtr<IVRDEServerInfo> &aVRDEServerInfo) 1983 { 2034 1984 /* mVRDEServerInfo is constant during life time, no need to lock */ 2035 mVRDEServerInfo.queryInterfaceTo(aVRDEServerInfo );1985 mVRDEServerInfo.queryInterfaceTo(aVRDEServerInfo.asOutParam()); 2036 1986 2037 1987 return S_OK; 2038 1988 } 2039 1989 2040 STDMETHODIMP Console::COMGETTER(EmulatedUSB)(IEmulatedUSB **aEmulatedUSB) 2041 { 2042 CheckComArgOutPointerValid(aEmulatedUSB); 2043 2044 AutoCaller autoCaller(this); 2045 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 2046 1990 HRESULT Console::getEmulatedUSB(ComPtr<IEmulatedUSB> &aEmulatedUSB) 1991 { 2047 1992 /* mEmulatedUSB is constant during life time, no need to lock */ 2048 mEmulatedUSB.queryInterfaceTo(aEmulatedUSB );1993 mEmulatedUSB.queryInterfaceTo(aEmulatedUSB.asOutParam()); 2049 1994 2050 1995 return S_OK; 2051 1996 } 2052 1997 2053 STDMETHODIMP 2054 Console::COMGETTER(SharedFolders)(ComSafeArrayOut(ISharedFolder *, aSharedFolders)) 2055 { 2056 CheckComArgOutSafeArrayPointerValid(aSharedFolders); 2057 2058 AutoCaller autoCaller(this); 2059 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 2060 1998 HRESULT Console::getSharedFolders(std::vector<ComPtr<ISharedFolder> > &aSharedFolders) 1999 { 2061 2000 /* loadDataFromSavedState() needs a write lock */ 2062 2001 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 2063 2002 2064 2003 /* Read console data stored in the saved state file (if not yet done) */ 2065 HRESULT rc = loadDataFromSavedState();2004 HRESULT rc = i_loadDataFromSavedState(); 2066 2005 if (FAILED(rc)) return rc; 2067 2006 2068 SafeIfaceArray<ISharedFolder> sf(m_mapSharedFolders); 2069 sf.detachTo(ComSafeArrayOutArg(aSharedFolders)); 2007 size_t i = 0; 2008 for (SharedFolderMap::const_iterator it = m_mapSharedFolders.begin(); it != m_mapSharedFolders.end(); ++i, ++it) 2009 (it)->second.queryInterfaceTo(aSharedFolders[i].asOutParam()); 2070 2010 2071 2011 return S_OK; 2072 2012 } 2073 2013 2074 2075 STDMETHODIMP Console::COMGETTER(EventSource)(IEventSource ** aEventSource) 2076 { 2077 CheckComArgOutPointerValid(aEventSource); 2078 2079 AutoCaller autoCaller(this); 2080 HRESULT hrc = autoCaller.rc(); 2081 if (SUCCEEDED(hrc)) 2082 { 2083 // no need to lock - lifetime constant 2084 mEventSource.queryInterfaceTo(aEventSource); 2085 } 2086 2087 return hrc; 2088 } 2089 2090 STDMETHODIMP Console::COMGETTER(AttachedPCIDevices)(ComSafeArrayOut(IPCIDeviceAttachment *, aAttachments)) 2091 { 2092 CheckComArgOutSafeArrayPointerValid(aAttachments); 2093 2094 AutoCaller autoCaller(this); 2095 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 2096 2014 HRESULT Console::getEventSource(ComPtr<IEventSource> &aEventSource) 2015 { 2016 // no need to lock - lifetime constant 2017 mEventSource.queryInterfaceTo(aEventSource.asOutParam()); 2018 2019 return S_OK; 2020 } 2021 2022 HRESULT Console::getAttachedPCIDevices(std::vector<ComPtr<IPCIDeviceAttachment> > &aAttachedPCIDevices) 2023 { 2097 2024 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 2098 2025 2099 2026 if (mBusMgr) 2100 mBusMgr->listAttachedPCIDevices( ComSafeArrayOutArg(aAttachments));2027 mBusMgr->listAttachedPCIDevices(aAttachedPCIDevices); 2101 2028 else 2102 { 2103 com::SafeIfaceArray<IPCIDeviceAttachment> result((size_t)0); 2104 result.detachTo(ComSafeArrayOutArg(aAttachments)); 2105 } 2029 aAttachedPCIDevices.resize(0); 2106 2030 2107 2031 return S_OK; 2108 2032 } 2109 2033 2110 STDMETHODIMP Console::COMGETTER(UseHostClipboard)(BOOL *aUseHostClipboard) 2111 { 2112 CheckComArgOutPointerValid(aUseHostClipboard); 2113 2114 AutoCaller autoCaller(this); 2115 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 2116 2034 HRESULT Console::getUseHostClipboard(BOOL *aUseHostClipboard) 2035 { 2117 2036 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 2118 2037 … … 2122 2041 } 2123 2042 2124 STDMETHODIMP Console::COMSETTER(UseHostClipboard)(BOOL aUseHostClipboard) 2125 { 2126 AutoCaller autoCaller(this); 2127 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 2128 2129 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 2130 2043 HRESULT Console::setUseHostClipboard(BOOL aUseHostClipboard) 2044 { 2131 2045 mfUseHostClipboard = !!aUseHostClipboard; 2132 2046 … … 2137 2051 ///////////////////////////////////////////////////////////////////////////// 2138 2052 2139 2140 STDMETHODIMP Console::PowerUp(IProgress **aProgress) 2141 { 2142 return powerUp(aProgress, false /* aPaused */); 2143 } 2144 2145 STDMETHODIMP Console::PowerUpPaused(IProgress **aProgress) 2146 { 2147 return powerUp(aProgress, true /* aPaused */); 2148 } 2149 2150 STDMETHODIMP Console::PowerDown(IProgress **aProgress) 2053 HRESULT Console::powerUp(ComPtr<IProgress> &aProgress) 2054 { 2055 ComObjPtr<IProgress> pProgress; 2056 i_powerUp(pProgress.asOutParam(), false /* aPaused */); 2057 pProgress.queryInterfaceTo(aProgress.asOutParam()); 2058 return S_OK; 2059 } 2060 2061 HRESULT Console::powerUpPaused(ComPtr<IProgress> &aProgress) 2062 { 2063 ComObjPtr<IProgress> pProgress; 2064 i_powerUp(pProgress.asOutParam(), true /* aPaused */); 2065 pProgress.queryInterfaceTo(aProgress.asOutParam()); 2066 return S_OK; 2067 } 2068 2069 HRESULT Console::powerDown(ComPtr<IProgress> &aProgress) 2151 2070 { 2152 2071 LogFlowThisFuncEnter(); 2153 2154 CheckComArgOutPointerValid(aProgress);2155 2156 AutoCaller autoCaller(this);2157 if (FAILED(autoCaller.rc())) return autoCaller.rc();2158 2072 2159 2073 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); … … 2224 2138 alock.release(); 2225 2139 2226 if (i sResetTurnedIntoPowerOff())2140 if (i_isResetTurnedIntoPowerOff()) 2227 2141 { 2228 2142 mMachine->DeleteGuestProperty(Bstr("/VirtualBox/HostInfo/VMPowerOffReason").raw()); … … 2247 2161 2248 2162 /* sync the state with the server */ 2249 setMachineStateLocally(MachineState_Stopping);2163 i_setMachineStateLocally(MachineState_Stopping); 2250 2164 2251 2165 /* setup task object and thread to carry out the operation asynchronously */ … … 2253 2167 AssertBreakStmt(task->isOk(), rc = E_FAIL); 2254 2168 2255 int vrc = RTThreadCreate(NULL, Console:: powerDownThread,2169 int vrc = RTThreadCreate(NULL, Console::i_powerDownThread, 2256 2170 (void *) task.get(), 0, 2257 2171 RTTHREADTYPE_MAIN_WORKER, 0, … … 2267 2181 2268 2182 /* pass the progress to the caller */ 2269 pProgress.queryInterfaceTo(aProgress );2183 pProgress.queryInterfaceTo(aProgress.asOutParam()); 2270 2184 } 2271 2185 while (0); … … 2285 2199 mControl->EndPoweringDown(eik.getResultCode(), eik.getText().raw()); } 2286 2200 2287 setMachineStateLocally(lastMachineState);2201 i_setMachineStateLocally(lastMachineState); 2288 2202 } 2289 2203 … … 2294 2208 } 2295 2209 2296 STDMETHODIMP Console::Reset()2210 HRESULT Console::reset() 2297 2211 { 2298 2212 LogFlowThisFuncEnter(); 2299 2300 AutoCaller autoCaller(this);2301 if (FAILED(autoCaller.rc())) return autoCaller.rc();2302 2213 2303 2214 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); … … 2309 2220 /** @todo r=bird: This should be allowed on paused VMs as well. Later. */ 2310 2221 ) 2311 return setInvalidMachineStateError();2222 return i_setInvalidMachineStateError(); 2312 2223 2313 2224 /* protect mpUVM */ … … 2331 2242 } 2332 2243 2333 /*static*/ DECLCALLBACK(int) Console:: unplugCpu(Console *pThis, PUVM pUVM, VMCPUID idCpu)2244 /*static*/ DECLCALLBACK(int) Console::i_unplugCpu(Console *pThis, PUVM pUVM, VMCPUID idCpu) 2334 2245 { 2335 2246 LogFlowFunc(("pThis=%p pVM=%p idCpu=%u\n", pThis, pUVM, idCpu)); … … 2343 2254 } 2344 2255 2345 HRESULT Console:: doCPURemove(ULONG aCpu, PUVM pUVM)2256 HRESULT Console::i_doCPURemove(ULONG aCpu, PUVM pUVM) 2346 2257 { 2347 2258 HRESULT rc = S_OK; … … 2363 2274 && mMachineState != MachineState_LiveSnapshotting 2364 2275 ) 2365 return setInvalidMachineStateError();2276 return i_setInvalidMachineStateError(); 2366 2277 2367 2278 /* Check if the CPU is present */ … … 2420 2331 PVMREQ pReq; 2421 2332 vrc = VMR3ReqCallU(pUVM, 0, &pReq, 0 /* no wait! */, VMREQFLAGS_VBOX_STATUS, 2422 (PFNRT) unplugCpu, 3,2333 (PFNRT)i_unplugCpu, 3, 2423 2334 this, pUVM, (VMCPUID)aCpu); 2424 2335 if (vrc == VERR_TIMEOUT || RT_SUCCESS(vrc)) … … 2450 2361 } 2451 2362 2452 /*static*/ DECLCALLBACK(int) Console:: plugCpu(Console *pThis, PUVM pUVM, VMCPUID idCpu)2363 /*static*/ DECLCALLBACK(int) Console::i_plugCpu(Console *pThis, PUVM pUVM, VMCPUID idCpu) 2453 2364 { 2454 2365 LogFlowFunc(("pThis=%p uCpu=%u\n", pThis, idCpu)); … … 2487 2398 } 2488 2399 2489 HRESULT Console:: doCPUAdd(ULONG aCpu, PUVM pUVM)2400 HRESULT Console::i_doCPUAdd(ULONG aCpu, PUVM pUVM) 2490 2401 { 2491 2402 HRESULT rc = S_OK; … … 2504 2415 /** @todo r=bird: This should be allowed on paused VMs as well. Later. */ 2505 2416 ) 2506 return setInvalidMachineStateError();2417 return i_setInvalidMachineStateError(); 2507 2418 2508 2419 AssertReturn(m_pVMMDev, E_FAIL); … … 2526 2437 PVMREQ pReq; 2527 2438 int vrc = VMR3ReqCallU(pUVM, 0, &pReq, 0 /* no wait! */, VMREQFLAGS_VBOX_STATUS, 2528 (PFNRT) plugCpu, 3,2439 (PFNRT)i_plugCpu, 3, 2529 2440 this, pUVM, aCpu); 2530 2441 … … 2561 2472 } 2562 2473 2563 STDMETHODIMP Console::Pause()2474 HRESULT Console::pause() 2564 2475 { 2565 2476 LogFlowThisFuncEnter(); 2566 2477 2567 HRESULT rc = pause(Reason_Unspecified);2478 HRESULT rc = i_pause(Reason_Unspecified); 2568 2479 2569 2480 LogFlowThisFunc(("rc=%Rhrc\n", rc)); … … 2572 2483 } 2573 2484 2574 STDMETHODIMP Console::Resume()2485 HRESULT Console::resume() 2575 2486 { 2576 2487 LogFlowThisFuncEnter(); 2577 2488 2578 HRESULT rc = resume(Reason_Unspecified);2489 HRESULT rc = i_resume(Reason_Unspecified); 2579 2490 2580 2491 LogFlowThisFunc(("rc=%Rhrc\n", rc)); … … 2583 2494 } 2584 2495 2585 STDMETHODIMP Console::PowerButton()2496 HRESULT Console::powerButton() 2586 2497 { 2587 2498 LogFlowThisFuncEnter(); 2588 2589 AutoCaller autoCaller(this);2590 if (FAILED(autoCaller.rc())) return autoCaller.rc();2591 2499 2592 2500 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); … … 2596 2504 && mMachineState != MachineState_LiveSnapshotting 2597 2505 ) 2598 return setInvalidMachineStateError();2506 return i_setInvalidMachineStateError(); 2599 2507 2600 2508 /* get the VM handle. */ … … 2628 2536 } 2629 2537 2630 STDMETHODIMP Console::GetPowerButtonHandled(BOOL *aHandled)2538 HRESULT Console::getPowerButtonHandled(BOOL *aHandled) 2631 2539 { 2632 2540 LogFlowThisFuncEnter(); 2633 2541 2634 CheckComArgOutPointerValid(aHandled);2635 2636 2542 *aHandled = FALSE; 2637 2638 AutoCaller autoCaller(this);2639 2543 2640 2544 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); … … 2644 2548 && mMachineState != MachineState_LiveSnapshotting 2645 2549 ) 2646 return setInvalidMachineStateError();2550 return i_setInvalidMachineStateError(); 2647 2551 2648 2552 /* get the VM handle. */ … … 2681 2585 } 2682 2586 2683 STDMETHODIMP Console::GetGuestEnteredACPIMode(BOOL *aEntered)2587 HRESULT Console::getGuestEnteredACPIMode(BOOL *aEntered) 2684 2588 { 2685 2589 LogFlowThisFuncEnter(); 2686 2590 2687 CheckComArgOutPointerValid(aEntered);2688 2689 2591 *aEntered = FALSE; 2690 2691 AutoCaller autoCaller(this);2692 2592 2693 2593 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); … … 2730 2630 } 2731 2631 2732 STDMETHODIMP Console::SleepButton()2632 HRESULT Console::sleepButton() 2733 2633 { 2734 2634 LogFlowThisFuncEnter(); 2735 2736 AutoCaller autoCaller(this);2737 if (FAILED(autoCaller.rc())) return autoCaller.rc();2738 2635 2739 2636 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); … … 2742 2639 && mMachineState != MachineState_Teleporting 2743 2640 && mMachineState != MachineState_LiveSnapshotting) 2744 return setInvalidMachineStateError();2641 return i_setInvalidMachineStateError(); 2745 2642 2746 2643 /* get the VM handle. */ … … 2774 2671 } 2775 2672 2776 STDMETHODIMP Console::SaveState(IProgress **aProgress)2673 HRESULT Console::saveState(ComPtr<IProgress> &aProgress) 2777 2674 { 2778 2675 LogFlowThisFuncEnter(); 2779 2780 HRESULT rc = saveState(Reason_Unspecified, aProgress); 2676 ComObjPtr<IProgress> pProgress; 2677 2678 HRESULT rc = i_saveState(Reason_Unspecified, pProgress.asOutParam()); 2679 pProgress.queryInterfaceTo(aProgress.asOutParam()); 2781 2680 2782 2681 LogFlowThisFunc(("rc=%Rhrc\n", rc)); … … 2785 2684 } 2786 2685 2787 STDMETHODIMP Console::AdoptSavedState(IN_BSTR aSavedStateFile) 2788 { 2789 CheckComArgStrNotEmptyOrNull(aSavedStateFile); 2790 2791 AutoCaller autoCaller(this); 2792 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 2793 2686 HRESULT Console::adoptSavedState(const com::Utf8Str &aSavedStateFile) 2687 { 2794 2688 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 2795 2689 … … 2802 2696 Global::stringifyMachineState(mMachineState)); 2803 2697 2804 return mControl->AdoptSavedState(aSavedStateFile); 2805 } 2806 2807 STDMETHODIMP Console::DiscardSavedState(BOOL aRemoveFile) 2808 { 2809 AutoCaller autoCaller(this); 2810 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 2811 2698 return mControl->AdoptSavedState(BSTR(aSavedStateFile.c_str())); 2699 } 2700 2701 HRESULT Console::discardSavedState(BOOL aFRemoveFile) 2702 { 2812 2703 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 2813 2704 … … 2817 2708 Global::stringifyMachineState(mMachineState)); 2818 2709 2819 HRESULT rc = mControl->SetRemoveSavedStateFile(a RemoveFile);2710 HRESULT rc = mControl->SetRemoveSavedStateFile(aFRemoveFile); 2820 2711 if (FAILED(rc)) return rc; 2821 2712 … … 2824 2715 * and properly handled. 2825 2716 */ 2826 rc = setMachineState(MachineState_PoweredOff);2717 rc = i_setMachineState(MachineState_PoweredOff); 2827 2718 2828 2719 return rc; … … 2839 2730 } 2840 2731 2841 STDMETHODIMP Console::GetDeviceActivity(DeviceType_T aDeviceType, 2842 DeviceActivity_T *aDeviceActivity) 2843 { 2844 CheckComArgNotNull(aDeviceActivity); 2845 2846 AutoCaller autoCaller(this); 2847 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 2848 2732 HRESULT Console::getDeviceActivity(DeviceType_T aType, 2733 DeviceActivity_T *aActivity) 2734 { 2849 2735 /* 2850 2736 * Note: we don't lock the console object here because … … 2854 2740 /* Get LED array to read */ 2855 2741 PDMLEDCORE SumLed = {0}; 2856 switch (a DeviceType)2742 switch (aType) 2857 2743 { 2858 2744 case DeviceType_Floppy: … … 2861 2747 { 2862 2748 for (unsigned i = 0; i < RT_ELEMENTS(mapStorageLeds); ++i) 2863 if (maStorageDevType[i] == a DeviceType)2749 if (maStorageDevType[i] == aType) 2864 2750 SumLed.u32 |= readAndClearLed(mapStorageLeds[i]); 2865 2751 break; … … 2895 2781 return setError(E_INVALIDARG, 2896 2782 tr("Invalid device type: %d"), 2897 a DeviceType);2783 aType); 2898 2784 } 2899 2785 … … 2902 2788 { 2903 2789 case 0: 2904 *a DeviceActivity = DeviceActivity_Idle;2790 *aActivity = DeviceActivity_Idle; 2905 2791 break; 2906 2792 case PDMLED_READING: 2907 *a DeviceActivity = DeviceActivity_Reading;2793 *aActivity = DeviceActivity_Reading; 2908 2794 break; 2909 2795 case PDMLED_WRITING: 2910 2796 case PDMLED_READING | PDMLED_WRITING: 2911 *a DeviceActivity = DeviceActivity_Writing;2797 *aActivity = DeviceActivity_Writing; 2912 2798 break; 2913 2799 } … … 2916 2802 } 2917 2803 2918 STDMETHODIMP Console::AttachUSBDevice(IN_BSTRaId)2804 HRESULT Console::attachUSBDevice(const com::Guid &aId) 2919 2805 { 2920 2806 #ifdef VBOX_WITH_USB 2921 AutoCaller autoCaller(this);2922 if (FAILED(autoCaller.rc())) return autoCaller.rc();2923 2924 2807 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 2925 2808 … … 2945 2828 2946 2829 /* Request the device capture */ 2947 return mControl->CaptureUSBDevice( aId);2830 return mControl->CaptureUSBDevice(BSTR(aId.toString().c_str())); 2948 2831 2949 2832 #else /* !VBOX_WITH_USB */ … … 2953 2836 } 2954 2837 2955 STDMETHODIMP Console::DetachUSBDevice(IN_BSTR aId, IUSBDevice **aDevice)2838 HRESULT Console::detachUSBDevice(const com::Guid &aId, ComPtr<IUSBDevice> &aDevice) 2956 2839 { 2957 2840 #ifdef VBOX_WITH_USB 2958 CheckComArgOutPointerValid(aDevice);2959 2960 AutoCaller autoCaller(this);2961 if (FAILED(autoCaller.rc())) return autoCaller.rc();2962 2841 2963 2842 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); … … 2966 2845 ComObjPtr<OUSBDevice> pUSBDevice; 2967 2846 USBDeviceList::iterator it = mUSBDevices.begin(); 2968 Guid uuid(aId);2969 2847 while (it != mUSBDevices.end()) 2970 2848 { 2971 if ((*it)->i_id() == uuid)2849 if ((*it)->i_id() == aId) 2972 2850 { 2973 2851 pUSBDevice = *it; … … 2980 2858 return setError(E_INVALIDARG, 2981 2859 tr("USB device with UUID {%RTuuid} is not attached to this machine"), 2982 Guid(aId).raw());2860 aId.raw()); 2983 2861 2984 2862 /* Remove the device from the collection, it is re-added below for failures */ … … 2989 2867 */ 2990 2868 alock.release(); 2991 HRESULT rc = mControl->DetachUSBDevice( aId, false /* aDone */);2869 HRESULT rc = mControl->DetachUSBDevice(BSTR(aId.toString().c_str()), false /* aDone */); 2992 2870 if (FAILED(rc)) 2993 2871 { … … 2999 2877 3000 2878 /* Request the PDM to detach the USB device. */ 3001 rc = detachUSBDevice(pUSBDevice);2879 rc = i_detachUSBDevice(pUSBDevice); 3002 2880 if (SUCCEEDED(rc)) 3003 2881 { 3004 2882 /* Request the device release. Even if it fails, the device will 3005 2883 * remain as held by proxy, which is OK for us (the VM process). */ 3006 rc = mControl->DetachUSBDevice( aId, true /* aDone */);2884 rc = mControl->DetachUSBDevice(BSTR(aId.toString().c_str()), true /* aDone */); 3007 2885 } 3008 2886 else … … 3022 2900 } 3023 2901 3024 STDMETHODIMP Console::FindUSBDeviceByAddress(IN_BSTR aAddress, IUSBDevice **aDevice) 2902 2903 HRESULT Console::findUSBDeviceByAddress(const com::Utf8Str &aName, ComPtr<IUSBDevice> &aDevice) 3025 2904 { 3026 2905 #ifdef VBOX_WITH_USB 3027 CheckComArgStrNotEmptyOrNull(aAddress); 3028 CheckComArgOutPointerValid(aDevice); 3029 3030 *aDevice = NULL; 2906 2907 aDevice = NULL; 3031 2908 3032 2909 SafeIfaceArray<IUSBDevice> devsvec; … … 3039 2916 rc = devsvec[i]->COMGETTER(Address)(address.asOutParam()); 3040 2917 if (FAILED(rc)) return rc; 3041 if (address == aAddress)2918 if (address == Bstr(aName)) 3042 2919 { 3043 2920 ComObjPtr<OUSBDevice> pUSBDevice; 3044 2921 pUSBDevice.createObject(); 3045 2922 pUSBDevice->init(devsvec[i]); 3046 return pUSBDevice.queryInterfaceTo(aDevice );2923 return pUSBDevice.queryInterfaceTo(aDevice.asOutParam()); 3047 2924 } 3048 2925 } 3049 2926 3050 2927 return setErrorNoLog(VBOX_E_OBJECT_NOT_FOUND, 3051 tr("Could not find a USB device with address '% ls'"),3052 a Address);2928 tr("Could not find a USB device with address '%s'"), 2929 aName.c_str()); 3053 2930 3054 2931 #else /* !VBOX_WITH_USB */ … … 3057 2934 } 3058 2935 3059 STDMETHODIMP Console::FindUSBDeviceById(IN_BSTR aId, IUSBDevice **aDevice)2936 HRESULT Console::findUSBDeviceById(const com::Guid &aId, ComPtr<IUSBDevice> &aDevice) 3060 2937 { 3061 2938 #ifdef VBOX_WITH_USB 3062 CheckComArgExpr(aId, Guid(aId).isValid()); 3063 CheckComArgOutPointerValid(aDevice); 3064 3065 *aDevice = NULL; 2939 2940 aDevice = NULL; 3066 2941 3067 2942 SafeIfaceArray<IUSBDevice> devsvec; … … 3074 2949 rc = devsvec[i]->COMGETTER(Id)(id.asOutParam()); 3075 2950 if (FAILED(rc)) return rc; 3076 if (id == aId)2951 if (id == BSTR(aId.toString().c_str())) 3077 2952 { 3078 2953 ComObjPtr<OUSBDevice> pUSBDevice; 3079 2954 pUSBDevice.createObject(); 3080 2955 pUSBDevice->init(devsvec[i]); 3081 return pUSBDevice.queryInterfaceTo(aDevice); 2956 ComObjPtr<IUSBDevice> iUSBDevice = static_cast <ComObjPtr<IUSBDevice> > (pUSBDevice); 2957 return iUSBDevice.queryInterfaceTo(aDevice.asOutParam()); 3082 2958 } 3083 2959 } … … 3092 2968 } 3093 2969 3094 STDMETHODIMP 3095 Console::CreateSharedFolder(IN_BSTR aName, IN_BSTR aHostPath, BOOL aWritable, BOOL aAutoMount) 3096 { 3097 CheckComArgStrNotEmptyOrNull(aName); 3098 CheckComArgStrNotEmptyOrNull(aHostPath); 3099 3100 LogFlowThisFunc(("Entering for '%ls' -> '%ls'\n", aName, aHostPath)); 3101 3102 AutoCaller autoCaller(this); 3103 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 3104 3105 Utf8Str strName(aName); 3106 Utf8Str strHostPath(aHostPath); 2970 HRESULT Console::createSharedFolder(const com::Utf8Str &aName, const com::Utf8Str &aHostPath, BOOL aWritable, BOOL aAutomount) 2971 { 2972 LogFlowThisFunc(("Entering for '%s' -> '%s'\n", aName.c_str(), aHostPath.c_str())); 3107 2973 3108 2974 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); … … 3123 2989 3124 2990 ComObjPtr<SharedFolder> pSharedFolder; 3125 HRESULT rc = findSharedFolder(strName, pSharedFolder, false /* aSetError */);2991 HRESULT rc = i_findSharedFolder(aName, pSharedFolder, false /* aSetError */); 3126 2992 if (SUCCEEDED(rc)) 3127 2993 return setError(VBOX_E_FILE_ERROR, 3128 2994 tr("Shared folder named '%s' already exists"), 3129 strName.c_str());2995 aName.c_str()); 3130 2996 3131 2997 pSharedFolder.createObject(); 3132 2998 rc = pSharedFolder->init(this, 3133 strName,3134 strHostPath,2999 aName, 3000 aHostPath, 3135 3001 !!aWritable, 3136 !!aAuto Mount,3002 !!aAutomount, 3137 3003 true /* fFailOnError */); 3138 3004 if (FAILED(rc)) return rc; … … 3148 3014 /* first, remove the machine or the global folder if there is any */ 3149 3015 SharedFolderDataMap::const_iterator it; 3150 if ( findOtherSharedFolder(aName, it))3016 if (i_findOtherSharedFolder(aName, it)) 3151 3017 { 3152 3018 rc = removeSharedFolder(aName); … … 3156 3022 3157 3023 /* second, create the given folder */ 3158 rc = createSharedFolder(aName, SharedFolderData(aHostPath, !!aWritable, !!aAutoMount));3024 rc = i_createSharedFolder(aName, SharedFolderData(aHostPath, !!aWritable, !!aAutomount)); 3159 3025 if (FAILED(rc)) 3160 3026 return rc; … … 3167 3033 fireSharedFolderChangedEvent(mEventSource, Scope_Session); 3168 3034 3169 LogFlowThisFunc(("Leaving for '% ls' -> '%ls'\n", aName, aHostPath));3035 LogFlowThisFunc(("Leaving for '%s' -> '%s'\n", aName.c_str(), aHostPath.c_str())); 3170 3036 3171 3037 return rc; 3172 3038 } 3173 3039 3174 STDMETHODIMP Console::RemoveSharedFolder(IN_BSTR aName) 3175 { 3176 CheckComArgStrNotEmptyOrNull(aName); 3177 3178 AutoCaller autoCaller(this); 3179 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 3180 3181 LogFlowThisFunc(("Entering for '%ls'\n", aName)); 3040 HRESULT Console::removeSharedFolder(const com::Utf8Str &aName) 3041 { 3042 LogFlowThisFunc(("Entering for '%s'\n", aName.c_str())); 3182 3043 3183 3044 Utf8Str strName(aName); … … 3200 3061 3201 3062 ComObjPtr<SharedFolder> pSharedFolder; 3202 HRESULT rc = findSharedFolder(aName, pSharedFolder, true /* aSetError */);3063 HRESULT rc = i_findSharedFolder(aName, pSharedFolder, true /* aSetError */); 3203 3064 if (FAILED(rc)) return rc; 3204 3065 … … 3219 3080 /* first, remove the machine or the global folder if there is any */ 3220 3081 SharedFolderDataMap::const_iterator it; 3221 if ( findOtherSharedFolder(strName, it))3222 { 3223 rc = createSharedFolder(strName, it->second);3082 if (i_findOtherSharedFolder(strName, it)) 3083 { 3084 rc = i_createSharedFolder(strName, it->second); 3224 3085 /* don't check rc here because we need to remove the console 3225 3086 * folder from the collection even on failure */ … … 3233 3094 fireSharedFolderChangedEvent(mEventSource, Scope_Session); 3234 3095 3235 LogFlowThisFunc(("Leaving for '% ls'\n", aName));3096 LogFlowThisFunc(("Leaving for '%s'\n", aName.c_str())); 3236 3097 3237 3098 return rc; 3238 3099 } 3239 3100 3240 STDMETHODIMP Console::TakeSnapshot(IN_BSTRaName,3241 IN_BSTRaDescription,3242 IProgress **aProgress)3101 HRESULT Console::takeSnapshot(const com::Utf8Str &aName, 3102 const com::Utf8Str &aDescription, 3103 ComPtr<IProgress> &aProgress) 3243 3104 { 3244 3105 LogFlowThisFuncEnter(); 3245 3106 3246 CheckComArgStrNotEmptyOrNull(aName);3247 CheckComArgOutPointerValid(aProgress);3248 3249 AutoCaller autoCaller(this);3250 if (FAILED(autoCaller.rc())) return autoCaller.rc();3251 3252 3107 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 3253 LogFlowThisFunc(("aName='% ls' mMachineState=%d\n", aName, mMachineState));3108 LogFlowThisFunc(("aName='%s' mMachineState=%d\n", aName.c_str(), mMachineState)); 3254 3109 3255 3110 if (Global::IsTransient(mMachineState)) … … 3320 3175 3321 3176 VMTakeSnapshotTask *pTask; 3322 if (!(pTask = new VMTakeSnapshotTask(this, pProgress, aName, aDescription)))3177 if (!(pTask = new VMTakeSnapshotTask(this, pProgress, Bstr(aName).raw(), Bstr(aDescription).raw()))) 3323 3178 return E_OUTOFMEMORY; 3324 3179 … … 3345 3200 3346 3201 int vrc = RTThreadCreate(NULL, 3347 Console:: fntTakeSnapshotWorker,3202 Console::i_fntTakeSnapshotWorker, 3348 3203 (void *)pTask, 3349 3204 0, … … 3356 3211 vrc); 3357 3212 3358 pTask->mProgress.queryInterfaceTo(aProgress );3213 pTask->mProgress.queryInterfaceTo(aProgress.asOutParam()); 3359 3214 } 3360 3215 catch (HRESULT erc) … … 3370 3225 } 3371 3226 3372 STDMETHODIMP Console::DeleteSnapshot(IN_BSTR aId, IProgress **aProgress) 3373 { 3374 CheckComArgExpr(aId, Guid(aId).isValid()); 3375 CheckComArgOutPointerValid(aProgress); 3376 3377 AutoCaller autoCaller(this); 3378 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 3379 3227 HRESULT Console::deleteSnapshot(const com::Guid &aId, ComPtr<IProgress> &aProgress) 3228 { 3380 3229 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 3381 3230 … … 3384 3233 tr("Cannot delete a snapshot of the machine while it is changing the state (machine state: %s)"), 3385 3234 Global::stringifyMachineState(mMachineState)); 3386 3235 ComObjPtr<IProgress> iProgress; 3387 3236 MachineState_T machineState = MachineState_Null; 3388 HRESULT rc = mControl->DeleteSnapshot(this, aId, aId, FALSE /* fDeleteAllChildren */, &machineState, aProgress); 3237 HRESULT rc = mControl->DeleteSnapshot((IConsole *)this, BSTR(aId.toString().c_str()), BSTR(aId.toString().c_str()), 3238 FALSE /* fDeleteAllChildren */, &machineState, iProgress.asOutParam()); 3389 3239 if (FAILED(rc)) return rc; 3390 3391 setMachineStateLocally(machineState); 3240 iProgress.queryInterfaceTo(aProgress.asOutParam()); 3241 3242 i_setMachineStateLocally(machineState); 3392 3243 return S_OK; 3393 3244 } 3394 3245 3395 STDMETHODIMP Console::DeleteSnapshotAndAllChildren(IN_BSTR aId, IProgress **aProgress) 3396 { 3397 CheckComArgExpr(aId, Guid(aId).isValid()); 3398 CheckComArgOutPointerValid(aProgress); 3399 3400 AutoCaller autoCaller(this); 3401 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 3402 3246 HRESULT Console::deleteSnapshotAndAllChildren(const com::Guid &aId, ComPtr<IProgress> &aProgress) 3247 3248 { 3403 3249 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 3404 3250 … … 3408 3254 Global::stringifyMachineState(mMachineState)); 3409 3255 3256 ComObjPtr<IProgress> iProgress; 3410 3257 MachineState_T machineState = MachineState_Null; 3411 HRESULT rc = mControl->DeleteSnapshot(this, aId, aId, TRUE /* fDeleteAllChildren */, &machineState, aProgress); 3258 HRESULT rc = mControl->DeleteSnapshot((IConsole *)this, BSTR(aId.toString().c_str()), BSTR(aId.toString().c_str()), 3259 TRUE /* fDeleteAllChildren */, &machineState, iProgress.asOutParam()); 3412 3260 if (FAILED(rc)) return rc; 3413 3414 setMachineStateLocally(machineState); 3261 iProgress.queryInterfaceTo(aProgress.asOutParam()); 3262 3263 i_setMachineStateLocally(machineState); 3415 3264 return S_OK; 3416 3265 } 3417 3266 3418 STDMETHODIMP Console::DeleteSnapshotRange(IN_BSTR aStartId, IN_BSTR aEndId, IProgress **aProgress) 3419 { 3420 CheckComArgExpr(aStartId, Guid(aStartId).isValid()); 3421 CheckComArgExpr(aEndId, Guid(aEndId).isValid()); 3422 CheckComArgOutPointerValid(aProgress); 3423 3424 AutoCaller autoCaller(this); 3425 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 3426 3267 HRESULT Console::deleteSnapshotRange(const com::Guid &aStartId, const com::Guid &aEndId, ComPtr<IProgress> &aProgress) 3268 { 3427 3269 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 3428 3270 … … 3432 3274 Global::stringifyMachineState(mMachineState)); 3433 3275 3276 ComObjPtr<IProgress> iProgress; 3434 3277 MachineState_T machineState = MachineState_Null; 3435 HRESULT rc = mControl->DeleteSnapshot( this, aStartId, aEndId, FALSE /* fDeleteAllChildren */, &machineState, aProgress);3278 HRESULT rc = mControl->DeleteSnapshot((IConsole *)this, BSTR(aStartId.toString().c_str()), BSTR(aEndId.toString().c_str()), FALSE /* fDeleteAllChildren */, &machineState, iProgress.asOutParam()); 3436 3279 if (FAILED(rc)) return rc; 3437 3438 setMachineStateLocally(machineState); 3280 iProgress.queryInterfaceTo(aProgress.asOutParam()); 3281 3282 i_setMachineStateLocally(machineState); 3439 3283 return S_OK; 3440 3284 } 3441 3285 3442 STDMETHODIMP Console::RestoreSnapshot(ISnapshot *aSnapshot, IProgress **aProgress) 3443 { 3444 AutoCaller autoCaller(this); 3445 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 3446 3286 HRESULT Console::restoreSnapshot(const ComPtr<ISnapshot> &aSnapshot, ComPtr<IProgress> &aProgress) 3287 { 3447 3288 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 3448 3289 … … 3452 3293 Global::stringifyMachineState(mMachineState)); 3453 3294 3295 ISnapshot* iSnapshot = aSnapshot; 3296 ComObjPtr<IProgress> iProgress; 3454 3297 MachineState_T machineState = MachineState_Null; 3455 HRESULT rc = mControl->RestoreSnapshot( this, aSnapshot, &machineState, aProgress);3298 HRESULT rc = mControl->RestoreSnapshot((IConsole*)this, iSnapshot, &machineState, iProgress.asOutParam()); 3456 3299 if (FAILED(rc)) return rc; 3457 3458 setMachineStateLocally(machineState); 3300 iProgress.queryInterfaceTo(aProgress.asOutParam()); 3301 3302 i_setMachineStateLocally(machineState); 3459 3303 return S_OK; 3460 3304 } … … 3464 3308 3465 3309 /*static*/ 3466 HRESULT Console:: setErrorStatic(HRESULT aResultCode, const char *pcsz, ...)3310 HRESULT Console::i_setErrorStatic(HRESULT aResultCode, const char *pcsz, ...) 3467 3311 { 3468 3312 va_list args; … … 3478 3322 } 3479 3323 3480 HRESULT Console:: setInvalidMachineStateError()3324 HRESULT Console::i_setInvalidMachineStateError() 3481 3325 { 3482 3326 return setError(VBOX_E_INVALID_VM_STATE, … … 3487 3331 3488 3332 /* static */ 3489 const char *Console:: convertControllerTypeToDev(StorageControllerType_T enmCtrlType)3333 const char *Console::i_convertControllerTypeToDev(StorageControllerType_T enmCtrlType) 3490 3334 { 3491 3335 switch (enmCtrlType) … … 3512 3356 } 3513 3357 3514 HRESULT Console:: convertBusPortDeviceToLun(StorageBus_T enmBus, LONG port, LONG device, unsigned &uLun)3358 HRESULT Console::i_convertBusPortDeviceToLun(StorageBus_T enmBus, LONG port, LONG device, unsigned &uLun) 3515 3359 { 3516 3360 switch (enmBus) … … 3558 3402 * afterwards. 3559 3403 */ 3560 HRESULT Console:: suspendBeforeConfigChange(PUVM pUVM, AutoWriteLock *pAlock, bool *pfResume)3404 HRESULT Console::i_suspendBeforeConfigChange(PUVM pUVM, AutoWriteLock *pAlock, bool *pfResume) 3561 3405 { 3562 3406 *pfResume = false; … … 3607 3451 * @param pUVM Safe VM handle. 3608 3452 */ 3609 void Console:: resumeAfterConfigChange(PUVM pUVM)3453 void Console::i_resumeAfterConfigChange(PUVM pUVM) 3610 3454 { 3611 3455 LogFlowFunc(("Resuming the VM...\n")); … … 3621 3465 { 3622 3466 /* too bad, we failed. try to sync the console state with the VMM state */ 3623 vmstateChangeCallback(pUVM, VMSTATE_SUSPENDED, enmVMState, this);3467 i_vmstateChangeCallback(pUVM, VMSTATE_SUSPENDED, enmVMState, this); 3624 3468 } 3625 3469 } … … 3635 3479 * @note Locks this object for writing. 3636 3480 */ 3637 HRESULT Console:: doMediumChange(IMediumAttachment *aMediumAttachment, bool fForce, PUVM pUVM)3481 HRESULT Console::i_doMediumChange(IMediumAttachment *aMediumAttachment, bool fForce, PUVM pUVM) 3638 3482 { 3639 3483 AutoCaller autoCaller(this); … … 3681 3525 rc = pStorageController->COMGETTER(ControllerType)(&enmCtrlType); 3682 3526 AssertComRC(rc); 3683 pszDevice = convertControllerTypeToDev(enmCtrlType);3527 pszDevice = i_convertControllerTypeToDev(enmCtrlType); 3684 3528 3685 3529 StorageBus_T enmBus; … … 3698 3542 */ 3699 3543 bool fResume = false; 3700 rc = suspendBeforeConfigChange(pUVM, &alock, &fResume);3544 rc = i_suspendBeforeConfigChange(pUVM, &alock, &fResume); 3701 3545 if (FAILED(rc)) 3702 3546 return rc; … … 3709 3553 PVMREQ pReq; 3710 3554 int vrc = VMR3ReqCallU(pUVM, VMCPUID_ANY, &pReq, 0 /* no wait! */, VMREQFLAGS_VBOX_STATUS, 3711 (PFNRT) changeRemovableMedium, 8,3555 (PFNRT)i_changeRemovableMedium, 8, 3712 3556 this, pUVM, pszDevice, uInstance, enmBus, fUseHostIOCache, aMediumAttachment, fForce); 3713 3557 … … 3725 3569 3726 3570 if (fResume) 3727 resumeAfterConfigChange(pUVM);3571 i_resumeAfterConfigChange(pUVM); 3728 3572 3729 3573 if (RT_SUCCESS(vrc)) … … 3764 3608 * @note The VM must not be running since it might have pending I/O to the drive which is being changed. 3765 3609 */ 3766 DECLCALLBACK(int) Console:: changeRemovableMedium(Console *pThis,3767 PUVM pUVM,3768 const char *pcszDevice,3769 unsigned uInstance,3770 StorageBus_T enmBus,3771 bool fUseHostIOCache,3772 IMediumAttachment *aMediumAtt,3773 bool fForce)3610 DECLCALLBACK(int) Console::i_changeRemovableMedium(Console *pThis, 3611 PUVM pUVM, 3612 const char *pcszDevice, 3613 unsigned uInstance, 3614 StorageBus_T enmBus, 3615 bool fUseHostIOCache, 3616 IMediumAttachment *aMediumAtt, 3617 bool fForce) 3774 3618 { 3775 3619 LogFlowFunc(("pThis=%p uInstance=%u pszDevice=%p:{%s} enmBus=%u, aMediumAtt=%p, fForce=%d\n", … … 3796 3640 3797 3641 PCFGMNODE pLunL0 = NULL; 3798 int rc = pThis-> configMediumAttachment(pCtlInst,3799 pcszDevice,3800 uInstance,3801 enmBus,3802 fUseHostIOCache,3803 false /* fSetupMerge */,3804 false /* fBuiltinIOCache */,3805 0 /* uMergeSource */,3806 0 /* uMergeTarget */,3807 aMediumAtt,3808 pThis->mMachineState,3809 NULL /* phrc */,3810 true /* fAttachDetach */,3811 fForce /* fForceUnmount */,3812 false /* fHotplug */,3813 pUVM,3814 NULL /* paLedDevType */,3815 &pLunL0);3642 int rc = pThis->i_configMediumAttachment(pCtlInst, 3643 pcszDevice, 3644 uInstance, 3645 enmBus, 3646 fUseHostIOCache, 3647 false /* fSetupMerge */, 3648 false /* fBuiltinIOCache */, 3649 0 /* uMergeSource */, 3650 0 /* uMergeTarget */, 3651 aMediumAtt, 3652 pThis->mMachineState, 3653 NULL /* phrc */, 3654 true /* fAttachDetach */, 3655 fForce /* fForceUnmount */, 3656 false /* fHotplug */, 3657 pUVM, 3658 NULL /* paLedDevType */, 3659 &pLunL0); 3816 3660 /* Dump the changed LUN if possible, dump the complete device otherwise */ 3817 3661 CFGMR3Dump(pLunL0 ? pLunL0 : pCtlInst); … … 3831 3675 * @note Locks this object for writing. 3832 3676 */ 3833 HRESULT Console:: doStorageDeviceAttach(IMediumAttachment *aMediumAttachment, PUVM pUVM, bool fSilent)3677 HRESULT Console::i_doStorageDeviceAttach(IMediumAttachment *aMediumAttachment, PUVM pUVM, bool fSilent) 3834 3678 { 3835 3679 AutoCaller autoCaller(this); … … 3877 3721 rc = pStorageController->COMGETTER(ControllerType)(&enmCtrlType); 3878 3722 AssertComRC(rc); 3879 pszDevice = convertControllerTypeToDev(enmCtrlType);3723 pszDevice = i_convertControllerTypeToDev(enmCtrlType); 3880 3724 3881 3725 StorageBus_T enmBus; … … 3894 3738 */ 3895 3739 bool fResume = false; 3896 rc = suspendBeforeConfigChange(pUVM, &alock, &fResume);3740 rc = i_suspendBeforeConfigChange(pUVM, &alock, &fResume); 3897 3741 if (FAILED(rc)) 3898 3742 return rc; … … 3905 3749 PVMREQ pReq; 3906 3750 int vrc = VMR3ReqCallU(pUVM, VMCPUID_ANY, &pReq, 0 /* no wait! */, VMREQFLAGS_VBOX_STATUS, 3907 (PFNRT) attachStorageDevice, 8,3751 (PFNRT)i_attachStorageDevice, 8, 3908 3752 this, pUVM, pszDevice, uInstance, enmBus, fUseHostIOCache, aMediumAttachment, fSilent); 3909 3753 … … 3921 3765 3922 3766 if (fResume) 3923 resumeAfterConfigChange(pUVM);3767 i_resumeAfterConfigChange(pUVM); 3924 3768 3925 3769 if (RT_SUCCESS(vrc)) … … 3954 3798 * @note The VM must not be running since it might have pending I/O to the drive which is being changed. 3955 3799 */ 3956 DECLCALLBACK(int) Console:: attachStorageDevice(Console *pThis,3957 PUVM pUVM,3958 const char *pcszDevice,3959 unsigned uInstance,3960 StorageBus_T enmBus,3961 bool fUseHostIOCache,3962 IMediumAttachment *aMediumAtt,3963 bool fSilent)3800 DECLCALLBACK(int) Console::i_attachStorageDevice(Console *pThis, 3801 PUVM pUVM, 3802 const char *pcszDevice, 3803 unsigned uInstance, 3804 StorageBus_T enmBus, 3805 bool fUseHostIOCache, 3806 IMediumAttachment *aMediumAtt, 3807 bool fSilent) 3964 3808 { 3965 3809 LogFlowFunc(("pThis=%p uInstance=%u pszDevice=%p:{%s} enmBus=%u, aMediumAtt=%p\n", … … 3991 3835 3992 3836 PCFGMNODE pLunL0 = NULL; 3993 int rc = pThis-> configMediumAttachment(pCtlInst,3994 pcszDevice,3995 uInstance,3996 enmBus,3997 fUseHostIOCache,3998 false /* fSetupMerge */,3999 false /* fBuiltinIOCache */,4000 0 /* uMergeSource */,4001 0 /* uMergeTarget */,4002 aMediumAtt,4003 pThis->mMachineState,4004 NULL /* phrc */,4005 true /* fAttachDetach */,4006 false /* fForceUnmount */,4007 !fSilent /* fHotplug */,4008 pUVM,4009 NULL /* paLedDevType */,4010 &pLunL0);3837 int rc = pThis->i_configMediumAttachment(pCtlInst, 3838 pcszDevice, 3839 uInstance, 3840 enmBus, 3841 fUseHostIOCache, 3842 false /* fSetupMerge */, 3843 false /* fBuiltinIOCache */, 3844 0 /* uMergeSource */, 3845 0 /* uMergeTarget */, 3846 aMediumAtt, 3847 pThis->mMachineState, 3848 NULL /* phrc */, 3849 true /* fAttachDetach */, 3850 false /* fForceUnmount */, 3851 !fSilent /* fHotplug */, 3852 pUVM, 3853 NULL /* paLedDevType */, 3854 &pLunL0); 4011 3855 /* Dump the changed LUN if possible, dump the complete device otherwise */ 4012 3856 if (enmBus != StorageBus_USB) … … 4026 3870 * @note Locks this object for writing. 4027 3871 */ 4028 HRESULT Console:: doStorageDeviceDetach(IMediumAttachment *aMediumAttachment, PUVM pUVM, bool fSilent)3872 HRESULT Console::i_doStorageDeviceDetach(IMediumAttachment *aMediumAttachment, PUVM pUVM, bool fSilent) 4029 3873 { 4030 3874 AutoCaller autoCaller(this); … … 4072 3916 rc = pStorageController->COMGETTER(ControllerType)(&enmCtrlType); 4073 3917 AssertComRC(rc); 4074 pszDevice = convertControllerTypeToDev(enmCtrlType);3918 pszDevice = i_convertControllerTypeToDev(enmCtrlType); 4075 3919 4076 3920 StorageBus_T enmBus; … … 4086 3930 */ 4087 3931 bool fResume = false; 4088 rc = suspendBeforeConfigChange(pUVM, &alock, &fResume);3932 rc = i_suspendBeforeConfigChange(pUVM, &alock, &fResume); 4089 3933 if (FAILED(rc)) 4090 3934 return rc; … … 4097 3941 PVMREQ pReq; 4098 3942 int vrc = VMR3ReqCallU(pUVM, VMCPUID_ANY, &pReq, 0 /* no wait! */, VMREQFLAGS_VBOX_STATUS, 4099 (PFNRT) detachStorageDevice, 7,3943 (PFNRT)i_detachStorageDevice, 7, 4100 3944 this, pUVM, pszDevice, uInstance, enmBus, aMediumAttachment, fSilent); 4101 3945 … … 4113 3957 4114 3958 if (fResume) 4115 resumeAfterConfigChange(pUVM);3959 i_resumeAfterConfigChange(pUVM); 4116 3960 4117 3961 if (RT_SUCCESS(vrc)) … … 4145 3989 * @note The VM must not be running since it might have pending I/O to the drive which is being changed. 4146 3990 */ 4147 DECLCALLBACK(int) Console:: detachStorageDevice(Console *pThis,4148 PUVM pUVM,4149 const char *pcszDevice,4150 unsigned uInstance,4151 StorageBus_T enmBus,4152 IMediumAttachment *pMediumAtt,4153 bool fSilent)3991 DECLCALLBACK(int) Console::i_detachStorageDevice(Console *pThis, 3992 PUVM pUVM, 3993 const char *pcszDevice, 3994 unsigned uInstance, 3995 StorageBus_T enmBus, 3996 IMediumAttachment *pMediumAtt, 3997 bool fSilent) 4154 3998 { 4155 3999 LogFlowFunc(("pThis=%p uInstance=%u pszDevice=%p:{%s} enmBus=%u, pMediumAtt=%p\n", … … 4187 4031 hrc = pMediumAtt->COMGETTER(Port)(&lPort); H(); 4188 4032 hrc = pMediumAtt->COMGETTER(Type)(&lType); H(); 4189 hrc = Console:: convertBusPortDeviceToLun(enmBus, lPort, lDev, uLUN);H();4033 hrc = Console::i_convertBusPortDeviceToLun(enmBus, lPort, lDev, uLUN); H(); 4190 4034 4191 4035 #undef H … … 4242 4086 * @note Locks this object for writing. 4243 4087 */ 4244 HRESULT Console:: onNetworkAdapterChange(INetworkAdapter *aNetworkAdapter, BOOL changeAdapter)4088 HRESULT Console::i_onNetworkAdapterChange(INetworkAdapter *aNetworkAdapter, BOOL changeAdapter) 4245 4089 { 4246 4090 LogFlowThisFunc(("\n")); … … 4314 4158 } 4315 4159 4316 rc = doNetworkAdapterChange(ptrVM.rawUVM(), pszAdapterName, ulInstance, 0, aNetworkAdapter);4160 rc = i_doNetworkAdapterChange(ptrVM.rawUVM(), pszAdapterName, ulInstance, 0, aNetworkAdapter); 4317 4161 4318 4162 if (fTraceEnabled && fCableConnected && pINetCfg) … … 4355 4199 * @note Locks this object for writing. 4356 4200 */ 4357 HRESULT Console::onNATRedirectRuleChange(ULONG ulInstance, BOOL aNatRuleRemove, 4358 NATProtocol_T aProto, IN_BSTR aHostIP, LONG aHostPort, IN_BSTR aGuestIP, LONG aGuestPort) 4201 HRESULT Console::i_onNATRedirectRuleChange(ULONG ulInstance, BOOL aNatRuleRemove, 4202 NATProtocol_T aProto, IN_BSTR aHostIP, 4203 LONG aHostPort, IN_BSTR aGuestIP, 4204 LONG aGuestPort) 4359 4205 { 4360 4206 LogFlowThisFunc(("\n")); … … 4374 4220 { 4375 4221 ComPtr<INetworkAdapter> pNetworkAdapter; 4376 rc = machine()->GetNetworkAdapter(ulInstance, pNetworkAdapter.asOutParam());4222 rc = i_machine()->GetNetworkAdapter(ulInstance, pNetworkAdapter.asOutParam()); 4377 4223 if ( FAILED(rc) 4378 4224 || pNetworkAdapter.isNull()) … … 4439 4285 } 4440 4286 4441 VMMDevMouseInterface *Console:: getVMMDevMouseInterface()4287 VMMDevMouseInterface *Console::i_getVMMDevMouseInterface() 4442 4288 { 4443 4289 return m_pVMMDev; 4444 4290 } 4445 4291 4446 DisplayMouseInterface *Console:: getDisplayMouseInterface()4292 DisplayMouseInterface *Console::i_getDisplayMouseInterface() 4447 4293 { 4448 4294 return mDisplay; … … 4458 4304 * @param ppszVal Where to store the value on success. 4459 4305 */ 4460 int Console:: consoleParseKeyValue(const char *psz, const char **ppszEnd,4461 char **ppszKey, char **ppszVal)4306 int Console::i_consoleParseKeyValue(const char *psz, const char **ppszEnd, 4307 char **ppszKey, char **ppszVal) 4462 4308 { 4463 4309 int rc = VINF_SUCCESS; … … 4520 4366 * @param cbKey Size of the key in bytes. 4521 4367 */ 4522 HRESULT Console:: configureEncryptionForDisk(const char *pszUuid, const uint8_t *pbKey, size_t cbKey)4368 HRESULT Console::i_configureEncryptionForDisk(const char *pszUuid, const uint8_t *pbKey, size_t cbKey) 4523 4369 { 4524 4370 HRESULT hrc = S_OK; … … 4598 4444 hrc = pStorageCtrl->COMGETTER(ControllerType)(&enmCtrlType); 4599 4445 AssertComRC(hrc); 4600 const char *pcszDevice = convertControllerTypeToDev(enmCtrlType);4446 const char *pcszDevice = i_convertControllerTypeToDev(enmCtrlType); 4601 4447 4602 4448 StorageBus_T enmBus; … … 4605 4451 4606 4452 unsigned uLUN; 4607 hrc = Console:: convertBusPortDeviceToLun(enmBus, lPort, lDev, uLUN);4453 hrc = Console::i_convertBusPortDeviceToLun(enmBus, lPort, lDev, uLUN); 4608 4454 AssertComRCReturnRC(hrc); 4609 4455 … … 4638 4484 * @param psz Pointer to the configuration for the encryption of one disk. 4639 4485 */ 4640 HRESULT Console:: consoleParseDiskEncryption(const char *psz, const char **ppszEnd)4486 HRESULT Console::i_consoleParseDiskEncryption(const char *psz, const char **ppszEnd) 4641 4487 { 4642 4488 char *pszUuid = NULL; … … 4652 4498 const char *pszEnd = NULL; 4653 4499 4654 rc = consoleParseKeyValue(psz, &pszEnd, &pszKey, &pszVal);4500 rc = i_consoleParseKeyValue(psz, &pszEnd, &pszKey, &pszVal); 4655 4501 if (RT_SUCCESS(rc)) 4656 4502 { … … 4698 4544 rc = RTBase64Decode(pszKeyEnc, pbKey, cbKey, NULL, NULL); 4699 4545 if (RT_SUCCESS(rc)) 4700 hrc = configureEncryptionForDisk(pszUuid, pbKey, cbKey);4546 hrc = i_configureEncryptionForDisk(pszUuid, pbKey, cbKey); 4701 4547 else 4702 4548 hrc = setError(E_FAIL, … … 4733 4579 } 4734 4580 4735 HRESULT Console:: setDiskEncryptionKeys(const Utf8Str &strCfg)4581 HRESULT Console::i_setDiskEncryptionKeys(const Utf8Str &strCfg) 4736 4582 { 4737 4583 HRESULT hrc = S_OK; … … 4742 4588 { 4743 4589 const char *pszNext = NULL; 4744 hrc = consoleParseDiskEncryption(pszCfg, &pszNext);4590 hrc = i_consoleParseDiskEncryption(pszCfg, &pszNext); 4745 4591 pszCfg = pszNext; 4746 4592 } … … 4760 4606 * @param aNetworkAdapter The network adapter whose attachment needs to be changed 4761 4607 */ 4762 HRESULT Console:: doNetworkAdapterChange(PUVM pUVM,4763 const char *pszDevice,4764 unsigned uInstance,4765 unsigned uLun,4766 INetworkAdapter *aNetworkAdapter)4608 HRESULT Console::i_doNetworkAdapterChange(PUVM pUVM, 4609 const char *pszDevice, 4610 unsigned uInstance, 4611 unsigned uLun, 4612 INetworkAdapter *aNetworkAdapter) 4767 4613 { 4768 4614 LogFlowThisFunc(("pszDevice=%p:{%s} uInstance=%u uLun=%u aNetworkAdapter=%p\n", … … 4776 4622 */ 4777 4623 bool fResume = false; 4778 int rc = suspendBeforeConfigChange(pUVM, NULL, &fResume);4624 int rc = i_suspendBeforeConfigChange(pUVM, NULL, &fResume); 4779 4625 if (FAILED(rc)) 4780 4626 return rc; … … 4787 4633 PVMREQ pReq; 4788 4634 int vrc = VMR3ReqCallU(pUVM, 0 /*idDstCpu*/, &pReq, 0 /* no wait! */, VMREQFLAGS_VBOX_STATUS, 4789 (PFNRT) changeNetworkAttachment, 6,4635 (PFNRT)i_changeNetworkAttachment, 6, 4790 4636 this, pUVM, pszDevice, uInstance, uLun, aNetworkAdapter); 4791 4637 … … 4800 4646 4801 4647 if (fResume) 4802 resumeAfterConfigChange(pUVM);4648 i_resumeAfterConfigChange(pUVM); 4803 4649 4804 4650 if (RT_SUCCESS(vrc)) … … 4830 4676 * @note The VM must not be running. 4831 4677 */ 4832 DECLCALLBACK(int) Console:: changeNetworkAttachment(Console *pThis,4833 PUVM pUVM,4834 const char *pszDevice,4835 unsigned uInstance,4836 unsigned uLun,4837 INetworkAdapter *aNetworkAdapter)4678 DECLCALLBACK(int) Console::i_changeNetworkAttachment(Console *pThis, 4679 PUVM pUVM, 4680 const char *pszDevice, 4681 unsigned uInstance, 4682 unsigned uLun, 4683 INetworkAdapter *aNetworkAdapter) 4838 4684 { 4839 4685 LogFlowFunc(("pThis=%p pszDevice=%p:{%s} uInstance=%u uLun=%u aNetworkAdapter=%p\n", … … 4874 4720 AssertRelease(pInst); 4875 4721 4876 int rc = pThis-> configNetwork(pszDevice, uInstance, uLun, aNetworkAdapter, pCfg, pLunL0, pInst,4722 int rc = pThis->i_configNetwork(pszDevice, uInstance, uLun, aNetworkAdapter, pCfg, pLunL0, pInst, 4877 4723 true /*fAttachDetach*/, false /*fIgnoreConnectFailure*/); 4878 4724 … … 4885 4731 * Called by IInternalSessionControl::OnSerialPortChange(). 4886 4732 */ 4887 HRESULT Console:: onSerialPortChange(ISerialPort *aSerialPort)4733 HRESULT Console::i_onSerialPortChange(ISerialPort *aSerialPort) 4888 4734 { 4889 4735 LogFlowThisFunc(("\n")); … … 4901 4747 * Called by IInternalSessionControl::OnParallelPortChange(). 4902 4748 */ 4903 HRESULT Console:: onParallelPortChange(IParallelPort *aParallelPort)4749 HRESULT Console::i_onParallelPortChange(IParallelPort *aParallelPort) 4904 4750 { 4905 4751 LogFlowThisFunc(("\n")); … … 4917 4763 * Called by IInternalSessionControl::OnStorageControllerChange(). 4918 4764 */ 4919 HRESULT Console:: onStorageControllerChange()4765 HRESULT Console::i_onStorageControllerChange() 4920 4766 { 4921 4767 LogFlowThisFunc(("\n")); … … 4933 4779 * Called by IInternalSessionControl::OnMediumChange(). 4934 4780 */ 4935 HRESULT Console:: onMediumChange(IMediumAttachment *aMediumAttachment, BOOL aForce)4781 HRESULT Console::i_onMediumChange(IMediumAttachment *aMediumAttachment, BOOL aForce) 4936 4782 { 4937 4783 LogFlowThisFunc(("\n")); … … 4946 4792 if (ptrVM.isOk()) 4947 4793 { 4948 rc = doMediumChange(aMediumAttachment, !!aForce, ptrVM.rawUVM());4794 rc = i_doMediumChange(aMediumAttachment, !!aForce, ptrVM.rawUVM()); 4949 4795 ptrVM.release(); 4950 4796 } … … 4963 4809 * @note Locks this object for writing. 4964 4810 */ 4965 HRESULT Console:: onCPUChange(ULONG aCPU, BOOL aRemove)4811 HRESULT Console::i_onCPUChange(ULONG aCPU, BOOL aRemove) 4966 4812 { 4967 4813 LogFlowThisFunc(("\n")); … … 4977 4823 { 4978 4824 if (aRemove) 4979 rc = doCPURemove(aCPU, ptrVM.rawUVM());4825 rc = i_doCPURemove(aCPU, ptrVM.rawUVM()); 4980 4826 else 4981 rc = doCPUAdd(aCPU, ptrVM.rawUVM());4827 rc = i_doCPUAdd(aCPU, ptrVM.rawUVM()); 4982 4828 ptrVM.release(); 4983 4829 } … … 4996 4842 * @note Locks this object for writing. 4997 4843 */ 4998 HRESULT Console:: onCPUExecutionCapChange(ULONG aExecutionCap)4844 HRESULT Console::i_onCPUExecutionCapChange(ULONG aExecutionCap) 4999 4845 { 5000 4846 LogFlowThisFunc(("\n")); … … 5020 4866 } 5021 4867 else 5022 rc = setInvalidMachineStateError();4868 rc = i_setInvalidMachineStateError(); 5023 4869 ptrVM.release(); 5024 4870 } … … 5040 4886 * @note Locks this object for writing. 5041 4887 */ 5042 HRESULT Console:: onClipboardModeChange(ClipboardMode_T aClipboardMode)4888 HRESULT Console::i_onClipboardModeChange(ClipboardMode_T aClipboardMode) 5043 4889 { 5044 4890 LogFlowThisFunc(("\n")); … … 5058 4904 || mMachineState == MachineState_Teleporting 5059 4905 || mMachineState == MachineState_LiveSnapshotting) 5060 changeClipboardMode(aClipboardMode);4906 i_changeClipboardMode(aClipboardMode); 5061 4907 else 5062 rc = setInvalidMachineStateError();4908 rc = i_setInvalidMachineStateError(); 5063 4909 ptrVM.release(); 5064 4910 } … … 5080 4926 * @note Locks this object for writing. 5081 4927 */ 5082 HRESULT Console:: onDnDModeChange(DnDMode_T aDnDMode)4928 HRESULT Console::i_onDnDModeChange(DnDMode_T aDnDMode) 5083 4929 { 5084 4930 LogFlowThisFunc(("\n")); … … 5098 4944 || mMachineState == MachineState_Teleporting 5099 4945 || mMachineState == MachineState_LiveSnapshotting) 5100 changeDnDMode(aDnDMode);4946 i_changeDnDMode(aDnDMode); 5101 4947 else 5102 rc = setInvalidMachineStateError();4948 rc = i_setInvalidMachineStateError(); 5103 4949 ptrVM.release(); 5104 4950 } … … 5120 4966 * @note Locks this object for writing. 5121 4967 */ 5122 HRESULT Console:: onVRDEServerChange(BOOL aRestart)4968 HRESULT Console::i_onVRDEServerChange(BOOL aRestart) 5123 4969 { 5124 4970 AutoCaller autoCaller(this); … … 5179 5025 } 5180 5026 else 5181 rc = setInvalidMachineStateError();5027 rc = i_setInvalidMachineStateError(); 5182 5028 5183 5029 mfVRDEChangeInProcess = false; … … 5198 5044 } 5199 5045 5200 void Console:: onVRDEServerInfoChange()5046 void Console::i_onVRDEServerInfoChange() 5201 5047 { 5202 5048 AutoCaller autoCaller(this); … … 5206 5052 } 5207 5053 5208 HRESULT Console:: onVideoCaptureChange()5054 HRESULT Console::i_onVideoCaptureChange() 5209 5055 { 5210 5056 AutoCaller autoCaller(this); … … 5259 5105 * Called by IInternalSessionControl::OnUSBControllerChange(). 5260 5106 */ 5261 HRESULT Console:: onUSBControllerChange()5107 HRESULT Console::i_onUSBControllerChange() 5262 5108 { 5263 5109 LogFlowThisFunc(("\n")); … … 5276 5122 * @note Locks this object for writing. 5277 5123 */ 5278 HRESULT Console:: onSharedFolderChange(BOOL aGlobal)5124 HRESULT Console::i_onSharedFolderChange(BOOL aGlobal) 5279 5125 { 5280 5126 LogFlowThisFunc(("aGlobal=%RTbool\n", aGlobal)); … … 5285 5131 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 5286 5132 5287 HRESULT rc = fetchSharedFolders(aGlobal);5133 HRESULT rc = i_fetchSharedFolders(aGlobal); 5288 5134 5289 5135 /* notify console callbacks on success */ … … 5312 5158 * @note Locks this object for writing. 5313 5159 */ 5314 HRESULT Console:: onUSBDeviceAttach(IUSBDevice *aDevice, IVirtualBoxErrorInfo *aError, ULONG aMaskedIfs)5160 HRESULT Console::i_onUSBDeviceAttach(IUSBDevice *aDevice, IVirtualBoxErrorInfo *aError, ULONG aMaskedIfs) 5315 5161 { 5316 5162 #ifdef VBOX_WITH_USB … … 5338 5184 /* notify callbacks about the error */ 5339 5185 alock.release(); 5340 onUSBDeviceStateChange(aDevice, true /* aAttached */, aError);5186 i_onUSBDeviceStateChange(aDevice, true /* aAttached */, aError); 5341 5187 return S_OK; 5342 5188 } … … 5350 5196 5351 5197 alock.release(); 5352 HRESULT rc = attachUSBDevice(aDevice, aMaskedIfs);5198 HRESULT rc = i_attachUSBDevice(aDevice, aMaskedIfs); 5353 5199 if (FAILED(rc)) 5354 5200 { … … 5361 5207 { 5362 5208 /* notify callbacks about the error */ 5363 onUSBDeviceStateChange(aDevice, true /* aAttached */, pError);5209 i_onUSBDeviceStateChange(aDevice, true /* aAttached */, pError); 5364 5210 } 5365 5211 } … … 5378 5224 * @note Locks this object for writing. 5379 5225 */ 5380 HRESULT Console:: onUSBDeviceDetach(IN_BSTR aId,5226 HRESULT Console::i_onUSBDeviceDetach(IN_BSTR aId, 5381 5227 IVirtualBoxErrorInfo *aError) 5382 5228 { … … 5430 5276 /* notify callback about an error */ 5431 5277 alock.release(); 5432 onUSBDeviceStateChange(pUSBDevice, false /* aAttached */, aError);5278 i_onUSBDeviceStateChange(pUSBDevice, false /* aAttached */, aError); 5433 5279 return S_OK; 5434 5280 } … … 5438 5284 5439 5285 alock.release(); 5440 HRESULT rc = detachUSBDevice(pUSBDevice);5286 HRESULT rc = i_detachUSBDevice(pUSBDevice); 5441 5287 if (FAILED(rc)) 5442 5288 { … … 5453 5299 { 5454 5300 /* notify callbacks about the error */ 5455 onUSBDeviceStateChange(pUSBDevice, false /* aAttached */, pError);5301 i_onUSBDeviceStateChange(pUSBDevice, false /* aAttached */, pError); 5456 5302 } 5457 5303 } … … 5469 5315 * @note Locks this object for writing. 5470 5316 */ 5471 HRESULT Console:: onBandwidthGroupChange(IBandwidthGroup *aBandwidthGroup)5317 HRESULT Console::i_onBandwidthGroupChange(IBandwidthGroup *aBandwidthGroup) 5472 5318 { 5473 5319 LogFlowThisFunc(("\n")); … … 5514 5360 } 5515 5361 else 5516 rc = setInvalidMachineStateError();5362 rc = i_setInvalidMachineStateError(); 5517 5363 ptrVM.release(); 5518 5364 } … … 5534 5380 * @note Locks this object for writing. 5535 5381 */ 5536 HRESULT Console:: onStorageDeviceChange(IMediumAttachment *aMediumAttachment, BOOL aRemove, BOOL aSilent)5382 HRESULT Console::i_onStorageDeviceChange(IMediumAttachment *aMediumAttachment, BOOL aRemove, BOOL aSilent) 5537 5383 { 5538 5384 LogFlowThisFunc(("\n")); … … 5548 5394 { 5549 5395 if (aRemove) 5550 rc = doStorageDeviceDetach(aMediumAttachment, ptrVM.rawUVM(), RT_BOOL(aSilent));5396 rc = i_doStorageDeviceDetach(aMediumAttachment, ptrVM.rawUVM(), RT_BOOL(aSilent)); 5551 5397 else 5552 rc = doStorageDeviceAttach(aMediumAttachment, ptrVM.rawUVM(), RT_BOOL(aSilent));5398 rc = i_doStorageDeviceAttach(aMediumAttachment, ptrVM.rawUVM(), RT_BOOL(aSilent)); 5553 5399 ptrVM.release(); 5554 5400 } … … 5562 5408 } 5563 5409 5564 HRESULT Console:: onExtraDataChange(IN_BSTR aMachineId, IN_BSTR aKey, IN_BSTR aVal)5410 HRESULT Console::i_onExtraDataChange(IN_BSTR aMachineId, IN_BSTR aKey, IN_BSTR aVal) 5565 5411 { 5566 5412 LogFlowThisFunc(("\n")); … … 5608 5454 * @note Temporarily locks this object for writing. 5609 5455 */ 5610 HRESULT Console::getGuestProperty(IN_BSTR aName, BSTR *aValue, 5611 LONG64 *aTimestamp, BSTR *aFlags) 5456 HRESULT Console::i_getGuestProperty(IN_BSTR aName, BSTR *aValue, LONG64 *aTimestamp, BSTR *aFlags) 5612 5457 { 5613 5458 #ifndef VBOX_WITH_GUEST_PROPS … … 5691 5536 * @note Temporarily locks this object for writing. 5692 5537 */ 5693 HRESULT Console:: setGuestProperty(IN_BSTR aName, IN_BSTR aValue, IN_BSTR aFlags)5538 HRESULT Console::i_setGuestProperty(IN_BSTR aName, IN_BSTR aValue, IN_BSTR aFlags) 5694 5539 { 5695 5540 #ifndef VBOX_WITH_GUEST_PROPS … … 5767 5612 * @note Temporarily locks this object for writing. 5768 5613 */ 5769 HRESULT Console:: enumerateGuestProperties(IN_BSTR aPatterns,5770 ComSafeArrayOut(BSTR, aNames),5771 ComSafeArrayOut(BSTR, aValues),5772 ComSafeArrayOut(LONG64, aTimestamps),5773 ComSafeArrayOut(BSTR, aFlags))5614 HRESULT Console::i_enumerateGuestProperties(IN_BSTR aPatterns, 5615 ComSafeArrayOut(BSTR, aNames), 5616 ComSafeArrayOut(BSTR, aValues), 5617 ComSafeArrayOut(LONG64, aTimestamps), 5618 ComSafeArrayOut(BSTR, aFlags)) 5774 5619 { 5775 5620 #ifndef VBOX_WITH_GUEST_PROPS … … 5798 5643 * autoVMCaller, so there is no need to hold a lock of this */ 5799 5644 5800 return doEnumerateGuestProperties(aPatterns, ComSafeArrayOutArg(aNames),5801 ComSafeArrayOutArg(aValues),5802 ComSafeArrayOutArg(aTimestamps),5803 ComSafeArrayOutArg(aFlags));5645 return i_doEnumerateGuestProperties(aPatterns, ComSafeArrayOutArg(aNames), 5646 ComSafeArrayOutArg(aValues), 5647 ComSafeArrayOutArg(aTimestamps), 5648 ComSafeArrayOutArg(aFlags)); 5804 5649 #endif /* VBOX_WITH_GUEST_PROPS */ 5805 5650 } … … 5821 5666 * @note Temporarily locks this object for writing. bird: And/or reading? 5822 5667 */ 5823 HRESULT Console:: onlineMergeMedium(IMediumAttachment *aMediumAttachment,5668 HRESULT Console::i_onlineMergeMedium(IMediumAttachment *aMediumAttachment, 5824 5669 ULONG aSourceIdx, ULONG aTargetIdx, 5825 5670 IProgress *aProgress) … … 5847 5692 5848 5693 default: 5849 return setInvalidMachineStateError();5694 return i_setInvalidMachineStateError(); 5850 5695 } 5851 5696 … … 5897 5742 rc = pStorageController->COMGETTER(ControllerType)(&enmCtrlType); 5898 5743 AssertComRC(rc); 5899 const char *pcszDevice = convertControllerTypeToDev(enmCtrlType);5744 const char *pcszDevice = i_convertControllerTypeToDev(enmCtrlType); 5900 5745 5901 5746 StorageBus_T enmBus; … … 5910 5755 5911 5756 unsigned uLUN; 5912 rc = Console:: convertBusPortDeviceToLun(enmBus, lPort, lDev, uLUN);5757 rc = Console::i_convertBusPortDeviceToLun(enmBus, lPort, lDev, uLUN); 5913 5758 AssertComRCReturnRC(rc); 5914 5759 … … 5928 5773 5929 5774 vrc = VMR3ReqCallWaitU(ptrVM.rawUVM(), VMCPUID_ANY, 5930 (PFNRT) reconfigureMediumAttachment, 13,5775 (PFNRT)i_reconfigureMediumAttachment, 13, 5931 5776 this, ptrVM.rawUVM(), pcszDevice, uInstance, enmBus, fUseHostIOCache, 5932 5777 fBuiltinIOCache, true /* fSetupMerge */, aSourceIdx, aTargetIdx, … … 5945 5790 /* too bad, we failed. try to sync the console state with the VMM state */ 5946 5791 AssertLogRelRC(vrc2); 5947 vmstateChangeCallback(ptrVM.rawUVM(), VMSTATE_SUSPENDED, enmVMState, this);5792 i_vmstateChangeCallback(ptrVM.rawUVM(), VMSTATE_SUSPENDED, enmVMState, this); 5948 5793 } 5949 5794 } … … 5990 5835 5991 5836 vrc = VMR3ReqCallWaitU(ptrVM.rawUVM(), VMCPUID_ANY, 5992 (PFNRT) reconfigureMediumAttachment, 13,5837 (PFNRT)i_reconfigureMediumAttachment, 13, 5993 5838 this, ptrVM.rawUVM(), pcszDevice, uInstance, enmBus, fUseHostIOCache, 5994 5839 fBuiltinIOCache, false /* fSetupMerge */, 0 /* uMergeSource */, … … 6007 5852 { 6008 5853 /* too bad, we failed. try to sync the console state with the VMM state */ 6009 vmstateChangeCallback(ptrVM.rawUVM(), VMSTATE_SUSPENDED, enmVMState, this);5854 i_vmstateChangeCallback(ptrVM.rawUVM(), VMSTATE_SUSPENDED, enmVMState, this); 6010 5855 } 6011 5856 } … … 6029 5874 * handling this. 6030 5875 */ 6031 int Console:: hgcmLoadService(const char *pszServiceLibrary, const char *pszServiceName)5876 int Console::i_hgcmLoadService(const char *pszServiceLibrary, const char *pszServiceName) 6032 5877 { 6033 5878 /* Everyone seems to delegate all HGCM calls to VMMDev, so stick to this … … 6040 5885 * Merely passes the call to Guest::enableVMMStatistics(). 6041 5886 */ 6042 void Console:: enableVMMStatistics(BOOL aEnable)5887 void Console::i_enableVMMStatistics(BOOL aEnable) 6043 5888 { 6044 5889 if (mGuest) … … 6050 5895 * a specific reason. 6051 5896 */ 6052 HRESULT Console:: pause(Reason_T aReason)5897 HRESULT Console::i_pause(Reason_T aReason) 6053 5898 { 6054 5899 LogFlowThisFuncEnter(); … … 6072 5917 6073 5918 default: 6074 return setInvalidMachineStateError();5919 return i_setInvalidMachineStateError(); 6075 5920 } 6076 5921 … … 6108 5953 * a specific reason. 6109 5954 */ 6110 HRESULT Console:: resume(Reason_T aReason)5955 HRESULT Console::i_resume(Reason_T aReason) 6111 5956 { 6112 5957 LogFlowThisFuncEnter(); … … 6167 6012 * a VM for a specific reason. 6168 6013 */ 6169 HRESULT Console:: saveState(Reason_T aReason, IProgress **aProgress)6014 HRESULT Console::i_saveState(Reason_T aReason, IProgress **aProgress) 6170 6015 { 6171 6016 LogFlowThisFuncEnter(); … … 6239 6084 6240 6085 /* sync the state with the server */ 6241 setMachineStateLocally(MachineState_Saving);6086 i_setMachineStateLocally(MachineState_Saving); 6242 6087 6243 6088 /* ensure the directory for the saved state file exists */ … … 6277 6122 6278 6123 /* create a thread to wait until the VM state is saved */ 6279 int vrc = RTThreadCreate(NULL, Console:: saveStateThread, (void *)task.get(),6124 int vrc = RTThreadCreate(NULL, Console::i_saveStateThread, (void *)task.get(), 6280 6125 0, RTTHREADTYPE_MAIN_WORKER, 0, "VMSave"); 6281 6126 if (RT_FAILURE(vrc)) … … 6310 6155 { 6311 6156 /* restore the paused state if appropriate */ 6312 setMachineStateLocally(MachineState_Paused);6157 i_setMachineStateLocally(MachineState_Paused); 6313 6158 /* restore the running state if appropriate */ 6314 6159 SafeVMPtr ptrVM(this); … … 6321 6166 } 6322 6167 else 6323 setMachineStateLocally(lastMachineState);6168 i_setMachineStateLocally(lastMachineState); 6324 6169 } 6325 6170 … … 6337 6182 * @note Locks this object for writing. 6338 6183 */ 6339 HRESULT Console:: updateMachineState(MachineState_T aMachineState)6184 HRESULT Console::i_updateMachineState(MachineState_T aMachineState) 6340 6185 { 6341 6186 AutoCaller autoCaller(this); … … 6352 6197 , E_FAIL); 6353 6198 6354 return setMachineStateLocally(aMachineState);6199 return i_setMachineStateLocally(aMachineState); 6355 6200 } 6356 6201 … … 6360 6205 */ 6361 6206 #endif 6362 void Console:: onMousePointerShapeChange(bool fVisible, bool fAlpha,6363 uint32_t xHot, uint32_t yHot,6207 void Console::i_onMousePointerShapeChange(bool fVisible, bool fAlpha, 6208 uint32_t xHot, uint32_t yHot, 6364 6209 uint32_t width, uint32_t height, 6365 6210 ComSafeArrayIn(BYTE,pShape)) … … 6412 6257 */ 6413 6258 #endif 6414 void Console:: onMouseCapabilityChange(BOOL supportsAbsolute, BOOL supportsRelative,6415 BOOL supportsMT, BOOL needsHostCursor)6259 void Console::i_onMouseCapabilityChange(BOOL supportsAbsolute, BOOL supportsRelative, 6260 BOOL supportsMT, BOOL needsHostCursor) 6416 6261 { 6417 6262 LogFlowThisFunc(("supportsAbsolute=%d supportsRelative=%d needsHostCursor=%d\n", … … 6437 6282 } 6438 6283 6439 void Console:: onStateChange(MachineState_T machineState)6284 void Console::i_onStateChange(MachineState_T machineState) 6440 6285 { 6441 6286 AutoCaller autoCaller(this); … … 6444 6289 } 6445 6290 6446 void Console:: onAdditionsStateChange()6291 void Console::i_onAdditionsStateChange() 6447 6292 { 6448 6293 AutoCaller autoCaller(this); … … 6459 6304 * Additions are available (via VBoxTray/VBoxClient). 6460 6305 */ 6461 void Console:: onAdditionsOutdated()6306 void Console::i_onAdditionsOutdated() 6462 6307 { 6463 6308 AutoCaller autoCaller(this); … … 6472 6317 */ 6473 6318 #endif 6474 void Console:: onKeyboardLedsChange(bool fNumLock, bool fCapsLock, bool fScrollLock)6319 void Console::i_onKeyboardLedsChange(bool fNumLock, bool fCapsLock, bool fScrollLock) 6475 6320 { 6476 6321 AutoCaller autoCaller(this); … … 6493 6338 } 6494 6339 6495 void Console:: onUSBDeviceStateChange(IUSBDevice *aDevice, bool aAttached,6496 IVirtualBoxErrorInfo *aError)6340 void Console::i_onUSBDeviceStateChange(IUSBDevice *aDevice, bool aAttached, 6341 IVirtualBoxErrorInfo *aError) 6497 6342 { 6498 6343 AutoCaller autoCaller(this); … … 6502 6347 } 6503 6348 6504 void Console:: onRuntimeError(BOOL aFatal, IN_BSTR aErrorID, IN_BSTR aMessage)6349 void Console::i_onRuntimeError(BOOL aFatal, IN_BSTR aErrorID, IN_BSTR aMessage) 6505 6350 { 6506 6351 AutoCaller autoCaller(this); … … 6510 6355 } 6511 6356 6512 HRESULT Console:: onShowWindow(BOOL aCheck, BOOL *aCanShow, LONG64 *aWinId)6357 HRESULT Console::i_onShowWindow(BOOL aCheck, BOOL *aCanShow, LONG64 *aWinId) 6513 6358 { 6514 6359 AssertReturn(aCanShow, E_POINTER); … … 6601 6446 * @note Locks this object for writing. 6602 6447 */ 6603 HRESULT Console:: addVMCaller(bool aQuiet /* = false */,6604 bool aAllowNullVM /* = false */)6448 HRESULT Console::i_addVMCaller(bool aQuiet /* = false */, 6449 bool aAllowNullVM /* = false */) 6605 6450 { 6606 6451 AutoCaller autoCaller(this); … … 6641 6486 * @note Locks this object for writing. 6642 6487 */ 6643 void Console:: releaseVMCaller()6488 void Console::i_releaseVMCaller() 6644 6489 { 6645 6490 AutoCaller autoCaller(this); … … 6661 6506 6662 6507 6663 HRESULT Console:: safeVMPtrRetainer(PUVM *a_ppUVM, bool a_Quiet)6508 HRESULT Console::i_safeVMPtrRetainer(PUVM *a_ppUVM, bool a_Quiet) 6664 6509 { 6665 6510 *a_ppUVM = NULL; … … 6696 6541 } 6697 6542 6698 void Console:: safeVMPtrReleaser(PUVM *a_ppUVM)6543 void Console::i_safeVMPtrReleaser(PUVM *a_ppUVM) 6699 6544 { 6700 6545 if (*a_ppUVM) … … 6710 6555 * Note that the logic must be in sync with Machine::DeleteSettings(). 6711 6556 */ 6712 HRESULT Console:: consoleInitReleaseLog(const ComPtr<IMachine> aMachine)6557 HRESULT Console::i_consoleInitReleaseLog(const ComPtr<IMachine> aMachine) 6713 6558 { 6714 6559 HRESULT hrc = S_OK; … … 6797 6642 * @param aPaused true if PowerUpPaused called. 6798 6643 */ 6799 HRESULT Console:: powerUp(IProgress **aProgress, bool aPaused)6644 HRESULT Console::i_powerUp(IProgress **aProgress, bool aPaused) 6800 6645 { 6801 6646 … … 6827 6672 /* Set up release logging as early as possible after the check if 6828 6673 * there is already a running VM which we shouldn't disturb. */ 6829 rc = consoleInitReleaseLog(mMachine);6674 rc = i_consoleInitReleaseLog(mMachine); 6830 6675 if (FAILED(rc)) 6831 6676 throw rc; … … 6893 6738 * saved state file (if not yet done). 6894 6739 */ 6895 rc = loadDataFromSavedState();6740 rc = i_loadDataFromSavedState(); 6896 6741 if (FAILED(rc)) 6897 6742 throw rc; … … 6937 6782 ComAssertComRCRetRC(task->rc()); 6938 6783 6939 task->mConfigConstructor = configConstructor;6784 task->mConfigConstructor = i_configConstructor; 6940 6785 task->mSharedFolders = sharedFolders; 6941 6786 task->mStartPaused = aPaused; … … 7203 7048 } 7204 7049 7205 int vrc = RTThreadCreate(NULL, Console:: powerUpThread,7050 int vrc = RTThreadCreate(NULL, Console::i_powerUpThread, 7206 7051 (void *)task.get(), 0, 7207 7052 RTTHREADTYPE_MAIN_WORKER, 0, "VMPwrUp"); … … 7216 7061 * any error reporting and appropriate state change! */ 7217 7062 if (mMachineState == MachineState_Saved) 7218 setMachineState(MachineState_Restoring);7063 i_setMachineState(MachineState_Restoring); 7219 7064 else if (fTeleporterEnabled) 7220 setMachineState(MachineState_TeleportingIn);7065 i_setMachineState(MachineState_TeleportingIn); 7221 7066 else if (enmFaultToleranceState == FaultToleranceState_Standby) 7222 setMachineState(MachineState_FaultTolerantSyncing);7067 i_setMachineState(MachineState_FaultTolerantSyncing); 7223 7068 else 7224 setMachineState(MachineState_Starting);7069 i_setMachineState(MachineState_Starting); 7225 7070 } 7226 7071 catch (HRESULT aRC) { rc = aRC; } … … 7276 7121 * release(). Otherwise it will deadlock. 7277 7122 */ 7278 HRESULT Console:: powerDown(IProgress *aProgress /*= NULL*/)7123 HRESULT Console::i_powerDown(IProgress *aProgress /*= NULL*/) 7279 7124 { 7280 7125 LogFlowThisFuncEnter(); … … 7344 7189 && mMachineState != MachineState_FaultTolerantSyncing 7345 7190 ) 7346 setMachineState(MachineState_Stopping);7191 i_setMachineState(MachineState_Stopping); 7347 7192 7348 7193 /* ---------------------------------------------------------------------- … … 7463 7308 { 7464 7309 alock.release(); 7465 detachAllUSBDevices(false /* aDone */);7310 i_detachAllUSBDevices(false /* aDone */); 7466 7311 alock.acquire(); 7467 7312 } … … 7518 7363 { 7519 7364 alock.release(); 7520 detachAllUSBDevices(true /* aDone */);7365 i_detachAllUSBDevices(true /* aDone */); 7521 7366 alock.acquire(); 7522 7367 } … … 7558 7403 * @note Locks this object for writing. 7559 7404 */ 7560 HRESULT Console:: setMachineState(MachineState_T aMachineState,7405 HRESULT Console::i_setMachineState(MachineState_T aMachineState, 7561 7406 bool aUpdateServer /* = true */) 7562 7407 { … … 7582 7427 // necessary??) 7583 7428 LogFlowThisFunc(("Doing onStateChange()...\n")); 7584 onStateChange(aMachineState);7429 i_onStateChange(aMachineState); 7585 7430 LogFlowThisFunc(("Done onStateChange()\n")); 7586 7431 … … 7622 7467 * @note The caller must lock this object for writing. 7623 7468 */ 7624 HRESULT Console:: findSharedFolder(const Utf8Str &strName,7625 ComObjPtr<SharedFolder> &aSharedFolder,7626 bool aSetError /* = false */)7469 HRESULT Console::i_findSharedFolder(const Utf8Str &strName, 7470 ComObjPtr<SharedFolder> &aSharedFolder, 7471 bool aSetError /* = false */) 7627 7472 { 7628 7473 /* sanity check */ … … 7651 7496 * @note The caller must lock this object for writing. 7652 7497 */ 7653 HRESULT Console:: fetchSharedFolders(BOOL aGlobal)7498 HRESULT Console::i_fetchSharedFolders(BOOL aGlobal) 7654 7499 { 7655 7500 /* sanity check */ … … 7736 7581 7737 7582 /* create the new machine folder */ 7738 rc = createSharedFolder(strName,7739 SharedFolderData(strHostPath, !!writable, !!autoMount));7583 rc = i_createSharedFolder(strName, 7584 SharedFolderData(strHostPath, !!writable, !!autoMount)); 7740 7585 if (FAILED(rc)) throw rc; 7741 7586 } … … 7766 7611 if (git != m_mapGlobalSharedFolders.end()) 7767 7612 { 7768 rc = createSharedFolder(git->first, git->second);7613 rc = i_createSharedFolder(git->first, git->second); 7769 7614 if (FAILED(rc)) throw rc; 7770 7615 } … … 7778 7623 rc = rc2; 7779 7624 if (online) 7780 setVMRuntimeErrorCallbackF(0, "BrokenSharedFolder",7781 N_("Broken shared folder!"));7625 i_setVMRuntimeErrorCallbackF(0, "BrokenSharedFolder", 7626 N_("Broken shared folder!")); 7782 7627 } 7783 7628 … … 7797 7642 * @note The caller must lock this object for reading. 7798 7643 */ 7799 bool Console:: findOtherSharedFolder(const Utf8Str &strName,7644 bool Console::i_findOtherSharedFolder(const Utf8Str &strName, 7800 7645 SharedFolderDataMap::const_iterator &aIt) 7801 7646 { … … 7825 7670 * @note Doesn't lock anything. 7826 7671 */ 7827 HRESULT Console:: createSharedFolder(const Utf8Str &strName, const SharedFolderData &aData)7672 HRESULT Console::i_createSharedFolder(const Utf8Str &strName, const SharedFolderData &aData) 7828 7673 { 7829 7674 ComAssertRet(strName.isNotEmpty(), E_FAIL); … … 7937 7782 * @note Doesn't lock anything. 7938 7783 */ 7939 HRESULT Console:: removeSharedFolder(const Utf8Str &strName)7784 HRESULT Console::i_removeSharedFolder(const Utf8Str &strName) 7940 7785 { 7941 7786 ComAssertRet(strName.isNotEmpty(), E_FAIL); … … 7984 7829 * calls after the VM was destroyed. 7985 7830 */ 7986 DECLCALLBACK(void) Console:: vmstateChangeCallback(PUVM pUVM, VMSTATE enmState, VMSTATE enmOldState, void *pvUser)7831 DECLCALLBACK(void) Console::i_vmstateChangeCallback(PUVM pUVM, VMSTATE enmState, VMSTATE enmOldState, void *pvUser) 7987 7832 { 7988 7833 LogFlowFunc(("Changing state from %s to %s (pUVM=%p)\n", … … 8009 7854 { 8010 7855 #ifdef VBOX_WITH_GUEST_PROPS 8011 if (that->i sResetTurnedIntoPowerOff())7856 if (that->i_isResetTurnedIntoPowerOff()) 8012 7857 { 8013 7858 Bstr strPowerOffReason; … … 8062 7907 8063 7908 /* sync the state with the server */ 8064 that-> setMachineStateLocally(MachineState_Stopping);7909 that->i_setMachineStateLocally(MachineState_Stopping); 8065 7910 8066 7911 /* Setup task object and thread to carry out the operation … … 8083 7928 } 8084 7929 8085 int vrc = RTThreadCreate(NULL, Console:: powerDownThread,7930 int vrc = RTThreadCreate(NULL, Console::i_powerDownThread, 8086 7931 (void *)task.get(), 0, 8087 7932 RTTHREADTYPE_MAIN_WORKER, 0, … … 8115 7960 */ 8116 7961 if (pUVM) 8117 that-> powerDownHostInterfaces();7962 that->i_powerDownHostInterfaces(); 8118 7963 8119 7964 /* From now on the machine is officially powered down or remains in … … 8127 7972 case MachineState_Stopping: 8128 7973 /* successfully powered down */ 8129 that-> setMachineState(MachineState_PoweredOff);7974 that->i_setMachineState(MachineState_PoweredOff); 8130 7975 break; 8131 7976 case MachineState_Saving: 8132 7977 /* successfully saved */ 8133 that-> setMachineState(MachineState_Saved);7978 that->i_setMachineState(MachineState_Saved); 8134 7979 break; 8135 7980 case MachineState_Starting: 8136 7981 /* failed to start, but be patient: set back to PoweredOff 8137 7982 * (for similarity with the below) */ 8138 that-> setMachineState(MachineState_PoweredOff);7983 that->i_setMachineState(MachineState_PoweredOff); 8139 7984 break; 8140 7985 case MachineState_Restoring: 8141 7986 /* failed to load the saved state file, but be patient: set 8142 7987 * back to Saved (to preserve the saved state file) */ 8143 that-> setMachineState(MachineState_Saved);7988 that->i_setMachineState(MachineState_Saved); 8144 7989 break; 8145 7990 case MachineState_TeleportingIn: 8146 7991 /* Teleportation failed or was canceled. Back to powered off. */ 8147 that-> setMachineState(MachineState_PoweredOff);7992 that->i_setMachineState(MachineState_PoweredOff); 8148 7993 break; 8149 7994 case MachineState_TeleportingPausedVM: 8150 7995 /* Successfully teleported the VM. */ 8151 that-> setMachineState(MachineState_Teleported);7996 that->i_setMachineState(MachineState_Teleported); 8152 7997 break; 8153 7998 case MachineState_FaultTolerantSyncing: 8154 7999 /* Fault tolerant sync failed or was canceled. Back to powered off. */ 8155 that-> setMachineState(MachineState_PoweredOff);8000 that->i_setMachineState(MachineState_PoweredOff); 8156 8001 break; 8157 8002 } … … 8163 8008 #ifdef VBOX_WITH_GUEST_PROPS 8164 8009 /* Do not take any read/write locks here! */ 8165 that-> guestPropertiesHandleVMReset();8010 that->i_guestPropertiesHandleVMReset(); 8166 8011 #endif 8167 8012 break; … … 8178 8023 { 8179 8024 case MachineState_Teleporting: 8180 that-> setMachineState(MachineState_TeleportingPausedVM);8025 that->i_setMachineState(MachineState_TeleportingPausedVM); 8181 8026 break; 8182 8027 8183 8028 case MachineState_LiveSnapshotting: 8184 that-> setMachineState(MachineState_Saving);8029 that->i_setMachineState(MachineState_Saving); 8185 8030 break; 8186 8031 … … 8197 8042 AssertMsgFailed(("%s\n", Global::stringifyMachineState(that->mMachineState))); 8198 8043 case MachineState_Running: 8199 that-> setMachineState(MachineState_Paused);8044 that->i_setMachineState(MachineState_Paused); 8200 8045 break; 8201 8046 … … 8216 8061 { 8217 8062 case MachineState_Teleporting: 8218 that-> setMachineState(MachineState_TeleportingPausedVM);8063 that->i_setMachineState(MachineState_TeleportingPausedVM); 8219 8064 break; 8220 8065 8221 8066 case MachineState_LiveSnapshotting: 8222 that-> setMachineState(MachineState_Saving);8067 that->i_setMachineState(MachineState_Saving); 8223 8068 break; 8224 8069 … … 8231 8076 AssertMsgFailed(("%s/%s -> %s\n", Global::stringifyMachineState(that->mMachineState), 8232 8077 VMR3GetStateName(enmOldState), VMR3GetStateName(enmState) )); 8233 that-> setMachineState(MachineState_Paused);8078 that->i_setMachineState(MachineState_Paused); 8234 8079 break; 8235 8080 } … … 8260 8105 && enmOldState == VMSTATE_RUNNING_FT)); 8261 8106 8262 that-> setMachineState(MachineState_Running);8107 that->i_setMachineState(MachineState_Running); 8263 8108 } 8264 8109 … … 8293 8138 * raised, so it is not worth adding a new externally 8294 8139 * visible state for this yet. */ 8295 that-> setMachineState(MachineState_Paused);8140 that->i_setMachineState(MachineState_Paused); 8296 8141 break; 8297 8142 } … … 8307 8152 Assert(Global::IsOnline(that->mMachineState)); 8308 8153 8309 that-> setMachineState(MachineState_Stuck);8154 that->i_setMachineState(MachineState_Stuck); 8310 8155 break; 8311 8156 } … … 8321 8166 * @param aClipboardMode new clipboard mode. 8322 8167 */ 8323 void Console:: changeClipboardMode(ClipboardMode_T aClipboardMode)8168 void Console::i_changeClipboardMode(ClipboardMode_T aClipboardMode) 8324 8169 { 8325 8170 VMMDev *pVMMDev = m_pVMMDev; … … 8358 8203 * @param aDnDMode new drag'n'drop mode. 8359 8204 */ 8360 int Console:: changeDnDMode(DnDMode_T aDnDMode)8205 int Console::i_changeDnDMode(DnDMode_T aDnDMode) 8361 8206 { 8362 8207 VMMDev *pVMMDev = m_pVMMDev; … … 8404 8249 * @note Synchronously calls EMT. 8405 8250 */ 8406 HRESULT Console:: attachUSBDevice(IUSBDevice *aHostDevice, ULONG aMaskedIfs)8251 HRESULT Console::i_attachUSBDevice(IUSBDevice *aHostDevice, ULONG aMaskedIfs) 8407 8252 { 8408 8253 AssertReturn(aHostDevice, E_FAIL); … … 8442 8287 { 8443 8288 RemoteUSBDevice *pRemoteUSBDevice = static_cast<RemoteUSBDevice *>(aHostDevice); 8444 pvRemoteBackend = consoleVRDPServer()->USBBackendRequestPointer(pRemoteUSBDevice->clientId(), &uuid);8289 pvRemoteBackend = i_consoleVRDPServer()->USBBackendRequestPointer(pRemoteUSBDevice->clientId(), &uuid); 8445 8290 if (!pvRemoteBackend) 8446 8291 return E_INVALIDARG; /* The clientId is invalid then. */ … … 8453 8298 8454 8299 int vrc = VMR3ReqCallWaitU(ptrVM.rawUVM(), 0 /* idDstCpu (saved state, see #6232) */, 8455 (PFNRT) usbAttachCallback, 9,8300 (PFNRT)i_usbAttachCallback, 9, 8456 8301 this, ptrVM.rawUVM(), aHostDevice, uuid.raw(), fRemote, 8457 8302 Address.c_str(), pvRemoteBackend, portVersion, aMaskedIfs); … … 8470 8315 /* notify callbacks */ 8471 8316 alock.release(); 8472 onUSBDeviceStateChange(pUSBDevice, true /* aAttached */, NULL);8317 i_onUSBDeviceStateChange(pUSBDevice, true /* aAttached */, NULL); 8473 8318 } 8474 8319 else … … 8505 8350 //static 8506 8351 DECLCALLBACK(int) 8507 Console:: usbAttachCallback(Console *that, PUVM pUVM, IUSBDevice *aHostDevice, PCRTUUID aUuid, bool aRemote,8508 const char *aAddress, void *pvRemoteBackend, USHORT aPortVersion, ULONG aMaskedIfs)8352 Console::i_usbAttachCallback(Console *that, PUVM pUVM, IUSBDevice *aHostDevice, PCRTUUID aUuid, bool aRemote, 8353 const char *aAddress, void *pvRemoteBackend, USHORT aPortVersion, ULONG aMaskedIfs) 8509 8354 { 8510 8355 LogFlowFuncEnter(); … … 8530 8375 * @note Synchronously calls EMT. 8531 8376 */ 8532 HRESULT Console:: detachUSBDevice(const ComObjPtr<OUSBDevice> &aHostDevice)8377 HRESULT Console::i_detachUSBDevice(const ComObjPtr<OUSBDevice> &aHostDevice) 8533 8378 { 8534 8379 AssertReturn(!isWriteLockOnCurrentThread(), E_FAIL); … … 8554 8399 HRESULT hrc2 = aHostDevice->COMGETTER(Remote)(&fRemote); 8555 8400 if (FAILED(hrc2)) 8556 setErrorStatic(hrc2, "GetRemote() failed");8401 i_setErrorStatic(hrc2, "GetRemote() failed"); 8557 8402 8558 8403 PCRTUUID pUuid = aHostDevice->i_id().raw(); … … 8560 8405 { 8561 8406 Guid guid(*pUuid); 8562 consoleVRDPServer()->USBBackendReleasePointer(&guid);8407 i_consoleVRDPServer()->USBBackendReleasePointer(&guid); 8563 8408 } 8564 8409 8565 8410 alock.release(); 8566 8411 int vrc = VMR3ReqCallWaitU(ptrVM.rawUVM(), 0 /* idDstCpu (saved state, see #6232) */, 8567 (PFNRT) usbDetachCallback, 5,8412 (PFNRT)i_usbDetachCallback, 5, 8568 8413 this, ptrVM.rawUVM(), pUuid); 8569 8414 if (RT_SUCCESS(vrc)) … … 8572 8417 8573 8418 /* notify callbacks */ 8574 onUSBDeviceStateChange(aHostDevice, false /* aAttached */, NULL);8419 i_onUSBDeviceStateChange(aHostDevice, false /* aAttached */, NULL); 8575 8420 } 8576 8421 … … 8591 8436 //static 8592 8437 DECLCALLBACK(int) 8593 Console:: usbDetachCallback(Console *that, PUVM pUVM, PCRTUUID aUuid)8438 Console::i_usbDetachCallback(Console *that, PUVM pUVM, PCRTUUID aUuid) 8594 8439 { 8595 8440 LogFlowFuncEnter(); … … 8847 8692 * @note The caller must lock this object for writing. 8848 8693 */ 8849 HRESULT Console:: powerDownHostInterfaces()8694 HRESULT Console::i_powerDownHostInterfaces() 8850 8695 { 8851 8696 LogFlowThisFunc(("\n")); … … 8906 8751 */ 8907 8752 /*static*/ 8908 DECLCALLBACK(int) Console:: stateProgressCallback(PUVM pUVM, unsigned uPercent, void *pvUser)8753 DECLCALLBACK(int) Console::i_stateProgressCallback(PUVM pUVM, unsigned uPercent, void *pvUser) 8909 8754 { 8910 8755 IProgress *pProgress = static_cast<IProgress *>(pvUser); … … 8925 8770 */ 8926 8771 /*static*/ DECLCALLBACK(void) 8927 Console:: genericVMSetErrorCallback(PUVM pUVM, void *pvUser, int rc, RT_SRC_POS_DECL,8928 const char *pszErrorFmt, va_list va)8772 Console::i_genericVMSetErrorCallback(PUVM pUVM, void *pvUser, int rc, RT_SRC_POS_DECL, 8773 const char *pszErrorFmt, va_list va) 8929 8774 { 8930 8775 Utf8Str *pErrorText = (Utf8Str *)pvUser; … … 8961 8806 */ 8962 8807 /* static */ DECLCALLBACK(void) 8963 Console:: setVMRuntimeErrorCallback(PUVM pUVM, void *pvUser, uint32_t fFlags,8964 const char *pszErrorId,8965 const char *pszFormat, va_list va)8808 Console::i_setVMRuntimeErrorCallback(PUVM pUVM, void *pvUser, uint32_t fFlags, 8809 const char *pszErrorId, 8810 const char *pszFormat, va_list va) 8966 8811 { 8967 8812 bool const fFatal = !!(fFlags & VMSETRTERR_FLAGS_FATAL); … … 8986 8831 8987 8832 8988 that-> onRuntimeError(BOOL(fFatal), Bstr(pszErrorId).raw(), Bstr(message).raw());8833 that->i_onRuntimeError(BOOL(fFatal), Bstr(pszErrorId).raw(), Bstr(message).raw()); 8989 8834 8990 8835 LogFlowFuncLeave(); NOREF(pUVM); … … 8997 8842 * @param pUVM The VM handle. 8998 8843 */ 8999 HRESULT Console:: captureUSBDevices(PUVM pUVM)8844 HRESULT Console::i_captureUSBDevices(PUVM pUVM) 9000 8845 { 9001 8846 LogFlowThisFunc(("\n")); … … 9026 8871 * purpose of clean up and such like. 9027 8872 */ 9028 void Console:: detachAllUSBDevices(bool aDone)8873 void Console::i_detachAllUSBDevices(bool aDone) 9029 8874 { 9030 8875 LogFlowThisFunc(("aDone=%RTbool\n", aDone)); … … 9047 8892 * @note Locks this object for writing. 9048 8893 */ 9049 void Console:: processRemoteUSBDevices(uint32_t u32ClientId, VRDEUSBDEVICEDESC *pDevList, uint32_t cbDevList, bool fDescExt)8894 void Console::i_processRemoteUSBDevices(uint32_t u32ClientId, VRDEUSBDEVICEDESC *pDevList, uint32_t cbDevList, bool fDescExt) 9050 8895 { 9051 8896 LogFlowThisFuncEnter(); … … 9139 8984 { 9140 8985 alock.release(); 9141 hrc = onUSBDeviceAttach(pUSBDevice, NULL, fMaskedIfs);8986 hrc = i_onUSBDeviceAttach(pUSBDevice, NULL, fMaskedIfs); 9142 8987 alock.acquire(); 9143 8988 … … 9206 9051 pUSBDevice->COMGETTER(Id)(uuid.asOutParam()); 9207 9052 alock.release(); 9208 onUSBDeviceDetach(uuid.raw(), NULL);9053 i_onUSBDeviceDetach(uuid.raw(), NULL); 9209 9054 alock.acquire(); 9210 9055 } … … 9239 9084 */ 9240 9085 /*static*/ 9241 DECLCALLBACK(int) Console:: powerUpThread(RTTHREAD Thread, void *pvUser)9086 DECLCALLBACK(int) Console::i_powerUpThread(RTTHREAD Thread, void *pvUser) 9242 9087 { 9243 9088 LogFlowFuncEnter(); … … 9302 9147 * 9303 9148 * Note! The media will be unlocked automatically by 9304 * SessionMachine:: setMachineState() when the VM is powered down.9149 * SessionMachine::i_setMachineState() when the VM is powered down. 9305 9150 */ 9306 9151 if ( !task->mTeleporterEnabled … … 9314 9159 * also create the framebuffer, required at VM creation. 9315 9160 */ 9316 ConsoleVRDPServer *server = pConsole-> consoleVRDPServer();9161 ConsoleVRDPServer *server = pConsole->i_consoleVRDPServer(); 9317 9162 Assert(server); 9318 9163 … … 9358 9203 LogRel(("VRDE: Failed: (%Rrc), error message: '%s'\n", 9359 9204 vrc, errMsg.c_str())); 9360 throw setErrorStatic(E_FAIL, errMsg.c_str());9361 } 9362 9363 ComPtr<IMachine> pMachine = pConsole-> machine();9205 throw i_setErrorStatic(E_FAIL, errMsg.c_str()); 9206 } 9207 9208 ComPtr<IMachine> pMachine = pConsole->i_machine(); 9364 9209 ULONG cCpus = 1; 9365 9210 pMachine->COMGETTER(CPUCount)(&cCpus); … … 9376 9221 vrc = VMR3Create(cCpus, 9377 9222 pConsole->mpVmm2UserMethods, 9378 Console:: genericVMSetErrorCallback,9223 Console::i_genericVMSetErrorCallback, 9379 9224 &task->mErrorMsg, 9380 9225 task->mConfigConstructor, … … 9385 9230 9386 9231 /* Enable client connections to the server. */ 9387 pConsole-> consoleVRDPServer()->EnableConnections();9232 pConsole->i_consoleVRDPServer()->EnableConnections(); 9388 9233 9389 9234 if (RT_SUCCESS(vrc)) … … 9396 9241 vrc = SSMR3RegisterExternal(pConsole->mpUVM, sSSMConsoleUnit, 0 /*iInstance*/, sSSMConsoleVer, 0 /* cbGuess */, 9397 9242 NULL, NULL, NULL, 9398 NULL, saveStateFileExec, NULL,9399 NULL, loadStateFileExec, NULL,9243 NULL, i_saveStateFileExec, NULL, 9244 NULL, i_loadStateFileExec, NULL, 9400 9245 static_cast<Console *>(pConsole)); 9401 9246 AssertRCBreak(vrc); 9402 9247 9403 vrc = static_cast<Console *>(pConsole)-> getDisplay()->registerSSM(pConsole->mpUVM);9248 vrc = static_cast<Console *>(pConsole)->i_getDisplay()->registerSSM(pConsole->mpUVM); 9404 9249 AssertRC(vrc); 9405 9250 if (RT_FAILURE(vrc)) … … 9409 9254 * Synchronize debugger settings 9410 9255 */ 9411 MachineDebugger *machineDebugger = pConsole-> getMachineDebugger();9256 MachineDebugger *machineDebugger = pConsole->i_getMachineDebugger(); 9412 9257 if (machineDebugger) 9413 9258 machineDebugger->i_flushQueuedSettings(); … … 9427 9272 { 9428 9273 const SharedFolderData &d = it->second; 9429 rc = pConsole-> createSharedFolder(it->first, d);9274 rc = pConsole->i_createSharedFolder(it->first, d); 9430 9275 if (FAILED(rc)) 9431 9276 { 9432 9277 ErrorInfoKeeper eik; 9433 pConsole-> setVMRuntimeErrorCallbackF(0, "BrokenSharedFolder",9278 pConsole->i_setVMRuntimeErrorCallbackF(0, "BrokenSharedFolder", 9434 9279 N_("The shared folder '%s' could not be set up: %ls.\n" 9435 9280 "The shared folder setup will not be complete. It is recommended to power down the virtual " 9436 9281 "machine and fix the shared folder settings while the machine is not running"), 9437 it->first.c_str(), eik.getText().raw());9282 it->first.c_str(), eik.getText().raw()); 9438 9283 } 9439 9284 } … … 9451 9296 * Capture USB devices. 9452 9297 */ 9453 rc = pConsole-> captureUSBDevices(pConsole->mpUVM);9298 rc = pConsole->i_captureUSBDevices(pConsole->mpUVM); 9454 9299 if (FAILED(rc)) 9455 9300 break; … … 9463 9308 vrc = VMR3LoadFromFile(pConsole->mpUVM, 9464 9309 task->mSavedStateFile.c_str(), 9465 Console:: stateProgressCallback,9310 Console::i_stateProgressCallback, 9466 9311 static_cast<IProgress *>(task->mProgress)); 9467 9312 … … 9470 9315 if (task->mStartPaused) 9471 9316 /* done */ 9472 pConsole-> setMachineState(MachineState_Paused);9317 pConsole->i_setMachineState(MachineState_Paused); 9473 9318 else 9474 9319 { … … 9496 9341 /* -> ConsoleImplTeleporter.cpp */ 9497 9342 bool fPowerOffOnFailure; 9498 rc = pConsole-> teleporterTrg(pConsole->mpUVM, pMachine, &task->mErrorMsg, task->mStartPaused,9499 task->mProgress, &fPowerOffOnFailure);9343 rc = pConsole->i_teleporterTrg(pConsole->mpUVM, pMachine, &task->mErrorMsg, task->mStartPaused, 9344 task->mProgress, &fPowerOffOnFailure); 9500 9345 if (FAILED(rc) && fPowerOffOnFailure) 9501 9346 { … … 9554 9399 else if (task->mStartPaused) 9555 9400 /* done */ 9556 pConsole-> setMachineState(MachineState_Paused);9401 pConsole->i_setMachineState(MachineState_Paused); 9557 9402 else 9558 9403 { … … 9580 9425 * cleanup (VRDP, USB devices) */ 9581 9426 alock.release(); 9582 HRESULT rc2 = pConsole-> powerDown();9427 HRESULT rc2 = pConsole->i_powerDown(); 9583 9428 alock.acquire(); 9584 9429 AssertComRC(rc2); … … 9592 9437 */ 9593 9438 alock.release(); 9594 VMR3AtErrorDeregister(pConsole->mpUVM, Console:: genericVMSetErrorCallback, &task->mErrorMsg);9439 VMR3AtErrorDeregister(pConsole->mpUVM, Console::i_genericVMSetErrorCallback, &task->mErrorMsg); 9595 9440 /** @todo register another VMSetError callback? */ 9596 9441 alock.acquire(); … … 9627 9472 /* Set the error message as the COM error. 9628 9473 * Progress::notifyComplete() will pick it up later. */ 9629 throw setErrorStatic(E_FAIL, task->mErrorMsg.c_str());9474 throw i_setErrorStatic(E_FAIL, task->mErrorMsg.c_str()); 9630 9475 } 9631 9476 } … … 9651 9496 9652 9497 Assert(pConsole->mpUVM == NULL); 9653 vmstateChangeCallback(NULL, VMSTATE_TERMINATED, VMSTATE_CREATING, pConsole);9498 i_vmstateChangeCallback(NULL, VMSTATE_TERMINATED, VMSTATE_CREATING, pConsole); 9654 9499 } 9655 9500 … … 9705 9550 */ 9706 9551 /* static */ 9707 DECLCALLBACK(int) Console:: reconfigureMediumAttachment(Console *pThis,9708 PUVM pUVM,9709 const char *pcszDevice,9710 unsigned uInstance,9711 StorageBus_T enmBus,9712 bool fUseHostIOCache,9713 bool fBuiltinIOCache,9714 bool fSetupMerge,9715 unsigned uMergeSource,9716 unsigned uMergeTarget,9717 IMediumAttachment *aMediumAtt,9718 MachineState_T aMachineState,9719 HRESULT *phrc)9552 DECLCALLBACK(int) Console::i_reconfigureMediumAttachment(Console *pThis, 9553 PUVM pUVM, 9554 const char *pcszDevice, 9555 unsigned uInstance, 9556 StorageBus_T enmBus, 9557 bool fUseHostIOCache, 9558 bool fBuiltinIOCache, 9559 bool fSetupMerge, 9560 unsigned uMergeSource, 9561 unsigned uMergeTarget, 9562 IMediumAttachment *aMediumAtt, 9563 MachineState_T aMachineState, 9564 HRESULT *phrc) 9720 9565 { 9721 9566 LogFlowFunc(("pUVM=%p aMediumAtt=%p phrc=%p\n", pUVM, aMediumAtt, phrc)); … … 9745 9590 /* Update the device instance configuration. */ 9746 9591 PCFGMNODE pLunL0 = NULL; 9747 int rc = pThis-> configMediumAttachment(pCtlInst,9748 pcszDevice,9749 uInstance,9750 enmBus,9751 fUseHostIOCache,9752 fBuiltinIOCache,9753 fSetupMerge,9754 uMergeSource,9755 uMergeTarget,9756 aMediumAtt,9757 aMachineState,9758 phrc,9759 true /* fAttachDetach */,9760 false /* fForceUnmount */,9761 false /* fHotplug */,9762 pUVM,9763 NULL /* paLedDevType */,9764 &pLunL0);9592 int rc = pThis->i_configMediumAttachment(pCtlInst, 9593 pcszDevice, 9594 uInstance, 9595 enmBus, 9596 fUseHostIOCache, 9597 fBuiltinIOCache, 9598 fSetupMerge, 9599 uMergeSource, 9600 uMergeTarget, 9601 aMediumAtt, 9602 aMachineState, 9603 phrc, 9604 true /* fAttachDetach */, 9605 false /* fForceUnmount */, 9606 false /* fHotplug */, 9607 pUVM, 9608 NULL /* paLedDevType */, 9609 &pLunL0); 9765 9610 /* Dump the changed LUN if possible, dump the complete device otherwise */ 9766 9611 CFGMR3Dump(pLunL0 ? pLunL0 : pCtlInst); … … 9793 9638 */ 9794 9639 /*static*/ 9795 DECLCALLBACK(int) Console:: fntTakeSnapshotWorker(RTTHREAD Thread, void *pvUser)9640 DECLCALLBACK(int) Console::i_fntTakeSnapshotWorker(RTTHREAD Thread, void *pvUser) 9796 9641 { 9797 9642 VMTakeSnapshotTask *pTask = (VMTakeSnapshotTask*)pvUser; … … 9845 9690 if ( !pTask->fTakingSnapshotOnline 9846 9691 && !pTask->bstrSavedStateFile.isEmpty()) 9847 throw setErrorStatic(E_FAIL, "Invalid state of saved state file");9692 throw i_setErrorStatic(E_FAIL, "Invalid state of saved state file"); 9848 9693 9849 9694 /* sync the state with the server */ 9850 9695 if (pTask->lastMachineState == MachineState_Running) 9851 that-> setMachineStateLocally(MachineState_LiveSnapshotting);9696 that->i_setMachineStateLocally(MachineState_LiveSnapshotting); 9852 9697 else 9853 that-> setMachineStateLocally(MachineState_Saving);9698 that->i_setMachineStateLocally(MachineState_Saving); 9854 9699 9855 9700 // STEP 3: save the VM state (if online) … … 9875 9720 strSavedStateFile.c_str(), 9876 9721 true /*fContinueAfterwards*/, 9877 Console:: stateProgressCallback,9722 Console::i_stateProgressCallback, 9878 9723 static_cast<IProgress *>(pTask->mProgress), 9879 9724 &fSuspenededBySave); 9880 9725 alock.acquire(); 9881 9726 if (RT_FAILURE(vrc)) 9882 throw setErrorStatic(E_FAIL,9727 throw i_setErrorStatic(E_FAIL, 9883 9728 tr("Failed to save the machine state to '%s' (%Rrc)"), 9884 9729 strSavedStateFile.c_str(), vrc); … … 9890 9735 9891 9736 if (!pTask->mProgress->i_notifyPointOfNoReturn()) 9892 throw setErrorStatic(E_FAIL, tr("Canceled"));9737 throw i_setErrorStatic(E_FAIL, tr("Canceled")); 9893 9738 that->mptrCancelableProgress.setNull(); 9894 9739 … … 9942 9787 throw rc; 9943 9788 9944 const char *pcszDevice = Console:: convertControllerTypeToDev(enmController);9789 const char *pcszDevice = Console::i_convertControllerTypeToDev(enmController); 9945 9790 9946 9791 BOOL fBuiltinIOCache; … … 9954 9799 */ 9955 9800 vrc = VMR3ReqCallWaitU(ptrVM.rawUVM(), VMCPUID_ANY, 9956 (PFNRT) reconfigureMediumAttachment, 13,9801 (PFNRT)i_reconfigureMediumAttachment, 13, 9957 9802 that, ptrVM.rawUVM(), pcszDevice, lInstance, enmBus, fUseHostIOCache, 9958 9803 fBuiltinIOCache, false /* fSetupMerge */, 0 /* uMergeSource */, 9959 9804 0 /* uMergeTarget */, atts[i], that->mMachineState, &rc); 9960 9805 if (RT_FAILURE(vrc)) 9961 throw setErrorStatic(E_FAIL, Console::tr("%Rrc"), vrc);9806 throw i_setErrorStatic(E_FAIL, Console::tr("%Rrc"), vrc); 9962 9807 if (FAILED(rc)) 9963 9808 throw rc; … … 10003 9848 10004 9849 if (!pTask->fTakingSnapshotOnline) 10005 that-> setMachineStateLocally(pTask->lastMachineState);9850 that->i_setMachineStateLocally(pTask->lastMachineState); 10006 9851 else if (SUCCEEDED(rc)) 10007 9852 { … … 10018 9863 if (RT_FAILURE(vrc)) 10019 9864 { 10020 rc = setErrorStatic(VBOX_E_VM_ERROR, tr("Could not resume the machine execution (%Rrc)"), vrc);9865 rc = i_setErrorStatic(VBOX_E_VM_ERROR, tr("Could not resume the machine execution (%Rrc)"), vrc); 10021 9866 pTask->mProgress->i_notifyComplete(rc); 10022 9867 if (that->mMachineState == MachineState_Saving) 10023 that-> setMachineStateLocally(MachineState_Paused);9868 that->i_setMachineStateLocally(MachineState_Paused); 10024 9869 } 10025 9870 } 10026 9871 else 10027 that-> setMachineStateLocally(MachineState_Paused);9872 that->i_setMachineStateLocally(MachineState_Paused); 10028 9873 } 10029 9874 else … … 10043 9888 case VMSTATE_RESETTING_LS: 10044 9889 Assert(!fSuspenededBySave); 10045 that-> setMachineState(MachineState_Running);9890 that->i_setMachineState(MachineState_Running); 10046 9891 break; 10047 9892 10048 9893 case VMSTATE_GURU_MEDITATION: 10049 9894 case VMSTATE_GURU_MEDITATION_LS: 10050 that-> setMachineState(MachineState_Stuck);9895 that->i_setMachineState(MachineState_Stuck); 10051 9896 break; 10052 9897 … … 10054 9899 case VMSTATE_FATAL_ERROR_LS: 10055 9900 if (pTask->lastMachineState == MachineState_Paused) 10056 that-> setMachineStateLocally(pTask->lastMachineState);9901 that->i_setMachineStateLocally(pTask->lastMachineState); 10057 9902 else 10058 that-> setMachineState(MachineState_Paused);9903 that->i_setMachineState(MachineState_Paused); 10059 9904 break; 10060 9905 … … 10075 9920 alock.acquire(); 10076 9921 if (RT_FAILURE(vrc)) 10077 that-> setMachineState(MachineState_Paused);9922 that->i_setMachineState(MachineState_Paused); 10078 9923 } 10079 9924 else if (pTask->lastMachineState == MachineState_Paused) 10080 that-> setMachineStateLocally(pTask->lastMachineState);9925 that->i_setMachineStateLocally(pTask->lastMachineState); 10081 9926 else 10082 that-> setMachineState(MachineState_Paused);9927 that->i_setMachineState(MachineState_Paused); 10083 9928 break; 10084 9929 } … … 10114 9959 */ 10115 9960 /*static*/ 10116 DECLCALLBACK(int) Console:: saveStateThread(RTTHREAD Thread, void *pvUser)9961 DECLCALLBACK(int) Console::i_saveStateThread(RTTHREAD Thread, void *pvUser) 10117 9962 { 10118 9963 LogFlowFuncEnter(); … … 10135 9980 task->mSavedStateFile.c_str(), 10136 9981 false, /*fContinueAfterwards*/ 10137 Console:: stateProgressCallback,9982 Console::i_stateProgressCallback, 10138 9983 static_cast<IProgress *>(task->mServerProgress), 10139 9984 &fSuspenededBySave); … … 10160 10005 task->releaseVMCaller(); 10161 10006 thatLock.release(); 10162 rc = that-> powerDown();10007 rc = that->i_powerDown(); 10163 10008 thatLock.acquire(); 10164 10009 } … … 10168 10013 */ 10169 10014 if (FAILED(rc)) 10170 that-> setMachineStateLocally(task->mMachineStateBefore);10015 that->i_setMachineStateLocally(task->mMachineStateBefore); 10171 10016 10172 10017 /* … … 10193 10038 */ 10194 10039 /*static*/ 10195 DECLCALLBACK(int) Console:: powerDownThread(RTTHREAD Thread, void *pvUser)10040 DECLCALLBACK(int) Console::i_powerDownThread(RTTHREAD Thread, void *pvUser) 10196 10041 { 10197 10042 LogFlowFuncEnter(); … … 10217 10062 thatLock.release(); 10218 10063 10219 that-> powerDown(task->mServerProgress);10064 that->i_powerDown(task->mServerProgress); 10220 10065 10221 10066 /* complete the operation */ … … 10231 10076 */ 10232 10077 /*static*/ DECLCALLBACK(int) 10233 Console:: vmm2User_SaveState(PCVMM2USERMETHODS pThis, PUVM pUVM)10078 Console::i_vmm2User_SaveState(PCVMM2USERMETHODS pThis, PUVM pUVM) 10234 10079 { 10235 10080 Console *pConsole = ((MYVMM2USERMETHODS *)pThis)->pConsole; … … 10248 10093 */ 10249 10094 /*static*/ DECLCALLBACK(void) 10250 Console:: vmm2User_NotifyEmtInit(PCVMM2USERMETHODS pThis, PUVM pUVM, PUVMCPU pUVCpu)10095 Console::i_vmm2User_NotifyEmtInit(PCVMM2USERMETHODS pThis, PUVM pUVM, PUVMCPU pUVCpu) 10251 10096 { 10252 10097 NOREF(pThis); NOREF(pUVM); NOREF(pUVCpu); … … 10258 10103 */ 10259 10104 /*static*/ DECLCALLBACK(void) 10260 Console:: vmm2User_NotifyEmtTerm(PCVMM2USERMETHODS pThis, PUVM pUVM, PUVMCPU pUVCpu)10105 Console::i_vmm2User_NotifyEmtTerm(PCVMM2USERMETHODS pThis, PUVM pUVM, PUVMCPU pUVCpu) 10261 10106 { 10262 10107 NOREF(pThis); NOREF(pUVM); NOREF(pUVCpu); … … 10268 10113 */ 10269 10114 /*static*/ DECLCALLBACK(void) 10270 Console:: vmm2User_NotifyPdmtInit(PCVMM2USERMETHODS pThis, PUVM pUVM)10115 Console::i_vmm2User_NotifyPdmtInit(PCVMM2USERMETHODS pThis, PUVM pUVM) 10271 10116 { 10272 10117 NOREF(pThis); NOREF(pUVM); … … 10278 10123 */ 10279 10124 /*static*/ DECLCALLBACK(void) 10280 Console:: vmm2User_NotifyPdmtTerm(PCVMM2USERMETHODS pThis, PUVM pUVM)10125 Console::i_vmm2User_NotifyPdmtTerm(PCVMM2USERMETHODS pThis, PUVM pUVM) 10281 10126 { 10282 10127 NOREF(pThis); NOREF(pUVM); … … 10288 10133 */ 10289 10134 /*static*/ DECLCALLBACK(void) 10290 Console:: vmm2User_NotifyResetTurnedIntoPowerOff(PCVMM2USERMETHODS pThis, PUVM pUVM)10135 Console::i_vmm2User_NotifyResetTurnedIntoPowerOff(PCVMM2USERMETHODS pThis, PUVM pUVM) 10291 10136 { 10292 10137 Console *pConsole = ((MYVMM2USERMETHODS *)pThis)->pConsole; … … 10338 10183 * @param iLUN The unit number. 10339 10184 */ 10340 DECLCALLBACK(void) Console:: drvStatus_UnitChanged(PPDMILEDCONNECTORS pInterface, unsigned iLUN)10185 DECLCALLBACK(void) Console::i_drvStatus_UnitChanged(PPDMILEDCONNECTORS pInterface, unsigned iLUN) 10341 10186 { 10342 10187 PDRVMAINSTATUS pThis = RT_FROM_MEMBER(pInterface, DRVMAINSTATUS, ILedConnectors); … … 10360 10205 * @param uLUN The unit number. 10361 10206 */ 10362 DECLCALLBACK(int) Console:: drvStatus_MediumEjected(PPDMIMEDIANOTIFY pInterface, unsigned uLUN)10207 DECLCALLBACK(int) Console::i_drvStatus_MediumEjected(PPDMIMEDIANOTIFY pInterface, unsigned uLUN) 10363 10208 { 10364 10209 PDRVMAINSTATUS pThis = RT_FROM_MEMBER(pInterface, DRVMAINSTATUS, IMediaNotify); … … 10412 10257 * @interface_method_impl{PDMIBASE,pfnQueryInterface} 10413 10258 */ 10414 DECLCALLBACK(void *) Console:: drvStatus_QueryInterface(PPDMIBASE pInterface, const char *pszIID)10259 DECLCALLBACK(void *) Console::i_drvStatus_QueryInterface(PPDMIBASE pInterface, const char *pszIID) 10415 10260 { 10416 10261 PPDMDRVINS pDrvIns = PDMIBASE_2_PDMDRV(pInterface); … … 10429 10274 * @param pDrvIns The driver instance data. 10430 10275 */ 10431 DECLCALLBACK(void) Console:: drvStatus_Destruct(PPDMDRVINS pDrvIns)10276 DECLCALLBACK(void) Console::i_drvStatus_Destruct(PPDMDRVINS pDrvIns) 10432 10277 { 10433 10278 PDMDRV_CHECK_VERSIONS_RETURN_VOID(pDrvIns); … … 10449 10294 * @copydoc FNPDMDRVCONSTRUCT 10450 10295 */ 10451 DECLCALLBACK(int) Console:: drvStatus_Construct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)10296 DECLCALLBACK(int) Console::i_drvStatus_Construct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags) 10452 10297 { 10453 10298 PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns); … … 10467 10312 * Data. 10468 10313 */ 10469 pDrvIns->IBase.pfnQueryInterface = Console:: drvStatus_QueryInterface;10470 pThis->ILedConnectors.pfnUnitChanged = Console:: drvStatus_UnitChanged;10471 pThis->IMediaNotify.pfnEjected = Console:: drvStatus_MediumEjected;10314 pDrvIns->IBase.pfnQueryInterface = Console::i_drvStatus_QueryInterface; 10315 pThis->ILedConnectors.pfnUnitChanged = Console::i_drvStatus_UnitChanged; 10316 pThis->IMediaNotify.pfnEjected = Console::i_drvStatus_MediumEjected; 10472 10317 pThis->pDrvIns = pDrvIns; 10473 10318 pThis->pszDeviceInstance = NULL; … … 10537 10382 10538 10383 for (unsigned i = pThis->iFirstLUN; i <= pThis->iLastLUN; ++i) 10539 Console:: drvStatus_UnitChanged(&pThis->ILedConnectors, i);10384 Console::i_drvStatus_UnitChanged(&pThis->ILedConnectors, i); 10540 10385 10541 10386 return VINF_SUCCESS; … … 10567 10412 sizeof(DRVMAINSTATUS), 10568 10413 /* pfnConstruct */ 10569 Console:: drvStatus_Construct,10414 Console::i_drvStatus_Construct, 10570 10415 /* pfnDestruct */ 10571 Console:: drvStatus_Destruct,10416 Console::i_drvStatus_Destruct, 10572 10417 /* pfnRelocate */ 10573 10418 NULL, … … 10594 10439 }; 10595 10440 10441 10442 10596 10443 /* vi: set tabstop=4 shiftwidth=4 expandtab: */ -
trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp
r51560 r51612 605 605 606 606 #ifdef VBOX_WITH_PCI_PASSTHROUGH 607 HRESULT Console:: attachRawPCIDevices(PUVM pUVM, BusAssignmentManager *pBusMgr, PCFGMNODE pDevices)607 HRESULT Console::i_attachRawPCIDevices(PUVM pUVM, BusAssignmentManager *pBusMgr, PCFGMNODE pDevices) 608 608 { 609 609 HRESULT hrc = S_OK; … … 611 611 612 612 SafeIfaceArray<IPCIDeviceAttachment> assignments; 613 ComPtr<IMachine> aMachine = machine();613 ComPtr<IMachine> aMachine = i_machine(); 614 614 615 615 hrc = aMachine->COMGETTER(PCIDeviceAssignments)(ComSafeArrayAsOutParam(assignments)); … … 744 744 745 745 746 void Console:: attachStatusDriver(PCFGMNODE pCtlInst, PPDMLED *papLeds,747 uint64_t uFirst, uint64_t uLast,748 Console::MediumAttachmentMap *pmapMediumAttachments,749 const char *pcszDevice, unsigned uInstance)746 void Console::i_attachStatusDriver(PCFGMNODE pCtlInst, PPDMLED *papLeds, 747 uint64_t uFirst, uint64_t uLast, 748 Console::MediumAttachmentMap *pmapMediumAttachments, 749 const char *pcszDevice, unsigned uInstance) 750 750 { 751 751 PCFGMNODE pLunL0, pCfg; … … 781 781 * @note Locks the Console object for writing. 782 782 */ 783 DECLCALLBACK(int) Console:: configConstructor(PUVM pUVM, PVM pVM, void *pvConsole)783 DECLCALLBACK(int) Console::i_configConstructor(PUVM pUVM, PVM pVM, void *pvConsole) 784 784 { 785 785 LogFlowFuncEnter(); … … 803 803 try 804 804 { 805 vrc = pConsole-> configConstructorInner(pUVM, pVM, &alock);805 vrc = pConsole->i_configConstructorInner(pUVM, pVM, &alock); 806 806 } 807 807 catch (...) … … 829 829 * more). 830 830 */ 831 int Console:: configConstructorInner(PUVM pUVM, PVM pVM, AutoWriteLock *pAlock)831 int Console::i_configConstructorInner(PUVM pUVM, PVM pVM, AutoWriteLock *pAlock) 832 832 { 833 833 VMMDev *pVMMDev = m_pVMMDev; Assert(pVMMDev); 834 ComPtr<IMachine> pMachine = machine();834 ComPtr<IMachine> pMachine = i_machine(); 835 835 836 836 int rc; … … 1185 1185 1186 1186 /* Reset overwrite. */ 1187 if (i sResetTurnedIntoPowerOff())1187 if (i_isResetTurnedIntoPowerOff()) 1188 1188 InsertConfigInteger(pRoot, "PowerOffInsteadOfReset", 1); 1189 1189 … … 1423 1423 #ifdef VBOX_WITH_PCI_PASSTHROUGH 1424 1424 /* Add PCI passthrough devices */ 1425 hrc = attachRawPCIDevices(pUVM, pBusMgr, pDevices); H();1425 hrc = i_attachRawPCIDevices(pUVM, pBusMgr, pDevices); H(); 1426 1426 #endif 1427 1427 } … … 1585 1585 case GraphicsControllerType_VMSVGA: 1586 1586 #endif 1587 rc = configGraphicsController(pDevices, graphicsController, pBusMgr, pMachine, biosSettings,1588 RT_BOOL(fHMEnabled));1587 rc = i_configGraphicsController(pDevices, graphicsController, pBusMgr, pMachine, biosSettings, 1588 RT_BOOL(fHMEnabled)); 1589 1589 if (FAILED(rc)) 1590 1590 return rc; … … 1799 1799 * Attach the status driver. 1800 1800 */ 1801 attachStatusDriver(pInst, &mapUSBLed[0], 0, 0, NULL, NULL, 0);1801 i_attachStatusDriver(pInst, &mapUSBLed[0], 0, 0, NULL, NULL, 0); 1802 1802 } 1803 1803 #ifdef VBOX_WITH_EHCI … … 1830 1830 * Attach the status driver. 1831 1831 */ 1832 attachStatusDriver(pInst, &mapUSBLed[1], 0, 0, NULL, NULL, 0);1832 i_attachStatusDriver(pInst, &mapUSBLed[1], 0, 0, NULL, NULL, 0); 1833 1833 } 1834 1834 # ifdef VBOX_WITH_EXTPACK … … 1876 1876 * Attach the status driver. 1877 1877 */ 1878 attachStatusDriver(pInst, &mapUSBLed[1], 0, 0, NULL, NULL, 0);1878 i_attachStatusDriver(pInst, &mapUSBLed[1], 0, 0, NULL, NULL, 0); 1879 1879 } 1880 1880 # ifdef VBOX_WITH_EXTPACK … … 2033 2033 2034 2034 PCFGMNODE pCtlInst = NULL; 2035 const char *pszCtrlDev = convertControllerTypeToDev(enmCtrlType);2035 const char *pszCtrlDev = i_convertControllerTypeToDev(enmCtrlType); 2036 2036 if (enmCtrlType != StorageControllerType_USB) 2037 2037 { … … 2078 2078 /* Attach the status driver */ 2079 2079 Assert(cLedScsi >= 16); 2080 attachStatusDriver(pCtlInst, &mapStorageLeds[iLedScsi], 0, 15,2080 i_attachStatusDriver(pCtlInst, &mapStorageLeds[iLedScsi], 0, 15, 2081 2081 &mapMediumAttachments, pszCtrlDev, ulInstance); 2082 2082 paLedDevType = &maStorageDevType[iLedScsi]; … … 2102 2102 /* Attach the status driver */ 2103 2103 Assert(cLedScsi >= 16); 2104 attachStatusDriver(pCtlInst, &mapStorageLeds[iLedScsi], 0, 15,2104 i_attachStatusDriver(pCtlInst, &mapStorageLeds[iLedScsi], 0, 15, 2105 2105 &mapMediumAttachments, pszCtrlDev, ulInstance); 2106 2106 paLedDevType = &maStorageDevType[iLedScsi]; … … 2127 2127 /* Attach the status driver */ 2128 2128 AssertRelease(cPorts <= cLedSata); 2129 attachStatusDriver(pCtlInst, &mapStorageLeds[iLedSata], 0, cPorts - 1,2129 i_attachStatusDriver(pCtlInst, &mapStorageLeds[iLedSata], 0, cPorts - 1, 2130 2130 &mapMediumAttachments, pszCtrlDev, ulInstance); 2131 2131 paLedDevType = &maStorageDevType[iLedSata]; … … 2144 2144 /* Attach the status driver */ 2145 2145 Assert(cLedIde >= 4); 2146 attachStatusDriver(pCtlInst, &mapStorageLeds[iLedIde], 0, 3,2146 i_attachStatusDriver(pCtlInst, &mapStorageLeds[iLedIde], 0, 3, 2147 2147 &mapMediumAttachments, pszCtrlDev, ulInstance); 2148 2148 paLedDevType = &maStorageDevType[iLedIde]; … … 2168 2168 /* Attach the status driver */ 2169 2169 Assert(cLedFloppy >= 2); 2170 attachStatusDriver(pCtlInst, &mapStorageLeds[iLedFloppy], 0, 1,2170 i_attachStatusDriver(pCtlInst, &mapStorageLeds[iLedFloppy], 0, 1, 2171 2171 &mapMediumAttachments, pszCtrlDev, ulInstance); 2172 2172 paLedDevType = &maStorageDevType[iLedFloppy]; … … 2197 2197 /* Attach the status driver */ 2198 2198 Assert(cLedSas >= 8); 2199 attachStatusDriver(pCtlInst, &mapStorageLeds[iLedSas], 0, 7,2199 i_attachStatusDriver(pCtlInst, &mapStorageLeds[iLedSas], 0, 7, 2200 2200 &mapMediumAttachments, pszCtrlDev, ulInstance); 2201 2201 paLedDevType = &maStorageDevType[iLedSas]; … … 2240 2240 { 2241 2241 IMediumAttachment *pMediumAtt = atts[j]; 2242 rc = configMediumAttachment(pCtlInst,2243 pszCtrlDev,2244 ulInstance,2245 enmBus,2246 !!fUseHostIOCache,2247 !!fBuiltinIOCache,2248 false /* fSetupMerge */,2249 0 /* uMergeSource */,2250 0 /* uMergeTarget */,2251 pMediumAtt,2252 mMachineState,2253 NULL /* phrc */,2254 false /* fAttachDetach */,2255 false /* fForceUnmount */,2256 false /* fHotplug */,2257 pUVM,2258 paLedDevType,2259 NULL /* ppLunL0 */);2242 rc = i_configMediumAttachment(pCtlInst, 2243 pszCtrlDev, 2244 ulInstance, 2245 enmBus, 2246 !!fUseHostIOCache, 2247 !!fBuiltinIOCache, 2248 false /* fSetupMerge */, 2249 0 /* uMergeSource */, 2250 0 /* uMergeTarget */, 2251 pMediumAtt, 2252 mMachineState, 2253 NULL /* phrc */, 2254 false /* fAttachDetach */, 2255 false /* fForceUnmount */, 2256 false /* fHotplug */, 2257 pUVM, 2258 paLedDevType, 2259 NULL /* ppLunL0 */); 2260 2260 if (RT_FAILURE(rc)) 2261 2261 return rc; … … 2445 2445 * Attach the status driver. 2446 2446 */ 2447 attachStatusDriver(pInst, &mapNetworkLeds[ulInstance], 0, 0, NULL, NULL, 0);2447 i_attachStatusDriver(pInst, &mapNetworkLeds[ulInstance], 0, 0, NULL, NULL, 0); 2448 2448 2449 2449 /* … … 2451 2451 */ 2452 2452 bool fIgnoreConnectFailure = mMachineState == MachineState_Restoring; 2453 rc = configNetwork(pszAdapterName,2454 ulInstance,2455 0,2456 networkAdapter,2457 pCfg,2458 pLunL0,2459 pInst,2460 false /*fAttachDetach*/,2461 fIgnoreConnectFailure);2453 rc = i_configNetwork(pszAdapterName, 2454 ulInstance, 2455 0, 2456 networkAdapter, 2457 pCfg, 2458 pLunL0, 2459 pInst, 2460 false /*fAttachDetach*/, 2461 fIgnoreConnectFailure); 2462 2462 if (RT_FAILURE(rc)) 2463 2463 return rc; … … 2613 2613 * Attach the status driver. 2614 2614 */ 2615 attachStatusDriver(pInst, &mapSharedFolderLed, 0, 0, NULL, NULL, 0);2615 i_attachStatusDriver(pInst, &mapSharedFolderLed, 0, 0, NULL, NULL, 0); 2616 2616 2617 2617 #ifndef VBOX_WITH_PDM_AUDIO_DRIVER … … 2817 2817 LogRel(("Shared clipboard service loaded.\n")); 2818 2818 2819 changeClipboardMode(mode);2819 i_changeClipboardMode(mode); 2820 2820 2821 2821 /* Setup the service. */ 2822 2822 VBOXHGCMSVCPARM parm; 2823 2823 parm.type = VBOX_HGCM_SVC_PARM_32BIT; 2824 parm.setUInt32(! useHostClipboard());2824 parm.setUInt32(!i_useHostClipboard()); 2825 2825 pVMMDev->hgcmHostCall("VBoxSharedClipboard", 2826 2826 VBOX_SHARED_CLIPBOARD_HOST_FN_SET_HEADLESS, 1, &parm); … … 2877 2877 { 2878 2878 LogRel(("Drag'n drop service loaded.\n")); 2879 rc = changeDnDMode(enmMode);2879 rc = i_changeDnDMode(enmMode); 2880 2880 } 2881 2881 } … … 2941 2941 * Guest property service. 2942 2942 */ 2943 rc = configGuestProperties(this, pUVM);2943 rc = i_configGuestProperties(this, pUVM); 2944 2944 #endif /* VBOX_WITH_GUEST_PROPS defined */ 2945 2945 … … 2948 2948 * Guest control service. 2949 2949 */ 2950 rc = configGuestControl(this);2950 rc = i_configGuestControl(this); 2951 2951 #endif /* VBOX_WITH_GUEST_CONTROL defined */ 2952 2952 … … 3105 3105 */ 3106 3106 if (RT_SUCCESS(rc)) 3107 rc = configCfgmOverlay(pRoot, virtualBox, pMachine);3107 rc = i_configCfgmOverlay(pRoot, virtualBox, pMachine); 3108 3108 3109 3109 /* … … 3111 3111 */ 3112 3112 if (RT_SUCCESS(rc)) 3113 rc = configDumpAPISettingsTweaks(virtualBox, pMachine);3113 rc = i_configDumpAPISettingsTweaks(virtualBox, pMachine); 3114 3114 3115 3115 #undef H … … 3120 3120 * Register VM state change handler. 3121 3121 */ 3122 int rc2 = VMR3AtStateRegister(pUVM, Console:: vmstateChangeCallback, this);3122 int rc2 = VMR3AtStateRegister(pUVM, Console::i_vmstateChangeCallback, this); 3123 3123 AssertRC(rc2); 3124 3124 if (RT_SUCCESS(rc)) … … 3128 3128 * Register VM runtime error handler. 3129 3129 */ 3130 rc2 = VMR3AtRuntimeErrorRegister(pUVM, Console:: setVMRuntimeErrorCallback, this);3130 rc2 = VMR3AtRuntimeErrorRegister(pUVM, Console::i_setVMRuntimeErrorCallback, this); 3131 3131 AssertRC(rc2); 3132 3132 if (RT_SUCCESS(rc)) … … 3151 3151 */ 3152 3152 /* static */ 3153 int Console:: configCfgmOverlay(PCFGMNODE pRoot, IVirtualBox *pVirtualBox, IMachine *pMachine)3153 int Console::i_configCfgmOverlay(PCFGMNODE pRoot, IVirtualBox *pVirtualBox, IMachine *pMachine) 3154 3154 { 3155 3155 /* … … 3327 3327 */ 3328 3328 /* static */ 3329 int Console:: configDumpAPISettingsTweaks(IVirtualBox *pVirtualBox, IMachine *pMachine)3329 int Console::i_configDumpAPISettingsTweaks(IVirtualBox *pVirtualBox, IMachine *pMachine) 3330 3330 { 3331 3331 { … … 3378 3378 } 3379 3379 3380 int Console:: configGraphicsController(PCFGMNODE pDevices,3381 const GraphicsControllerType_T graphicsController,3382 BusAssignmentManager *pBusMgr,3383 const ComPtr<IMachine> &pMachine,3384 const ComPtr<IBIOSSettings> &biosSettings,3385 bool fHMEnabled)3380 int Console::i_configGraphicsController(PCFGMNODE pDevices, 3381 const GraphicsControllerType_T graphicsController, 3382 BusAssignmentManager *pBusMgr, 3383 const ComPtr<IMachine> &pMachine, 3384 const ComPtr<IBIOSSettings> &biosSettings, 3385 bool fHMEnabled) 3386 3386 { 3387 3387 // InsertConfig* throws … … 3412 3412 #endif 3413 3413 3414 attachStatusDriver(pInst, &mapCrOglLed, 0, 0, NULL, NULL, 0);3414 i_attachStatusDriver(pInst, &mapCrOglLed, 0, 0, NULL, NULL, 0); 3415 3415 3416 3416 #ifdef VBOX_WITH_VMSVGA … … 3454 3454 ULONG ulHeightReduction; 3455 3455 IFramebuffer *pFramebuffer = NULL; 3456 hrc = getDisplay()->QueryFramebuffer(0, &pFramebuffer);3456 hrc = i_getDisplay()->QueryFramebuffer(0, &pFramebuffer); 3457 3457 if (SUCCEEDED(hrc) && pFramebuffer) 3458 3458 { … … 3520 3520 * Ellipsis to va_list wrapper for calling setVMRuntimeErrorCallback. 3521 3521 */ 3522 void Console:: setVMRuntimeErrorCallbackF(uint32_t fFlags, const char *pszErrorId, const char *pszFormat, ...)3522 void Console::i_setVMRuntimeErrorCallbackF(uint32_t fFlags, const char *pszErrorId, const char *pszFormat, ...) 3523 3523 { 3524 3524 va_list va; 3525 3525 va_start(va, pszFormat); 3526 setVMRuntimeErrorCallback(NULL, this, fFlags, pszErrorId, pszFormat, va);3526 i_setVMRuntimeErrorCallback(NULL, this, fFlags, pszErrorId, pszFormat, va); 3527 3527 va_end(va); 3528 3528 } … … 3548 3548 } 3549 3549 3550 int Console:: configMediumAttachment(PCFGMNODE pCtlInst,3551 const char *pcszDevice,3552 unsigned uInstance,3553 StorageBus_T enmBus,3554 bool fUseHostIOCache,3555 bool fBuiltinIOCache,3556 bool fSetupMerge,3557 unsigned uMergeSource,3558 unsigned uMergeTarget,3559 IMediumAttachment *pMediumAtt,3560 MachineState_T aMachineState,3561 HRESULT *phrc,3562 bool fAttachDetach,3563 bool fForceUnmount,3564 bool fHotplug,3565 PUVM pUVM,3566 DeviceType_T *paLedDevType,3567 PCFGMNODE *ppLunL0)3550 int Console::i_configMediumAttachment(PCFGMNODE pCtlInst, 3551 const char *pcszDevice, 3552 unsigned uInstance, 3553 StorageBus_T enmBus, 3554 bool fUseHostIOCache, 3555 bool fBuiltinIOCache, 3556 bool fSetupMerge, 3557 unsigned uMergeSource, 3558 unsigned uMergeTarget, 3559 IMediumAttachment *pMediumAtt, 3560 MachineState_T aMachineState, 3561 HRESULT *phrc, 3562 bool fAttachDetach, 3563 bool fForceUnmount, 3564 bool fHotplug, 3565 PUVM pUVM, 3566 DeviceType_T *paLedDevType, 3567 PCFGMNODE *ppLunL0) 3568 3568 { 3569 3569 // InsertConfig* throws … … 3590 3590 unsigned uLUN; 3591 3591 PCFGMNODE pLunL0 = NULL; 3592 hrc = Console:: convertBusPortDeviceToLun(enmBus, lPort, lDev, uLUN); H();3592 hrc = Console::i_convertBusPortDeviceToLun(enmBus, lPort, lDev, uLUN); H(); 3593 3593 3594 3594 if (enmBus == StorageBus_USB) … … 3626 3626 /* Attach the status driver */ 3627 3627 Assert(cLedUsb >= 8); 3628 attachStatusDriver(pCtlInst, &mapStorageLeds[iLedUsb], 0, 7,3628 i_attachStatusDriver(pCtlInst, &mapStorageLeds[iLedUsb], 0, 7, 3629 3629 &mapMediumAttachments, pcszDevice, 0); 3630 3630 paLedDevType = &maStorageDevType[iLedUsb]; … … 3756 3756 Utf8Str utfFile = Utf8Str(strFile); 3757 3757 Bstr strSnap; 3758 ComPtr<IMachine> pMachine = machine();3758 ComPtr<IMachine> pMachine = i_machine(); 3759 3759 hrc = pMachine->COMGETTER(SnapshotFolder)(strSnap.asOutParam()); H(); 3760 3760 Utf8Str utfSnap = Utf8Str(strSnap); … … 3782 3782 const char *pszUnit; 3783 3783 uint64_t u64Print = formatDiskSize((uint64_t)i64Size, &pszUnit); 3784 setVMRuntimeErrorCallbackF(0, "FatPartitionDetected",3784 i_setVMRuntimeErrorCallbackF(0, "FatPartitionDetected", 3785 3785 N_("The medium '%ls' has a logical size of %RU64%s " 3786 3786 "but the file system the medium is located on seems " … … 3813 3813 uint64_t u64PrintSiz = formatDiskSize((LONG64)i64Size, &pszUnitSiz); 3814 3814 uint64_t u64PrintMax = formatDiskSize(maxSize, &pszUnitMax); 3815 setVMRuntimeErrorCallbackF(0, "FatPartitionDetected", /* <= not exact but ... */3815 i_setVMRuntimeErrorCallbackF(0, "FatPartitionDetected", /* <= not exact but ... */ 3816 3816 N_("The medium '%ls' has a logical size of %RU64%s " 3817 3817 "but the file system the medium is located on can " … … 3836 3836 const char *pszUnit; 3837 3837 uint64_t u64Print = formatDiskSize(i64Size, &pszUnit); 3838 setVMRuntimeErrorCallbackF(0, "FatPartitionDetected",3838 i_setVMRuntimeErrorCallbackF(0, "FatPartitionDetected", 3839 3839 #ifdef RT_OS_WINDOWS 3840 3840 N_("The snapshot folder of this VM '%ls' seems to be located on " … … 3877 3877 || enmFsTypeFile == RTFSTYPE_XFS) 3878 3878 { 3879 setVMRuntimeErrorCallbackF(0, "Ext4PartitionDetected",3879 i_setVMRuntimeErrorCallbackF(0, "Ext4PartitionDetected", 3880 3880 N_("The host I/O cache for at least one controller is disabled " 3881 3881 "and the medium '%ls' for this VM " … … 3894 3894 && !mfSnapshotFolderExt4WarningShown) 3895 3895 { 3896 setVMRuntimeErrorCallbackF(0, "Ext4PartitionDetected",3896 i_setVMRuntimeErrorCallbackF(0, "Ext4PartitionDetected", 3897 3897 N_("The host I/O cache for at least one controller is disabled " 3898 3898 "and the snapshot folder for this VM " … … 3947 3947 } 3948 3948 3949 rc = configMedium(pLunL0,3950 !!fPassthrough,3951 lType,3952 fUseHostIOCache,3953 fBuiltinIOCache,3954 fSetupMerge,3955 uMergeSource,3956 uMergeTarget,3957 strBwGroup.isEmpty() ? NULL : Utf8Str(strBwGroup).c_str(),3958 !!fDiscard,3959 pMedium,3960 aMachineState,3961 phrc);3949 rc = i_configMedium(pLunL0, 3950 !!fPassthrough, 3951 lType, 3952 fUseHostIOCache, 3953 fBuiltinIOCache, 3954 fSetupMerge, 3955 uMergeSource, 3956 uMergeTarget, 3957 strBwGroup.isEmpty() ? NULL : Utf8Str(strBwGroup).c_str(), 3958 !!fDiscard, 3959 pMedium, 3960 aMachineState, 3961 phrc); 3962 3962 if (RT_FAILURE(rc)) 3963 3963 return rc; … … 4005 4005 } 4006 4006 4007 int Console:: configMedium(PCFGMNODE pLunL0,4008 bool fPassthrough,4009 DeviceType_T enmType,4010 bool fUseHostIOCache,4011 bool fBuiltinIOCache,4012 bool fSetupMerge,4013 unsigned uMergeSource,4014 unsigned uMergeTarget,4015 const char *pcszBwGroup,4016 bool fDiscard,4017 IMedium *pMedium,4018 MachineState_T aMachineState,4019 HRESULT *phrc)4007 int Console::i_configMedium(PCFGMNODE pLunL0, 4008 bool fPassthrough, 4009 DeviceType_T enmType, 4010 bool fUseHostIOCache, 4011 bool fBuiltinIOCache, 4012 bool fSetupMerge, 4013 unsigned uMergeSource, 4014 unsigned uMergeTarget, 4015 const char *pcszBwGroup, 4016 bool fDiscard, 4017 IMedium *pMedium, 4018 MachineState_T aMachineState, 4019 HRESULT *phrc) 4020 4020 { 4021 4021 // InsertConfig* throws … … 4099 4099 Bstr loc; 4100 4100 hrc = pMedium->COMGETTER(Location)(loc.asOutParam()); H(); 4101 setVMRuntimeErrorCallbackF(0, "DvdOrFloppyImageInaccessible",4102 "The image file '%ls' is inaccessible and is being ignored. "4103 "Please select a different image file for the virtual %s drive.",4104 loc.raw(),4105 enmType == DeviceType_DVD ? "DVD" : "floppy");4101 i_setVMRuntimeErrorCallbackF(0, "DvdOrFloppyImageInaccessible", 4102 "The image file '%ls' is inaccessible and is being ignored. " 4103 "Please select a different image file for the virtual %s drive.", 4104 loc.raw(), 4105 enmType == DeviceType_DVD ? "DVD" : "floppy"); 4106 4106 pMedium = NULL; 4107 4107 } … … 4325 4325 * @thread EMT 4326 4326 */ 4327 int Console:: configNetwork(const char *pszDevice,4328 unsigned uInstance,4329 unsigned uLun,4330 INetworkAdapter *aNetworkAdapter,4331 PCFGMNODE pCfg,4332 PCFGMNODE pLunL0,4333 PCFGMNODE pInst,4334 bool fAttachDetach,4335 bool fIgnoreConnectFailure)4327 int Console::i_configNetwork(const char *pszDevice, 4328 unsigned uInstance, 4329 unsigned uLun, 4330 INetworkAdapter *aNetworkAdapter, 4331 PCFGMNODE pCfg, 4332 PCFGMNODE pLunL0, 4333 PCFGMNODE pInst, 4334 bool fAttachDetach, 4335 bool fIgnoreConnectFailure) 4336 4336 { 4337 4337 AutoCaller autoCaller(this); … … 4354 4354 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 4355 4355 4356 ComPtr<IMachine> pMachine = machine();4356 ComPtr<IMachine> pMachine = i_machine(); 4357 4357 4358 4358 ComPtr<IVirtualBox> virtualBox; … … 4827 4827 if (ioctl(iSock, SIOCGIFFLAGS, &Req) >= 0) 4828 4828 if ((Req.ifr_flags & IFF_UP) == 0) 4829 setVMRuntimeErrorCallbackF(0, "BridgedInterfaceDown",4830 N_("Bridged interface %s is down. Guest will not be able to use this interface"),4831 pszBridgedIfName);4829 i_setVMRuntimeErrorCallbackF(0, "BridgedInterfaceDown", 4830 N_("Bridged interface %s is down. Guest will not be able to use this interface"), 4831 pszBridgedIfName); 4832 4832 4833 4833 close(iSock); … … 5452 5452 * the machine XML and set a couple of initial properties. 5453 5453 */ 5454 /* static */ int Console:: configGuestProperties(void *pvConsole, PUVM pUVM)5454 /* static */ int Console::i_configGuestProperties(void *pvConsole, PUVM pUVM) 5455 5455 { 5456 5456 #ifdef VBOX_WITH_GUEST_PROPS … … 5589 5589 HGCMSVCEXTHANDLE hDummy; 5590 5590 HGCMHostRegisterServiceExtension(&hDummy, "VBoxGuestPropSvc", 5591 Console:: doGuestPropNotification,5591 Console::i_doGuestPropNotification, 5592 5592 pvConsole); 5593 5593 … … 5609 5609 * Set up the Guest Control service. 5610 5610 */ 5611 /* static */ int Console:: configGuestControl(void *pvConsole)5611 /* static */ int Console::i_configGuestControl(void *pvConsole) 5612 5612 { 5613 5613 #ifdef VBOX_WITH_GUEST_CONTROL … … 5629 5629 rc = HGCMHostRegisterServiceExtension(&hDummy, "VBoxGuestControlSvc", 5630 5630 &Guest::notifyCtrlDispatcher, 5631 pConsole-> getGuest());5631 pConsole->i_getGuest()); 5632 5632 if (RT_FAILURE(rc)) 5633 5633 Log(("Cannot register VBoxGuestControlSvc extension!\n")); -
trunk/src/VBox/Main/src-client/ConsoleImplTeleporter.cpp
r51441 r51612 5 5 6 6 /* 7 * Copyright (C) 2010-201 3Oracle Corporation7 * Copyright (C) 2010-2014 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 229 229 */ 230 230 HRESULT 231 Console:: teleporterSrcReadACK(TeleporterStateSrc *pState, const char *pszWhich,232 const char *pszNAckMsg /*= NULL*/)231 Console::i_teleporterSrcReadACK(TeleporterStateSrc *pState, const char *pszWhich, 232 const char *pszNAckMsg /*= NULL*/) 233 233 { 234 234 char szMsg[256]; … … 293 293 * @remarks the setError laziness forces this to be a Console member. 294 294 */ 295 HRESULT 296 Console::teleporterSrcSubmitCommand(TeleporterStateSrc *pState, const char *pszCommand, bool fWaitForAck /*= true*/) 295 HRESULT Console::i_teleporterSrcSubmitCommand(TeleporterStateSrc *pState, const char *pszCommand, bool fWaitForAck /*= true*/) 297 296 { 298 297 int vrc = RTTcpSgWriteL(pState->mhSocket, 2, pszCommand, strlen(pszCommand), "\n", sizeof("\n") - 1); … … 301 300 if (!fWaitForAck) 302 301 return S_OK; 303 return teleporterSrcReadACK(pState, pszCommand);302 return i_teleporterSrcReadACK(pState, pszCommand); 304 303 } 305 304 … … 625 624 * @param pState The teleporter state. 626 625 */ 627 HRESULT 628 Console::teleporterSrc(TeleporterStateSrc *pState) 626 HRESULT Console::i_teleporterSrc(TeleporterStateSrc *pState) 629 627 { 630 628 AutoCaller autoCaller(this); … … 670 668 671 669 /* ACK */ 672 hrc = teleporterSrcReadACK(pState, "password", tr("Invalid password"));670 hrc = i_teleporterSrcReadACK(pState, "password", tr("Invalid password")); 673 671 if (FAILED(hrc)) 674 672 return hrc; … … 681 679 * in the first pass, so we should fail pretty promptly on misconfig. 682 680 */ 683 hrc = teleporterSrcSubmitCommand(pState, "load");681 hrc = i_teleporterSrcSubmitCommand(pState, "load"); 684 682 if (FAILED(hrc)) 685 683 return hrc; … … 698 696 && RT_SUCCESS(RTTcpSelectOne(pState->mhSocket, 1))) 699 697 { 700 hrc = teleporterSrcReadACK(pState, "load-complete");698 hrc = i_teleporterSrcReadACK(pState, "load-complete"); 701 699 if (FAILED(hrc)) 702 700 return hrc; … … 705 703 } 706 704 707 hrc = teleporterSrcReadACK(pState, "load-complete");705 hrc = i_teleporterSrcReadACK(pState, "load-complete"); 708 706 if (FAILED(hrc)) 709 707 return hrc; … … 714 712 if (!pState->mptrProgress->i_notifyPointOfNoReturn()) 715 713 { 716 teleporterSrcSubmitCommand(pState, "cancel", false /*fWaitForAck*/);714 i_teleporterSrcSubmitCommand(pState, "cancel", false /*fWaitForAck*/); 717 715 return E_FAIL; 718 716 } … … 729 727 pState->mfUnlockedMedia = true; 730 728 731 hrc = teleporterSrcSubmitCommand(pState, "lock-media");729 hrc = i_teleporterSrcSubmitCommand(pState, "lock-media"); 732 730 if (FAILED(hrc)) 733 731 return hrc; … … 738 736 if ( vrc == VINF_SSM_LIVE_SUSPENDED 739 737 || pState->menmOldMachineState == MachineState_Paused) 740 hrc = teleporterSrcSubmitCommand(pState, "hand-over-paused");738 hrc = i_teleporterSrcSubmitCommand(pState, "hand-over-paused"); 741 739 else 742 hrc = teleporterSrcSubmitCommand(pState, "hand-over-resume");740 hrc = i_teleporterSrcSubmitCommand(pState, "hand-over-resume"); 743 741 if (FAILED(hrc)) 744 742 return hrc; … … 760 758 */ 761 759 /*static*/ DECLCALLBACK(int) 762 Console:: teleporterSrcThreadWrapper(RTTHREAD hThread, void *pvUser)760 Console::i_teleporterSrcThreadWrapper(RTTHREAD hThread, void *pvUser) 763 761 { 764 762 TeleporterStateSrc *pState = (TeleporterStateSrc *)pvUser; … … 772 770 773 771 if (SUCCEEDED(hrc)) 774 hrc = pState->mptrConsole-> teleporterSrc(pState);772 hrc = pState->mptrConsole->i_teleporterSrc(pState); 775 773 776 774 /* Close the connection ASAP on so that the other side can complete. */ … … 815 813 autoLock.release(); 816 814 817 hrc = pState->mptrConsole-> powerDown();815 hrc = pState->mptrConsole->i_powerDown(); 818 816 819 817 autoLock.acquire(); … … 867 865 Assert(!pState->mfSuspendedByUs); 868 866 Assert(!pState->mfUnlockedMedia); 869 pState->mptrConsole-> setMachineState(MachineState_Running);867 pState->mptrConsole->i_setMachineState(MachineState_Running); 870 868 break; 871 869 872 870 case VMSTATE_GURU_MEDITATION: 873 871 case VMSTATE_GURU_MEDITATION_LS: 874 pState->mptrConsole-> setMachineState(MachineState_Stuck);872 pState->mptrConsole->i_setMachineState(MachineState_Stuck); 875 873 break; 876 874 877 875 case VMSTATE_FATAL_ERROR: 878 876 case VMSTATE_FATAL_ERROR_LS: 879 pState->mptrConsole-> setMachineState(MachineState_Paused);877 pState->mptrConsole->i_setMachineState(MachineState_Paused); 880 878 break; 881 879 … … 889 887 if (!pState->mfUnlockedMedia) 890 888 { 891 pState->mptrConsole-> setMachineState(MachineState_Paused);889 pState->mptrConsole->i_setMachineState(MachineState_Paused); 892 890 if (pState->mfSuspendedByUs) 893 891 { … … 901 899 { 902 900 /* Faking a guru meditation is the best I can think of doing here... */ 903 pState->mptrConsole-> setMachineState(MachineState_Stuck);901 pState->mptrConsole->i_setMachineState(MachineState_Stuck); 904 902 } 905 903 break; … … 930 928 * @param aProgress Where to return the progress object. 931 929 */ 932 STDMETHODIMP 933 Console::Teleport(IN_BSTR aHostname, ULONG aPort, IN_BSTR aPassword, ULONG aMaxDowntime, IProgress **aProgress)930 HRESULT Console::teleport(const com::Utf8Str &aHostname, ULONG aTcpport, const com::Utf8Str &aPassword, 931 ULONG aMaxDowntime, ComPtr<IProgress> &aProgress) 934 932 { 935 933 /* … … 937 935 * and validate the state. 938 936 */ 939 CheckComArgOutPointerValid(aProgress);940 CheckComArgStrNotEmptyOrNull(aHostname);941 CheckComArgNotNull(aPassword);942 CheckComArgExprMsg(aPort, aPort > 0 && aPort <= 65535, ("is %u", aPort));943 CheckComArgExprMsg(aMaxDowntime, aMaxDowntime > 0, ("is %u", aMaxDowntime));944 945 937 Utf8Str strPassword(aPassword); 946 938 if (!strPassword.isEmpty()) … … 988 980 pState->mstrPassword = strPassword; 989 981 pState->mstrHostname = aHostname; 990 pState->muPort = a Port;982 pState->muPort = aTcpport; 991 983 pState->mcMsMaxDowntime = aMaxDowntime; 992 984 … … 994 986 ptrProgress->i_setCancelCallback(teleporterProgressCancelCallback, pvUser); 995 987 996 int vrc = RTThreadCreate(NULL, Console:: teleporterSrcThreadWrapper, (void *)pState, 0 /*cbStack*/,988 int vrc = RTThreadCreate(NULL, Console::i_teleporterSrcThreadWrapper, (void *)pState, 0 /*cbStack*/, 997 989 RTTHREADTYPE_EMULATION, 0 /*fFlags*/, "Teleport"); 998 990 if (RT_SUCCESS(vrc)) 999 991 { 1000 992 if (mMachineState == MachineState_Running) 1001 hrc = setMachineState(MachineState_Teleporting);993 hrc = i_setMachineState(MachineState_Teleporting); 1002 994 else 1003 hrc = setMachineState(MachineState_TeleportingPausedVM);995 hrc = i_setMachineState(MachineState_TeleportingPausedVM); 1004 996 if (SUCCEEDED(hrc)) 1005 997 { 1006 ptrProgress.queryInterfaceTo(aProgress );998 ptrProgress.queryInterfaceTo(aProgress.asOutParam()); 1007 999 mptrCancelableProgress = ptrProgress; 1008 1000 } … … 1038 1030 * @todo Check that all the possible failure paths sets error info... 1039 1031 */ 1040 HRESULT 1041 Console::teleporterTrg(PUVM pUVM, IMachine *pMachine, Utf8Str *pErrorMsg, bool fStartPaused, 1042 Progress *pProgress, bool *pfPowerOffOnFailure) 1032 HRESULT Console::i_teleporterTrg(PUVM pUVM, IMachine *pMachine, Utf8Str *pErrorMsg, bool fStartPaused, 1033 Progress *pProgress, bool *pfPowerOffOnFailure) 1043 1034 { 1044 1035 LogThisFunc(("pUVM=%p pMachine=%p fStartPaused=%RTbool pProgress=%p\n", pUVM, pMachine, fStartPaused, pProgress)); … … 1122 1113 if (SUCCEEDED(hrc)) 1123 1114 { 1124 vrc = RTTcpServerListen(hServer, Console:: teleporterTrgServeConnection, &theState);1115 vrc = RTTcpServerListen(hServer, Console::i_teleporterTrgServeConnection, &theState); 1125 1116 pProgress->i_setCancelCallback(NULL, NULL); 1126 1117 … … 1257 1248 */ 1258 1249 /*static*/ DECLCALLBACK(int) 1259 Console:: teleporterTrgServeConnection(RTSOCKET Sock, void *pvUser)1250 Console::i_teleporterTrgServeConnection(RTSOCKET Sock, void *pvUser) 1260 1251 { 1261 1252 TeleporterStateTrg *pState = (TeleporterStateTrg *)pvUser; … … 1345 1336 1346 1337 int vrc2 = VMR3AtErrorRegister(pState->mpUVM, 1347 Console:: genericVMSetErrorCallback, &pState->mErrorText); AssertRC(vrc2);1338 Console::i_genericVMSetErrorCallback, &pState->mErrorText); AssertRC(vrc2); 1348 1339 RTSocketRetain(pState->mhSocket); /* For concurrent access by I/O thread and EMT. */ 1349 1340 pState->moffStream = 0; … … 1355 1346 1356 1347 RTSocketRelease(pState->mhSocket); 1357 vrc2 = VMR3AtErrorDeregister(pState->mpUVM, Console::genericVMSetErrorCallback, &pState->mErrorText); AssertRC(vrc2); 1348 vrc2 = VMR3AtErrorDeregister(pState->mpUVM, Console::i_genericVMSetErrorCallback, &pState->mErrorText); 1349 AssertRC(vrc2); 1358 1350 1359 1351 if (RT_FAILURE(vrc)) … … 1420 1412 vrc = VMR3Resume(pState->mpUVM, VMRESUMEREASON_TELEPORTED); 1421 1413 else 1422 pState->mptrConsole-> setMachineState(MachineState_Paused);1414 pState->mptrConsole->i_setMachineState(MachineState_Paused); 1423 1415 fDone = true; 1424 1416 break; -
trunk/src/VBox/Main/src-client/ConsoleVRDPServer.cpp
r51436 r51612 589 589 { 590 590 com::Bstr bstr; 591 server->mConsole-> getVRDEServer()->GetVRDEProperty(Bstr("TCP/Address").raw(), bstr.asOutParam());591 server->mConsole->i_getVRDEServer()->GetVRDEProperty(Bstr("TCP/Address").raw(), bstr.asOutParam()); 592 592 593 593 /* The server expects UTF8. */ … … 620 620 ULONG cMonitors = 1; 621 621 622 server->mConsole-> machine()->COMGETTER(MonitorCount)(&cMonitors);622 server->mConsole->i_machine()->COMGETTER(MonitorCount)(&cMonitors); 623 623 624 624 if (cbBuffer >= sizeof(uint32_t)) … … 638 638 { 639 639 com::Bstr bstr; 640 HRESULT hrc = server->mConsole-> getVRDEServer()->GetVRDEProperty(Bstr("TCP/Ports").raw(), bstr.asOutParam());640 HRESULT hrc = server->mConsole->i_getVRDEServer()->GetVRDEProperty(Bstr("TCP/Ports").raw(), bstr.asOutParam()); 641 641 642 642 if (hrc != S_OK) … … 678 678 { 679 679 com::Bstr bstr; 680 HRESULT hrc = server->mConsole-> getVRDEServer()->GetVRDEProperty(Bstr("VideoChannel/Enabled").raw(),680 HRESULT hrc = server->mConsole->i_getVRDEServer()->GetVRDEProperty(Bstr("VideoChannel/Enabled").raw(), 681 681 bstr.asOutParam()); 682 682 … … 707 707 { 708 708 com::Bstr bstr; 709 HRESULT hrc = server->mConsole-> getVRDEServer()->GetVRDEProperty(Bstr("VideoChannel/Quality").raw(),709 HRESULT hrc = server->mConsole->i_getVRDEServer()->GetVRDEProperty(Bstr("VideoChannel/Quality").raw(), 710 710 bstr.asOutParam()); 711 711 … … 737 737 738 738 com::Bstr bstr; 739 HRESULT hrc = server->mConsole-> machine()->GetExtraData(Bstr("VRDP/SunFlsh").raw(),739 HRESULT hrc = server->mConsole->i_machine()->GetExtraData(Bstr("VRDP/SunFlsh").raw(), 740 740 bstr.asOutParam()); 741 741 if (hrc == S_OK && !bstr.isEmpty()) … … 800 800 extraData += pFeature->achInfo; 801 801 802 HRESULT hrc = server->mConsole-> machine()->GetExtraData(com::Bstr(extraData).raw(),802 HRESULT hrc = server->mConsole->i_machine()->GetExtraData(com::Bstr(extraData).raw(), 803 803 bstrValue.asOutParam()); 804 804 if (FAILED(hrc) || bstrValue.isEmpty()) … … 808 808 extraData += pFeature->achInfo; 809 809 810 hrc = server->mConsole-> machine()->GetExtraData(com::Bstr(extraData).raw(),810 hrc = server->mConsole->i_machine()->GetExtraData(com::Bstr(extraData).raw(), 811 811 bstrValue.asOutParam()); 812 812 if (FAILED(hrc)) … … 820 820 /* Generic properties. */ 821 821 const char *pszPropertyName = &pFeature->achInfo[9]; 822 HRESULT hrc = server->mConsole-> getVRDEServer()->GetVRDEProperty(Bstr(pszPropertyName).raw(),822 HRESULT hrc = server->mConsole->i_getVRDEServer()->GetVRDEProperty(Bstr(pszPropertyName).raw(), 823 823 bstrValue.asOutParam()); 824 824 if (FAILED(hrc)) … … 871 871 } 872 872 873 server->mConsole-> onVRDEServerInfoChange();873 server->mConsole->i_onVRDEServerInfoChange(); 874 874 } break; 875 875 … … 903 903 Log(("VRDE_SP_CLIENT_STATUS [%s]\n", pStatus->achStatus)); 904 904 905 server->mConsole-> VRDPClientStatusChange(pStatus->u32ClientId, pStatus->achStatus);905 server->mConsole->i_VRDPClientStatusChange(pStatus->u32ClientId, pStatus->achStatus); 906 906 907 907 rc = VINF_SUCCESS; … … 912 912 } 913 913 914 server->mConsole-> onVRDEServerInfoChange();914 server->mConsole->i_onVRDEServerInfoChange(); 915 915 } break; 916 916 … … 927 927 ConsoleVRDPServer *server = static_cast<ConsoleVRDPServer*>(pvCallback); 928 928 929 return server->mConsole-> VRDPClientLogon(u32ClientId, pszUser, pszPassword, pszDomain);929 return server->mConsole->i_VRDPClientLogon(u32ClientId, pszUser, pszPassword, pszDomain); 930 930 } 931 931 … … 934 934 ConsoleVRDPServer *server = static_cast<ConsoleVRDPServer*>(pvCallback); 935 935 936 server->mConsole-> VRDPClientConnect(u32ClientId);936 server->mConsole->i_VRDPClientConnect(u32ClientId); 937 937 938 938 /* Should the server report usage of an interface for each client? … … 952 952 ConsoleVRDPServer *server = static_cast<ConsoleVRDPServer*>(pvCallback); 953 953 954 server->mConsole-> VRDPClientDisconnect(u32ClientId, fu32Intercepted);954 server->mConsole->i_VRDPClientDisconnect(u32ClientId, fu32Intercepted); 955 955 956 956 if (ASMAtomicReadU32(&server->mu32AudioInputClientId) == u32ClientId) … … 962 962 server->mConsole->getAudioVRDE()->handleVRDESvrCmdAudioInputIntercept(false); 963 963 #else 964 PPDMIAUDIOSNIFFERPORT pPort = server->mConsole-> getAudioSniffer()->getAudioSnifferPort();964 PPDMIAUDIOSNIFFERPORT pPort = server->mConsole->i_getAudioSniffer()->getAudioSnifferPort(); 965 965 if (pPort) 966 966 { … … 995 995 case VRDE_CLIENT_INTERCEPT_AUDIO: 996 996 { 997 server->mConsole-> VRDPInterceptAudio(u32ClientId);997 server->mConsole->i_VRDPInterceptAudio(u32ClientId); 998 998 if (ppvIntercept) 999 999 { … … 1005 1005 case VRDE_CLIENT_INTERCEPT_USB: 1006 1006 { 1007 server->mConsole-> VRDPInterceptUSB(u32ClientId, ppvIntercept);1007 server->mConsole->i_VRDPInterceptUSB(u32ClientId, ppvIntercept); 1008 1008 rc = VINF_SUCCESS; 1009 1009 } break; … … 1011 1011 case VRDE_CLIENT_INTERCEPT_CLIPBOARD: 1012 1012 { 1013 server->mConsole-> VRDPInterceptClipboard(u32ClientId);1013 server->mConsole->i_VRDPInterceptClipboard(u32ClientId); 1014 1014 if (ppvIntercept) 1015 1015 { … … 1030 1030 server->mConsole->getAudioVRDE()->handleVRDESvrCmdAudioInputIntercept(true); 1031 1031 #else 1032 PPDMIAUDIOSNIFFERPORT pPort = server->mConsole-> getAudioSniffer()->getAudioSnifferPort();1032 PPDMIAUDIOSNIFFERPORT pPort = server->mConsole->i_getAudioSniffer()->getAudioSnifferPort(); 1033 1033 if (pPort) 1034 1034 { … … 1086 1086 1087 1087 /* Obtain the new screen bitmap. */ 1088 HRESULT hr = server->mConsole-> getDisplay()->QuerySourceBitmap(uScreenId, server->maSourceBitmaps[uScreenId].asOutParam());1088 HRESULT hr = server->mConsole->i_getDisplay()->QuerySourceBitmap(uScreenId, server->maSourceBitmaps[uScreenId].asOutParam()); 1089 1089 if (SUCCEEDED(hr)) 1090 1090 { … … 1107 1107 if (SUCCEEDED(hr)) 1108 1108 { 1109 hr = server->mConsole-> getDisplay()->GetScreenResolution(uScreenId, NULL, NULL, NULL,1109 hr = server->mConsole->i_getDisplay()->GetScreenResolution(uScreenId, NULL, NULL, NULL, 1110 1110 &xOrigin, &yOrigin); 1111 1111 … … 1172 1172 if (cbInput == sizeof(VRDEINPUTSCANCODE)) 1173 1173 { 1174 IKeyboard *pKeyboard = pConsole-> getKeyboard();1174 IKeyboard *pKeyboard = pConsole->i_getKeyboard(); 1175 1175 1176 1176 const VRDEINPUTSCANCODE *pInputScancode = (VRDEINPUTSCANCODE *)pvInput; … … 1233 1233 if (server->m_fGuestWantsAbsolute) 1234 1234 { 1235 pConsole-> getMouse()->PutMouseEventAbsolute(pInputPoint->x + 1, pInputPoint->y + 1, iWheel,1236 0 /* Horizontal wheel */, mouseButtons);1235 pConsole->i_getMouse()->PutMouseEventAbsolute(pInputPoint->x + 1, pInputPoint->y + 1, iWheel, 1236 0 /* Horizontal wheel */, mouseButtons); 1237 1237 } else 1238 1238 { 1239 pConsole-> getMouse()->PutMouseEvent(pInputPoint->x - server->m_mousex,1240 pInputPoint->y - server->m_mousey,1241 iWheel, 0 /* Horizontal wheel */, mouseButtons);1239 pConsole->i_getMouse()->PutMouseEvent(pInputPoint->x - server->m_mousex, 1240 pInputPoint->y - server->m_mousey, 1241 iWheel, 0 /* Horizontal wheel */, mouseButtons); 1242 1242 server->m_mousex = pInputPoint->x; 1243 1243 server->m_mousey = pInputPoint->y; … … 1248 1248 case VRDE_INPUT_CAD: 1249 1249 { 1250 pConsole-> getKeyboard()->PutCAD();1250 pConsole->i_getKeyboard()->PutCAD(); 1251 1251 } break; 1252 1252 … … 1260 1260 if (cbInput == sizeof(VRDEINPUTSYNCH)) 1261 1261 { 1262 IKeyboard *pKeyboard = pConsole-> getKeyboard();1262 IKeyboard *pKeyboard = pConsole->i_getKeyboard(); 1263 1263 1264 1264 const VRDEINPUTSYNCH *pInputSynch = (VRDEINPUTSYNCH *)pvInput; … … 1296 1296 ConsoleVRDPServer *server = static_cast<ConsoleVRDPServer*>(pvCallback); 1297 1297 1298 server->mConsole-> getDisplay()->SetVideoModeHint(uScreenId, TRUE /*=enabled*/,1299 FALSE /*=changeOrigin*/, 0/*=OriginX*/, 0/*=OriginY*/,1300 cWidth, cHeight, cBitsPerPixel);1298 server->mConsole->i_getDisplay()->SetVideoModeHint(uScreenId, TRUE /*=enabled*/, 1299 FALSE /*=changeOrigin*/, 0/*=OriginX*/, 0/*=OriginY*/, 1300 cWidth, cHeight, cBitsPerPixel); 1301 1301 } 1302 1302 … … 1310 1310 ConsoleVRDPServer *server = static_cast<ConsoleVRDPServer*>(pvCallback); 1311 1311 #ifndef VBOX_WITH_PDM_AUDIO_DRIVER 1312 PPDMIAUDIOSNIFFERPORT pPort = server->mConsole-> getAudioSniffer()->getAudioSnifferPort();1312 PPDMIAUDIOSNIFFERPORT pPort = server->mConsole->i_getAudioSniffer()->getAudioSnifferPort(); 1313 1313 #endif 1314 1314 … … 1482 1482 LogFlowThisFunc(("\n")); 1483 1483 1484 IVRDEServer *server = mConsole-> getVRDEServer();1484 IVRDEServer *server = mConsole->i_getVRDEServer(); 1485 1485 AssertReturn(server, VERR_INTERNAL_ERROR_2); 1486 1486 … … 1513 1513 { 1514 1514 #ifdef VBOX_WITH_EXTPACK 1515 ExtPackManager *pExtPackMgr = mConsole-> getExtPackManager();1515 ExtPackManager *pExtPackMgr = mConsole->i_getExtPackManager(); 1516 1516 vrc = pExtPackMgr->i_getVrdeLibraryPathForExtPack(&strExtPack, &strVrdeLibrary); 1517 1517 #else … … 2098 2098 /* Check if 3D redirection has been enabled. It is enabled by default. */ 2099 2099 com::Bstr bstr; 2100 HRESULT hrc = mConsole-> getVRDEServer()->GetVRDEProperty(Bstr("H3DRedirect/Enabled").raw(), bstr.asOutParam());2100 HRESULT hrc = mConsole->i_getVRDEServer()->GetVRDEProperty(Bstr("H3DRedirect/Enabled").raw(), bstr.asOutParam()); 2101 2101 2102 2102 com::Utf8Str value = hrc == S_OK? bstr: ""; … … 2138 2138 data.aParms[0].u.pointer.size = sizeof(outputRedirect); 2139 2139 2140 int rc = mConsole-> getDisplay()->crCtlSubmitSync(&data.Hdr, sizeof (data));2140 int rc = mConsole->i_getDisplay()->crCtlSubmitSync(&data.Hdr, sizeof (data)); 2141 2141 if (!RT_SUCCESS(rc)) 2142 2142 { … … 2204 2204 #ifdef VBOX_WITH_USB_CARDREADER 2205 2205 ConsoleVRDPServer *pThis = static_cast<ConsoleVRDPServer*>(pvContext); 2206 UsbCardReader *pReader = pThis->mConsole-> getUsbCardReader();2206 UsbCardReader *pReader = pThis->mConsole->i_getUsbCardReader(); 2207 2207 return pReader->VRDENotify(u32Id, pvData, cbData); 2208 2208 #else … … 2224 2224 #ifdef VBOX_WITH_USB_CARDREADER 2225 2225 ConsoleVRDPServer *pThis = static_cast<ConsoleVRDPServer*>(pvContext); 2226 UsbCardReader *pReader = pThis->mConsole-> getUsbCardReader();2226 UsbCardReader *pReader = pThis->mConsole->i_getUsbCardReader(); 2227 2227 return pReader->VRDEResponse(rcRequest, pvUser, u32Function, pvData, cbData); 2228 2228 #else … … 2524 2524 parms.iface.u.pointer.size = sizeof(hostChannelInterface); 2525 2525 2526 VMMDev *pVMMDev = mConsole-> getVMMDev();2526 VMMDev *pVMMDev = mConsole->i_getVMMDev(); 2527 2527 2528 2528 if (!pVMMDev) … … 2834 2834 if (pHeader->u16EventId == VRDEINPUT_EVENTID_TOUCH) 2835 2835 { 2836 IMouse *pMouse = pThis->mConsole-> getMouse();2836 IMouse *pMouse = pThis->mConsole->i_getMouse(); 2837 2837 2838 2838 VRDEINPUT_TOUCH_EVENT_PDU *p = (VRDEINPUT_TOUCH_EVENT_PDU *)pHeader; … … 3245 3245 /* Load the external authentication library. */ 3246 3246 Bstr authLibrary; 3247 mConsole-> getVRDEServer()->COMGETTER(AuthLibrary)(authLibrary.asOutParam());3247 mConsole->i_getVRDEServer()->COMGETTER(AuthLibrary)(authLibrary.asOutParam()); 3248 3248 3249 3249 Utf8Str filename = authLibrary; … … 4095 4095 uint32_t cbOut = 0; \ 4096 4096 \ 4097 mParent-> consoleVRDPServer()->QueryInfo \4097 mParent->i_consoleVRDPServer()->QueryInfo \ 4098 4098 (_aIndex, &value, sizeof(value), &cbOut); \ 4099 4099 \ … … 4119 4119 uint32_t cbOut = 0; \ 4120 4120 \ 4121 mParent-> consoleVRDPServer()->QueryInfo \4121 mParent->i_consoleVRDPServer()->QueryInfo \ 4122 4122 (_aIndex, &value, sizeof(value), &cbOut); \ 4123 4123 \ … … 4143 4143 uint32_t cbOut = 0; \ 4144 4144 \ 4145 mParent-> consoleVRDPServer()->QueryInfo \4145 mParent->i_consoleVRDPServer()->QueryInfo \ 4146 4146 (_aIndex, NULL, 0, &cbOut); \ 4147 4147 \ … … 4163 4163 } \ 4164 4164 \ 4165 mParent-> consoleVRDPServer()->QueryInfo \4165 mParent->i_consoleVRDPServer()->QueryInfo \ 4166 4166 (_aIndex, pchBuffer, cbOut, &cbOut); \ 4167 4167 \ -
trunk/src/VBox/Main/src-client/DisplayImpl.cpp
r51610 r51612 316 316 BOOL f3DSnapshot = FALSE; 317 317 BOOL is3denabled; 318 that->mParent-> machine()->COMGETTER(Accelerate3DEnabled)(&is3denabled);318 that->mParent->i_machine()->COMGETTER(Accelerate3DEnabled)(&is3denabled); 319 319 if (is3denabled && that->mCrOglCallbacks.pfnHasData()) 320 320 { 321 VMMDev *pVMMDev = that->mParent-> getVMMDev();321 VMMDev *pVMMDev = that->mParent->i_getVMMDev(); 322 322 if (pVMMDev) 323 323 { … … 587 587 588 588 ULONG ul; 589 mParent-> machine()->COMGETTER(MonitorCount)(&ul);589 mParent->i_machine()->COMGETTER(MonitorCount)(&ul); 590 590 mcMonitors = ul; 591 591 … … 740 740 #ifdef DEBUG 741 741 BOOL is3denabled; 742 mParent-> machine()->COMGETTER(Accelerate3DEnabled)(&is3denabled);742 mParent->i_machine()->COMGETTER(Accelerate3DEnabled)(&is3denabled); 743 743 Assert(!is3denabled); 744 744 #endif … … 746 746 } 747 747 748 VMMDev *pVMMDev = mParent-> getVMMDev();748 VMMDev *pVMMDev = mParent->i_getVMMDev(); 749 749 if (!pVMMDev) 750 750 { … … 835 835 836 836 BOOL is3denabled; 837 mParent-> machine()->COMGETTER(Accelerate3DEnabled)(&is3denabled);837 mParent->i_machine()->COMGETTER(Accelerate3DEnabled)(&is3denabled); 838 838 839 839 if (is3denabled) … … 842 842 if (mhCrOglSvc) 843 843 { 844 VMMDev *pVMMDev = mParent-> getVMMDev();844 VMMDev *pVMMDev = mParent->i_getVMMDev(); 845 845 if (pVMMDev) 846 846 { … … 958 958 */ 959 959 LogRelFlowFunc(("Calling VRDP\n")); 960 mParent-> consoleVRDPServer()->SendResize();960 mParent->i_consoleVRDPServer()->SendResize(); 961 961 962 962 /* @todo Merge these two 'if's within one 'if (!pFBInfo->pFramebuffer.isNull())' */ … … 995 995 { 996 996 BOOL is3denabled; 997 mParent-> machine()->COMGETTER(Accelerate3DEnabled)(&is3denabled);997 mParent->i_machine()->COMGETTER(Accelerate3DEnabled)(&is3denabled); 998 998 999 999 if (is3denabled) … … 1137 1137 * Inform the server here only if VBVA is disabled. 1138 1138 */ 1139 mParent-> consoleVRDPServer()->SendUpdateBitmap(uScreenId, x, y, w, h);1139 mParent->i_consoleVRDPServer()->SendUpdateBitmap(uScreenId, x, y, w, h); 1140 1140 } 1141 1141 } … … 1284 1284 BOOL is3denabled = FALSE; 1285 1285 1286 mParent-> machine()->COMGETTER(Accelerate3DEnabled)(&is3denabled);1287 1288 VMMDev *vmmDev = mParent-> getVMMDev();1286 mParent->i_machine()->COMGETTER(Accelerate3DEnabled)(&is3denabled); 1287 1288 VMMDev *vmmDev = mParent->i_getVMMDev(); 1289 1289 if (is3denabled && vmmDev) 1290 1290 { … … 1615 1615 * and needs to know current status. 1616 1616 */ 1617 VMMDev *pVMMDev = mParent-> getVMMDev();1617 VMMDev *pVMMDev = mParent->i_getVMMDev(); 1618 1618 if (pVMMDev) 1619 1619 { … … 2089 2089 2090 2090 /* Forward the command to VRDP server. */ 2091 mParent-> consoleVRDPServer()->SendUpdate (uScreenId, phdr, cbCmd);2091 mParent->i_consoleVRDPServer()->SendUpdate (uScreenId, phdr, cbCmd); 2092 2092 2093 2093 *phdr = hdrSaved; … … 2284 2284 #if defined(VBOX_WITH_HGCM) && defined(VBOX_WITH_CROGL) 2285 2285 BOOL fIs3DEnabled = FALSE; 2286 mParent-> machine()->COMGETTER(Accelerate3DEnabled)(&fIs3DEnabled);2286 mParent->i_machine()->COMGETTER(Accelerate3DEnabled)(&fIs3DEnabled); 2287 2287 2288 2288 if (fIs3DEnabled) … … 2385 2385 } 2386 2386 ULONG cMonitors; 2387 mParent-> machine()->COMGETTER(MonitorCount)(&cMonitors);2387 mParent->i_machine()->COMGETTER(MonitorCount)(&cMonitors); 2388 2388 if (cMonitors == 0 && aDisplay > 0) 2389 2389 return E_INVALIDARG; … … 2400 2400 alock.release(); 2401 2401 2402 VMMDev *pVMMDev = mParent-> getVMMDev();2402 VMMDev *pVMMDev = mParent->i_getVMMDev(); 2403 2403 if (pVMMDev) 2404 2404 { … … 2422 2422 alock.release(); 2423 2423 2424 VMMDev *pVMMDev = mParent-> getVMMDev();2424 VMMDev *pVMMDev = mParent->i_getVMMDev(); 2425 2425 if (pVMMDev) 2426 2426 { … … 2435 2435 BOOL is3denabled = FALSE; 2436 2436 2437 mParent-> machine()->COMGETTER(Accelerate3DEnabled)(&is3denabled);2438 2439 VMMDev *vmmDev = mParent-> getVMMDev();2437 mParent->i_machine()->COMGETTER(Accelerate3DEnabled)(&is3denabled); 2438 2439 VMMDev *vmmDev = mParent->i_getVMMDev(); 2440 2440 if (is3denabled && vmmDev) 2441 2441 { … … 2471 2471 { 2472 2472 BOOL is3denabled; 2473 pDisplay->mParent-> machine()->COMGETTER(Accelerate3DEnabled)(&is3denabled);2473 pDisplay->mParent->i_machine()->COMGETTER(Accelerate3DEnabled)(&is3denabled); 2474 2474 if (is3denabled && pDisplay->mCrOglCallbacks.pfnHasData()) 2475 2475 { 2476 VMMDev *pVMMDev = pDisplay->mParent-> getVMMDev();2476 VMMDev *pVMMDev = pDisplay->mParent->i_getVMMDev(); 2477 2477 if (pVMMDev) 2478 2478 { … … 2933 2933 return rc; 2934 2934 } 2935 ComPtr<IMachine> pMachine = mParent-> machine();2935 ComPtr<IMachine> pMachine = mParent->i_machine(); 2936 2936 com::SafeArray<BOOL> screens; 2937 2937 HRESULT hrc = pMachine->COMGETTER(VideoCaptureScreens)(ComSafeArrayAsOutParam(screens)); … … 3136 3136 3137 3137 if (RT_SUCCESS(rc)) 3138 pDisplay->mParent-> consoleVRDPServer()->SendUpdateBitmap(aScreenId, x, y, width, height);3138 pDisplay->mParent->i_consoleVRDPServer()->SendUpdateBitmap(aScreenId, x, y, width, height); 3139 3139 3140 3140 pDisplay->vbvaUnlock(); … … 3352 3352 3353 3353 BOOL is3denabled; 3354 mParent-> machine()->COMGETTER(Accelerate3DEnabled)(&is3denabled);3354 mParent->i_machine()->COMGETTER(Accelerate3DEnabled)(&is3denabled); 3355 3355 3356 3356 if (is3denabled) … … 3481 3481 int Display::crViewportNotify(ULONG aScreenId, ULONG x, ULONG y, ULONG width, ULONG height) 3482 3482 { 3483 VMMDev *pVMMDev = mParent-> getVMMDev();3483 VMMDev *pVMMDev = mParent->i_getVMMDev(); 3484 3484 if (!pVMMDev) 3485 3485 return VERR_INVALID_STATE; … … 3513 3513 void Display::setupCrHgsmiData(void) 3514 3514 { 3515 VMMDev *pVMMDev = mParent-> getVMMDev();3515 VMMDev *pVMMDev = mParent->i_getVMMDev(); 3516 3516 Assert(pVMMDev); 3517 3517 int rc = RTCritSectRwEnterExcl(&mCrOglLock); … … 3663 3663 DISPLAYFBINFO *pFBInfo = &pDisplay->maFramebuffers[uScreenId]; 3664 3664 3665 Assert (pDisplay->mParent && pDisplay->mParent-> consoleVRDPServer());3666 pDisplay->mParent-> consoleVRDPServer()->SendUpdate (uScreenId, NULL, 0);3665 Assert (pDisplay->mParent && pDisplay->mParent->i_consoleVRDPServer()); 3666 pDisplay->mParent->i_consoleVRDPServer()->SendUpdate (uScreenId, NULL, 0); 3667 3667 } 3668 3668 } … … 3674 3674 # if defined(VBOX_WITH_HGCM) && defined(VBOX_WITH_CROGL) 3675 3675 BOOL is3denabled; 3676 pDisplay->mParent-> machine()->COMGETTER(Accelerate3DEnabled)(&is3denabled);3676 pDisplay->mParent->i_machine()->COMGETTER(Accelerate3DEnabled)(&is3denabled); 3677 3677 if (is3denabled) 3678 3678 { … … 3966 3966 { 3967 3967 pFBInfo->fDisabled = false; 3968 fireGuestMonitorChangedEvent(pDrv->pDisplay->mParent-> getEventSource(),3968 fireGuestMonitorChangedEvent(pDrv->pDisplay->mParent->i_getEventSource(), 3969 3969 GuestMonitorChangedEventType_Enabled, 3970 3970 uScreenId, … … 4089 4089 if (mhCrOglSvc) 4090 4090 { 4091 VMMDev *pVMMDev = mParent-> getVMMDev();4091 VMMDev *pVMMDev = mParent->i_getVMMDev(); 4092 4092 if (pVMMDev) 4093 4093 { … … 4117 4117 if (mhCrOglSvc) 4118 4118 { 4119 VMMDev *pVMMDev = mParent-> getVMMDev();4119 VMMDev *pVMMDev = mParent->i_getVMMDev(); 4120 4120 if (pVMMDev) 4121 4121 { … … 4203 4203 void *pvCompletion) 4204 4204 { 4205 VMMDev *pVMMDev = mParent ? mParent-> getVMMDev() : NULL;4205 VMMDev *pVMMDev = mParent ? mParent->i_getVMMDev() : NULL; 4206 4206 if (!pVMMDev) 4207 4207 { … … 4418 4418 { 4419 4419 pFBInfo->fDisabled = false; 4420 fireGuestMonitorChangedEvent(pThis->mParent-> getEventSource(),4420 fireGuestMonitorChangedEvent(pThis->mParent->i_getEventSource(), 4421 4421 GuestMonitorChangedEventType_Enabled, 4422 4422 uScreenId, … … 4534 4534 4535 4535 /* @todo new SendUpdate entry which can get a separate cmd header or coords. */ 4536 pThis->mParent-> consoleVRDPServer()->SendUpdate (uScreenId, pCmd, (uint32_t)cbCmd);4536 pThis->mParent->i_consoleVRDPServer()->SendUpdate (uScreenId, pCmd, (uint32_t)cbCmd); 4537 4537 4538 4538 *pHdrUnconst = hdrSaved; … … 4652 4652 u32Width, u32Height, pScreen->u16Flags); 4653 4653 4654 fireGuestMonitorChangedEvent(pThis->mParent-> getEventSource(),4654 fireGuestMonitorChangedEvent(pThis->mParent->i_getEventSource(), 4655 4655 GuestMonitorChangedEventType_Disabled, 4656 4656 pScreen->u32ViewIndex, … … 4690 4690 { 4691 4691 pFBInfo->fDisabled = false; 4692 fireGuestMonitorChangedEvent(pThis->mParent-> getEventSource(),4692 fireGuestMonitorChangedEvent(pThis->mParent->i_getEventSource(), 4693 4693 GuestMonitorChangedEventType_Enabled, 4694 4694 pScreen->u32ViewIndex, … … 4716 4716 if (fNewOrigin) 4717 4717 { 4718 fireGuestMonitorChangedEvent(pThis->mParent-> getEventSource(),4718 fireGuestMonitorChangedEvent(pThis->mParent->i_getEventSource(), 4719 4719 GuestMonitorChangedEventType_NewOrigin, 4720 4720 pScreen->u32ViewIndex, … … 4730 4730 /* VRDP server still need this notification. */ 4731 4731 LogRelFlowFunc(("Calling VRDP\n")); 4732 pThis->mParent-> consoleVRDPServer()->SendResize();4732 pThis->mParent->i_consoleVRDPServer()->SendResize(); 4733 4733 } 4734 4734 return VINF_SUCCESS; … … 4764 4764 4765 4765 /* Tell the console about it */ 4766 pDrv->pDisplay->mParent-> onMousePointerShapeChange(fVisible, fAlpha,4767 xHot, yHot, cx, cy, ComSafeArrayAsInParam(shapeData));4766 pDrv->pDisplay->mParent->i_onMousePointerShapeChange(fVisible, fAlpha, 4767 xHot, yHot, cx, cy, ComSafeArrayAsInParam(shapeData)); 4768 4768 4769 4769 return VINF_SUCCESS; … … 4916 4916 4917 4917 #ifdef VBOX_WITH_VPX 4918 ComPtr<IMachine> pMachine = pDisplay->mParent-> machine();4918 ComPtr<IMachine> pMachine = pDisplay->mParent->i_machine(); 4919 4919 BOOL fEnabled = false; 4920 4920 HRESULT hrc = pMachine->COMGETTER(VideoCaptureEnabled)(&fEnabled); … … 4923 4923 { 4924 4924 rc = pDisplay->VideoCaptureStart(); 4925 fireVideoCaptureChangedEvent(pDisplay->mParent-> getEventSource());4925 fireVideoCaptureChangedEvent(pDisplay->mParent->i_getEventSource()); 4926 4926 } 4927 4927 #endif -
trunk/src/VBox/Main/src-client/GuestCtrlPrivate.cpp
r50727 r51612 6 6 7 7 /* 8 * Copyright (C) 2011-201 3Oracle Corporation8 * Copyright (C) 2011-2014 Oracle Corporation 9 9 * 10 10 * This file is part of VirtualBox Open Source Edition (OSE), as … … 1239 1239 1240 1240 /* Forward the information to the VMM device. */ 1241 VMMDev *pVMMDev = pConsole-> getVMMDev();1241 VMMDev *pVMMDev = pConsole->i_getVMMDev(); 1242 1242 if (pVMMDev) 1243 1243 { -
trunk/src/VBox/Main/src-client/GuestDnDPrivate.cpp
r51556 r51612 501 501 /* Forward the information to the VMM device. */ 502 502 Assert(!pConsole.isNull()); 503 VMMDev *pVMMDev = pConsole-> getVMMDev();503 VMMDev *pVMMDev = pConsole->i_getVMMDev(); 504 504 if (!pVMMDev) 505 505 return VERR_COM_OBJECT_NOT_FOUND; -
trunk/src/VBox/Main/src-client/GuestImpl.cpp
r51476 r51612 81 81 82 82 ULONG aMemoryBalloonSize; 83 HRESULT hr = mParent-> machine()->COMGETTER(MemoryBalloonSize)(&aMemoryBalloonSize);83 HRESULT hr = mParent->i_machine()->COMGETTER(MemoryBalloonSize)(&aMemoryBalloonSize); 84 84 if (hr == S_OK) /** @todo r=andy SUCCEEDED? */ 85 85 mMemoryBalloonSize = aMemoryBalloonSize; … … 88 88 89 89 BOOL fPageFusionEnabled; 90 hr = mParent-> machine()->COMGETTER(PageFusionEnabled)(&fPageFusionEnabled);90 hr = mParent->i_machine()->COMGETTER(PageFusionEnabled)(&fPageFusionEnabled); 91 91 if (hr == S_OK) /** @todo r=andy SUCCEEDED? */ 92 92 mfPageFusionEnabled = fPageFusionEnabled; … … 337 337 } 338 338 339 mParent-> reportVmStatistics(validStats,340 aGuestStats[GUESTSTATTYPE_CPUUSER],341 aGuestStats[GUESTSTATTYPE_CPUKERNEL],342 aGuestStats[GUESTSTATTYPE_CPUIDLE],343 /* Convert the units for RAM usage stats: page (4K) -> 1KB units */344 mCurrentGuestStat[GUESTSTATTYPE_MEMTOTAL] * (_4K/_1K),345 mCurrentGuestStat[GUESTSTATTYPE_MEMFREE] * (_4K/_1K),346 mCurrentGuestStat[GUESTSTATTYPE_MEMBALLOON] * (_4K/_1K),347 (ULONG)(cbSharedMem / _1K), /* bytes -> KB */348 mCurrentGuestStat[GUESTSTATTYPE_MEMCACHE] * (_4K/_1K),349 mCurrentGuestStat[GUESTSTATTYPE_PAGETOTAL] * (_4K/_1K),350 (ULONG)(cbAllocTotal / _1K), /* bytes -> KB */351 (ULONG)(cbFreeTotal / _1K),352 (ULONG)(cbBalloonedTotal / _1K),353 (ULONG)(cbSharedTotal / _1K),354 uNetStatRx,355 uNetStatTx);339 mParent->i_reportVmStatistics(validStats, 340 aGuestStats[GUESTSTATTYPE_CPUUSER], 341 aGuestStats[GUESTSTATTYPE_CPUKERNEL], 342 aGuestStats[GUESTSTATTYPE_CPUIDLE], 343 /* Convert the units for RAM usage stats: page (4K) -> 1KB units */ 344 mCurrentGuestStat[GUESTSTATTYPE_MEMTOTAL] * (_4K/_1K), 345 mCurrentGuestStat[GUESTSTATTYPE_MEMFREE] * (_4K/_1K), 346 mCurrentGuestStat[GUESTSTATTYPE_MEMBALLOON] * (_4K/_1K), 347 (ULONG)(cbSharedMem / _1K), /* bytes -> KB */ 348 mCurrentGuestStat[GUESTSTATTYPE_MEMCACHE] * (_4K/_1K), 349 mCurrentGuestStat[GUESTSTATTYPE_PAGETOTAL] * (_4K/_1K), 350 (ULONG)(cbAllocTotal / _1K), /* bytes -> KB */ 351 (ULONG)(cbFreeTotal / _1K), 352 (ULONG)(cbBalloonedTotal / _1K), 353 (ULONG)(cbSharedTotal / _1K), 354 uNetStatRx, 355 uNetStatTx); 356 356 } 357 357 … … 373 373 { 374 374 /* Redirect the call to IMachine if no additions are installed. */ 375 ComPtr<IMachine> ptrMachine(mParent-> machine());375 ComPtr<IMachine> ptrMachine(mParent->i_machine()); 376 376 alock.release(); 377 377 hrc = ptrMachine->COMGETTER(OSTypeId)(a_pbstrOSTypeId); … … 416 416 * Revision in early 3.1.x releases (see r57115). 417 417 */ 418 ComPtr<IMachine> ptrMachine = mParent-> machine();418 ComPtr<IMachine> ptrMachine = mParent->i_machine(); 419 419 alock.release(); /* No need to hold this during the IPC fun. */ 420 420 … … 469 469 * Revision in early 3.1.x releases (see r57115). 470 470 */ 471 ComPtr<IMachine> ptrMachine = mParent-> machine();471 ComPtr<IMachine> ptrMachine = mParent->i_machine(); 472 472 alock.release(); /* No need to hold this during the IPC fun. */ 473 473 … … 627 627 /* We must be 100% sure that IMachine::COMSETTER(MemoryBalloonSize) 628 628 * does not call us back in any way! */ 629 HRESULT ret = mParent-> machine()->COMSETTER(MemoryBalloonSize)(aMemoryBalloonSize);629 HRESULT ret = mParent->i_machine()->COMSETTER(MemoryBalloonSize)(aMemoryBalloonSize); 630 630 if (ret == S_OK) 631 631 { 632 632 mMemoryBalloonSize = aMemoryBalloonSize; 633 633 /* forward the information to the VMM device */ 634 VMMDev *pVMMDev = mParent-> getVMMDev();634 VMMDev *pVMMDev = mParent->i_getVMMDev(); 635 635 /* MUST release all locks before calling VMM device as its critsect 636 636 * has higher lock order than anything in Main. */ … … 680 680 mStatUpdateInterval = aUpdateInterval; 681 681 /* forward the information to the VMM device */ 682 VMMDev *pVMMDev = mParent-> getVMMDev();682 VMMDev *pVMMDev = mParent->i_getVMMDev(); 683 683 /* MUST release all locks before calling VMM device as its critsect 684 684 * has higher lock order than anything in Main. */ … … 866 866 /* Check for magic domain names which are used to pass encryption keys to the disk. */ 867 867 if (Utf8Str(aDomain) == "@@disk") 868 return mParent-> setDiskEncryptionKeys(Utf8Str(aPassword));868 return mParent->i_setDiskEncryptionKeys(Utf8Str(aPassword)); 869 869 else if (Utf8Str(aDomain) == "@@mem") 870 870 { … … 875 875 { 876 876 /* forward the information to the VMM device */ 877 VMMDev *pVMMDev = mParent-> getVMMDev();877 VMMDev *pVMMDev = mParent->i_getVMMDev(); 878 878 if (pVMMDev) 879 879 { -
trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp
r50899 r51612 5 5 6 6 /* 7 * Copyright (C) 2012-201 3Oracle Corporation7 * Copyright (C) 2012-2014 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 2007 2007 2008 2008 /* Forward the information to the VMM device. */ 2009 VMMDev *pVMMDev = pConsole-> getVMMDev();2009 VMMDev *pVMMDev = pConsole->i_getVMMDev(); 2010 2010 AssertPtr(pVMMDev); 2011 2011 -
trunk/src/VBox/Main/src-client/GuestSessionImplTasks.cpp
r51441 r51612 5 5 6 6 /* 7 * Copyright (C) 2012-201 3Oracle Corporation7 * Copyright (C) 2012-2014 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 77 77 { 78 78 ComObjPtr<Console> pConsole = pGuest->getConsole(); 79 const ComPtr<IMachine> pMachine = pConsole-> machine();79 const ComPtr<IMachine> pMachine = pConsole->i_machine(); 80 80 81 81 Assert(!pMachine.isNull()); … … 338 338 default: 339 339 setProgressErrorMsg(VBOX_E_IPRT_ERROR, 340 Utf8StrFmt(GuestSession::tr("Error while creating guest process for copying file \"%s\" from guest to host: %Rrc"), 340 Utf8StrFmt(GuestSession::tr( 341 "Error while creating guest process for copying file \"%s\" from guest to host: %Rrc"), 341 342 mSource.c_str(), rc)); 342 343 break; … … 506 507 if (RT_FAILURE(rc)) 507 508 setProgressErrorMsg(VBOX_E_IPRT_ERROR, 508 Utf8StrFmt(GuestSession::tr("Waiting on termination for copying file \"%s\" failed: %Rrc"), 509 Utf8StrFmt( 510 GuestSession::tr("Waiting on termination for copying file \"%s\" failed: %Rrc"), 509 511 mSource.c_str(), rc)); 510 512 else 511 513 { 512 514 setProgressErrorMsg(VBOX_E_IPRT_ERROR, 513 Utf8StrFmt(GuestSession::tr("Waiting on termination for copying file \"%s\" failed with wait result %ld"), 515 Utf8StrFmt(GuestSession::tr( 516 "Waiting on termination for copying file \"%s\" failed with wait result %ld"), 514 517 mSource.c_str(), waitRes)); 515 518 rc = VERR_GENERAL_FAILURE; /* Fudge. */ … … 528 531 { 529 532 setProgressErrorMsg(VBOX_E_IPRT_ERROR, 530 Utf8StrFmt(GuestSession::tr("Copying file \"%s\" failed with status %ld, exit code %ld"), 533 Utf8StrFmt(GuestSession::tr( 534 "Copying file \"%s\" failed with status %ld, exit code %ld"), 531 535 mSource.c_str(), procStatus, exitCode)); /**@todo Add stringify methods! */ 532 536 rc = VERR_GENERAL_FAILURE; /* Fudge. */ … … 657 661 default: 658 662 setProgressErrorMsg(VBOX_E_IPRT_ERROR, 659 Utf8StrFmt(GuestSession::tr("Error while creating guest process for copying file \"%s\" from guest to host: %Rrc"), 663 Utf8StrFmt(GuestSession::tr( 664 "Error while creating guest process for copying file \"%s\" from guest to host: %Rrc"), 660 665 mSource.c_str(), rc)); 661 666 break; -
trunk/src/VBox/Main/src-client/KeyboardImpl.cpp
r51096 r51612 5 5 6 6 /* 7 * Copyright (C) 2006-201 2Oracle Corporation7 * Copyright (C) 2006-2014 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 285 285 { 286 286 PDRVMAINKEYBOARD pDrv = RT_FROM_MEMBER(pInterface, DRVMAINKEYBOARD, IConnector); 287 pDrv->pKeyboard->getParent()-> onKeyboardLedsChange(RT_BOOL(enmLeds & PDMKEYBLEDS_NUMLOCK),288 RT_BOOL(enmLeds & PDMKEYBLEDS_CAPSLOCK),289 RT_BOOL(enmLeds & PDMKEYBLEDS_SCROLLLOCK));287 pDrv->pKeyboard->getParent()->i_onKeyboardLedsChange(RT_BOOL(enmLeds & PDMKEYBLEDS_NUMLOCK), 288 RT_BOOL(enmLeds & PDMKEYBLEDS_CAPSLOCK), 289 RT_BOOL(enmLeds & PDMKEYBLEDS_SCROLLLOCK)); 290 290 } 291 291 -
trunk/src/VBox/Main/src-client/MouseImpl.cpp
r50613 r51612 5 5 6 6 /* 7 * Copyright (C) 2006-201 2Oracle Corporation7 * Copyright (C) 2006-2014 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 159 159 uint32_t fCapsRemoved) 160 160 { 161 VMMDevMouseInterface *pVMMDev = mParent-> getVMMDevMouseInterface();161 VMMDevMouseInterface *pVMMDev = mParent->i_getVMMDevMouseInterface(); 162 162 if (!pVMMDev) 163 163 return E_FAIL; /* No assertion, as the front-ends can send events … … 382 382 HRESULT Mouse::i_reportAbsEventToVMMDev(int32_t x, int32_t y) 383 383 { 384 VMMDevMouseInterface *pVMMDev = mParent-> getVMMDevMouseInterface();384 VMMDevMouseInterface *pVMMDev = mParent->i_getVMMDevMouseInterface(); 385 385 ComAssertRet(pVMMDev, E_FAIL); 386 386 PPDMIVMMDEVPORT pVMMDevPort = pVMMDev->getVMMDevPort(); … … 542 542 AssertPtrReturn(pyAdj, E_POINTER); 543 543 AssertPtrNullReturn(pfValid, E_POINTER); 544 DisplayMouseInterface *pDisplay = mParent-> getDisplayMouseInterface();544 DisplayMouseInterface *pDisplay = mParent->i_getDisplayMouseInterface(); 545 545 ComAssertRet(pDisplay, E_FAIL); 546 546 /** The amount to add to the result (multiplied by the screen width/height) … … 700 700 } 701 701 702 DisplayMouseInterface *pDisplay = mParent-> getDisplayMouseInterface();702 DisplayMouseInterface *pDisplay = mParent->i_getDisplayMouseInterface(); 703 703 ComAssertRet(pDisplay, E_FAIL); 704 704 … … 905 905 * callback data atomically. However I can't see any sign that the cached 906 906 * data is ever used again. */ 907 mParent-> onMouseCapabilityChange(fCanAbs, fRelDev, fMTDev, fNeedsHostCursor);907 mParent->i_onMouseCapabilityChange(fCanAbs, fRelDev, fMTDev, fNeedsHostCursor); 908 908 } 909 909 -
trunk/src/VBox/Main/src-client/Nvram.cpp
r45927 r51612 5 5 6 6 /* 7 * Copyright (C) 2012-201 3Oracle Corporation7 * Copyright (C) 2012-2014 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 174 174 try 175 175 { 176 HRESULT hrc = pThis->pNvram->getParent()-> machine()->SetExtraData(Bstr(szExtraName).raw(),176 HRESULT hrc = pThis->pNvram->getParent()->i_machine()->SetExtraData(Bstr(szExtraName).raw(), 177 177 Bstr(apszTodo[i + 1]).raw()); 178 178 if (FAILED(hrc)) … … 216 216 try 217 217 { 218 HRESULT hrc = pThis->pNvram->getParent()-> machine()->SetExtraData(Bstr(szExtraName).raw(), Bstr().raw());218 HRESULT hrc = pThis->pNvram->getParent()->i_machine()->SetExtraData(Bstr(szExtraName).raw(), Bstr().raw()); 219 219 if (FAILED(hrc)) 220 220 LogRel(("drvNvram_deleteVar: SetExtraData(%s,) returned %Rhrc\n", szExtraName, hrc)); -
trunk/src/VBox/Main/src-client/PCIRawDevImpl.cpp
r49644 r51612 5 5 6 6 /* 7 * Copyright (C) 2010-201 3Oracle Corporation7 * Copyright (C) 2010-2014 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 76 76 PDRVMAINPCIRAWDEV pThis = RT_FROM_CPP_MEMBER(pInterface, DRVMAINPCIRAWDEV, IConnector); 77 77 Console *pConsole = pThis->pPCIRawDev->getParent(); 78 const ComPtr<IMachine>& machine = pConsole-> machine();78 const ComPtr<IMachine>& machine = pConsole->i_machine(); 79 79 ComPtr<IVirtualBox> vbox; 80 80 -
trunk/src/VBox/Main/src-client/RemoteUSBBackend.cpp
r51092 r51612 5 5 6 6 /* 7 * Copyright (C) 2006-201 2Oracle Corporation7 * Copyright (C) 2006-2014 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 820 820 { 821 821 /* Unmount all remote USB devices. */ 822 mConsole-> processRemoteUSBDevices(mu32ClientId, NULL, 0, false);822 mConsole->i_processRemoteUSBDevices(mu32ClientId, NULL, 0, false); 823 823 824 824 menmPollRemoteDevicesStatus = PollRemoteDevicesStatus_Dereferenced; … … 880 880 if (mfHasDeviceList) 881 881 { 882 mConsole-> processRemoteUSBDevices(mu32ClientId, (VRDEUSBDEVICEDESC *)mpvDeviceList, mcbDeviceList, mfDescExt);882 mConsole->i_processRemoteUSBDevices(mu32ClientId, (VRDEUSBDEVICEDESC *)mpvDeviceList, mcbDeviceList, mfDescExt); 883 883 LogFlow(("USB::PollRemoteDevices: WaitResponse after process\n")); 884 884 -
trunk/src/VBox/Main/src-client/SessionImpl.cpp
r51476 r51612 167 167 #ifndef VBOX_COM_INPROC_API_CLIENT 168 168 if (mConsole) 169 rc = mConsole-> machine().queryInterfaceTo(aMachine);169 rc = mConsole->i_machine().queryInterfaceTo(aMachine); 170 170 else 171 171 #endif … … 500 500 AssertReturn(!mConsole.isNull(), E_FAIL); 501 501 502 return mConsole-> updateMachineState(aMachineState);502 return mConsole->i_updateMachineState(aMachineState); 503 503 #else 504 504 return S_OK; … … 569 569 AssertReturn(mConsole, VBOX_E_INVALID_OBJECT_STATE); 570 570 571 return mConsole-> onNetworkAdapterChange(networkAdapter, changeAdapter);571 return mConsole->i_onNetworkAdapterChange(networkAdapter, changeAdapter); 572 572 #else 573 573 return S_OK; … … 588 588 AssertReturn(mConsole, VBOX_E_INVALID_OBJECT_STATE); 589 589 590 return mConsole-> onSerialPortChange(serialPort);590 return mConsole->i_onSerialPortChange(serialPort); 591 591 #else 592 592 return S_OK; … … 607 607 AssertReturn(mConsole, VBOX_E_INVALID_OBJECT_STATE); 608 608 609 return mConsole-> onParallelPortChange(parallelPort);609 return mConsole->i_onParallelPortChange(parallelPort); 610 610 #else 611 611 return S_OK; … … 626 626 AssertReturn(mConsole, VBOX_E_INVALID_OBJECT_STATE); 627 627 628 return mConsole-> onStorageControllerChange();628 return mConsole->i_onStorageControllerChange(); 629 629 #else 630 630 return S_OK; … … 645 645 AssertReturn(mConsole, VBOX_E_INVALID_OBJECT_STATE); 646 646 647 return mConsole-> onMediumChange(aMediumAttachment, aForce);647 return mConsole->i_onMediumChange(aMediumAttachment, aForce); 648 648 #else 649 649 return S_OK; … … 664 664 AssertReturn(mConsole, VBOX_E_INVALID_OBJECT_STATE); 665 665 666 return mConsole-> onCPUChange(aCPU, aRemove);666 return mConsole->i_onCPUChange(aCPU, aRemove); 667 667 #else 668 668 return S_OK; … … 683 683 AssertReturn(mConsole, VBOX_E_INVALID_OBJECT_STATE); 684 684 685 return mConsole-> onCPUExecutionCapChange(aExecutionCap);685 return mConsole->i_onCPUExecutionCapChange(aExecutionCap); 686 686 #else 687 687 return S_OK; … … 702 702 AssertReturn(mConsole, VBOX_E_INVALID_OBJECT_STATE); 703 703 704 return mConsole-> onVRDEServerChange(aRestart);704 return mConsole->i_onVRDEServerChange(aRestart); 705 705 #else 706 706 return S_OK; … … 721 721 AssertReturn(mConsole, VBOX_E_INVALID_OBJECT_STATE); 722 722 723 return mConsole-> onVideoCaptureChange();723 return mConsole->i_onVideoCaptureChange(); 724 724 #else 725 725 return S_OK; … … 740 740 AssertReturn(mConsole, VBOX_E_INVALID_OBJECT_STATE); 741 741 742 return mConsole-> onUSBControllerChange();742 return mConsole->i_onUSBControllerChange(); 743 743 #else 744 744 return S_OK; … … 759 759 AssertReturn(mConsole, VBOX_E_INVALID_OBJECT_STATE); 760 760 761 return mConsole-> onSharedFolderChange(aGlobal);761 return mConsole->i_onSharedFolderChange(aGlobal); 762 762 #else 763 763 return S_OK; … … 778 778 AssertReturn(mConsole, VBOX_E_INVALID_OBJECT_STATE); 779 779 780 return mConsole-> onClipboardModeChange(aClipboardMode);780 return mConsole->i_onClipboardModeChange(aClipboardMode); 781 781 #else 782 782 return S_OK; … … 796 796 AssertReturn(mType == SessionType_WriteLock, VBOX_E_INVALID_OBJECT_STATE); 797 797 798 return mConsole-> onDnDModeChange(aDragAndDropMode);798 return mConsole->i_onDnDModeChange(aDragAndDropMode); 799 799 #else 800 800 return S_OK; … … 817 817 AssertReturn(mConsole, VBOX_E_INVALID_OBJECT_STATE); 818 818 819 return mConsole-> onUSBDeviceAttach(aDevice, aError, aMaskedIfs);819 return mConsole->i_onUSBDeviceAttach(aDevice, aError, aMaskedIfs); 820 820 #else 821 821 return S_OK; … … 837 837 AssertReturn(mConsole, VBOX_E_INVALID_OBJECT_STATE); 838 838 839 return mConsole-> onUSBDeviceDetach(aId, aError);839 return mConsole->i_onUSBDeviceDetach(aId, aError); 840 840 #else 841 841 return S_OK; … … 867 867 868 868 #ifndef VBOX_COM_INPROC_API_CLIENT 869 return mConsole-> onShowWindow(aCheck, aCanShow, aWinId);869 return mConsole->i_onShowWindow(aCheck, aCanShow, aWinId); 870 870 #else 871 871 return S_OK; … … 886 886 AssertReturn(mConsole, VBOX_E_INVALID_OBJECT_STATE); 887 887 888 return mConsole-> onBandwidthGroupChange(aBandwidthGroup);888 return mConsole->i_onBandwidthGroupChange(aBandwidthGroup); 889 889 #else 890 890 return S_OK; … … 905 905 AssertReturn(mConsole, VBOX_E_INVALID_OBJECT_STATE); 906 906 907 return mConsole-> onStorageDeviceChange(aMediumAttachment, aRemove, aSilent);907 return mConsole->i_onStorageDeviceChange(aMediumAttachment, aRemove, aSilent); 908 908 #else 909 909 return S_OK; … … 944 944 945 945 if (!aIsSetter) 946 return mConsole-> getGuestProperty(aName, aRetValue, aRetTimestamp, aRetFlags);946 return mConsole->i_getGuestProperty(aName, aRetValue, aRetTimestamp, aRetFlags); 947 947 else 948 return mConsole-> setGuestProperty(aName, aValue, aFlags);948 return mConsole->i_setGuestProperty(aName, aValue, aFlags); 949 949 950 950 # else /* VBOX_COM_INPROC_API_CLIENT */ … … 991 991 return E_ACCESSDENIED; 992 992 993 return mConsole-> enumerateGuestProperties(aPatterns,994 ComSafeArrayOutArg(aNames),995 ComSafeArrayOutArg(aValues),996 ComSafeArrayOutArg(aTimestamps),997 ComSafeArrayOutArg(aFlags));993 return mConsole->i_enumerateGuestProperties(aPatterns, 994 ComSafeArrayOutArg(aNames), 995 ComSafeArrayOutArg(aValues), 996 ComSafeArrayOutArg(aTimestamps), 997 ComSafeArrayOutArg(aFlags)); 998 998 #else /* VBOX_WITH_GUEST_PROPS not defined */ 999 999 ReturnComNotImplemented(); … … 1017 1017 CheckComArgNotNull(aMediumAttachment); 1018 1018 1019 return mConsole-> onlineMergeMedium(aMediumAttachment,1020 aSourceIdx, aTargetIdx,1021 aProgress);1019 return mConsole->i_onlineMergeMedium(aMediumAttachment, 1020 aSourceIdx, aTargetIdx, 1021 aProgress); 1022 1022 #else 1023 1023 AssertFailed(); … … 1037 1037 AssertReturn(mConsole, VBOX_E_INVALID_OBJECT_STATE); 1038 1038 1039 mConsole-> enableVMMStatistics(aEnable);1039 mConsole->i_enableVMMStatistics(aEnable); 1040 1040 1041 1041 return S_OK; … … 1057 1057 AssertReturn(mConsole, VBOX_E_INVALID_OBJECT_STATE); 1058 1058 1059 return mConsole-> pause(aReason);1059 return mConsole->i_pause(aReason); 1060 1060 #else 1061 1061 AssertFailed(); … … 1075 1075 AssertReturn(mConsole, VBOX_E_INVALID_OBJECT_STATE); 1076 1076 1077 return mConsole-> resume(aReason);1077 return mConsole->i_resume(aReason); 1078 1078 #else 1079 1079 AssertFailed(); … … 1093 1093 AssertReturn(mConsole, VBOX_E_INVALID_OBJECT_STATE); 1094 1094 1095 return mConsole-> saveState(aReason, aProgress);1095 return mConsole->i_saveState(aReason, aProgress); 1096 1096 #else 1097 1097 AssertFailed(); -
trunk/src/VBox/Main/src-client/UsbCardReader.cpp
r45927 r51612 5 5 6 6 /* 7 * Copyright (C) 2011-201 2Oracle Corporation7 * Copyright (C) 2011-2014 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 693 693 int UsbCardReader::vrdeSCardRequest(void *pvUser, uint32_t u32Function, const void *pvData, uint32_t cbData) 694 694 { 695 int rc = mParent-> consoleVRDPServer()->SCardRequest(pvUser, u32Function, pvData, cbData);695 int rc = mParent->i_consoleVRDPServer()->SCardRequest(pvUser, u32Function, pvData, cbData); 696 696 LogFlowFunc(("%d %Rrc\n", u32Function, rc)); 697 697 return rc; -
trunk/src/VBox/Main/src-client/UsbWebcamInterface.cpp
r50580 r51612 5 5 6 6 /* 7 * Copyright (C) 2011-201 3Oracle Corporation7 * Copyright (C) 2011-2014 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 258 258 259 259 /* Try to attach the device. */ 260 EmulatedUSB *pEUSB = mParent->getConsole()-> getEmulatedUSB();260 EmulatedUSB *pEUSB = mParent->getConsole()->i_getEmulatedUSB(); 261 261 pEUSB->i_webcamAttachInternal("", "", "EmWebcam", pRemote); 262 262 } -
trunk/src/VBox/Main/src-client/VMMDevInterface.cpp
r51436 r51612 5 5 6 6 /* 7 * Copyright (C) 2006-201 2Oracle Corporation7 * Copyright (C) 2006-2014 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 160 160 161 161 /* Store that information in IGuest */ 162 Guest* guest = pConsole-> getGuest();162 Guest* guest = pConsole->i_getGuest(); 163 163 AssertPtrReturnVoid(guest); 164 164 165 165 guest->setAdditionsStatus((VBoxGuestFacilityType)uFacility, (VBoxGuestFacilityStatus)uStatus, fFlags, pTimeSpecTS); 166 pConsole-> onAdditionsStateChange();166 pConsole->i_onAdditionsStateChange(); 167 167 } 168 168 … … 182 182 183 183 /* Store that information in IGuest. */ 184 Guest* pGuest = pConsole-> getGuest();184 Guest* pGuest = pConsole->i_getGuest(); 185 185 AssertPtrReturnVoid(pGuest); 186 186 … … 203 203 { 204 204 AssertPtrReturnVoid(guestInfo); 205 205 206 206 PDRVMAINVMMDEV pDrv = RT_FROM_MEMBER(pInterface, DRVMAINVMMDEV, Connector); 207 207 Console *pConsole = pDrv->pVMMDev->getParent(); 208 208 209 209 /* Store that information in IGuest */ 210 Guest* guest = pConsole-> getGuest();210 Guest* guest = pConsole->i_getGuest(); 211 211 AssertPtrReturnVoid(guest); 212 212 … … 221 221 * so that it can notify its consumers. 222 222 */ 223 pConsole-> onAdditionsStateChange();223 pConsole->i_onAdditionsStateChange(); 224 224 225 225 if (guestInfo->interfaceVersion < VMMDEV_VERSION) 226 pConsole-> onAdditionsOutdated();226 pConsole->i_onAdditionsOutdated(); 227 227 } 228 228 else … … 239 239 RTTimeNow(&TimeSpecTS); 240 240 guest->setAdditionsStatus(VBoxGuestFacilityType_All, VBoxGuestFacilityStatus_Inactive, 0 /*fFlags*/, &TimeSpecTS); 241 pConsole-> onAdditionsStateChange();241 pConsole->i_onAdditionsStateChange(); 242 242 } 243 243 } … … 254 254 255 255 /* Store that information in IGuest. */ 256 Guest *pGuest = pDrv->pVMMDev->getParent()-> getGuest();256 Guest *pGuest = pDrv->pVMMDev->getParent()->i_getGuest(); 257 257 AssertPtrReturnVoid(pGuest); 258 258 … … 283 283 284 284 /* store that information in IGuest */ 285 Guest* pGuest = pConsole-> getGuest();285 Guest* pGuest = pConsole->i_getGuest(); 286 286 AssertPtrReturnVoid(pGuest); 287 287 … … 295 295 * so that it can notify its consumers. 296 296 */ 297 pConsole-> onAdditionsStateChange();297 pConsole->i_onAdditionsStateChange(); 298 298 } 299 299 … … 316 316 * so that it can notify its consumers. 317 317 */ 318 Mouse *pMouse = pConsole-> getMouse();318 Mouse *pMouse = pConsole->i_getMouse(); 319 319 if (pMouse) /** @todo and if not? Can that actually happen? */ 320 320 pMouse->i_onVMMDevGuestCapsChange(fNewCaps & VMMDEV_MOUSE_GUEST_MASK); … … 356 356 if (pShape) 357 357 ::memcpy(shapeData.raw(), pShape, cbShapeSize); 358 pConsole-> onMousePointerShapeChange(fVisible, fAlpha, xHot, yHot, width, height, ComSafeArrayAsInParam(shapeData));358 pConsole->i_onMousePointerShapeChange(fVisible, fAlpha, xHot, yHot, width, height, ComSafeArrayAsInParam(shapeData)); 359 359 } 360 360 … … 364 364 Console *pConsole = pDrv->pVMMDev->getParent(); 365 365 366 Display *display = pConsole-> getDisplay();366 Display *display = pConsole->i_getDisplay(); 367 367 368 368 if (display) … … 379 379 Console *pConsole = pDrv->pVMMDev->getParent(); 380 380 381 Display *display = pConsole-> getDisplay();381 Display *display = pConsole->i_getDisplay(); 382 382 383 383 if (display) … … 400 400 #endif 401 401 IFramebuffer *framebuffer = NULL; 402 HRESULT hrc = pConsole-> getDisplay()->QueryFramebuffer(display, &framebuffer);402 HRESULT hrc = pConsole->i_getDisplay()->QueryFramebuffer(display, &framebuffer); 403 403 if (SUCCEEDED(hrc) && framebuffer) 404 404 { … … 424 424 return VERR_INVALID_PARAMETER; 425 425 IFramebuffer *framebuffer = NULL; 426 HRESULT hrc = pConsole-> getDisplay()->QueryFramebuffer(0, &framebuffer);426 HRESULT hrc = pConsole->i_getDisplay()->QueryFramebuffer(0, &framebuffer); 427 427 if (SUCCEEDED(hrc) && framebuffer) 428 428 { … … 451 451 452 452 /* Forward to Display, which calls corresponding framebuffers. */ 453 pConsole-> getDisplay()->handleSetVisibleRegion(cRect, pRect);453 pConsole->i_getDisplay()->handleSetVisibleRegion(cRect, pRect); 454 454 455 455 return VINF_SUCCESS; … … 462 462 463 463 /* Forward to Display, which calls corresponding framebuffers. */ 464 pConsole-> getDisplay()->handleQueryVisibleRegion(pcRect, pRect);464 pConsole->i_getDisplay()->handleQueryVisibleRegion(pcRect, pRect); 465 465 466 466 return VINF_SUCCESS; … … 485 485 486 486 /* store that information in IGuest */ 487 Guest* guest = pConsole-> getGuest();487 Guest* guest = pConsole->i_getGuest(); 488 488 AssertPtrReturn(guest, VERR_GENERAL_FAILURE); 489 489 … … 511 511 512 512 /* store that information in IGuest */ 513 Guest* guest = pConsole-> getGuest();513 Guest* guest = pConsole->i_getGuest(); 514 514 AssertPtrReturn(guest, VERR_GENERAL_FAILURE); 515 515 … … 537 537 538 538 /* store that information in IGuest */ 539 Guest* guest = pConsole-> getGuest();539 Guest* guest = pConsole->i_getGuest(); 540 540 AssertPtrReturn(guest, VERR_GENERAL_FAILURE); 541 541 … … 560 560 561 561 /* store that information in IGuest */ 562 Guest* guest = pConsole-> getGuest();562 Guest* guest = pConsole->i_getGuest(); 563 563 AssertPtrReturn(guest, VERR_GENERAL_FAILURE); 564 564 … … 574 574 575 575 /** @todo r=bird: Convert from 4KB to 1KB units? 576 * CollectorGuestHAL:: getGuestMemLoad says it returns KB units to576 * CollectorGuestHAL::i_getGuestMemLoad says it returns KB units to 577 577 * preCollect(). I might be wrong ofc, this is convoluted code... */ 578 578 if (pGuestStats->u32StatCaps & VBOX_GUEST_STAT_PHYS_MEM_TOTAL) -
trunk/src/VBox/Main/src-client/xpcom/module.cpp
r51092 r51612 82 82 #endif 83 83 84 NS_DECL_CLASSINFO(Console)85 NS_IMPL_THREADSAFE_ISUPPORTS1_CI(Console, IConsole)84 // NS_DECL_CLASSINFO(Console) 85 // NS_IMPL_THREADSAFE_ISUPPORTS1_CI(Console, IConsole) 86 86 87 87 #endif /* VBOX_COM_INPROC_API_CLIENT */
Note:
See TracChangeset
for help on using the changeset viewer.