VirtualBox

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

Last change on this file since 70772 was 70496, checked in by vboxsync, 6 years ago

Audio: Renamed VBOX_WITH_VRDE_AUDIO -> VBOX_WITH_AUDIO_VRDE.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.4 KB
RevLine 
[55401]1/* $Id: VBoxDriversRegister.cpp 70496 2018-01-09 16:09:23Z vboxsync $ */
[1]2/** @file
3 *
4 * Main driver registration.
5 */
6
7/*
[70496]8 * Copyright (C) 2006-2018 Oracle Corporation
[1]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
[5999]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.
[1]17 */
18
19
[57358]20/*********************************************************************************************************************************
21* Header Files *
22*********************************************************************************************************************************/
[67914]23#define LOG_GROUP LOG_GROUP_MAIN
24#include "LoggingNew.h"
25
[1]26#include "MouseImpl.h"
27#include "KeyboardImpl.h"
28#include "DisplayImpl.h"
29#include "VMMDev.h"
[70496]30#ifdef VBOX_WITH_AUDIO_VRDE
[61157]31# include "DrvAudioVRDE.h"
32#endif
[65171]33#ifdef VBOX_WITH_AUDIO_VIDEOREC
34# include "DrvAudioVideoRec.h"
35#endif
[43131]36#include "Nvram.h"
[48406]37#include "UsbWebcamInterface.h"
[41352]38#ifdef VBOX_WITH_USB_CARDREADER
39# include "UsbCardReader.h"
40#endif
[1]41#include "ConsoleImpl.h"
[35685]42#ifdef VBOX_WITH_PCI_PASSTHROUGH
[42551]43# include "PCIRawDevImpl.h"
[35685]44#endif
[1]45
[35346]46#include <VBox/vmm/pdmdrv.h>
[1]47#include <VBox/version.h>
48
[67914]49
[1]50/**
51 * Register the main drivers.
52 *
53 * @returns VBox status code.
54 * @param pCallbacks Pointer to the callback table.
55 * @param u32Version VBox version number.
56 */
57extern "C" DECLEXPORT(int) VBoxDriversRegister(PCPDMDRVREGCB pCallbacks, uint32_t u32Version)
58{
59 LogFlow(("VBoxDriversRegister: u32Version=%#x\n", u32Version));
60 AssertReleaseMsg(u32Version == VBOX_VERSION, ("u32Version=%#x VBOX_VERSION=%#x\n", u32Version, VBOX_VERSION));
61
62 int rc = pCallbacks->pfnRegister(pCallbacks, &Mouse::DrvReg);
[13835]63 if (RT_FAILURE(rc))
[1]64 return rc;
65
66 rc = pCallbacks->pfnRegister(pCallbacks, &Keyboard::DrvReg);
[13835]67 if (RT_FAILURE(rc))
[1]68 return rc;
69
70 rc = pCallbacks->pfnRegister(pCallbacks, &Display::DrvReg);
[13835]71 if (RT_FAILURE(rc))
[1]72 return rc;
73
74 rc = pCallbacks->pfnRegister(pCallbacks, &VMMDev::DrvReg);
[13835]75 if (RT_FAILURE(rc))
[1]76 return rc;
[70496]77#ifdef VBOX_WITH_AUDIO_VRDE
[53442]78 rc = pCallbacks->pfnRegister(pCallbacks, &AudioVRDE::DrvReg);
[13835]79 if (RT_FAILURE(rc))
[1]80 return rc;
[61157]81#endif
[65171]82#ifdef VBOX_WITH_AUDIO_VIDEOREC
83 rc = pCallbacks->pfnRegister(pCallbacks, &AudioVideoRec::DrvReg);
84 if (RT_FAILURE(rc))
85 return rc;
86#endif
[43131]87 rc = pCallbacks->pfnRegister(pCallbacks, &Nvram::DrvReg);
88 if (RT_FAILURE(rc))
89 return rc;
90
[44191]91 rc = pCallbacks->pfnRegister(pCallbacks, &EmWebcam::DrvReg);
[37282]92 if (RT_FAILURE(rc))
93 return rc;
94
[41352]95#ifdef VBOX_WITH_USB_CARDREADER
96 rc = pCallbacks->pfnRegister(pCallbacks, &UsbCardReader::DrvReg);
97 if (RT_FAILURE(rc))
98 return rc;
99#endif
100
[1]101 rc = pCallbacks->pfnRegister(pCallbacks, &Console::DrvStatusReg);
[13835]102 if (RT_FAILURE(rc))
[1]103 return rc;
[35676]104
[35685]105#ifdef VBOX_WITH_PCI_PASSTHROUGH
[42551]106 rc = pCallbacks->pfnRegister(pCallbacks, &PCIRawDev::DrvReg);
[35676]107 if (RT_FAILURE(rc))
108 return rc;
[35685]109#endif
[35676]110
[1]111 return VINF_SUCCESS;
112}
[14772]113/* vi: set tabstop=4 shiftwidth=4 expandtab: */
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use