Logo Search packages:      
Sourcecode: virtualbox-ose version File versions

Console Class Reference

#include <ConsoleImpl.h>

Inheritance diagram for Console:

VirtualBoxBaseWithChildrenNEXT VirtualBoxSupportErrorInfoImpl< Console, IConsole > VirtualBoxSupportTranslation< Console > VirtualBoxBaseNEXT VirtualBoxSupportErrorInfoImplBase VirtualBoxSupportTranslationBase VirtualBoxBase VirtualBoxBaseProto util::Lockable

List of all members.


Detailed Description

IConsole implementation class

Definition at line 102 of file ConsoleImpl.h.


Public Types

typedef AutoCallerBase< false > AutoCaller
typedef AutoCallerBase< true > AutoLimitedCaller
typedef SafeVMPtrBase< false > SafeVMPtr
typedef SafeVMPtrBase< true > SafeVMPtrQuiet
typedef std::map< Bstr,
SharedFolderData > 
SharedFolderDataMap
typedef std::map< Bstr,
ComObjPtr< SharedFolder > > 
SharedFolderMap
enum  State {
  NotReady, Ready, InInit, InUninit,
  InitFailed, Limited, MayUninit, WillUninit
}

Public Member Functions

virtual HRESULT addCaller (State *aState=NULL, bool aLimited=false)
template<class C>
void addDependentChild (const ComObjPtr< C > &aChild)
template<class C>
void addDependentChild (C *aChild)
HRESULT addLimitedCaller (State *aState=NULL)
STDMETHOD() AdoptSavedState (IN_BSTR aSavedStateFile)
STDMETHOD() AttachUSBDevice (IN_GUID aId)
virtual RWLockHandlechildrenLock ()
ConsoleVRDPServer * consoleVRDPServer () const
STDMETHOD() CreateSharedFolder (IN_BSTR aName, IN_BSTR aHostPath, BOOL aWritable)
STDMETHOD() DetachUSBDevice (IN_GUID aId, IUSBDevice **aDevice)
STDMETHOD() DiscardCurrentSnapshotAndState (IProgress **aProgress)
STDMETHOD() DiscardCurrentState (IProgress **aProgress)
STDMETHOD() DiscardSavedState ()
STDMETHOD() DiscardSnapshot (IN_GUID aId, IProgress **aProgress)
HRESULT enumerateGuestProperties (IN_BSTR aPatterns, ComSafeArrayOut(BSTR, aNames), ComSafeArrayOut(BSTR, aValues), ComSafeArrayOut(ULONG64, aTimestamps), ComSafeArrayOut(BSTR, aFlags))
virtual void eventQuit ()=0
virtual CONEVENT eventWait ()=0
HRESULT FinalConstruct ()
void FinalRelease ()
AudioSniffer * getAudioSniffer ()
STDMETHOD() GetDeviceActivity (DeviceType_T aDeviceType, DeviceActivity_T *aDeviceActivity)
Display * getDisplay () const
Guest * getGuest () const
STDMETHOD() GetGuestEnteredACPIMode (BOOL *aEntered)
HRESULT getGuestProperty (IN_BSTR aKey, BSTR *aValue, ULONG64 *aTimestamp, BSTR *aFlags)
Keyboard * getKeyboard () const
MachineDebugger * getMachineDebugger () const
Mouse * getMouse () const
STDMETHOD() GetPowerButtonHandled (BOOL *aHandled)
VMMDev * getVMMDev ()
IVRDPServer * getVRDPServer () const
HRESULT init (IMachine *aMachine, IInternalMachineControl *aControl)
bool initialized ()
virtual bool inputGrabbed ()
virtual void inputGrabEnd ()=0
virtual void inputGrabStart ()=0
STDMETHOD() InterfaceSupportsErrorInfo (REFIID riid)
bool isLockedOnCurrentThread ()
bool isWriteLockOnCurrentThread ()
virtual RWLockHandlelockHandle () const
const ComPtr< IMachine > & machine () const
virtual void mouseSendEvent (int dz)=0
void onAdditionsOutdated ()
void onAdditionsStateChange ()
HRESULT onDVDDriveChange ()
HRESULT onFloppyDriveChange ()
void onKeyboardLedsChange (bool fNumLock, bool fCapsLock, bool fScrollLock)
void onMouseCapabilityChange (BOOL supportsAbsolute, BOOL needsHostCursor)
void onMousePointerShapeChange (bool fVisible, bool fAlpha, uint32_t xHot, uint32_t yHot, uint32_t width, uint32_t height, void *pShape)
virtual void onMousePointerShapeChange (bool fVisible, bool fAlpha, uint32_t xHot, uint32_t yHot, uint32_t width, uint32_t height, void *pShape)=0
HRESULT onNetworkAdapterChange (INetworkAdapter *aNetworkAdapter)
HRESULT onParallelPortChange (IParallelPort *aParallelPort)
void onRuntimeError (BOOL aFatal, IN_BSTR aErrorID, IN_BSTR aMessage)
HRESULT onSerialPortChange (ISerialPort *aSerialPort)
HRESULT onSharedFolderChange (BOOL aGlobal)
HRESULT onShowWindow (BOOL aCheck, BOOL *aCanShow, ULONG64 *aWinId)
void onStateChange (MachineState_T aMachineState)
HRESULT onUSBControllerChange ()
HRESULT onUSBDeviceAttach (IUSBDevice *aDevice, IVirtualBoxErrorInfo *aError, ULONG aMaskedIfs)
HRESULT onUSBDeviceDetach (IN_GUID aId, IVirtualBoxErrorInfo *aError)
void onUSBDeviceStateChange (IUSBDevice *aDevice, bool aAttached, IVirtualBoxErrorInfo *aError)
HRESULT onVRDPServerChange ()
STDMETHOD() Pause ()
STDMETHOD() PowerButton ()
STDMETHOD() PowerDown ()
STDMETHOD() PowerDownAsync (IProgress **aProgress)
STDMETHOD() PowerUp (IProgress **aProgress)
STDMETHOD() PowerUpPaused (IProgress **aProgress)
void processRemoteUSBDevices (uint32_t u32ClientId, VRDPUSBDEVICEDESC *pDevList, uint32_t cbDevList)
virtual void progressInfo (PVM pVM, unsigned uPercent, void *pvUser)=0
STDMETHOD() RegisterCallback (IConsoleCallback *aCallback)
virtual void releaseCaller ()
template<class C>
void removeDependentChild (const ComObjPtr< C > &aChild)
template<class C>
void removeDependentChild (C *aChild)
STDMETHOD() RemoveSharedFolder (IN_BSTR aName)
void reportAuthLibraryError (const char *filename, int rc)
STDMETHOD() Reset ()
virtual void resetCursor ()
virtual void resetKeys (void)=0
STDMETHOD() Resume ()
LockOps * rlock ()
STDMETHOD() SaveState (IProgress **aProgress)
HRESULT setGuestProperty (IN_BSTR aKey, IN_BSTR aValue, IN_BSTR aFlags)
STDMETHOD() SleepButton ()
 STDMETHOD (COMGETTER(SharedFolders))(ISharedFolderCollection **aSharedFolders)
 STDMETHOD (COMGETTER(RemoteDisplayInfo))(IRemoteDisplayInfo **aRemoteDisplayInfo)
 STDMETHOD (COMGETTER(RemoteUSBDevices))(IHostUSBDeviceCollection **aRemoteUSBDevices)
 STDMETHOD (COMGETTER(USBDevices))(IUSBDeviceCollection **aUSBDevices)
 STDMETHOD (COMGETTER(Debugger))(IMachineDebugger **aDebugger)
 STDMETHOD (COMGETTER(Display))(IDisplay **aDisplay)
 STDMETHOD (COMGETTER(Mouse))(IMouse **aMouse)
 STDMETHOD (COMGETTER(Keyboard))(IKeyboard **aKeyboard)
 STDMETHOD (COMGETTER(Guest))(IGuest **aGuest)
 STDMETHOD (COMGETTER(State))(MachineState_T *aMachineState)
 STDMETHOD (COMGETTER(Machine))(IMachine **aMachine)
STDMETHOD() TakeSnapshot (IN_BSTR aName, IN_BSTR aDescription, IProgress **aProgress)
void uninit ()
STDMETHOD() UnregisterCallback (IConsoleCallback *aCallback)
HRESULT updateMachineState (MachineState_T aMachineState)
virtual void updateTitlebar ()=0
virtual void updateTitlebarProgress (const char *pszStr, int iPercent)=0
void VRDPClientConnect (uint32_t u32ClientId)
void VRDPClientDisconnect (uint32_t u32ClientId, uint32_t fu32Intercepted)
int VRDPClientLogon (uint32_t u32ClientId, const char *pszUser, const char *pszPassword, const char *pszDomain)
void VRDPInterceptAudio (uint32_t u32ClientId)
void VRDPInterceptClipboard (uint32_t u32ClientId)
void VRDPInterceptUSB (uint32_t u32ClientId, void **ppvIntercept)
LockOps * wlock ()

Static Public Member Functions

static const wchar_t * getComponentName ()
static const char * tr (const char *aSourceText, const char *aComment=NULL)
static const char * translate (const char *context, const char *sourceText, const char *comment=0)
static const char * translate (const char *context, const char *sourceText, const char *comment=0)

Static Public Attributes

static const PDMDRVREG DrvStatusReg

Protected Member Functions

VirtualBoxBaseNEXTgetDependentChild (const ComPtr< IUnknown > &aUnk)
WriteLockHandlestateLockHandle ()
void uninitDependentChildren ()

Static Protected Member Functions

static const char * className ()
static bool cutClassNameFrom__PRETTY_FUNCTION__ (char *aPrettyFunctionName)
static HRESULT setError (HRESULT aResultCode, const GUID &aIID, const Bstr &aComponent, const char *aText, va_list aArgs, bool aLogIt=true)
static HRESULT setError (HRESULT aResultCode, const GUID &aIID, const Bstr &aComponent, const Bstr &aText, bool aLogIt=true)
static HRESULT setError (HRESULT aResultCode, const GUID &aIID, const char *aText,...)
static HRESULT setError (HRESULT aResultCode, const char *aText,...)
static HRESULT setError (HRESULT aResultCode, const GUID &aIID, const wchar_t *aComponent, const char *aText,...)
static HRESULT setErrorBstr (HRESULT aResultCode, const Bstr &aText)
static HRESULT setErrorNoLog (HRESULT aResultCode, const char *aText,...)
static HRESULT setErrorV (HRESULT aResultCode, const char *aText, va_list aArgs)
static HRESULT setWarning (HRESULT aResultCode, const GUID &aIID, const Bstr &aComponent, const char *aText, va_list aArgs)
static HRESULT setWarning (HRESULT aResultCode, const GUID &aIID, const Bstr &aComponent, const Bstr &aText)
static HRESULT setWarning (HRESULT aResultCode, const GUID &aIID, const char *aText,...)
static HRESULT setWarning (HRESULT aResultCode, const char *aText,...)
static HRESULT setWarning (HRESULT aResultCode, const GUID &aIID, const wchar_t *aComponent, const char *aText,...)
static HRESULT setWarningBstr (HRESULT aResultCode, const Bstr &aText)
static HRESULT setWarningV (HRESULT aResultCode, const char *aText, va_list aArgs)

Protected Attributes

HKEYSTATE enmHKeyState
bool mfInitialized
bool mfInputGrab

Private Types

typedef AutoVMCallerBase
< false, false > 
AutoVMCaller
typedef AutoVMCallerBase< true,
false > 
AutoVMCallerQuiet
typedef AutoVMCallerBase< true,
true > 
AutoVMCallerQuietWeak
typedef AutoVMCallerBase
< false, true > 
AutoVMCallerWeak
typedef std::list< ComPtr
< IConsoleCallback > > 
CallbackList
typedef std::list< ComObjPtr
< RemoteUSBDevice > > 
RemoteUSBDeviceList
typedef std::list< ComObjPtr
< OUSBDevice > > 
USBDeviceList

Private Member Functions

HRESULT addVMCaller (bool aQuiet=false, bool aAllowNullVM=false)
HRESULT attachToHostInterface (INetworkAdapter *networkAdapter)
HRESULT callTapSetupApplication (bool isStatic, RTFILE tapFD, Bstr &tapDevice, Bstr &tapSetupApplication)
HRESULT captureUSBDevices (PVM pVM)
HRESULT consoleInitReleaseLog (const ComPtr< IMachine > aMachine)
HRESULT createSharedFolder (CBSTR aName, SharedFolderData aData)
void detachAllUSBDevices (bool aDone)
HRESULT detachFromHostInterface (INetworkAdapter *networkAdapter)
HRESULT doDriveChange (const char *pszDevice, unsigned uInstance, unsigned uLun, DriveState_T eState, DriveState_T *peState, const char *pszPath, bool fPassthrough)
HRESULT fetchSharedFolders (BOOL aGlobal)
bool findOtherSharedFolder (IN_BSTR aName, SharedFolderDataMap::const_iterator &aIt)
HRESULT findSharedFolder (CBSTR aName, ComObjPtr< SharedFolder > &aSharedFolder, bool aSetError=false)
HRESULT loadDataFromSavedState ()
HRESULT powerDown (Progress *aProgress=NULL)
HRESULT powerDownHostInterfaces ()
HRESULT powerUp (IProgress **aProgress, bool aPaused)
void releaseVMCaller ()
HRESULT removeSharedFolder (CBSTR aName)
HRESULT setMachineState (MachineState_T aMachineState, bool aUpdateServer=true)
HRESULT setMachineStateLocally (MachineState_T aMachineState)

Static Private Member Functions

static DECLCALLBACK (int) loadStateFileExec(PSSMHANDLE pSSM
static DECLCALLBACK (void) saveStateFileExec(PSSMHANDLE pSSM
static DECLCALLBACK (int) drvStatus_Construct(PPDMDRVINS pDrvIns
static DECLCALLBACK (void) drvStatus_Destruct(PPDMDRVINS pDrvIns)
static DECLCALLBACK (void) drvStatus_UnitChanged(PPDMILEDCONNECTORS pInterface
static DECLCALLBACK (void *) drvStatus_QueryInterface(PPDMIBASE pInterface
static DECLCALLBACK (int) powerDownThread(RTTHREAD Thread
static DECLCALLBACK (int) saveStateThread(RTTHREAD Thread
static DECLCALLBACK (int) powerUpThread(RTTHREAD Thread
static DECLCALLBACK (void) setVMRuntimeErrorCallback(PVM pVM
static DECLCALLBACK (void) setVMErrorCallback(PVM pVM
static DECLCALLBACK (int) stateProgressCallback(PVM pVM
static DECLCALLBACK (int) changeDrive(Console *pThis
static DECLCALLBACK (void) vmstateChangeCallback(PVM aVM
static DECLCALLBACK (int) configConstructor(PVM pVM

Private Attributes

static VMSTATE VMSTATE aOldState
static void bool const char
const char va_list 
args
static void int const char va_list args
static VMSTATE aState
static VMSTATE VMSTATE void * aUser
static PDMINTERFACE enmInterface
static const char unsigned
unsigned DriveState_T 
eState
static void bool fFatal
static const char unsigned
unsigned DriveState_T
DriveState_T const char bool 
fPassthrough
static unsigned iLUN
PPDMLED mapFDLeds [2]
PPDMLED mapIDELeds [4]
PPDMLED mapNetworkLeds [8]
PPDMLED mapSATALeds [30]
PPDMLED mapSharedFolderLed
PPDMLED mapUSBLed [2]
AudioSniffer *const mAudioSniffer
struct {
   struct {
      bool   capsLock
      bool   numLock
      bool   scrollLock
      bool   valid
   }   klc
   struct {
      BOOL   needsHostCursor
      BOOL   supportsAbsolute
      bool   valid
   }   mcc
   struct {
      bool   alpha
      uint32_t   height
      BYTE *   shape
      size_t   shapeSize
      bool   valid
      bool   visible
      uint32_t   width
      uint32_t   xHot
      uint32_t   yHot
   }   mpsc
mCallbackData
CallbackList mCallbacks
int mcAudioRefs
ConsoleVRDPServer *const mConsoleVRDPServer
const ComPtr
< IInternalMachineControl > 
mControl
volatile uint32_t mcVRDPClients
const ComObjPtr< MachineDebugger > mDebugger
const ComObjPtr< Display > mDisplay
const ComPtr< IDVDDrive > mDVDDrive
DriveState_T meDVDState
DriveState_T meFloppyState
const ComPtr< IFloppyDrive > mFloppyDrive
SharedFolderDataMap mGlobalSharedFolders
const ComObjPtr< Guest > mGuest
const ComObjPtr< Keyboard > mKeyboard
const ComPtr< IMachine > mMachine
SharedFolderDataMap mMachineSharedFolders
MachineState_T mMachineState
const ComObjPtr< Mouse > mMouse
PVM mpVM
const ComObjPtr
< RemoteDisplayInfo > 
mRemoteDisplayInfo
RemoteUSBDeviceList mRemoteUSBDevices
bool mSavedStateDataLoaded: 1
SharedFolderMap mSharedFolders
uint32_t mu32SingleRDPClientId
USBDeviceList mUSBDevices
uint32_t mVMCallers
bool mVMDestroying: 1
VMMDev *const mVMMDev
bool mVMPoweredOff: 1
bool mVMStateChangeCallbackDisabled
RTSEMEVENT mVMZeroCallersSem
const ComPtr< IVRDPServer > mVRDPServer
static PCFGMNODE pCfgHandle
static const char unsigned
unsigned DriveState_T
DriveState_T * 
peState
static const char * pszDevice
static void bool const char * pszErrorID
static void bool const char
const char * 
pszFormat
static void int const char * pszFormat
static const char unsigned
unsigned DriveState_T
DriveState_T const char * 
pszPath
static void * pvConsole
static void * pvUser
static unsigned void * pvUser
static void int rc
static void int RT_SRC_POS_DECL
static void uint32_t u32Version
static const char unsigned uInstance
static const char unsigned unsigned uLun
static unsigned uPercent

Static Private Attributes

static const char * sSSMConsoleUnit = "ConsoleData"
static uint32_t sSSMConsoleVer = 0x00010001

Friends

struct VMTask

Classes

class  AutoVMCallerBase
class  SafeVMPtrBase
class  SharedFolderData

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index