ConsoleVRDPServer.h revision dd27007552cf908dc60cc544981d059beaedfab6
/** @file
*
* VBox Console VRDP Helper class and implementation of IRemoteDisplayInfo
*/
/*
* Copyright (C) 2006 InnoTek Systemberatung GmbH
*
* 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 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.
*
* If you received this file as part of a commercial VirtualBox
* distribution, then only the terms of your commercial VirtualBox
* license agreement apply instead of the previous paragraph.
*/
#ifndef ____H_CONSOLEVRDPSERVER
#define ____H_CONSOLEVRDPSERVER
#include "RemoteUSBBackend.h"
#include <VBox/VRDPAuth.h>
// ConsoleVRDPServer
///////////////////////////////////////////////////////////////////////////////
/* Member of Console. Helper class for VRDP server management. Not a COM class. */
{
~ConsoleVRDPServer ();
int Launch (void);
void SetCallback (void);
void Stop (void);
#ifdef VRDP_MC
/* Private interface for the RemoteUSBBackend destructor. */
/* Private methods for the Remote USB thread. */
bool isRemoteUSBThreadRunning (void);
void waitRemoteUSBThreadEvent (unsigned cMillies);
#else
void DeleteUSBBackend (void);
void *GetUSBBackendPointer (void);
#endif /* VRDP_MC */
/*
* Forwarders to VRDP server library.
*/
void SendResize (void) const;
#ifdef VRDP_MC
#else
#endif /* VRDP_MC */
/* Note: This is not a ComObjPtr here, because the ConsoleVRDPServer object
* is actually just a part of the Console.
*/
#ifdef VBOX_VRDP
static bool loadVRDPLibrary (void);
/** Static because will never load this more than once! */
static RTLDRMOD mVRDPLibrary;
// VRDP API function pointers
static int (VBOXCALL *mpfnVRDPStartServer) (IConsole *pConsole, IVRDPServer *pVRDPServer, HVRDPSERVER *phServer);
static int (VBOXCALL *mpfnVRDPSetFramebuffer) (HVRDPSERVER hServer, IFramebuffer *pFramebuffer, uint32_t fFlags);
static void (VBOXCALL *mpfnVRDPSetCallback) (HVRDPSERVER hServer, VRDPSERVERCALLBACK *pcallback, void *pvUser);
static void (VBOXCALL *mpfnVRDPSendUpdateBitmap)(HVRDPSERVER hServer, unsigned x, unsigned y, unsigned w, unsigned h);
static void (VBOXCALL *mpfnVRDPSendAudioSamples)(HVRDPSERVER hserver, void *pvSamples, uint32_t cSamples, VRDPAUDIOFORMAT format);
static void (VBOXCALL *mpfnVRDPSendAudioVolume) (HVRDPSERVER hserver, uint16_t left, uint16_t right);
#ifdef VRDP_MC
static void (VBOXCALL *mpfnVRDPSendUSBRequest) (HVRDPSERVER hserver, uint32_t u32ClientId, void *pvParms, uint32_t cbParms);
#else
static void (VBOXCALL *mpfnVRDPSendUSBRequest) (HVRDPSERVER hserver, void *pvParms, uint32_t cbParms);
#endif /* VRDP_MC */
static void (VBOXCALL *mpfnVRDPSendUpdate) (HVRDPSERVER hServer, void *pvUpdate, uint32_t cbUpdate);
static void (VBOXCALL *mpfnVRDPQueryInfo) (HVRDPSERVER hserver, uint32_t index, void *pvBuffer, uint32_t cbBuffer, uint32_t *pcbOut);
static void (VBOXCALL *mpfnVRDPClipboard) (HVRDPSERVER hserver, uint32_t u32Function, uint32_t u32Format, const void *pvData, uint32_t cbData);
#endif
#ifdef VRDP_MC
int lockConsoleVRDPServer (void);
void unlockConsoleVRDPServer (void);
int mcClipboardRefs;
void *mpvClipboardData;
volatile uint32_t mfu32ClipboardWaitData;
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 */
#else
#ifdef VBOX_WITH_USB
/* The remote USB backend object is created only if the client
* asks for USB channel. The object is created in the vrdp_InterceptUSB
* callback.
*/
#endif /* VBOX_WITH_USB */
#endif /* VRDP_MC */
/* 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();
/* IRemoteDisplayInfo properties */
/* For VirtualBoxSupportErrorInfoImpl. */
};
#endif // ____H_CONSOLEVRDPSERVER