RemoteUSBBackend.h revision 677833bc953b6cb418c701facbdcf4aa18d6c44e
/** @file
*
* VirtualBox Remote USB backend
*/
/*
* 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_REMOTEUSBBACKEND
#define ____H_REMOTEUSBBACKEND
#include "RemoteUSBDeviceImpl.h"
typedef enum
{
RDLIdle = 0,
} RDLState;
#ifdef VRDP_MC
/* How many remote devices can be attached to a remote client.
* Normally a client computer has 2-8 physical USB ports, so 16 devices
* should be usually enough.
*/
#define VRDP_MAX_USB_DEVICES_PER_CLIENT (16)
{
};
#endif /* VRDP_MC */
#ifdef VRDP_MC
#else
#endif /* VRDP_MC */
{
#ifdef VRDP_MC
~RemoteUSBBackend();
void AddRef (void);
void Release (void);
void NotifyDelete (void);
void PollRemoteDevices (void);
#else
~RemoteUSBBackend();
void ReleaseUSB (void);
#endif /* VRDP_MC */
public: /* Functions for internal use. */
#ifdef VRDP_MC
bool pollingEnabledURB (void) { return mfPollURB; }
void request (void);
void release (void);
#else
bool pollingEnabledURB (void) { return mfPollURB; };
void notifyThreadFinished (void);
bool threadEnabled (void);
bool continueThread (void);
bool needRDL (void);
void notifyRDLSent (void);
bool processRDL (void);
void request (void);
void release (void);
#endif /* VRDP_MC */
#ifndef VRDP_MC
void initMembers (void);
#endif /* !VRDP_MC */
#ifdef VRDP_MC
int cRefs;
bool mfHasDeviceList;
void *mpvDeviceList;
typedef enum {
bool mfPollURB;
bool mfWillBeDeleted;
#else
bool mfThreadActive;
bool mfThreadEnabled;
bool mfTerminateThread;
void *mpvDeviceList;
bool mfPollURB;
#endif /* VRDP_MC */
};
#endif /* ____H_REMOTEUSBBACKEND */