VirtualBox

source: vbox/trunk/src/VBox/HostDrivers/VBoxUSB/win/cmn/VBoxUsbIdc.h

Last change on this file was 98103, checked in by vboxsync, 17 months ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.3 KB
Line 
1/* $Id: VBoxUsbIdc.h 98103 2023-01-17 14:15:46Z vboxsync $ */
2/** @file
3 * Windows USB Proxy - Monitor Driver communication interface.
4 */
5
6/*
7 * Copyright (C) 2011-2023 Oracle and/or its affiliates.
8 *
9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.virtualbox.org.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, in version 3 of the
15 * License.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, see <https://www.gnu.org/licenses>.
24 *
25 * The contents of this file may alternatively be used under the terms
26 * of the Common Development and Distribution License Version 1.0
27 * (CDDL), a copy of it is provided in the "COPYING.CDDL" file included
28 * in the VirtualBox distribution, in which case the provisions of the
29 * CDDL are applicable instead of those of the GPL.
30 *
31 * You may elect to license modified versions of this file under the
32 * terms and conditions of either the GPL or the CDDL or both.
33 *
34 * SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0
35 */
36
37#ifndef VBOX_INCLUDED_SRC_VBoxUSB_win_cmn_VBoxUsbIdc_h
38#define VBOX_INCLUDED_SRC_VBoxUSB_win_cmn_VBoxUsbIdc_h
39#ifndef RT_WITHOUT_PRAGMA_ONCE
40# pragma once
41#endif
42
43#define VBOXUSBIDC_VERSION_MAJOR 1
44#define VBOXUSBIDC_VERSION_MINOR 0
45
46#define VBOXUSBIDC_INTERNAL_IOCTL_GET_VERSION CTL_CODE(FILE_DEVICE_UNKNOWN, 0x618, METHOD_NEITHER, FILE_WRITE_ACCESS)
47#define VBOXUSBIDC_INTERNAL_IOCTL_PROXY_STARTUP CTL_CODE(FILE_DEVICE_UNKNOWN, 0x619, METHOD_NEITHER, FILE_WRITE_ACCESS)
48#define VBOXUSBIDC_INTERNAL_IOCTL_PROXY_TEARDOWN CTL_CODE(FILE_DEVICE_UNKNOWN, 0x61A, METHOD_NEITHER, FILE_WRITE_ACCESS)
49#define VBOXUSBIDC_INTERNAL_IOCTL_PROXY_STATE_CHANGE CTL_CODE(FILE_DEVICE_UNKNOWN, 0x61B, METHOD_NEITHER, FILE_WRITE_ACCESS)
50
51typedef struct
52{
53 uint32_t u32Major;
54 uint32_t u32Minor;
55} VBOXUSBIDC_VERSION, *PVBOXUSBIDC_VERSION;
56
57typedef void *HVBOXUSBIDCDEV;
58
59/* the initial device state is USBDEVICESTATE_HELD_BY_PROXY */
60typedef struct VBOXUSBIDC_PROXY_STARTUP
61{
62 union
63 {
64 /* in: device PDO */
65 PDEVICE_OBJECT pPDO;
66 /* out: device handle to be used for subsequent USBSUP_PROXY_XXX calls */
67 HVBOXUSBIDCDEV hDev;
68 } u;
69} VBOXUSBIDC_PROXY_STARTUP, *PVBOXUSBIDC_PROXY_STARTUP;
70
71typedef struct VBOXUSBIDC_PROXY_TEARDOWN
72{
73 HVBOXUSBIDCDEV hDev;
74} VBOXUSBIDC_PROXY_TEARDOWN, *PVBOXUSBIDC_PROXY_TEARDOWN;
75
76typedef enum
77{
78 VBOXUSBIDC_PROXY_STATE_UNKNOWN = 0,
79 VBOXUSBIDC_PROXY_STATE_IDLE,
80 VBOXUSBIDC_PROXY_STATE_INITIAL = VBOXUSBIDC_PROXY_STATE_IDLE,
81 VBOXUSBIDC_PROXY_STATE_USED_BY_GUEST
82} VBOXUSBIDC_PROXY_STATE;
83
84typedef struct VBOXUSBIDC_PROXY_STATE_CHANGE
85{
86 HVBOXUSBIDCDEV hDev;
87 VBOXUSBIDC_PROXY_STATE enmState;
88} VBOXUSBIDC_PROXY_STATE_CHANGE, *PVBOXUSBIDC_PROXY_STATE_CHANGE;
89
90NTSTATUS VBoxUsbIdcInit();
91VOID VBoxUsbIdcTerm();
92NTSTATUS VBoxUsbIdcProxyStarted(PDEVICE_OBJECT pPDO, HVBOXUSBIDCDEV *phDev);
93NTSTATUS VBoxUsbIdcProxyStopped(HVBOXUSBIDCDEV hDev);
94
95#endif /* !VBOX_INCLUDED_SRC_VBoxUSB_win_cmn_VBoxUsbIdc_h */
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use