VirtualBox

source: vbox/trunk/include/VBox/vrdpusb.h@ 99582

Last change on this file since 99582 was 98103, checked in by vboxsync, 2 years ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.2 KB
Line 
1/** @file
2 * VBox Remote Desktop Protocol - Remote USB backend interface. (VRDP)
3 */
4
5/*
6 * Copyright (C) 2006-2023 Oracle and/or its affiliates.
7 *
8 * This file is part of VirtualBox base platform packages, as
9 * available from https://www.virtualbox.org.
10 *
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation, in version 3 of the
14 * License.
15 *
16 * This program is distributed in the hope that it will be useful, but
17 * WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, see <https://www.gnu.org/licenses>.
23 *
24 * The contents of this file may alternatively be used under the terms
25 * of the Common Development and Distribution License Version 1.0
26 * (CDDL), a copy of it is provided in the "COPYING.CDDL" file included
27 * in the VirtualBox distribution, in which case the provisions of the
28 * CDDL are applicable instead of those of the GPL.
29 *
30 * You may elect to license modified versions of this file under the
31 * terms and conditions of either the GPL or the CDDL or both.
32 *
33 * SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0
34 */
35
36#ifndef VBOX_INCLUDED_vrdpusb_h
37#define VBOX_INCLUDED_vrdpusb_h
38#ifndef RT_WITHOUT_PRAGMA_ONCE
39# pragma once
40#endif
41
42#include <VBox/cdefs.h>
43#include <VBox/types.h>
44
45#ifdef IN_RING0
46# error "There are no VRDP APIs available in Ring-0 Host Context!"
47#endif
48#ifdef IN_RC
49# error "There are no VRDP APIs available Guest Context!"
50#endif
51
52
53/** @defgroup grp_vrdpusb Remote USB over VURP
54 * @ingroup grp_vusb
55 * @{
56 */
57
58#define REMOTE_USB_BACKEND_PREFIX_S "REMOTEUSB"
59#define REMOTE_USB_BACKEND_PREFIX_LEN 9
60
61/* Forward declaration. */
62struct _REMOTEUSBDEVICE;
63typedef struct _REMOTEUSBDEVICE *PREMOTEUSBDEVICE;
64
65/* Forward declaration. */
66struct _REMOTEUSBQURB;
67typedef struct _REMOTEUSBQURB *PREMOTEUSBQURB;
68
69/* Forward declaration. Actually a class. */
70struct _REMOTEUSBBACKEND;
71typedef struct _REMOTEUSBBACKEND *PREMOTEUSBBACKEND;
72
73/**
74 * Pointer to this structure is queried from USBREMOTEIF::pfnQueryRemoteUsbBackend.
75 */
76typedef struct REMOTEUSBCALLBACK
77{
78 PREMOTEUSBBACKEND pInstance;
79
80 DECLCALLBACKMEMBER(int, pfnOpen,(PREMOTEUSBBACKEND pInstance, const char *pszAddress, size_t cbAddress, PREMOTEUSBDEVICE *ppDevice));
81 DECLCALLBACKMEMBER(void, pfnClose,(PREMOTEUSBDEVICE pDevice));
82 DECLCALLBACKMEMBER(int, pfnReset,(PREMOTEUSBDEVICE pDevice));
83 DECLCALLBACKMEMBER(int, pfnSetConfig,(PREMOTEUSBDEVICE pDevice, uint8_t u8Cfg));
84 DECLCALLBACKMEMBER(int, pfnClaimInterface,(PREMOTEUSBDEVICE pDevice, uint8_t u8Ifnum));
85 DECLCALLBACKMEMBER(int, pfnReleaseInterface,(PREMOTEUSBDEVICE pDevice, uint8_t u8Ifnum));
86 DECLCALLBACKMEMBER(int, pfnInterfaceSetting,(PREMOTEUSBDEVICE pDevice, uint8_t u8Ifnum, uint8_t u8Setting));
87 DECLCALLBACKMEMBER(int, pfnQueueURB,(PREMOTEUSBDEVICE pDevice, uint8_t u8Type, uint8_t u8Ep, uint8_t u8Direction, uint32_t u32Len, void *pvData, void *pvURB, PREMOTEUSBQURB *ppRemoteURB));
88 DECLCALLBACKMEMBER(int, pfnReapURB,(PREMOTEUSBDEVICE pDevice, uint32_t u32Millies, void **ppvURB, uint32_t *pu32Len, uint32_t *pu32Err));
89 DECLCALLBACKMEMBER(int, pfnClearHaltedEP,(PREMOTEUSBDEVICE pDevice, uint8_t u8Ep));
90 DECLCALLBACKMEMBER(void, pfnCancelURB,(PREMOTEUSBDEVICE pDevice, PREMOTEUSBQURB pRemoteURB));
91 DECLCALLBACKMEMBER(int, pfnWakeup,(PREMOTEUSBDEVICE pDevice));
92} REMOTEUSBCALLBACK;
93/** Pointer to a remote USB callback table. */
94typedef REMOTEUSBCALLBACK *PREMOTEUSBCALLBACK;
95
96/**
97 * Remote USB interface for querying the remote USB callback table for particular client.
98 * Returned from the *QueryGenericUserObject when passing REMOTEUSBIF_OID as the identifier.
99 */
100typedef struct REMOTEUSBIF
101{
102 /** Opaque user data to pass as the first parameter to the callbacks. */
103 void *pvUser;
104
105 /**
106 * Queries the remote USB interface callback table for a given UUID/client ID pair.
107 *
108 * @returns Pointer to the remote USB callback table or NULL if the client ID and or UUID is invalid.
109 * @param pvUser Opaque user data from this interface.
110 * @param pUuid The device UUID to query the interface for.
111 * @param idClient The client ID to query the interface for.
112 */
113 DECLCALLBACKMEMBER(PREMOTEUSBCALLBACK, pfnQueryRemoteUsbBackend, (void *pvUser, PCRTUUID pUuid, uint32_t idClient));
114} REMOTEUSBIF;
115/** Pointer to a remote USB interface. */
116typedef REMOTEUSBIF *PREMOTEUSBIF;
117
118/** The UUID to identify the remote USB interface. */
119#define REMOTEUSBIF_OID "87012f58-2ad6-4f89-b7b1-92f72c7ea8cc"
120
121
122typedef struct EMULATEDUSBIF
123{
124 /** Opaque user data to pass as the first parameter to the callbacks. */
125 void *pvUser;
126
127 DECLCALLBACKMEMBER(int, pfnQueryEmulatedUsbDataById, (void *pvUser, const char *pszId, void **ppvEmUsbCb, void **ppvEmUsbCbData, void **ppvObject));
128} EMULATEDUSBIF;
129typedef EMULATEDUSBIF *PEMULATEDUSBIF;
130
131#define EMULATEDUSBIF_OID "b7b4e194-ada0-4722-8e4e-1700ed9064f3"
132
133/** @} */
134
135#endif /* !VBOX_INCLUDED_vrdpusb_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