VirtualBox

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

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

Main/Console: more forgotten build fixes for r134142

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.2 KB
Line 
1/* $Id: VBoxDriversRegister.cpp 81428 2019-10-21 18:38:38Z vboxsync $ */
2/** @file
3 *
4 * Main driver registration.
5 */
6
7/*
8 * Copyright (C) 2006-2019 Oracle Corporation
9 *
10 * This file is part of VirtualBox Open Source Edition (OSE), as
11 * available from http://www.virtualbox.org. This file is free software;
12 * you can redistribute it and/or modify it under the terms of the GNU
13 * General Public License (GPL) as published by the Free Software
14 * Foundation, in version 2 as it comes in the "COPYING" file of the
15 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
16 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
17 */
18
19
20/*********************************************************************************************************************************
21* Header Files *
22*********************************************************************************************************************************/
23#define LOG_GROUP LOG_GROUP_MAIN
24#include "LoggingNew.h"
25
26#include "MouseImpl.h"
27#include "KeyboardImpl.h"
28#include "DisplayImpl.h"
29#include "VMMDev.h"
30#ifdef VBOX_WITH_AUDIO_VRDE
31# include "DrvAudioVRDE.h"
32#endif
33#ifdef VBOX_WITH_AUDIO_RECORDING
34# include "DrvAudioRec.h"
35#endif
36#include "UsbWebcamInterface.h"
37#ifdef VBOX_WITH_USB_CARDREADER
38# include "UsbCardReader.h"
39#endif
40#include "ConsoleImpl.h"
41#ifdef VBOX_WITH_PCI_PASSTHROUGH
42# include "PCIRawDevImpl.h"
43#endif
44
45#include <VBox/vmm/pdmdrv.h>
46#include <VBox/version.h>
47
48
49/**
50 * Register the main drivers.
51 *
52 * @returns VBox status code.
53 * @param pCallbacks Pointer to the callback table.
54 * @param u32Version VBox version number.
55 */
56extern "C" DECLEXPORT(int) VBoxDriversRegister(PCPDMDRVREGCB pCallbacks, uint32_t u32Version)
57{
58 LogFlow(("VBoxDriversRegister: u32Version=%#x\n", u32Version));
59 AssertReleaseMsg(u32Version == VBOX_VERSION, ("u32Version=%#x VBOX_VERSION=%#x\n", u32Version, VBOX_VERSION));
60
61 int rc = pCallbacks->pfnRegister(pCallbacks, &Mouse::DrvReg);
62 if (RT_FAILURE(rc))
63 return rc;
64
65 rc = pCallbacks->pfnRegister(pCallbacks, &Keyboard::DrvReg);
66 if (RT_FAILURE(rc))
67 return rc;
68
69 rc = pCallbacks->pfnRegister(pCallbacks, &Display::DrvReg);
70 if (RT_FAILURE(rc))
71 return rc;
72
73 rc = pCallbacks->pfnRegister(pCallbacks, &VMMDev::DrvReg);
74 if (RT_FAILURE(rc))
75 return rc;
76#ifdef VBOX_WITH_AUDIO_VRDE
77 rc = pCallbacks->pfnRegister(pCallbacks, &AudioVRDE::DrvReg);
78 if (RT_FAILURE(rc))
79 return rc;
80#endif
81#ifdef VBOX_WITH_AUDIO_RECORDING
82 rc = pCallbacks->pfnRegister(pCallbacks, &AudioVideoRec::DrvReg);
83 if (RT_FAILURE(rc))
84 return rc;
85#endif
86
87 rc = pCallbacks->pfnRegister(pCallbacks, &EmWebcam::DrvReg);
88 if (RT_FAILURE(rc))
89 return rc;
90
91#ifdef VBOX_WITH_USB_CARDREADER
92 rc = pCallbacks->pfnRegister(pCallbacks, &UsbCardReader::DrvReg);
93 if (RT_FAILURE(rc))
94 return rc;
95#endif
96
97 rc = pCallbacks->pfnRegister(pCallbacks, &Console::DrvStatusReg);
98 if (RT_FAILURE(rc))
99 return rc;
100
101#ifdef VBOX_WITH_PCI_PASSTHROUGH
102 rc = pCallbacks->pfnRegister(pCallbacks, &PCIRawDev::DrvReg);
103 if (RT_FAILURE(rc))
104 return rc;
105#endif
106
107 return VINF_SUCCESS;
108}
109/* vi: set tabstop=4 shiftwidth=4 expandtab: */
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