ConsoleVRDPServer.h revision cc74f15083bf80fbc96723a89faa06c15d0dead8
/* $Id$ */
/** @file
*
* VBox Console VRDE Server Helper class and implementation of IVRDEServerInfo
*/
/*
* Copyright (C) 2006-2010 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
#ifndef ____H_CONSOLEVRDPSERVER
#define ____H_CONSOLEVRDPSERVER
#include "RemoteUSBBackend.h"
#include <VBox/VRDPAuth.h>
#include "SchemaDefs.h"
// ConsoleVRDPServer
///////////////////////////////////////////////////////////////////////////////
typedef struct _VRDPInputSynch
{
bool fGuestNumLock;
bool fGuestCapsLock;
bool fGuestScrollLock;
bool fClientNumLock;
bool fClientCapsLock;
bool fClientScrollLock;
/* Member of Console. Helper class for VRDP server management. Not a COM class. */
{
~ConsoleVRDPServer ();
int Launch (void);
void NotifyAbsoluteMouse (bool fGuestWantsAbsolute)
{
}
{
/* Might need to resync in case the guest itself changed the LED status. */
{
}
{
}
}
void EnableConnections (void);
void MousePointerHide (void);
void Stop (void);
/* Private interface for the RemoteUSBBackend destructor. */
/* Private methods for the Remote USB thread. */
bool isRemoteUSBThreadRunning (void);
/*
* Forwarders to VRDP server library.
*/
void SendResize (void) const;
/* Note: This is not a ComObjPtr here, because the ConsoleVRDPServer object
* is actually just a part of the Console.
*/
static int loadVRDPLibrary (const char *pszLibraryName);
/** Static because will never load this more than once! */
static RTLDRMOD mVRDPLibrary;
static VRDEENTRYPOINTS_1 *mpEntryPoints;
static VRDECALLBACKS_1 mCallbacks;
static DECLCALLBACK(int) VRDPCallbackQueryProperty (void *pvCallback, uint32_t index, void *pvBuffer, uint32_t cbBuffer, uint32_t *pcbOut);
static DECLCALLBACK(int) VRDPCallbackClientLogon (void *pvCallback, uint32_t u32ClientId, const char *pszUser, const char *pszPassword, const char *pszDomain);
static DECLCALLBACK(void) VRDPCallbackClientDisconnect (void *pvCallback, uint32_t u32ClientId, uint32_t fu32Intercepted);
static DECLCALLBACK(int) VRDPCallbackIntercept (void *pvCallback, uint32_t u32ClientId, uint32_t fu32Intercept, void **ppvIntercept);
static DECLCALLBACK(int) VRDPCallbackUSB (void *pvCallback, void *pvIntercept, uint32_t u32ClientId, uint8_t u8Code, const void *pvRet, uint32_t cbRet);
static DECLCALLBACK(int) VRDPCallbackClipboard (void *pvCallback, void *pvIntercept, uint32_t u32ClientId, uint32_t u32Function, uint32_t u32Format, const void *pvData, uint32_t cbData);
static DECLCALLBACK(bool) VRDPCallbackFramebufferQuery (void *pvCallback, unsigned uScreenId, VRDEFRAMEBUFFERINFO *pInfo);
static DECLCALLBACK(void) VRDPCallbackInput (void *pvCallback, int type, const void *pvInput, unsigned cbInput);
static DECLCALLBACK(void) VRDPCallbackVideoModeHint (void *pvCallback, unsigned cWidth, unsigned cHeight, unsigned cBitsPerPixel, unsigned uScreenId);
bool m_fGuestWantsAbsolute;
int m_mousex;
int m_mousey;
int lockConsoleVRDPServer (void);
void unlockConsoleVRDPServer (void);
int mcClipboardRefs;
static DECLCALLBACK(int) ClipboardCallback (void *pvCallback, uint32_t u32ClientId, uint32_t u32Function, uint32_t u32Format, const void *pvData, uint32_t cbData);
static DECLCALLBACK(int) ClipboardServiceExtension (void *pvExtension, uint32_t u32Function, void *pvParm, uint32_t cbParms);
#ifdef VBOX_WITH_USB
typedef struct _USBBackends
{
bool fThreadRunning;
} USBBackends;
void remoteUSBThreadStart (void);
void remoteUSBThreadStop (void);
#endif /* VBOX_WITH_USB */
/* External authentication library handle. The library is loaded in the
* Authenticate method and unloaded at the object destructor.
*/
};
{
void FinalRelease();
/* Public initializer/uninitializer for internal purposes only. */
void uninit();
/* IVRDEServerInfo properties */
};
#endif // ____H_CONSOLEVRDPSERVER
/* vi: set tabstop=4 shiftwidth=4 expandtab: */