vrdpusb.h revision e64031e20c39650a7bc902a3e1aba613b9415dee
/** @file
*
*/
/*
* Copyright (C) 2006-2007 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 __VRDPUSB__H
#define __VRDPUSB__H
#include <endian.h>
#include <byteswap.h>
#ifndef cpu_to_le16
#if __BYTE_ORDER == __LITTLE_ENDIAN
#else
#endif
#endif /* cpu_to_le16 */
//#include <asm/byteorder.h>
//#define cpu_to_le16 __cpu_to_le16
#define uint64_t long long
#define bool int
#define false 0
#define true 1
#define OPSTATIC
#ifdef RDPUSB_DEBUG
#else
#define LogFlow(a) do {} while (0)
#define Log(a) do {} while (0)
#define Log2(a) do {} while (0)
#endif
/* Runtime wrappers. */
#define RTMemAlloc xmalloc
#define RTMemRealloc xrealloc
#define _1K 1024
#define VINF_SUCCESS 0
#define VERR_NO_MEMORY (-8)
#define VERR_NOT_SUPPORTED (-37)
#define VERR_ACCESS_DENIED (-38)
#define VERR_VUSB_USBFS_PERMISSION (-2005)
#define RTFILE int
#define RTCRITSECT void *
if (!(_expr)) \
{ \
} \
} while (0)
#define AssertMsgFailed(_msg) do { \
Log(("Assertion failed msg:!!!\n")); \
} while (0)
if (!(_expr)) \
{ \
return (_retval); \
} \
} while (0)
{
return VINF_SUCCESS;
}
{
return VINF_SUCCESS;
}
{
return VINF_SUCCESS;
}
{
return VINF_SUCCESS;
}
{
if (p)
{
}
return p;
}
{
void *p = RTMemAlloc (cb);
if (p)
{
}
return p;
}
static inline int RTStrToUInt32Ex (const char *pszValue, char **ppszNext, unsigned uBase, uint32_t *pu32)
{
return VINF_SUCCESS;
}
{
if (*ppStream)
{
return VINF_SUCCESS;
}
return VERR_NOT_SUPPORTED;
}
{
return VINF_SUCCESS;
}
{
{
return VINF_SUCCESS;
}
return VERR_NOT_SUPPORTED;
}
static inline char *RTStrStripL (const char *psz)
{
psz++;
return (char *)psz;
}
#define NIL_RTFILE -1
#define RTFILE_O_READWRITE 0x00000003
#define RTFILE_O_OPEN 0x00000000
#define RTFILE_O_DENY_NONE 0x00000000
{
if (*pFile != -1)
{
return VINF_SUCCESS;
}
return VERR_ACCESS_DENIED;
}
{
return VINF_SUCCESS;
}
static inline uint64_t RTTimeMilliTS (void)
{
}
#define VRDP_USB_STATUS_SUCCESS 0
#define VRDP_USB_STATUS_ACCESS_DENIED 1
#define VRDP_USB_STATUS_DEVICE_REMOVED 2
#define VRDP_USB_REAP_FLAG_CONTINUED (0)
#define VRDP_USB_REAP_FLAG_LAST (1)
#define VRDP_USB_CAPS_FLAG_ASYNC (0)
#define VRDP_USB_CAPS_FLAG_POLL (1)
#pragma pack(1)
#include "vusb.h"
typedef struct VUSBDEV
{
char* pszName;
int request_detach;
typedef struct usb_proxy {
/* Note: the backend code assumes that the dev member is the first in the structure. */
/* 'union' because backend accesses the file handle as priv.File. */
union {
void *pv;
int File;
} Backend;
int iActiveCfg;
int cIgnoreSetConfigs;
} *PUSBPROXYDEV;
typedef struct vusb_setup {
} VUSBSETUP, *PVUSBSETUP;
#pragma pack()
{
}
typedef struct USBPROXYBACK
{
/** Name of the backend. */
const char *pszName;
} USBPROXYBACK;
typedef USBPROXYBACK *PUSBPROXYBACK;
extern const USBPROXYBACK g_USBProxyDeviceHost;
{
}
{
}
{
}
{
}
{
}
{
}
{
}
{
}
{
}
{
}
{
}
#endif /* __VRDPUSB__H */