VirtualBox

source: vbox/trunk/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbCmn.h@ 74911

Last change on this file since 74911 was 69500, checked in by vboxsync, 7 years ago

*: scm --update-copyright-year

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.7 KB
Line 
1/* $Id: VBoxUsbCmn.h 69500 2017-10-28 15:14:05Z vboxsync $ */
2/** @file
3 * VBoxUsmCmn.h - USB device. Common defs
4 */
5/*
6 * Copyright (C) 2011-2017 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 * The contents of this file may alternatively be used under the terms
17 * of the Common Development and Distribution License Version 1.0
18 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
19 * VirtualBox OSE distribution, in which case the provisions of the
20 * CDDL are applicable instead of those of the GPL.
21 *
22 * You may elect to license modified versions of this file under the
23 * terms and conditions of either the GPL or the CDDL or both.
24 */
25#ifndef ___VBoxUsbCmn_h___
26#define ___VBoxUsbCmn_h___
27
28#include "../cmn/VBoxDrvTool.h"
29#include "../cmn/VBoxUsbTool.h"
30
31#include <iprt/cdefs.h>
32#include <iprt/asm.h>
33
34#include <VBox/usblib-win.h>
35
36#define VBOXUSB_CFG_IDLE_TIME_MS 5000
37
38typedef struct VBOXUSBDEV_EXT *PVBOXUSBDEV_EXT;
39
40RT_C_DECLS_BEGIN
41
42#ifdef _WIN64
43#define DECLSPEC_USBIMPORT DECLSPEC_IMPORT
44#else
45#define DECLSPEC_USBIMPORT
46
47#define USBD_ParseDescriptors _USBD_ParseDescriptors
48#define USBD_ParseConfigurationDescriptorEx _USBD_ParseConfigurationDescriptorEx
49#define USBD_CreateConfigurationRequestEx _USBD_CreateConfigurationRequestEx
50#endif
51
52DECLSPEC_USBIMPORT PUSB_COMMON_DESCRIPTOR
53USBD_ParseDescriptors(
54 IN PVOID DescriptorBuffer,
55 IN ULONG TotalLength,
56 IN PVOID StartPosition,
57 IN LONG DescriptorType
58 );
59
60DECLSPEC_USBIMPORT PUSB_INTERFACE_DESCRIPTOR
61USBD_ParseConfigurationDescriptorEx(
62 IN PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor,
63 IN PVOID StartPosition,
64 IN LONG InterfaceNumber,
65 IN LONG AlternateSetting,
66 IN LONG InterfaceClass,
67 IN LONG InterfaceSubClass,
68 IN LONG InterfaceProtocol
69 );
70
71DECLSPEC_USBIMPORT PURB
72USBD_CreateConfigurationRequestEx(
73 IN PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor,
74 IN PUSBD_INTERFACE_LIST_ENTRY InterfaceList
75 );
76
77RT_C_DECLS_END
78
79DECLHIDDEN(PVOID) vboxUsbMemAlloc(SIZE_T cbBytes);
80DECLHIDDEN(PVOID) vboxUsbMemAllocZ(SIZE_T cbBytes);
81DECLHIDDEN(VOID) vboxUsbMemFree(PVOID pvMem);
82
83#include "VBoxUsbRt.h"
84#include "VBoxUsbPnP.h"
85#include "VBoxUsbPwr.h"
86#include "VBoxUsbDev.h"
87
88
89#endif /* #ifndef ___VBoxUsbCmn_h___ */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette