VirtualBox

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

Last change on this file since 41352 was 41352, checked in by vboxsync, 13 years ago

Main: remote smartcard

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.8 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#ifdef VBOX_WITH_USB_VIDEO
28# include "UsbWebcamInterface.h"
29#endif
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, &AudioSniffer::DrvReg);
72 if (RT_FAILURE(rc))
73 return rc;
74
75#ifdef VBOX_WITH_USB_VIDEO
76 rc = pCallbacks->pfnRegister(pCallbacks, &UsbWebcamInterface::DrvReg);
77 if (RT_FAILURE(rc))
78 return rc;
79#endif
80
81#ifdef VBOX_WITH_USB_CARDREADER
82 rc = pCallbacks->pfnRegister(pCallbacks, &UsbCardReader::DrvReg);
83 if (RT_FAILURE(rc))
84 return rc;
85#endif
86
87 rc = pCallbacks->pfnRegister(pCallbacks, &Console::DrvStatusReg);
88 if (RT_FAILURE(rc))
89 return rc;
90
91#ifdef VBOX_WITH_PCI_PASSTHROUGH
92 rc = pCallbacks->pfnRegister(pCallbacks, &PciRawDev::DrvReg);
93 if (RT_FAILURE(rc))
94 return rc;
95#endif
96
97 return VINF_SUCCESS;
98}
99/* 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