VirtualBox

source: vbox/trunk/src/VBox/Main/include/ConsoleImpl.h@ 54060

Last change on this file since 54060 was 54060, checked in by vboxsync, 10 years ago

Main: Fix i_configMediumAttachment inconsistency for USB storage devices

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 42.9 KB
Line 
1/* $Id: ConsoleImpl.h 54060 2015-02-02 21:17:31Z vboxsync $ */
2/** @file
3 * VBox Console COM Class definition
4 */
5
6/*
7 * Copyright (C) 2005-2014 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18#ifndef ____H_CONSOLEIMPL
19#define ____H_CONSOLEIMPL
20
21#include "VirtualBoxBase.h"
22#include "VBox/com/array.h"
23#include "EventImpl.h"
24#include "ConsoleWrap.h"
25
26class Guest;
27class Keyboard;
28class Mouse;
29class Display;
30class MachineDebugger;
31class TeleporterStateSrc;
32class OUSBDevice;
33class RemoteUSBDevice;
34class SharedFolder;
35class VRDEServerInfo;
36class EmulatedUSB;
37#ifdef VBOX_WITH_PDM_AUDIO_DRIVER
38class AudioVRDE;
39#else
40class AudioSniffer;
41#endif
42class AudioVRDE;
43class Nvram;
44#ifdef VBOX_WITH_USB_CARDREADER
45class UsbCardReader;
46#endif
47class ConsoleVRDPServer;
48class VMMDev;
49class Progress;
50class BusAssignmentManager;
51COM_STRUCT_OR_CLASS(IEventListener);
52#ifdef VBOX_WITH_EXTPACK
53class ExtPackManager;
54#endif
55class VMMDevMouseInterface;
56class DisplayMouseInterface;
57
58#include <iprt/uuid.h>
59#include <iprt/memsafer.h>
60#include <VBox/RemoteDesktop/VRDE.h>
61#include <VBox/vmm/pdmdrv.h>
62#ifdef VBOX_WITH_GUEST_PROPS
63# include <VBox/HostServices/GuestPropertySvc.h> /* For the property notification callback */
64#endif
65
66#ifdef RT_OS_WINDOWS
67# include "../src-server/win/VBoxComEvents.h"
68#endif
69
70struct VUSBIRHCONFIG;
71typedef struct VUSBIRHCONFIG *PVUSBIRHCONFIG;
72
73#include <list>
74#include <vector>
75
76// defines
77///////////////////////////////////////////////////////////////////////////////
78
79/**
80 * Checks the availability of the underlying VM device driver corresponding
81 * to the COM interface (IKeyboard, IMouse, IDisplay, etc.). When the driver is
82 * not available (NULL), sets error info and returns returns E_ACCESSDENIED.
83 * The translatable error message is defined in null context.
84 *
85 * Intended to used only within Console children (i.e. Keyboard, Mouse,
86 * Display, etc.).
87 *
88 * @param drv driver pointer to check (compare it with NULL)
89 */
90#define CHECK_CONSOLE_DRV(drv) \
91 do { \
92 if (!(drv)) \
93 return setError(E_ACCESSDENIED, tr("The console is not powered up")); \
94 } while (0)
95
96// Console
97///////////////////////////////////////////////////////////////////////////////
98
99class ConsoleMouseInterface
100{
101public:
102 virtual VMMDevMouseInterface *i_getVMMDevMouseInterface(){return NULL;}
103 virtual DisplayMouseInterface *i_getDisplayMouseInterface(){return NULL;}
104 virtual void i_onMouseCapabilityChange(BOOL supportsAbsolute,
105 BOOL supportsRelative,
106 BOOL supportsMT,
107 BOOL needsHostCursor){NOREF(supportsAbsolute); NOREF(supportsRelative); NOREF(supportsMT); NOREF(needsHostCursor);}
108};
109
110/** IConsole implementation class */
111class ATL_NO_VTABLE Console :
112 public ConsoleWrap,
113 public ConsoleMouseInterface
114{
115
116public:
117
118 DECLARE_EMPTY_CTOR_DTOR(Console)
119
120 HRESULT FinalConstruct();
121 void FinalRelease();
122
123 // public initializers/uninitializers for internal purposes only
124 HRESULT init(IMachine *aMachine, IInternalMachineControl *aControl, LockType_T aLockType);
125 void uninit();
126
127
128 // public methods for internal purposes only
129
130 /*
131 * Note: the following methods do not increase refcount. intended to be
132 * called only by the VM execution thread.
133 */
134
135 Guest *i_getGuest() const { return mGuest; }
136 Keyboard *i_getKeyboard() const { return mKeyboard; }
137 Mouse *i_getMouse() const { return mMouse; }
138 Display *i_getDisplay() const { return mDisplay; }
139 MachineDebugger *i_getMachineDebugger() const { return mDebugger; }
140#ifdef VBOX_WITH_PDM_AUDIO_DRIVER
141 AudioVRDE *i_getAudioVRDE() const { return mAudioVRDE; }
142#else
143 AudioSniffer *i_getAudioSniffer() const { return mAudioSniffer; }
144#endif
145
146 const ComPtr<IMachine> &i_machine() const { return mMachine; }
147
148 bool i_useHostClipboard() { return mfUseHostClipboard; }
149
150 /** Method is called only from ConsoleVRDPServer */
151 IVRDEServer *i_getVRDEServer() const { return mVRDEServer; }
152
153 ConsoleVRDPServer *i_consoleVRDPServer() const { return mConsoleVRDPServer; }
154
155 HRESULT i_updateMachineState(MachineState_T aMachineState);
156
157 // events from IInternalSessionControl
158 HRESULT i_onNetworkAdapterChange(INetworkAdapter *aNetworkAdapter, BOOL changeAdapter);
159 HRESULT i_onSerialPortChange(ISerialPort *aSerialPort);
160 HRESULT i_onParallelPortChange(IParallelPort *aParallelPort);
161 HRESULT i_onStorageControllerChange();
162 HRESULT i_onMediumChange(IMediumAttachment *aMediumAttachment, BOOL aForce);
163 HRESULT i_onCPUChange(ULONG aCPU, BOOL aRemove);
164 HRESULT i_onCPUExecutionCapChange(ULONG aExecutionCap);
165 HRESULT i_onClipboardModeChange(ClipboardMode_T aClipboardMode);
166 HRESULT i_onDnDModeChange(DnDMode_T aDnDMode);
167 HRESULT i_onVRDEServerChange(BOOL aRestart);
168 HRESULT i_onVideoCaptureChange();
169 HRESULT i_onUSBControllerChange();
170 HRESULT i_onSharedFolderChange(BOOL aGlobal);
171 HRESULT i_onUSBDeviceAttach(IUSBDevice *aDevice, IVirtualBoxErrorInfo *aError, ULONG aMaskedIfs,
172 const Utf8Str &aCaptureFilename);
173 HRESULT i_onUSBDeviceDetach(IN_BSTR aId, IVirtualBoxErrorInfo *aError);
174 HRESULT i_onBandwidthGroupChange(IBandwidthGroup *aBandwidthGroup);
175 HRESULT i_onStorageDeviceChange(IMediumAttachment *aMediumAttachment, BOOL aRemove, BOOL aSilent);
176 HRESULT i_onExtraDataChange(IN_BSTR aMachineId, IN_BSTR aKey, IN_BSTR aVal);
177
178 HRESULT i_getGuestProperty(const Utf8Str &aName, Utf8Str *aValue, LONG64 *aTimestamp, Utf8Str *aFlags);
179 HRESULT i_setGuestProperty(const Utf8Str &aName, const Utf8Str &aValue, const Utf8Str &aFlags);
180 HRESULT i_deleteGuestProperty(const Utf8Str &aName);
181 HRESULT i_enumerateGuestProperties(const Utf8Str &aPatterns,
182 std::vector<Utf8Str> &aNames,
183 std::vector<Utf8Str> &aValues,
184 std::vector<LONG64> &aTimestamps,
185 std::vector<Utf8Str> &aFlags);
186 HRESULT i_onlineMergeMedium(IMediumAttachment *aMediumAttachment,
187 ULONG aSourceIdx, ULONG aTargetIdx,
188 IProgress *aProgress);
189 int i_hgcmLoadService(const char *pszServiceLibrary, const char *pszServiceName);
190 VMMDev *i_getVMMDev() { return m_pVMMDev; }
191#ifdef VBOX_WITH_PDM_AUDIO_DRIVER
192 AudioVRDE *i_getAudioVRDE() { return mAudioVRDE; }
193#else
194 AudioSniffer *i_getAudioSniffer() { return mAudioSniffer; }
195#endif
196
197#ifdef VBOX_WITH_EXTPACK
198 ExtPackManager *i_getExtPackManager();
199#endif
200 EventSource *i_getEventSource() { return mEventSource; }
201#ifdef VBOX_WITH_USB_CARDREADER
202 UsbCardReader *i_getUsbCardReader() { return mUsbCardReader; }
203#endif
204
205 int i_VRDPClientLogon(uint32_t u32ClientId, const char *pszUser, const char *pszPassword, const char *pszDomain);
206 void i_VRDPClientStatusChange(uint32_t u32ClientId, const char *pszStatus);
207 void i_VRDPClientConnect(uint32_t u32ClientId);
208 void i_VRDPClientDisconnect(uint32_t u32ClientId, uint32_t fu32Intercepted);
209 void i_VRDPInterceptAudio(uint32_t u32ClientId);
210 void i_VRDPInterceptUSB(uint32_t u32ClientId, void **ppvIntercept);
211 void i_VRDPInterceptClipboard(uint32_t u32ClientId);
212
213 void i_processRemoteUSBDevices(uint32_t u32ClientId, VRDEUSBDEVICEDESC *pDevList, uint32_t cbDevList, bool fDescExt);
214 void i_reportVmStatistics(ULONG aValidStats, ULONG aCpuUser,
215 ULONG aCpuKernel, ULONG aCpuIdle,
216 ULONG aMemTotal, ULONG aMemFree,
217 ULONG aMemBalloon, ULONG aMemShared,
218 ULONG aMemCache, ULONG aPageTotal,
219 ULONG aAllocVMM, ULONG aFreeVMM,
220 ULONG aBalloonedVMM, ULONG aSharedVMM,
221 ULONG aVmNetRx, ULONG aVmNetTx)
222 {
223 mControl->ReportVmStatistics(aValidStats, aCpuUser, aCpuKernel, aCpuIdle,
224 aMemTotal, aMemFree, aMemBalloon, aMemShared,
225 aMemCache, aPageTotal, aAllocVMM, aFreeVMM,
226 aBalloonedVMM, aSharedVMM, aVmNetRx, aVmNetTx);
227 }
228 void i_enableVMMStatistics(BOOL aEnable);
229
230 HRESULT i_pause(Reason_T aReason);
231 HRESULT i_resume(Reason_T aReason);
232 HRESULT i_saveState(Reason_T aReason, IProgress **aProgress);
233
234 // callback callers (partly; for some events console callbacks are notified
235 // directly from IInternalSessionControl event handlers declared above)
236 void i_onMousePointerShapeChange(bool fVisible, bool fAlpha,
237 uint32_t xHot, uint32_t yHot,
238 uint32_t width, uint32_t height,
239 const uint8_t *pu8Shape,
240 uint32_t cbShape);
241 void i_onMouseCapabilityChange(BOOL supportsAbsolute, BOOL supportsRelative,
242 BOOL supportsMT, BOOL needsHostCursor);
243 void i_onStateChange(MachineState_T aMachineState);
244 void i_onAdditionsStateChange();
245 void i_onAdditionsOutdated();
246 void i_onKeyboardLedsChange(bool fNumLock, bool fCapsLock, bool fScrollLock);
247 void i_onUSBDeviceStateChange(IUSBDevice *aDevice, bool aAttached,
248 IVirtualBoxErrorInfo *aError);
249 void i_onRuntimeError(BOOL aFatal, IN_BSTR aErrorID, IN_BSTR aMessage);
250 HRESULT i_onShowWindow(BOOL aCheck, BOOL *aCanShow, LONG64 *aWinId);
251 void i_onVRDEServerInfoChange();
252 HRESULT i_sendACPIMonitorHotPlugEvent();
253
254 static const PDMDRVREG DrvStatusReg;
255
256 static HRESULT i_setErrorStatic(HRESULT aResultCode, const char *pcsz, ...);
257 HRESULT i_setInvalidMachineStateError();
258
259 static const char *i_convertControllerTypeToDev(StorageControllerType_T enmCtrlType);
260 static HRESULT i_convertBusPortDeviceToLun(StorageBus_T enmBus, LONG port, LONG device, unsigned &uLun);
261 // Called from event listener
262 HRESULT i_onNATRedirectRuleChange(ULONG ulInstance, BOOL aNatRuleRemove,
263 NATProtocol_T aProto, IN_BSTR aHostIp, LONG aHostPort, IN_BSTR aGuestIp, LONG aGuestPort);
264
265 // Mouse interface
266 VMMDevMouseInterface *i_getVMMDevMouseInterface();
267 DisplayMouseInterface *i_getDisplayMouseInterface();
268
269 EmulatedUSB *i_getEmulatedUSB(void) { return mEmulatedUSB; }
270
271 /**
272 * Sets the disk encryption keys.
273 *
274 * @returns COM status code.
275 * @þaram strCfg The config for the disks.
276 *
277 * @note: One line in the config string contains all required data for one disk.
278 * The format for one disk is some sort of comma separated value using
279 * key=value pairs.
280 * There are two keys defined at the moment:
281 * - uuid: The uuid of the base image the key is for (with or without)
282 * the curly braces.
283 * - dek: The data encryption key in base64 encoding
284 */
285 HRESULT i_setDiskEncryptionKeys(const Utf8Str &strCfg);
286
287private:
288
289 // wraped IConsole properties
290 HRESULT getMachine(ComPtr<IMachine> &aMachine);
291 HRESULT getState(MachineState_T *aState);
292 HRESULT getGuest(ComPtr<IGuest> &aGuest);
293 HRESULT getKeyboard(ComPtr<IKeyboard> &aKeyboard);
294 HRESULT getMouse(ComPtr<IMouse> &aMouse);
295 HRESULT getDisplay(ComPtr<IDisplay> &aDisplay);
296 HRESULT getDebugger(ComPtr<IMachineDebugger> &aDebugger);
297 HRESULT getUSBDevices(std::vector<ComPtr<IUSBDevice> > &aUSBDevices);
298 HRESULT getRemoteUSBDevices(std::vector<ComPtr<IHostUSBDevice> > &aRemoteUSBDevices);
299 HRESULT getSharedFolders(std::vector<ComPtr<ISharedFolder> > &aSharedFolders);
300 HRESULT getVRDEServerInfo(ComPtr<IVRDEServerInfo> &aVRDEServerInfo);
301 HRESULT getEventSource(ComPtr<IEventSource> &aEventSource);
302 HRESULT getAttachedPCIDevices(std::vector<ComPtr<IPCIDeviceAttachment> > &aAttachedPCIDevices);
303 HRESULT getUseHostClipboard(BOOL *aUseHostClipboard);
304 HRESULT setUseHostClipboard(BOOL aUseHostClipboard);
305 HRESULT getEmulatedUSB(ComPtr<IEmulatedUSB> &aEmulatedUSB);
306
307 // wraped IConsole methods
308 HRESULT powerUp(ComPtr<IProgress> &aProgress);
309 HRESULT powerUpPaused(ComPtr<IProgress> &aProgress);
310 HRESULT powerDown(ComPtr<IProgress> &aProgress);
311 HRESULT reset();
312 HRESULT pause();
313 HRESULT resume();
314 HRESULT powerButton();
315 HRESULT sleepButton();
316 HRESULT getPowerButtonHandled(BOOL *aHandled);
317 HRESULT getGuestEnteredACPIMode(BOOL *aEntered);
318 HRESULT saveState(ComPtr<IProgress> &aProgress);
319 HRESULT adoptSavedState(const com::Utf8Str &aSavedStateFile);
320 HRESULT discardSavedState(BOOL aFRemoveFile);
321 HRESULT getDeviceActivity(const std::vector<DeviceType_T> &aType,
322 std::vector<DeviceActivity_T> &aActivity);
323 HRESULT attachUSBDevice(const com::Guid &aId, const com::Utf8Str &aCaptureFilename);
324 HRESULT detachUSBDevice(const com::Guid &aId,
325 ComPtr<IUSBDevice> &aDevice);
326 HRESULT findUSBDeviceByAddress(const com::Utf8Str &aName,
327 ComPtr<IUSBDevice> &aDevice);
328 HRESULT findUSBDeviceById(const com::Guid &aId,
329 ComPtr<IUSBDevice> &aDevice);
330 HRESULT createSharedFolder(const com::Utf8Str &aName,
331 const com::Utf8Str &aHostPath,
332 BOOL aWritable,
333 BOOL aAutomount);
334 HRESULT removeSharedFolder(const com::Utf8Str &aName);
335 HRESULT takeSnapshot(const com::Utf8Str &aName,
336 const com::Utf8Str &aDescription,
337 ComPtr<IProgress> &aProgress);
338 HRESULT deleteSnapshot(const com::Guid &aId,
339 ComPtr<IProgress> &aProgress);
340 HRESULT deleteSnapshotAndAllChildren(const com::Guid &aId,
341 ComPtr<IProgress> &aProgress);
342 HRESULT deleteSnapshotRange(const com::Guid &aStartId,
343 const com::Guid &aEndId,
344 ComPtr<IProgress> &aProgress);
345 HRESULT restoreSnapshot(const ComPtr<ISnapshot> &aSnapshot,
346 ComPtr<IProgress> &aProgress);
347 HRESULT teleport(const com::Utf8Str &aHostname,
348 ULONG aTcpport,
349 const com::Utf8Str &aPassword,
350 ULONG aMaxDowntime,
351 ComPtr<IProgress> &aProgress);
352
353 /**
354 * Base template for AutoVMCaller and SafeVMPtr. Template arguments
355 * have the same meaning as arguments of Console::addVMCaller().
356 */
357 template <bool taQuiet = false, bool taAllowNullVM = false>
358 class AutoVMCallerBase
359 {
360 public:
361 AutoVMCallerBase(Console *aThat) : mThat(aThat), mRC(E_FAIL)
362 {
363 Assert(aThat);
364 mRC = aThat->i_addVMCaller(taQuiet, taAllowNullVM);
365 }
366 ~AutoVMCallerBase()
367 {
368 doRelease();
369 }
370 /** Decreases the number of callers before the instance is destroyed. */
371 void releaseCaller()
372 {
373 Assert(SUCCEEDED(mRC));
374 doRelease();
375 }
376 /** Restores the number of callers after by #release(). #rc() must be
377 * rechecked to ensure the operation succeeded. */
378 void addYY()
379 {
380 AssertReturnVoid(!SUCCEEDED(mRC));
381 mRC = mThat->i_addVMCaller(taQuiet, taAllowNullVM);
382 }
383 /** Returns the result of Console::addVMCaller() */
384 HRESULT rc() const { return mRC; }
385 /** Shortcut to SUCCEEDED(rc()) */
386 bool isOk() const { return SUCCEEDED(mRC); }
387 protected:
388 Console *mThat;
389 void doRelease()
390 {
391 if (SUCCEEDED(mRC))
392 {
393 mThat->i_releaseVMCaller();
394 mRC = E_FAIL;
395 }
396 }
397 private:
398 HRESULT mRC; /* Whether the caller was added. */
399 DECLARE_CLS_COPY_CTOR_ASSIGN_NOOP(AutoVMCallerBase)
400 };
401
402#if 0
403 /**
404 * Helper class that protects sections of code using the mpUVM pointer by
405 * automatically calling addVMCaller() on construction and
406 * releaseVMCaller() on destruction. Intended for Console methods dealing
407 * with mpUVM. The usage pattern is:
408 * <code>
409 * AutoVMCaller autoVMCaller(this);
410 * if (FAILED(autoVMCaller.rc())) return autoVMCaller.rc();
411 * ...
412 * VMR3ReqCall (mpUVM, ...
413 * </code>
414 *
415 * @note Temporarily locks the argument for writing.
416 *
417 * @sa SafeVMPtr, SafeVMPtrQuiet
418 * @obsolete Use SafeVMPtr
419 */
420 typedef AutoVMCallerBase<false, false> AutoVMCaller;
421#endif
422
423 /**
424 * Same as AutoVMCaller but doesn't set extended error info on failure.
425 *
426 * @note Temporarily locks the argument for writing.
427 * @obsolete Use SafeVMPtrQuiet
428 */
429 typedef AutoVMCallerBase<true, false> AutoVMCallerQuiet;
430
431 /**
432 * Same as AutoVMCaller but allows a null VM pointer (to trigger an error
433 * instead of assertion).
434 *
435 * @note Temporarily locks the argument for writing.
436 * @obsolete Use SafeVMPtr
437 */
438 typedef AutoVMCallerBase<false, true> AutoVMCallerWeak;
439
440 /**
441 * Same as AutoVMCaller but doesn't set extended error info on failure
442 * and allows a null VM pointer (to trigger an error instead of
443 * assertion).
444 *
445 * @note Temporarily locks the argument for writing.
446 * @obsolete Use SafeVMPtrQuiet
447 */
448 typedef AutoVMCallerBase<true, true> AutoVMCallerQuietWeak;
449
450 /**
451 * Base template for SafeVMPtr and SafeVMPtrQuiet.
452 */
453 template<bool taQuiet = false>
454 class SafeVMPtrBase : public AutoVMCallerBase<taQuiet, true>
455 {
456 typedef AutoVMCallerBase<taQuiet, true> Base;
457 public:
458 SafeVMPtrBase(Console *aThat) : Base(aThat), mRC(E_FAIL), mpUVM(NULL)
459 {
460 if (Base::isOk())
461 mRC = aThat->i_safeVMPtrRetainer(&mpUVM, taQuiet);
462 }
463 ~SafeVMPtrBase()
464 {
465 doRelease();
466 }
467 /** Direct PUVM access. */
468 PUVM rawUVM() const { return mpUVM; }
469 /** Release the handles. */
470 void release()
471 {
472 Assert(SUCCEEDED(mRC));
473 doRelease();
474 }
475
476 /** The combined result of Console::addVMCaller() and Console::safeVMPtrRetainer */
477 HRESULT rc() const { return Base::isOk()? mRC: Base::rc(); }
478 /** Shortcut to SUCCEEDED(rc()) */
479 bool isOk() const { return SUCCEEDED(mRC) && Base::isOk(); }
480
481 private:
482 void doRelease()
483 {
484 if (SUCCEEDED(mRC))
485 {
486 Base::mThat->i_safeVMPtrReleaser(&mpUVM);
487 mRC = E_FAIL;
488 }
489 Base::doRelease();
490 }
491 HRESULT mRC; /* Whether the VM ptr was retained. */
492 PUVM mpUVM;
493 DECLARE_CLS_COPY_CTOR_ASSIGN_NOOP(SafeVMPtrBase)
494 };
495
496public:
497
498 /*
499 * Helper class that safely manages the Console::mpUVM pointer
500 * by calling addVMCaller() on construction and releaseVMCaller() on
501 * destruction. Intended for Console children. The usage pattern is:
502 * <code>
503 * Console::SafeVMPtr ptrVM(mParent);
504 * if (!ptrVM.isOk())
505 * return ptrVM.rc();
506 * ...
507 * VMR3ReqCall(ptrVM.rawUVM(), ...
508 * ...
509 * printf("%p\n", ptrVM.rawUVM());
510 * </code>
511 *
512 * @note Temporarily locks the argument for writing.
513 *
514 * @sa SafeVMPtrQuiet, AutoVMCaller
515 */
516 typedef SafeVMPtrBase<false> SafeVMPtr;
517
518 /**
519 * A deviation of SafeVMPtr that doesn't set the error info on failure.
520 * Intended for pieces of code that don't need to return the VM access
521 * failure to the caller. The usage pattern is:
522 * <code>
523 * Console::SafeVMPtrQuiet pVM(mParent);
524 * if (pVM.rc())
525 * VMR3ReqCall(pVM, ...
526 * return S_OK;
527 * </code>
528 *
529 * @note Temporarily locks the argument for writing.
530 *
531 * @sa SafeVMPtr, AutoVMCaller
532 */
533 typedef SafeVMPtrBase<true> SafeVMPtrQuiet;
534
535 class SharedFolderData
536 {
537 public:
538 SharedFolderData()
539 { }
540
541 SharedFolderData(const Utf8Str &aHostPath,
542 bool aWritable,
543 bool aAutoMount)
544 : m_strHostPath(aHostPath),
545 m_fWritable(aWritable),
546 m_fAutoMount(aAutoMount)
547 { }
548
549 // copy constructor
550 SharedFolderData(const SharedFolderData& aThat)
551 : m_strHostPath(aThat.m_strHostPath),
552 m_fWritable(aThat.m_fWritable),
553 m_fAutoMount(aThat.m_fAutoMount)
554 { }
555
556 Utf8Str m_strHostPath;
557 bool m_fWritable;
558 bool m_fAutoMount;
559 };
560
561 /**
562 * Class for managing emulated USB MSDs.
563 */
564 class USBStorageDevice
565 {
566 public:
567 USBStorageDevice()
568 { }
569 /** The UUID associated with the USB device. */
570 RTUUID mUuid;
571 /** Port of the storage device. */
572 LONG iPort;
573 };
574
575 /**
576 * Class for managing cryptographic keys.
577 * @todo: Replace with a keystore implementation once it is ready.
578 */
579 class SecretKey
580 {
581 public:
582 SecretKey() { }
583
584 SecretKey(uint8_t *pbKey, size_t cbKey)
585 : m_cRefs(0),
586 m_pbKey(pbKey),
587 m_cbKey(cbKey)
588 { }
589
590 ~SecretKey()
591 {
592 RTMemSaferFree(m_pbKey, m_cbKey);
593 m_cRefs = 0;
594 m_pbKey = NULL;
595 m_cbKey = 0;
596 }
597
598 /** Reference counter of the key. */
599 volatile uint32_t m_cRefs;
600 /** Key material. */
601 uint8_t *m_pbKey;
602 /** Size of the key in bytes. */
603 size_t m_cbKey;
604 };
605
606 typedef std::map<Utf8Str, ComObjPtr<SharedFolder> > SharedFolderMap;
607 typedef std::map<Utf8Str, SharedFolderData> SharedFolderDataMap;
608 typedef std::map<Utf8Str, ComPtr<IMediumAttachment> > MediumAttachmentMap;
609 typedef std::list <USBStorageDevice> USBStorageDeviceList;
610 typedef std::map<Utf8Str, SecretKey *> SecretKeyMap;
611
612private:
613
614 typedef std::list <ComObjPtr<OUSBDevice> > USBDeviceList;
615 typedef std::list <ComObjPtr<RemoteUSBDevice> > RemoteUSBDeviceList;
616
617 HRESULT i_addVMCaller(bool aQuiet = false, bool aAllowNullVM = false);
618 void i_releaseVMCaller();
619 HRESULT i_safeVMPtrRetainer(PUVM *a_ppUVM, bool aQuiet);
620 void i_safeVMPtrReleaser(PUVM *a_ppUVM);
621
622 HRESULT i_consoleInitReleaseLog(const ComPtr<IMachine> aMachine);
623
624 HRESULT i_powerUp(IProgress **aProgress, bool aPaused);
625 HRESULT i_powerDown(IProgress *aProgress = NULL);
626
627/* Note: FreeBSD needs this whether netflt is used or not. */
628#if ((defined(RT_OS_LINUX) && !defined(VBOX_WITH_NETFLT)) || defined(RT_OS_FREEBSD))
629 HRESULT i_attachToTapInterface(INetworkAdapter *networkAdapter);
630 HRESULT i_detachFromTapInterface(INetworkAdapter *networkAdapter);
631#endif
632 HRESULT i_powerDownHostInterfaces();
633
634 HRESULT i_setMachineState(MachineState_T aMachineState, bool aUpdateServer = true);
635 HRESULT i_setMachineStateLocally(MachineState_T aMachineState)
636 {
637 return i_setMachineState(aMachineState, false /* aUpdateServer */);
638 }
639
640 HRESULT i_findSharedFolder(const Utf8Str &strName,
641 ComObjPtr<SharedFolder> &aSharedFolder,
642 bool aSetError = false);
643
644 HRESULT i_fetchSharedFolders(BOOL aGlobal);
645 bool i_findOtherSharedFolder(const Utf8Str &straName,
646 SharedFolderDataMap::const_iterator &aIt);
647
648 HRESULT i_createSharedFolder(const Utf8Str &strName, const SharedFolderData &aData);
649 HRESULT i_removeSharedFolder(const Utf8Str &strName);
650
651 HRESULT i_suspendBeforeConfigChange(PUVM pUVM, AutoWriteLock *pAlock, bool *pfResume);
652 void i_resumeAfterConfigChange(PUVM pUVM);
653
654 static DECLCALLBACK(int) i_configConstructor(PUVM pUVM, PVM pVM, void *pvConsole);
655 int i_configConstructorInner(PUVM pUVM, PVM pVM, AutoWriteLock *pAlock);
656 int i_configCfgmOverlay(PCFGMNODE pRoot, IVirtualBox *pVirtualBox, IMachine *pMachine);
657 int i_configDumpAPISettingsTweaks(IVirtualBox *pVirtualBox, IMachine *pMachine);
658
659 int i_configGraphicsController(PCFGMNODE pDevices,
660 const GraphicsControllerType_T graphicsController,
661 BusAssignmentManager *pBusMgr,
662 const ComPtr<IMachine> &ptrMachine,
663 const ComPtr<IBIOSSettings> &ptrBiosSettings,
664 bool fHMEnabled);
665 int i_configMediumAttachment(const char *pcszDevice,
666 unsigned uInstance,
667 StorageBus_T enmBus,
668 bool fUseHostIOCache,
669 bool fBuiltinIoCache,
670 bool fSetupMerge,
671 unsigned uMergeSource,
672 unsigned uMergeTarget,
673 IMediumAttachment *pMediumAtt,
674 MachineState_T aMachineState,
675 HRESULT *phrc,
676 bool fAttachDetach,
677 bool fForceUnmount,
678 bool fHotplug,
679 PUVM pUVM,
680 DeviceType_T *paLedDevType,
681 PCFGMNODE *ppLunL0);
682 int i_configMedium(PCFGMNODE pLunL0,
683 bool fPassthrough,
684 DeviceType_T enmType,
685 bool fUseHostIOCache,
686 bool fBuiltinIoCache,
687 bool fSetupMerge,
688 unsigned uMergeSource,
689 unsigned uMergeTarget,
690 const char *pcszBwGroup,
691 bool fDiscard,
692 IMedium *pMedium,
693 MachineState_T aMachineState,
694 HRESULT *phrc);
695 int i_configMediumProperties(PCFGMNODE pCur, IMedium *pMedium, bool *pfHostIP);
696 static DECLCALLBACK(int) i_reconfigureMediumAttachment(Console *pThis,
697 PUVM pUVM,
698 const char *pcszDevice,
699 unsigned uInstance,
700 StorageBus_T enmBus,
701 bool fUseHostIOCache,
702 bool fBuiltinIoCache,
703 bool fSetupMerge,
704 unsigned uMergeSource,
705 unsigned uMergeTarget,
706 IMediumAttachment *aMediumAtt,
707 MachineState_T aMachineState,
708 HRESULT *phrc);
709 static DECLCALLBACK(int) i_changeRemovableMedium(Console *pThis,
710 PUVM pUVM,
711 const char *pcszDevice,
712 unsigned uInstance,
713 StorageBus_T enmBus,
714 bool fUseHostIOCache,
715 IMediumAttachment *aMediumAtt,
716 bool fForce);
717
718 HRESULT i_attachRawPCIDevices(PUVM pUVM, BusAssignmentManager *BusMgr, PCFGMNODE pDevices);
719 void i_attachStatusDriver(PCFGMNODE pCtlInst, PPDMLED *papLeds,
720 uint64_t uFirst, uint64_t uLast,
721 Console::MediumAttachmentMap *pmapMediumAttachments,
722 const char *pcszDevice, unsigned uInstance);
723
724 int i_configNetwork(const char *pszDevice, unsigned uInstance, unsigned uLun,
725 INetworkAdapter *aNetworkAdapter, PCFGMNODE pCfg,
726 PCFGMNODE pLunL0, PCFGMNODE pInst,
727 bool fAttachDetach, bool fIgnoreConnectFailure);
728
729 static DECLCALLBACK(int) i_configGuestProperties(void *pvConsole, PUVM pUVM);
730 static DECLCALLBACK(int) i_configGuestControl(void *pvConsole);
731 static DECLCALLBACK(void) i_vmstateChangeCallback(PUVM pUVM, VMSTATE enmState, VMSTATE enmOldState, void *pvUser);
732 static DECLCALLBACK(int) i_unplugCpu(Console *pThis, PUVM pUVM, VMCPUID idCpu);
733 static DECLCALLBACK(int) i_plugCpu(Console *pThis, PUVM pUVM, VMCPUID idCpu);
734 HRESULT i_doMediumChange(IMediumAttachment *aMediumAttachment, bool fForce, PUVM pUVM);
735 HRESULT i_doCPURemove(ULONG aCpu, PUVM pUVM);
736 HRESULT i_doCPUAdd(ULONG aCpu, PUVM pUVM);
737
738 HRESULT i_doNetworkAdapterChange(PUVM pUVM, const char *pszDevice, unsigned uInstance,
739 unsigned uLun, INetworkAdapter *aNetworkAdapter);
740 static DECLCALLBACK(int) i_changeNetworkAttachment(Console *pThis, PUVM pUVM, const char *pszDevice,
741 unsigned uInstance, unsigned uLun,
742 INetworkAdapter *aNetworkAdapter);
743
744 void i_changeClipboardMode(ClipboardMode_T aClipboardMode);
745 int i_changeDnDMode(DnDMode_T aDnDMode);
746
747#ifdef VBOX_WITH_USB
748 HRESULT i_attachUSBDevice(IUSBDevice *aHostDevice, ULONG aMaskedIfs, const Utf8Str &aCaptureFilename);
749 HRESULT i_detachUSBDevice(const ComObjPtr<OUSBDevice> &aHostDevice);
750
751 static DECLCALLBACK(int) i_usbAttachCallback(Console *that, PUVM pUVM, IUSBDevice *aHostDevice, PCRTUUID aUuid,
752 bool aRemote, const char *aAddress, void *pvRemoteBackend,
753 USHORT aPortVersion, ULONG aMaskedIfs, const char *pszCaptureFilename);
754 static DECLCALLBACK(int) i_usbDetachCallback(Console *that, PUVM pUVM, PCRTUUID aUuid);
755#endif
756
757 static DECLCALLBACK(int) i_attachStorageDevice(Console *pThis,
758 PUVM pUVM,
759 const char *pcszDevice,
760 unsigned uInstance,
761 StorageBus_T enmBus,
762 bool fUseHostIOCache,
763 IMediumAttachment *aMediumAtt,
764 bool fSilent);
765 static DECLCALLBACK(int) i_detachStorageDevice(Console *pThis,
766 PUVM pUVM,
767 const char *pcszDevice,
768 unsigned uInstance,
769 StorageBus_T enmBus,
770 IMediumAttachment *aMediumAtt,
771 bool fSilent);
772 HRESULT i_doStorageDeviceAttach(IMediumAttachment *aMediumAttachment, PUVM pUVM, bool fSilent);
773 HRESULT i_doStorageDeviceDetach(IMediumAttachment *aMediumAttachment, PUVM pUVM, bool fSilent);
774
775 static DECLCALLBACK(int) i_fntTakeSnapshotWorker(RTTHREAD Thread, void *pvUser);
776
777 static DECLCALLBACK(int) i_stateProgressCallback(PUVM pUVM, unsigned uPercent, void *pvUser);
778
779 static DECLCALLBACK(void) i_genericVMSetErrorCallback(PUVM pUVM, void *pvUser, int rc, RT_SRC_POS_DECL,
780 const char *pszErrorFmt, va_list va);
781
782 void i_setVMRuntimeErrorCallbackF(uint32_t fFatal, const char *pszErrorId, const char *pszFormat, ...);
783 static DECLCALLBACK(void) i_setVMRuntimeErrorCallback(PUVM pUVM, void *pvUser, uint32_t fFatal,
784 const char *pszErrorId, const char *pszFormat, va_list va);
785
786 HRESULT i_captureUSBDevices(PUVM pUVM);
787 void i_detachAllUSBDevices(bool aDone);
788
789 static DECLCALLBACK(int) i_powerUpThread(RTTHREAD Thread, void *pvUser);
790 static DECLCALLBACK(int) i_saveStateThread(RTTHREAD Thread, void *pvUser);
791 static DECLCALLBACK(int) i_powerDownThread(RTTHREAD Thread, void *pvUser);
792
793 static DECLCALLBACK(int) i_vmm2User_SaveState(PCVMM2USERMETHODS pThis, PUVM pUVM);
794 static DECLCALLBACK(void) i_vmm2User_NotifyEmtInit(PCVMM2USERMETHODS pThis, PUVM pUVM, PUVMCPU pUVCpu);
795 static DECLCALLBACK(void) i_vmm2User_NotifyEmtTerm(PCVMM2USERMETHODS pThis, PUVM pUVM, PUVMCPU pUVCpu);
796 static DECLCALLBACK(void) i_vmm2User_NotifyPdmtInit(PCVMM2USERMETHODS pThis, PUVM pUVM);
797 static DECLCALLBACK(void) i_vmm2User_NotifyPdmtTerm(PCVMM2USERMETHODS pThis, PUVM pUVM);
798 static DECLCALLBACK(void) i_vmm2User_NotifyResetTurnedIntoPowerOff(PCVMM2USERMETHODS pThis, PUVM pUVM);
799
800 static DECLCALLBACK(void *) i_drvStatus_QueryInterface(PPDMIBASE pInterface, const char *pszIID);
801 static DECLCALLBACK(void) i_drvStatus_UnitChanged(PPDMILEDCONNECTORS pInterface, unsigned iLUN);
802 static DECLCALLBACK(int) i_drvStatus_MediumEjected(PPDMIMEDIANOTIFY pInterface, unsigned iLUN);
803 static DECLCALLBACK(void) i_drvStatus_Destruct(PPDMDRVINS pDrvIns);
804 static DECLCALLBACK(int) i_drvStatus_Construct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags);
805
806 static DECLCALLBACK(int) i_pdmIfSecKey_KeyRetain(PPDMISECKEY pInterface, const char *pszId, const uint8_t **ppbKey,
807 size_t *pcbKey);
808 static DECLCALLBACK(int) i_pdmIfSecKey_KeyRelease(PPDMISECKEY pInterface, const char *pszId);
809
810 static DECLCALLBACK(int) i_pdmIfSecKeyHlp_KeyMissingNotify(PPDMISECKEYHLP pInterface);
811
812 int mcAudioRefs;
813 volatile uint32_t mcVRDPClients;
814 uint32_t mu32SingleRDPClientId; /* The id of a connected client in the single connection mode. */
815 volatile bool mcGuestCredentialsProvided;
816
817 static const char *sSSMConsoleUnit;
818 static uint32_t sSSMConsoleVer;
819
820 HRESULT i_loadDataFromSavedState();
821 int i_loadStateFileExecInternal(PSSMHANDLE pSSM, uint32_t u32Version);
822
823 static DECLCALLBACK(void) i_saveStateFileExec(PSSMHANDLE pSSM, void *pvUser);
824 static DECLCALLBACK(int) i_loadStateFileExec(PSSMHANDLE pSSM, void *pvUser, uint32_t uVersion, uint32_t uPass);
825
826#ifdef VBOX_WITH_GUEST_PROPS
827 static DECLCALLBACK(int) i_doGuestPropNotification(void *pvExtension, uint32_t, void *pvParms, uint32_t cbParms);
828 HRESULT i_doEnumerateGuestProperties(const Utf8Str &aPatterns,
829 std::vector<Utf8Str> &aNames,
830 std::vector<Utf8Str> &aValues,
831 std::vector<LONG64> &aTimestamps,
832 std::vector<Utf8Str> &aFlags);
833
834 void i_guestPropertiesHandleVMReset(void);
835 bool i_guestPropertiesVRDPEnabled(void);
836 void i_guestPropertiesVRDPUpdateLogon(uint32_t u32ClientId, const char *pszUser, const char *pszDomain);
837 void i_guestPropertiesVRDPUpdateActiveClient(uint32_t u32ClientId);
838 void i_guestPropertiesVRDPUpdateClientAttach(uint32_t u32ClientId, bool fAttached);
839 void i_guestPropertiesVRDPUpdateNameChange(uint32_t u32ClientId, const char *pszName);
840 void i_guestPropertiesVRDPUpdateIPAddrChange(uint32_t u32ClientId, const char *pszIPAddr);
841 void i_guestPropertiesVRDPUpdateLocationChange(uint32_t u32ClientId, const char *pszLocation);
842 void i_guestPropertiesVRDPUpdateOtherInfoChange(uint32_t u32ClientId, const char *pszOtherInfo);
843 void i_guestPropertiesVRDPUpdateDisconnect(uint32_t u32ClientId);
844#endif
845
846 bool i_isResetTurnedIntoPowerOff(void);
847
848 /** @name Disk encryption support
849 * @{ */
850 HRESULT i_consoleParseDiskEncryption(const char *psz, const char **ppszEnd);
851 HRESULT i_configureEncryptionForDisk(const char *pszUuid);
852 HRESULT i_clearDiskEncryptionKeysOnAllAttachments(void);
853 int i_consoleParseKeyValue(const char *psz, const char **ppszEnd,
854 char **ppszKey, char **ppszVal);
855 /** @} */
856
857 /** @name Teleporter support
858 * @{ */
859 static DECLCALLBACK(int) i_teleporterSrcThreadWrapper(RTTHREAD hThread, void *pvUser);
860 HRESULT i_teleporterSrc(TeleporterStateSrc *pState);
861 HRESULT i_teleporterSrcReadACK(TeleporterStateSrc *pState, const char *pszWhich, const char *pszNAckMsg = NULL);
862 HRESULT i_teleporterSrcSubmitCommand(TeleporterStateSrc *pState, const char *pszCommand, bool fWaitForAck = true);
863 HRESULT i_teleporterTrg(PUVM pUVM, IMachine *pMachine, Utf8Str *pErrorMsg, bool fStartPaused,
864 Progress *pProgress, bool *pfPowerOffOnFailure);
865 static DECLCALLBACK(int) i_teleporterTrgServeConnection(RTSOCKET Sock, void *pvUser);
866 /** @} */
867
868 bool mSavedStateDataLoaded : 1;
869
870 const ComPtr<IMachine> mMachine;
871 const ComPtr<IInternalMachineControl> mControl;
872
873 const ComPtr<IVRDEServer> mVRDEServer;
874
875 ConsoleVRDPServer * const mConsoleVRDPServer;
876 bool mfVRDEChangeInProcess;
877 bool mfVRDEChangePending;
878
879 const ComObjPtr<Guest> mGuest;
880 const ComObjPtr<Keyboard> mKeyboard;
881 const ComObjPtr<Mouse> mMouse;
882 const ComObjPtr<Display> mDisplay;
883 const ComObjPtr<MachineDebugger> mDebugger;
884 const ComObjPtr<VRDEServerInfo> mVRDEServerInfo;
885 /** This can safely be used without holding any locks.
886 * An AutoCaller suffices to prevent it being destroy while in use and
887 * internally there is a lock providing the necessary serialization. */
888 const ComObjPtr<EventSource> mEventSource;
889#ifdef VBOX_WITH_EXTPACK
890 const ComObjPtr<ExtPackManager> mptrExtPackManager;
891#endif
892 const ComObjPtr<EmulatedUSB> mEmulatedUSB;
893
894 USBDeviceList mUSBDevices;
895 RemoteUSBDeviceList mRemoteUSBDevices;
896
897 SharedFolderDataMap m_mapGlobalSharedFolders;
898 SharedFolderDataMap m_mapMachineSharedFolders;
899 SharedFolderMap m_mapSharedFolders; // the console instances
900
901 /** The user mode VM handle. */
902 PUVM mpUVM;
903 /** Holds the number of "readonly" mpUVM callers (users). */
904 uint32_t mVMCallers;
905 /** Semaphore posted when the number of mpUVM callers drops to zero. */
906 RTSEMEVENT mVMZeroCallersSem;
907 /** true when Console has entered the mpUVM destruction phase. */
908 bool mVMDestroying : 1;
909 /** true when power down is initiated by vmstateChangeCallback (EMT). */
910 bool mVMPoweredOff : 1;
911 /** true when vmstateChangeCallback shouldn't initiate a power down. */
912 bool mVMIsAlreadyPoweringOff : 1;
913 /** true if we already showed the snapshot folder size warning. */
914 bool mfSnapshotFolderSizeWarningShown : 1;
915 /** true if we already showed the snapshot folder ext4/xfs bug warning. */
916 bool mfSnapshotFolderExt4WarningShown : 1;
917 /** true if we already listed the disk type of the snapshot folder. */
918 bool mfSnapshotFolderDiskTypeShown : 1;
919 /** true if a USB controller is available (i.e. USB devices can be attached). */
920 bool mfVMHasUsbController : 1;
921 /** true if the VM power off was caused by reset. */
922 bool mfPowerOffCausedByReset : 1;
923
924 /** Pointer to the VMM -> User (that's us) callbacks. */
925 struct MYVMM2USERMETHODS : public VMM2USERMETHODS
926 {
927 Console *pConsole;
928 } *mpVmm2UserMethods;
929
930 /** The current network attachment type in the VM.
931 * This doesn't have to match the network attachment type maintained in the
932 * NetworkAdapter. This is needed to change the network attachment
933 * dynamically.
934 */
935 typedef std::vector<NetworkAttachmentType_T> NetworkAttachmentTypeVector;
936 NetworkAttachmentTypeVector meAttachmentType;
937
938 VMMDev * m_pVMMDev;
939#ifdef VBOX_WITH_PDM_AUDIO_DRIVER
940 AudioVRDE * const mAudioVRDE;
941#else
942 AudioSniffer * const mAudioSniffer;
943#endif
944 Nvram * const mNvram;
945#ifdef VBOX_WITH_USB_CARDREADER
946 UsbCardReader * const mUsbCardReader;
947#endif
948 BusAssignmentManager* mBusMgr;
949
950 enum
951 {
952 iLedFloppy = 0,
953 cLedFloppy = 2,
954 iLedIde = iLedFloppy + cLedFloppy,
955 cLedIde = 4,
956 iLedSata = iLedIde + cLedIde,
957 cLedSata = 30,
958 iLedScsi = iLedSata + cLedSata,
959 cLedScsi = 16,
960 iLedSas = iLedScsi + cLedScsi,
961 cLedSas = 8,
962 iLedUsb = iLedSas + cLedSas,
963 cLedUsb = 8,
964 cLedStorage = cLedFloppy + cLedIde + cLedSata + cLedScsi + cLedSas + cLedUsb
965 };
966 DeviceType_T maStorageDevType[cLedStorage];
967 PPDMLED mapStorageLeds[cLedStorage];
968 PPDMLED mapNetworkLeds[36]; /**< @todo adapt this to the maximum network card count */
969 PPDMLED mapSharedFolderLed;
970 PPDMLED mapUSBLed[2];
971 PPDMLED mapCrOglLed;
972
973 MediumAttachmentMap mapMediumAttachments;
974
975 /** List of attached USB storage devices. */
976 USBStorageDeviceList mUSBStorageDevices;
977
978 /** Map of secret keys used for disk encryption. */
979 SecretKeyMap m_mapSecretKeys;
980
981 /** Pointer to the key consumer -> provider (that's us) callbacks. */
982 struct MYPDMISECKEY : public PDMISECKEY
983 {
984 Console *pConsole;
985 } *mpIfSecKey;
986
987 /** Pointer to the key helpers -> provider (that's us) callbacks. */
988 struct MYPDMISECKEYHLP : public PDMISECKEYHLP
989 {
990 Console *pConsole;
991 } *mpIfSecKeyHlp;
992
993/* Note: FreeBSD needs this whether netflt is used or not. */
994#if ((defined(RT_OS_LINUX) && !defined(VBOX_WITH_NETFLT)) || defined(RT_OS_FREEBSD))
995 Utf8Str maTAPDeviceName[8];
996 RTFILE maTapFD[8];
997#endif
998
999 bool mVMStateChangeCallbackDisabled;
1000
1001 bool mfUseHostClipboard;
1002
1003 /** Local machine state value. */
1004 MachineState_T mMachineState;
1005
1006 /** Pointer to the progress object of a live cancelable task.
1007 *
1008 * This is currently only used by Console::Teleport(), but is intended to later
1009 * be used by the live snapshot code path as well. Actions like
1010 * Console::PowerDown, which automatically cancels out the running snapshot /
1011 * teleportation operation, will cancel the teleportation / live snapshot
1012 * operation before starting. */
1013 ComObjPtr<Progress> mptrCancelableProgress;
1014
1015 ComPtr<IEventListener> mVmListener;
1016
1017 friend struct VMTask;
1018};
1019
1020#endif // !____H_CONSOLEIMPL
1021/* vi: set tabstop=4 shiftwidth=4 expandtab: */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette