VirtualBox

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

Last change on this file since 78177 was 76568, checked in by vboxsync, 6 years ago

HostDrivers: Use VBOX_INCLUDED_SRC_ as header guard prefix with scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.8 KB
Line 
1/* $Id: VBoxUsbCmn.h 76568 2019-01-01 04:34:11Z vboxsync $ */
2/** @file
3 * VBoxUsmCmn.h - USB device. Common defs
4 */
5/*
6 * Copyright (C) 2011-2019 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
26#ifndef VBOX_INCLUDED_SRC_VBoxUSB_win_dev_VBoxUsbCmn_h
27#define VBOX_INCLUDED_SRC_VBoxUSB_win_dev_VBoxUsbCmn_h
28#ifndef RT_WITHOUT_PRAGMA_ONCE
29# pragma once
30#endif
31
32#include "../cmn/VBoxDrvTool.h"
33#include "../cmn/VBoxUsbTool.h"
34
35#include <iprt/cdefs.h>
36#include <iprt/asm.h>
37
38#include <VBox/usblib-win.h>
39
40#define VBOXUSB_CFG_IDLE_TIME_MS 5000
41
42typedef struct VBOXUSBDEV_EXT *PVBOXUSBDEV_EXT;
43
44RT_C_DECLS_BEGIN
45
46#ifdef _WIN64
47#define DECLSPEC_USBIMPORT DECLSPEC_IMPORT
48#else
49#define DECLSPEC_USBIMPORT
50
51#define USBD_ParseDescriptors _USBD_ParseDescriptors
52#define USBD_ParseConfigurationDescriptorEx _USBD_ParseConfigurationDescriptorEx
53#define USBD_CreateConfigurationRequestEx _USBD_CreateConfigurationRequestEx
54#endif
55
56DECLSPEC_USBIMPORT PUSB_COMMON_DESCRIPTOR
57USBD_ParseDescriptors(
58 IN PVOID DescriptorBuffer,
59 IN ULONG TotalLength,
60 IN PVOID StartPosition,
61 IN LONG DescriptorType
62 );
63
64DECLSPEC_USBIMPORT PUSB_INTERFACE_DESCRIPTOR
65USBD_ParseConfigurationDescriptorEx(
66 IN PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor,
67 IN PVOID StartPosition,
68 IN LONG InterfaceNumber,
69 IN LONG AlternateSetting,
70 IN LONG InterfaceClass,
71 IN LONG InterfaceSubClass,
72 IN LONG InterfaceProtocol
73 );
74
75DECLSPEC_USBIMPORT PURB
76USBD_CreateConfigurationRequestEx(
77 IN PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor,
78 IN PUSBD_INTERFACE_LIST_ENTRY InterfaceList
79 );
80
81RT_C_DECLS_END
82
83DECLHIDDEN(PVOID) vboxUsbMemAlloc(SIZE_T cbBytes);
84DECLHIDDEN(PVOID) vboxUsbMemAllocZ(SIZE_T cbBytes);
85DECLHIDDEN(VOID) vboxUsbMemFree(PVOID pvMem);
86
87#include "VBoxUsbRt.h"
88#include "VBoxUsbPnP.h"
89#include "VBoxUsbPwr.h"
90#include "VBoxUsbDev.h"
91
92
93#endif /* !VBOX_INCLUDED_SRC_VBoxUSB_win_dev_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