VirtualBox

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

Last change on this file since 55401 was 55401, checked in by vboxsync, 10 years ago

added a couple of missing Id headers

  • 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 55401 2015-04-23 10:03:17Z vboxsync $ */
2/** @file
3 *
4 * Main driver registration.
5 */
6
7/*
8 * Copyright (C) 2006-2012 Oracle Corporation
9 *
10 * This file is part of VirtualBox Open Source Edition (OSE), as
11 * available from http://www.215389.xyz. 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_PDM_AUDIO_DRIVER
28#include "DrvAudioVRDE.h"
29#else
30#include "AudioSnifferInterface.h"
31#endif
32#include "Nvram.h"
33#include "UsbWebcamInterface.h"
34#ifdef VBOX_WITH_USB_CARDREADER
35# include "UsbCardReader.h"
36#endif
37#include "ConsoleImpl.h"
38#ifdef VBOX_WITH_PCI_PASSTHROUGH
39# include "PCIRawDevImpl.h"
40#endif
41
42#include "Logging.h"
43
44#include <VBox/vmm/pdmdrv.h>
45#include <VBox/version.h>
46
47/**
48 * Register the main drivers.
49 *
50 * @returns VBox status code.
51 * @param pCallbacks Pointer to the callback table.
52 * @param u32Version VBox version number.
53 */
54extern "C" DECLEXPORT(int) VBoxDriversRegister(PCPDMDRVREGCB pCallbacks, uint32_t u32Version)
55{
56 LogFlow(("VBoxDriversRegister: u32Version=%#x\n", u32Version));
57 AssertReleaseMsg(u32Version == VBOX_VERSION, ("u32Version=%#x VBOX_VERSION=%#x\n", u32Version, VBOX_VERSION));
58
59 int rc = pCallbacks->pfnRegister(pCallbacks, &Mouse::DrvReg);
60 if (RT_FAILURE(rc))
61 return rc;
62
63 rc = pCallbacks->pfnRegister(pCallbacks, &Keyboard::DrvReg);
64 if (RT_FAILURE(rc))
65 return rc;
66
67 rc = pCallbacks->pfnRegister(pCallbacks, &Display::DrvReg);
68 if (RT_FAILURE(rc))
69 return rc;
70
71 rc = pCallbacks->pfnRegister(pCallbacks, &VMMDev::DrvReg);
72 if (RT_FAILURE(rc))
73 return rc;
74
75#ifdef VBOX_WITH_PDM_AUDIO_DRIVER
76 rc = pCallbacks->pfnRegister(pCallbacks, &AudioVRDE::DrvReg);
77#else
78 rc = pCallbacks->pfnRegister(pCallbacks, &AudioSniffer::DrvReg);
79#endif
80 if (RT_FAILURE(rc))
81 return rc;
82
83 rc = pCallbacks->pfnRegister(pCallbacks, &Nvram::DrvReg);
84 if (RT_FAILURE(rc))
85 return rc;
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.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette