VirtualBox

source: vbox/trunk/src/VBox/Devices/testcase/tstDevicePlugin.h@ 96407

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

scm copyright and license note update

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.1 KB
Line 
1/** @file
2 * tstDevice: Plugin API.
3 */
4
5/*
6 * Copyright (C) 2017-2022 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 * SPDX-License-Identifier: GPL-3.0-only
25 */
26
27#ifndef VBOX_INCLUDED_SRC_testcase_tstDevicePlugin_h
28#define VBOX_INCLUDED_SRC_testcase_tstDevicePlugin_h
29#ifndef RT_WITHOUT_PRAGMA_ONCE
30# pragma once
31#endif
32
33#include <VBox/types.h>
34
35#include "tstDeviceCfg.h"
36
37
38/** Device under test handle. */
39typedef struct TSTDEVDUTINT *TSTDEVDUT;
40
41/**
42 * Testcase registration structure.
43 */
44typedef struct TSTDEVTESTCASEREG
45{
46 /** Testcase name. */
47 char szName[16];
48 /** Testcase description. */
49 const char *pszDesc;
50 /** Flags for this testcase. */
51 uint32_t fFlags;
52
53 /**
54 * Testcase entry point.
55 *
56 * @returns VBox status code.
57 * @param hDut Handle of the device under test.
58 * @param paCfg Pointer to the testcase config.
59 * @param cCfgItems Number of config items.
60 */
61 DECLR3CALLBACKMEMBER(int, pfnTestEntry, (TSTDEVDUT hDut, PCTSTDEVCFGITEM paCfg, uint32_t cCfgItems));
62} TSTDEVTESTCASEREG;
63/** Pointer to a testcase registration structure. */
64typedef TSTDEVTESTCASEREG *PTSTDEVTESTCASEREG;
65/** Pointer to a constant testcase registration structure. */
66typedef const TSTDEVTESTCASEREG *PCTSTDEVTESTCASEREG;
67
68
69/**
70 * Testcase register callbacks structure.
71 */
72typedef struct TSTDEVPLUGINREGISTER
73{
74 /**
75 * Registers a new testcase.
76 *
77 * @returns VBox status code.
78 * @param pvUser Opaque user data given in the plugin load callback.
79 * @param pTestcaseReg The testcase descriptor to register.
80 */
81 DECLR3CALLBACKMEMBER(int, pfnRegisterTestcase, (void *pvUser, PCTSTDEVTESTCASEREG pTestcaseReg));
82
83} TSTDEVPLUGINREGISTER;
84/** Pointer to a backend register callbacks structure. */
85typedef TSTDEVPLUGINREGISTER *PTSTDEVPLUGINREGISTER;
86
87
88/**
89 * Initialization entry point called by the device test framework when
90 * a plugin is loaded.
91 *
92 * @returns VBox status code.
93 * @param pvUser Opaque user data passed in the register callbacks.
94 * @param pRegisterCallbacks Pointer to the register callbacks structure.
95 */
96typedef DECLCALLBACKTYPE(int, FNTSTDEVPLUGINLOAD,(void *pvUser, PTSTDEVPLUGINREGISTER pRegisterCallbacks));
97typedef FNTSTDEVPLUGINLOAD *PFNTSTDEVPLUGINLOAD;
98#define TSTDEV_PLUGIN_LOAD_NAME "TSTDevPluginLoad"
99
100#endif /* !VBOX_INCLUDED_SRC_testcase_tstDevicePlugin_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