1 | /* $Id: VBoxUsbCmn.h 56293 2015-06-09 14:23:56Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VBoxUsmCmn.h - USB device. Common defs
|
---|
4 | */
|
---|
5 | /*
|
---|
6 | * Copyright (C) 2011-2015 Oracle Corporation
|
---|
7 | *
|
---|
8 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
9 | * available from http://www.virtualbox.org. This file is free software;
|
---|
10 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
11 | * General Public License (GPL) as published by the Free Software
|
---|
12 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
13 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
14 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
15 | */
|
---|
16 | #ifndef ___VBoxUsbCmn_h___
|
---|
17 | #define ___VBoxUsbCmn_h___
|
---|
18 |
|
---|
19 | #include "../cmn/VBoxDrvTool.h"
|
---|
20 | #include "../cmn/VBoxUsbTool.h"
|
---|
21 |
|
---|
22 | #include <iprt/cdefs.h>
|
---|
23 | #include <iprt/asm.h>
|
---|
24 |
|
---|
25 | #include <VBox/usblib-win.h>
|
---|
26 |
|
---|
27 | #define VBOXUSB_CFG_IDLE_TIME_MS 5000
|
---|
28 |
|
---|
29 | typedef struct VBOXUSBDEV_EXT *PVBOXUSBDEV_EXT;
|
---|
30 |
|
---|
31 | RT_C_DECLS_BEGIN
|
---|
32 |
|
---|
33 | #ifdef _WIN64
|
---|
34 | #define DECLSPEC_USBIMPORT DECLSPEC_IMPORT
|
---|
35 | #else
|
---|
36 | #define DECLSPEC_USBIMPORT
|
---|
37 |
|
---|
38 | #define USBD_ParseDescriptors _USBD_ParseDescriptors
|
---|
39 | #define USBD_ParseConfigurationDescriptorEx _USBD_ParseConfigurationDescriptorEx
|
---|
40 | #define USBD_CreateConfigurationRequestEx _USBD_CreateConfigurationRequestEx
|
---|
41 | #endif
|
---|
42 |
|
---|
43 | DECLSPEC_USBIMPORT PUSB_COMMON_DESCRIPTOR
|
---|
44 | USBD_ParseDescriptors(
|
---|
45 | IN PVOID DescriptorBuffer,
|
---|
46 | IN ULONG TotalLength,
|
---|
47 | IN PVOID StartPosition,
|
---|
48 | IN LONG DescriptorType
|
---|
49 | );
|
---|
50 |
|
---|
51 | DECLSPEC_USBIMPORT PUSB_INTERFACE_DESCRIPTOR
|
---|
52 | USBD_ParseConfigurationDescriptorEx(
|
---|
53 | IN PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor,
|
---|
54 | IN PVOID StartPosition,
|
---|
55 | IN LONG InterfaceNumber,
|
---|
56 | IN LONG AlternateSetting,
|
---|
57 | IN LONG InterfaceClass,
|
---|
58 | IN LONG InterfaceSubClass,
|
---|
59 | IN LONG InterfaceProtocol
|
---|
60 | );
|
---|
61 |
|
---|
62 | DECLSPEC_USBIMPORT PURB
|
---|
63 | USBD_CreateConfigurationRequestEx(
|
---|
64 | IN PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor,
|
---|
65 | IN PUSBD_INTERFACE_LIST_ENTRY InterfaceList
|
---|
66 | );
|
---|
67 |
|
---|
68 | RT_C_DECLS_END
|
---|
69 |
|
---|
70 | DECLHIDDEN(PVOID) vboxUsbMemAlloc(SIZE_T cbBytes);
|
---|
71 | DECLHIDDEN(PVOID) vboxUsbMemAllocZ(SIZE_T cbBytes);
|
---|
72 | DECLHIDDEN(VOID) vboxUsbMemFree(PVOID pvMem);
|
---|
73 |
|
---|
74 | #include "VBoxUsbRt.h"
|
---|
75 | #include "VBoxUsbPnP.h"
|
---|
76 | #include "VBoxUsbPwr.h"
|
---|
77 | #include "VBoxUsbDev.h"
|
---|
78 |
|
---|
79 |
|
---|
80 | #endif /* #ifndef ___VBoxUsbCmn_h___ */
|
---|