ConsoleImpl.h revision f244f3b6136a2c0642e68a3dce252362c08e2437
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync * VBox Console COM Class definition
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync * Copyright (C) 2006-2007 innotek GmbH
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync * available from http://www.virtualbox.org. This file is free software;
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync * you can redistribute it and/or modify it under the terms of the GNU
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync * General Public License (GPL) as published by the Free Software
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync///////////////////////////////////////////////////////////////////////////////
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync * Checks the availability of the underlying VM device driver corresponding
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync * to the COM interface (IKeyboard, IMouse, IDisplay, etc.). When the driver is
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync * not available (NULL), sets error info and returns returns E_ACCESSDENIED.
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync * The translatable error message is defined in null context.
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync * Intended to used only within Console children (i,e. Keyboard, Mouse,
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync * Display, etc.).
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync * @param drv driver pointer to check (compare it with NULL)
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync return setError (E_ACCESSDENIED, tr ("The console is not powered up")); \
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync } while (0)
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync/** @def VBOX_WITH_UNIXY_TAP_NETWORKING
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync * Unixy style TAP networking. This is defined in the Makefile since it's also
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync///////////////////////////////////////////////////////////////////////////////
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync/** IConsole implementation class */
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync public VirtualBoxSupportErrorInfoImpl <Console, IConsole>,
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync // public initializers/uninitializers for internal purposes only
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync HRESULT init (IMachine *aMachine, IInternalMachineControl *aControl);
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync // IConsole properties
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync STDMETHOD(COMGETTER(Machine)) (IMachine **aMachine);
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync STDMETHOD(COMGETTER(State)) (MachineState_T *aMachineState);
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync STDMETHOD(COMGETTER(Keyboard)) (IKeyboard **aKeyboard);
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync STDMETHOD(COMGETTER(Display)) (IDisplay **aDisplay);
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync STDMETHOD(COMGETTER(Debugger)) (IMachineDebugger **aDebugger);
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync STDMETHOD(COMGETTER(USBDevices)) (IUSBDeviceCollection **aUSBDevices);
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync STDMETHOD(COMGETTER(RemoteUSBDevices)) (IHostUSBDeviceCollection **aRemoteUSBDevices);
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync STDMETHOD(COMGETTER(RemoteDisplayInfo)) (IRemoteDisplayInfo **aRemoteDisplayInfo);
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync STDMETHOD(COMGETTER(SharedFolders)) (ISharedFolderCollection **aSharedFolders);
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync // IConsole methods
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync STDMETHOD(AdoptSavedState) (INPTR BSTR aSavedStateFile);
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync STDMETHOD(GetDeviceActivity) (DeviceType_T aDeviceType,
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync STDMETHOD(DetachUSBDevice) (INPTR GUIDPARAM aId, IUSBDevice **aDevice);
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync STDMETHOD(CreateSharedFolder) (INPTR BSTR aName, INPTR BSTR aHostPath, BOOL aWritable);
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync STDMETHOD(TakeSnapshot) (INPTR BSTR aName, INPTR BSTR aDescription,
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync STDMETHOD(DiscardSnapshot) (INPTR GUIDPARAM aId, IProgress **aProgress);
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync STDMETHOD(DiscardCurrentState) (IProgress **aProgress);
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync STDMETHOD(DiscardCurrentSnapshotAndState) (IProgress **aProgress);
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync STDMETHOD(RegisterCallback) (IConsoleCallback *aCallback);
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync STDMETHOD(UnregisterCallback)(IConsoleCallback *aCallback);
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync // public methods for internal purposes only
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync * Note: the following methods do not increase refcount. intended to be
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync * called only by the VM execution thread.
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync MachineDebugger *getMachineDebugger() { return mDebugger; }
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync const ComPtr <IMachine> &machine() { return mMachine; }
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync /** Method is called only from ConsoleVRDPServer */
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync IVRDPServer *getVRDPServer() { return mVRDPServer; }
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync ConsoleVRDPServer *consoleVRDPServer() { return mConsoleVRDPServer; }
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync HRESULT updateMachineState (MachineState_T aMachineState);
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync // events from IInternalSessionControl
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync HRESULT onNetworkAdapterChange (INetworkAdapter *aNetworkAdapter);
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync HRESULT onSerialPortChange (ISerialPort *aSerialPort);
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync HRESULT onParallelPortChange (IParallelPort *aParallelPort);
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync HRESULT onUSBDeviceAttach (IUSBDevice *aDevice, IVirtualBoxErrorInfo *aError, ULONG aMaskedIfs);
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync HRESULT onUSBDeviceDetach (INPTR GUIDPARAM aId, IVirtualBoxErrorInfo *aError);
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync AudioSniffer *getAudioSniffer () { return mAudioSniffer; }
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync int VRDPClientLogon (uint32_t u32ClientId, const char *pszUser, const char *pszPassword, const char *pszDomain);
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync void VRDPClientDisconnect (uint32_t u32ClientId, uint32_t fu32Intercepted);
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync void VRDPInterceptUSB (uint32_t u32ClientId, void **ppvIntercept);
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync void VRDPInterceptClipboard (uint32_t u32ClientId);
1d7eb4842eb34752cbc8655fc26097b97806314dvboxsync void processRemoteUSBDevices (uint32_t u32ClientId, VRDPUSBDEVICEDESC *pDevList, uint32_t cbDevList);
void *pShape);
void onAdditionsStateChange();
void onAdditionsOutdated();
setError (E_FAIL, tr("Could not load the external authentication library '%s' (%Vrc)"), filename, rc);
void release()
void add()
SharedFolderData() {}
void releaseVMCaller();
bool aSetError = false);
bool fPassthrough);
#ifdef VBOX_WITH_USB
static DECLCALLBACK(int)
static DECLCALLBACK(int)
static DECLCALLBACK (int)
static DECLCALLBACK(void)
static DECLCALLBACK(void)
const char *pszErrorID,
static DECLCALLBACK(void *) drvStatus_QueryInterface(PPDMIBASE pInterface, PDMINTERFACE enmInterface);
int mcAudioRefs;
static const char *sSSMConsoleUnit;
bool valid;
bool visible;
bool alpha;
mpsc;
bool valid;
mcc;
bool valid;
bool numLock;
bool capsLock;
bool scrollLock;
klc;