VirtualBox

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

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

*: scm cleanup run.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.0 KB
Line 
1/* $Id: VBoxDriversRegister.cpp 57358 2015-08-14 15:16:38Z vboxsync $ */
2/** @file
3 *
4 * Main driver registration.
5 */
6
7/*
8 * Copyright (C) 2006-2015 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#include "DrvAudioVRDE.h"
28#include "Nvram.h"
29#include "UsbWebcamInterface.h"
30#ifdef VBOX_WITH_USB_CARDREADER
31# include "UsbCardReader.h"
32#endif
33#include "ConsoleImpl.h"
34#ifdef VBOX_WITH_PCI_PASSTHROUGH
35# include "PCIRawDevImpl.h"
36#endif
37
38#include "Logging.h"
39
40#include <VBox/vmm/pdmdrv.h>
41#include <VBox/version.h>
42
43/**
44 * Register the main drivers.
45 *
46 * @returns VBox status code.
47 * @param pCallbacks Pointer to the callback table.
48 * @param u32Version VBox version number.
49 */
50extern "C" DECLEXPORT(int) VBoxDriversRegister(PCPDMDRVREGCB pCallbacks, uint32_t u32Version)
51{
52 LogFlow(("VBoxDriversRegister: u32Version=%#x\n", u32Version));
53 AssertReleaseMsg(u32Version == VBOX_VERSION, ("u32Version=%#x VBOX_VERSION=%#x\n", u32Version, VBOX_VERSION));
54
55 int rc = pCallbacks->pfnRegister(pCallbacks, &Mouse::DrvReg);
56 if (RT_FAILURE(rc))
57 return rc;
58
59 rc = pCallbacks->pfnRegister(pCallbacks, &Keyboard::DrvReg);
60 if (RT_FAILURE(rc))
61 return rc;
62
63 rc = pCallbacks->pfnRegister(pCallbacks, &Display::DrvReg);
64 if (RT_FAILURE(rc))
65 return rc;
66
67 rc = pCallbacks->pfnRegister(pCallbacks, &VMMDev::DrvReg);
68 if (RT_FAILURE(rc))
69 return rc;
70
71 rc = pCallbacks->pfnRegister(pCallbacks, &AudioVRDE::DrvReg);
72 if (RT_FAILURE(rc))
73 return rc;
74
75 rc = pCallbacks->pfnRegister(pCallbacks, &Nvram::DrvReg);
76 if (RT_FAILURE(rc))
77 return rc;
78
79 rc = pCallbacks->pfnRegister(pCallbacks, &EmWebcam::DrvReg);
80 if (RT_FAILURE(rc))
81 return rc;
82
83#ifdef VBOX_WITH_USB_CARDREADER
84 rc = pCallbacks->pfnRegister(pCallbacks, &UsbCardReader::DrvReg);
85 if (RT_FAILURE(rc))
86 return rc;
87#endif
88
89 rc = pCallbacks->pfnRegister(pCallbacks, &Console::DrvStatusReg);
90 if (RT_FAILURE(rc))
91 return rc;
92
93#ifdef VBOX_WITH_PCI_PASSTHROUGH
94 rc = pCallbacks->pfnRegister(pCallbacks, &PCIRawDev::DrvReg);
95 if (RT_FAILURE(rc))
96 return rc;
97#endif
98
99 return VINF_SUCCESS;
100}
101/* 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