VirtualBox

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

Last change on this file since 84909 was 83261, checked in by vboxsync, 5 years ago

Devices/tstDevice: Testbench updates, work in progress

  • 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#include "tstDeviceCfg.h"
26
27
28/** Device under test handle. */
29typedef struct TSTDEVDUTINT *TSTDEVDUT;
30
31/**
32 * Testcase registration structure.
33 */
34typedef struct TSTDEVTESTCASEREG
35{
36 /** Testcase name. */
37 char szName[16];
38 /** Testcase description. */
39 const char *pszDesc;
40 /** Flags for this testcase. */
41 uint32_t fFlags;
42
43 /**
44 * Testcase entry point.
45 *
46 * @returns VBox status code.
47 * @param hDut Handle of the device under test.
48 * @param paCfg Pointer to the testcase config.
49 * @param cCfgItems Number of config items.
50 */
51 DECLR3CALLBACKMEMBER(int, pfnTestEntry, (TSTDEVDUT hDut, PCTSTDEVCFGITEM paCfg, uint32_t cCfgItems));
52} TSTDEVTESTCASEREG;
53/** Pointer to a testcase registration structure. */
54typedef TSTDEVTESTCASEREG *PTSTDEVTESTCASEREG;
55/** Pointer to a constant testcase registration structure. */
56typedef const TSTDEVTESTCASEREG *PCTSTDEVTESTCASEREG;
57
58
59/**
60 * Testcase register callbacks structure.
61 */
62typedef struct TSTDEVPLUGINREGISTER
63{
64 /**
65 * Registers a new testcase.
66 *
67 * @returns VBox status code.
68 * @param pvUser Opaque user data given in the plugin load callback.
69 * @param pTestcaseReg The testcase descriptor to register.
70 */
71 DECLR3CALLBACKMEMBER(int, pfnRegisterTestcase, (void *pvUser, PCTSTDEVTESTCASEREG pTestcaseReg));
72
73} TSTDEVPLUGINREGISTER;
74/** Pointer to a backend register callbacks structure. */
75typedef TSTDEVPLUGINREGISTER *PTSTDEVPLUGINREGISTER;
76
77
78/**
79 * Initialization entry point called by the device test framework when
80 * a plugin is loaded.
81 *
82 * @returns VBox status code.
83 * @param pvUser Opaque user data passed in the register callbacks.
84 * @param pRegisterCallbacks Pointer to the register callbacks structure.
85 */
86typedef DECLCALLBACK(int) FNTSTDEVPLUGINLOAD(void *pvUser, PTSTDEVPLUGINREGISTER pRegisterCallbacks);
87typedef FNTSTDEVPLUGINLOAD *PFNTSTDEVPLUGINLOAD;
88#define TSTDEV_PLUGIN_LOAD_NAME "TSTDevPluginLoad"
89
90#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