VirtualBox

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

Last change on this file since 35685 was 35685, checked in by vboxsync, 14 years ago

Main, Device: passthrough conditional

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.4 KB
Line 
1/** @file
2 *
3 * Main driver registration.
4 */
5
6/*
7 * Copyright (C) 2006-2007 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.215389.xyz. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18
19/*******************************************************************************
20* Header Files *
21*******************************************************************************/
22#include "MouseImpl.h"
23#include "KeyboardImpl.h"
24#include "DisplayImpl.h"
25#include "VMMDev.h"
26#include "AudioSnifferInterface.h"
27#include "ConsoleImpl.h"
28#ifdef VBOX_WITH_PCI_PASSTHROUGH
29#include "PciRawDevImpl.h"
30#endif
31
32#include "Logging.h"
33
34#include <VBox/vmm/pdmdrv.h>
35#include <VBox/version.h>
36
37/**
38 * Register the main drivers.
39 *
40 * @returns VBox status code.
41 * @param pCallbacks Pointer to the callback table.
42 * @param u32Version VBox version number.
43 */
44extern "C" DECLEXPORT(int) VBoxDriversRegister(PCPDMDRVREGCB pCallbacks, uint32_t u32Version)
45{
46 LogFlow(("VBoxDriversRegister: u32Version=%#x\n", u32Version));
47 AssertReleaseMsg(u32Version == VBOX_VERSION, ("u32Version=%#x VBOX_VERSION=%#x\n", u32Version, VBOX_VERSION));
48
49 int rc = pCallbacks->pfnRegister(pCallbacks, &Mouse::DrvReg);
50 if (RT_FAILURE(rc))
51 return rc;
52
53 rc = pCallbacks->pfnRegister(pCallbacks, &Keyboard::DrvReg);
54 if (RT_FAILURE(rc))
55 return rc;
56
57 rc = pCallbacks->pfnRegister(pCallbacks, &Display::DrvReg);
58 if (RT_FAILURE(rc))
59 return rc;
60
61 rc = pCallbacks->pfnRegister(pCallbacks, &VMMDev::DrvReg);
62 if (RT_FAILURE(rc))
63 return rc;
64
65 rc = pCallbacks->pfnRegister(pCallbacks, &AudioSniffer::DrvReg);
66 if (RT_FAILURE(rc))
67 return rc;
68
69 rc = pCallbacks->pfnRegister(pCallbacks, &Console::DrvStatusReg);
70 if (RT_FAILURE(rc))
71 return rc;
72
73#ifdef VBOX_WITH_PCI_PASSTHROUGH
74 rc = pCallbacks->pfnRegister(pCallbacks, &PciRawDev::DrvReg);
75 if (RT_FAILURE(rc))
76 return rc;
77#endif
78
79 return VINF_SUCCESS;
80}
81/* 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