VirtualBox

source: vbox/trunk/src/VBox/ValidationKit/utils/usb/UsbTestServiceGadgetInternal.h@ 72293

Last change on this file since 72293 was 69111, checked in by vboxsync, 7 years ago

(C) year

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.3 KB
Line 
1/* $Id: UsbTestServiceGadgetInternal.h 69111 2017-10-17 14:26:02Z vboxsync $ */
2/** @file
3 * UsbTestServ - Remote USB test configuration and execution server, Interal gadget interfaces.
4 */
5
6/*
7 * Copyright (C) 2016-2017 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 *
17 * The contents of this file may alternatively be used under the terms
18 * of the Common Development and Distribution License Version 1.0
19 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
20 * VirtualBox OSE distribution, in which case the provisions of the
21 * CDDL are applicable instead of those of the GPL.
22 *
23 * You may elect to license modified versions of this file under the
24 * terms and conditions of either the GPL or the CDDL or both.
25 */
26
27#ifndef ___UsbTestServiceGadgetInternal_h___
28#define ___UsbTestServiceGadgetInternal_h___
29
30#include <iprt/cdefs.h>
31#include <iprt/types.h>
32
33#include "UsbTestServiceGadget.h"
34
35RT_C_DECLS_BEGIN
36
37/** Pointer to an opaque type dependent gadget host instance data. */
38typedef struct UTSGADGETCLASSINT *PUTSGADGETCLASSINT;
39/** Pointer to a gadget host instance pointer. */
40typedef PUTSGADGETCLASSINT *PPUTSGADGETCLASSINT;
41
42/**
43 * Gadget class interface.
44 */
45typedef struct UTSGADGETCLASSIF
46{
47 /** The gadget class type implemented. */
48 UTSGADGETCLASS enmClass;
49 /** Description. */
50 const char *pszDesc;
51 /** Size of the class specific instance data. */
52 size_t cbClass;
53
54 /**
55 * Initializes the gadget class instance.
56 *
57 * @returns IPRT status code.
58 * @param pClass The interface specific instance data.
59 * @param paCfg The configuration of the interface.
60 */
61 DECLR3CALLBACKMEMBER(int, pfnInit, (PUTSGADGETCLASSINT pClass, PCUTSGADGETCFGITEM paCfg));
62
63 /**
64 * Terminates the gadget class instance.
65 *
66 * @returns nothing.
67 * @param pClass The interface specific instance data.
68 */
69 DECLR3CALLBACKMEMBER(void, pfnTerm, (PUTSGADGETCLASSINT pClass));
70
71 /**
72 * Returns the bus ID of the class instance.
73 *
74 * @returns Bus ID.
75 * @param pClass The interface specific instance data.
76 */
77 DECLR3CALLBACKMEMBER(uint32_t, pfnGetBusId, (PUTSGADGETCLASSINT pClass));
78
79 /**
80 * Connects the gadget.
81 *
82 * @returns IPRT status code.
83 * @param pClass The interface specific instance data.
84 */
85 DECLR3CALLBACKMEMBER(int, pfnConnect, (PUTSGADGETCLASSINT pClass));
86
87 /**
88 * Disconnect the gadget.
89 *
90 * @returns IPRT status code.
91 * @param pClass The interface specific instance data.
92 */
93 DECLR3CALLBACKMEMBER(int, pfnDisconnect, (PUTSGADGETCLASSINT pClass));
94
95} UTSGADGETCLASSIF;
96/** Pointer to a gadget class callback table. */
97typedef UTSGADGETCLASSIF *PUTSGADGETCLASSIF;
98/** Pointer to a const gadget host callback table. */
99typedef const struct UTSGADGETCLASSIF *PCUTSGADGETCLASSIF;
100
101extern UTSGADGETCLASSIF const g_UtsGadgetClassTest;
102
103RT_C_DECLS_END
104
105#endif
106
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