VirtualBox

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

Last change on this file since 61157 was 61157, checked in by vboxsync, 9 years ago

Audio:

  • Unified GPDMAUDIOGSTSTRMIN / PDMAUDIOGSTSTRMOUT / PDMAUDIOHSTSTRMIN / PDMAUDIOHSTSTRMOUT structures to use a single PDMAUDIOSTREAM structure.
  • Cleaned up PDMIAUDIOCONNECTOR / PDMIHOSTAUDIO interfaces.
  • Made the VRDE audio support configurable with VBOX_WITH_VRDE_AUDIO (enabled by default).
  • Updates on mixing buffer handling. Work in progress.
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.1 KB
Line 
1/* $Id: VBoxDriversRegister.cpp 61157 2016-05-24 11:47:09Z vboxsync $ */
2/** @file
3 *
4 * Main driver registration.
5 */
6
7/*
8 * Copyright (C) 2006-2016 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#include "MouseImpl.h"
24#include "KeyboardImpl.h"
25#include "DisplayImpl.h"
26#include "VMMDev.h"
27#ifdef VBOX_WITH_VRDE_AUDIO
28# include "DrvAudioVRDE.h"
29#endif
30#include "Nvram.h"
31#include "UsbWebcamInterface.h"
32#ifdef VBOX_WITH_USB_CARDREADER
33# include "UsbCardReader.h"
34#endif
35#include "ConsoleImpl.h"
36#ifdef VBOX_WITH_PCI_PASSTHROUGH
37# include "PCIRawDevImpl.h"
38#endif
39
40#include "Logging.h"
41
42#include <VBox/vmm/pdmdrv.h>
43#include <VBox/version.h>
44
45/**
46 * Register the main drivers.
47 *
48 * @returns VBox status code.
49 * @param pCallbacks Pointer to the callback table.
50 * @param u32Version VBox version number.
51 */
52extern "C" DECLEXPORT(int) VBoxDriversRegister(PCPDMDRVREGCB pCallbacks, uint32_t u32Version)
53{
54 LogFlow(("VBoxDriversRegister: u32Version=%#x\n", u32Version));
55 AssertReleaseMsg(u32Version == VBOX_VERSION, ("u32Version=%#x VBOX_VERSION=%#x\n", u32Version, VBOX_VERSION));
56
57 int rc = pCallbacks->pfnRegister(pCallbacks, &Mouse::DrvReg);
58 if (RT_FAILURE(rc))
59 return rc;
60
61 rc = pCallbacks->pfnRegister(pCallbacks, &Keyboard::DrvReg);
62 if (RT_FAILURE(rc))
63 return rc;
64
65 rc = pCallbacks->pfnRegister(pCallbacks, &Display::DrvReg);
66 if (RT_FAILURE(rc))
67 return rc;
68
69 rc = pCallbacks->pfnRegister(pCallbacks, &VMMDev::DrvReg);
70 if (RT_FAILURE(rc))
71 return rc;
72#ifdef VBOX_WITH_VRDE_AUDIO
73 rc = pCallbacks->pfnRegister(pCallbacks, &AudioVRDE::DrvReg);
74 if (RT_FAILURE(rc))
75 return rc;
76#endif
77 rc = pCallbacks->pfnRegister(pCallbacks, &Nvram::DrvReg);
78 if (RT_FAILURE(rc))
79 return rc;
80
81 rc = pCallbacks->pfnRegister(pCallbacks, &EmWebcam::DrvReg);
82 if (RT_FAILURE(rc))
83 return rc;
84
85#ifdef VBOX_WITH_USB_CARDREADER
86 rc = pCallbacks->pfnRegister(pCallbacks, &UsbCardReader::DrvReg);
87 if (RT_FAILURE(rc))
88 return rc;
89#endif
90
91 rc = pCallbacks->pfnRegister(pCallbacks, &Console::DrvStatusReg);
92 if (RT_FAILURE(rc))
93 return rc;
94
95#ifdef VBOX_WITH_PCI_PASSTHROUGH
96 rc = pCallbacks->pfnRegister(pCallbacks, &PCIRawDev::DrvReg);
97 if (RT_FAILURE(rc))
98 return rc;
99#endif
100
101 return VINF_SUCCESS;
102}
103/* 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