VirtualBox

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

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

Main,ExtPacks/Puel/UsbWebcam: UsbWebcam intergration.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.6 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#include "ConsoleImpl.h"
31#ifdef VBOX_WITH_PCI_PASSTHROUGH
32# include "PciRawDevImpl.h"
33#endif
34
35#include "Logging.h"
36
37#include <VBox/vmm/pdmdrv.h>
38#include <VBox/version.h>
39
40/**
41 * Register the main drivers.
42 *
43 * @returns VBox status code.
44 * @param pCallbacks Pointer to the callback table.
45 * @param u32Version VBox version number.
46 */
47extern "C" DECLEXPORT(int) VBoxDriversRegister(PCPDMDRVREGCB pCallbacks, uint32_t u32Version)
48{
49 LogFlow(("VBoxDriversRegister: u32Version=%#x\n", u32Version));
50 AssertReleaseMsg(u32Version == VBOX_VERSION, ("u32Version=%#x VBOX_VERSION=%#x\n", u32Version, VBOX_VERSION));
51
52 int rc = pCallbacks->pfnRegister(pCallbacks, &Mouse::DrvReg);
53 if (RT_FAILURE(rc))
54 return rc;
55
56 rc = pCallbacks->pfnRegister(pCallbacks, &Keyboard::DrvReg);
57 if (RT_FAILURE(rc))
58 return rc;
59
60 rc = pCallbacks->pfnRegister(pCallbacks, &Display::DrvReg);
61 if (RT_FAILURE(rc))
62 return rc;
63
64 rc = pCallbacks->pfnRegister(pCallbacks, &VMMDev::DrvReg);
65 if (RT_FAILURE(rc))
66 return rc;
67
68 rc = pCallbacks->pfnRegister(pCallbacks, &AudioSniffer::DrvReg);
69 if (RT_FAILURE(rc))
70 return rc;
71
72#ifdef VBOX_WITH_USB_VIDEO
73 rc = pCallbacks->pfnRegister(pCallbacks, &UsbWebcamInterface::DrvReg);
74 if (RT_FAILURE(rc))
75 return rc;
76#endif
77
78 rc = pCallbacks->pfnRegister(pCallbacks, &Console::DrvStatusReg);
79 if (RT_FAILURE(rc))
80 return rc;
81
82#ifdef VBOX_WITH_PCI_PASSTHROUGH
83 rc = pCallbacks->pfnRegister(pCallbacks, &PciRawDev::DrvReg);
84 if (RT_FAILURE(rc))
85 return rc;
86#endif
87
88 return VINF_SUCCESS;
89}
90/* 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