VirtualBox

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

Last change on this file since 83133 was 83062, checked in by vboxsync, 5 years ago

Devices/testcase/tstDevice: Implement JSON based configuration loader for the device testbench

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