VirtualBox

source: vbox/trunk/src/VBox/Main/src-client/VBoxDriversRegister.cpp@ 98275

Last change on this file since 98275 was 98275, checked in by vboxsync, 16 months ago

Main/VBoxDriversRegister.cpp: rc -> hrc/vrc. bugref:10223

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.7 KB
Line 
1/* $Id: VBoxDriversRegister.cpp 98275 2023-01-24 11:20:08Z vboxsync $ */
2/** @file
3 *
4 * Main driver registration.
5 */
6
7/*
8 * Copyright (C) 2006-2023 Oracle and/or its affiliates.
9 *
10 * This file is part of VirtualBox base platform packages, as
11 * available from https://www.virtualbox.org.
12 *
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License
15 * as published by the Free Software Foundation, in version 3 of the
16 * License.
17 *
18 * This program is distributed in the hope that it will be useful, but
19 * WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 * General Public License for more details.
22 *
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, see <https://www.gnu.org/licenses>.
25 *
26 * SPDX-License-Identifier: GPL-3.0-only
27 */
28
29
30/*********************************************************************************************************************************
31* Header Files *
32*********************************************************************************************************************************/
33#define LOG_GROUP LOG_GROUP_MAIN
34#include "LoggingNew.h"
35
36#include "MouseImpl.h"
37#include "KeyboardImpl.h"
38#include "DisplayImpl.h"
39#include "VMMDev.h"
40#include "NvramStoreImpl.h"
41#ifdef VBOX_WITH_AUDIO_VRDE
42# include "DrvAudioVRDE.h"
43#endif
44#ifdef VBOX_WITH_AUDIO_RECORDING
45# include "DrvAudioRec.h"
46#endif
47#include "UsbWebcamInterface.h"
48#ifdef VBOX_WITH_USB_CARDREADER
49# include "UsbCardReader.h"
50#endif
51#include "ConsoleImpl.h"
52#ifdef VBOX_WITH_PCI_PASSTHROUGH
53# include "PCIRawDevImpl.h"
54#endif
55
56#include <VBox/vmm/pdmdrv.h>
57#include <VBox/version.h>
58
59
60/**
61 * Register the main drivers.
62 *
63 * @returns VBox status code.
64 * @param pCallbacks Pointer to the callback table.
65 * @param u32Version VBox version number.
66 */
67extern "C" DECLEXPORT(int) VBoxDriversRegister(PCPDMDRVREGCB pCallbacks, uint32_t u32Version)
68{
69 LogFlow(("VBoxDriversRegister: u32Version=%#x\n", u32Version));
70 AssertReleaseMsg(u32Version == VBOX_VERSION, ("u32Version=%#x VBOX_VERSION=%#x\n", u32Version, VBOX_VERSION));
71
72 int vrc = pCallbacks->pfnRegister(pCallbacks, &Mouse::DrvReg);
73 if (RT_FAILURE(vrc))
74 return vrc;
75
76 vrc = pCallbacks->pfnRegister(pCallbacks, &Keyboard::DrvReg);
77 if (RT_FAILURE(vrc))
78 return vrc;
79
80 vrc = pCallbacks->pfnRegister(pCallbacks, &Display::DrvReg);
81 if (RT_FAILURE(vrc))
82 return vrc;
83
84 vrc = pCallbacks->pfnRegister(pCallbacks, &VMMDev::DrvReg);
85 if (RT_FAILURE(vrc))
86 return vrc;
87#ifdef VBOX_WITH_AUDIO_VRDE
88 vrc = pCallbacks->pfnRegister(pCallbacks, &AudioVRDE::DrvReg);
89 if (RT_FAILURE(vrc))
90 return vrc;
91#endif
92#ifdef VBOX_WITH_AUDIO_RECORDING
93 vrc = pCallbacks->pfnRegister(pCallbacks, &AudioVideoRec::DrvReg);
94 if (RT_FAILURE(vrc))
95 return vrc;
96#endif
97
98 vrc = pCallbacks->pfnRegister(pCallbacks, &EmWebcam::DrvReg);
99 if (RT_FAILURE(vrc))
100 return vrc;
101
102#ifdef VBOX_WITH_USB_CARDREADER
103 vrc = pCallbacks->pfnRegister(pCallbacks, &UsbCardReader::DrvReg);
104 if (RT_FAILURE(vrc))
105 return vrc;
106#endif
107
108 vrc = pCallbacks->pfnRegister(pCallbacks, &Console::DrvStatusReg);
109 if (RT_FAILURE(vrc))
110 return vrc;
111
112#ifdef VBOX_WITH_PCI_PASSTHROUGH
113 vrc = pCallbacks->pfnRegister(pCallbacks, &PCIRawDev::DrvReg);
114 if (RT_FAILURE(vrc))
115 return vrc;
116#endif
117
118 vrc = pCallbacks->pfnRegister(pCallbacks, &NvramStore::DrvReg);
119 if (RT_FAILURE(vrc))
120 return vrc;
121
122 return VINF_SUCCESS;
123}
124/* vi: set tabstop=4 shiftwidth=4 expandtab: */
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use