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