VirtualBox

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

Last change on this file since 47469 was 44191, checked in by vboxsync, 11 years ago

include,ExtPacks\Puel\UsbWebcam,Main,VRDP,VBoxManage: emulated USB webcam.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.0 KB
Line 
1/** @file
2 *
3 * Main driver registration.
4 */
5
6/*
7 * Copyright (C) 2006-2012 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. 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 "Nvram.h"
28#ifdef VBOX_WITH_USB_VIDEO
29# include "UsbWebcamInterface.h"
30#endif
31#ifdef VBOX_WITH_USB_CARDREADER
32# include "UsbCardReader.h"
33#endif
34#include "ConsoleImpl.h"
35#ifdef VBOX_WITH_PCI_PASSTHROUGH
36# include "PCIRawDevImpl.h"
37#endif
38
39#include "Logging.h"
40
41#include <VBox/vmm/pdmdrv.h>
42#include <VBox/version.h>
43
44/**
45 * Register the main drivers.
46 *
47 * @returns VBox status code.
48 * @param pCallbacks Pointer to the callback table.
49 * @param u32Version VBox version number.
50 */
51extern "C" DECLEXPORT(int) VBoxDriversRegister(PCPDMDRVREGCB pCallbacks, uint32_t u32Version)
52{
53 LogFlow(("VBoxDriversRegister: u32Version=%#x\n", u32Version));
54 AssertReleaseMsg(u32Version == VBOX_VERSION, ("u32Version=%#x VBOX_VERSION=%#x\n", u32Version, VBOX_VERSION));
55
56 int rc = pCallbacks->pfnRegister(pCallbacks, &Mouse::DrvReg);
57 if (RT_FAILURE(rc))
58 return rc;
59
60 rc = pCallbacks->pfnRegister(pCallbacks, &Keyboard::DrvReg);
61 if (RT_FAILURE(rc))
62 return rc;
63
64 rc = pCallbacks->pfnRegister(pCallbacks, &Display::DrvReg);
65 if (RT_FAILURE(rc))
66 return rc;
67
68 rc = pCallbacks->pfnRegister(pCallbacks, &VMMDev::DrvReg);
69 if (RT_FAILURE(rc))
70 return rc;
71
72 rc = pCallbacks->pfnRegister(pCallbacks, &AudioSniffer::DrvReg);
73 if (RT_FAILURE(rc))
74 return rc;
75
76 rc = pCallbacks->pfnRegister(pCallbacks, &Nvram::DrvReg);
77 if (RT_FAILURE(rc))
78 return rc;
79
80#ifdef VBOX_WITH_USB_VIDEO
81 rc = pCallbacks->pfnRegister(pCallbacks, &EmWebcam::DrvReg);
82 if (RT_FAILURE(rc))
83 return rc;
84#endif
85
86#ifdef VBOX_WITH_USB_CARDREADER
87 rc = pCallbacks->pfnRegister(pCallbacks, &UsbCardReader::DrvReg);
88 if (RT_FAILURE(rc))
89 return rc;
90#endif
91
92 rc = pCallbacks->pfnRegister(pCallbacks, &Console::DrvStatusReg);
93 if (RT_FAILURE(rc))
94 return rc;
95
96#ifdef VBOX_WITH_PCI_PASSTHROUGH
97 rc = pCallbacks->pfnRegister(pCallbacks, &PCIRawDev::DrvReg);
98 if (RT_FAILURE(rc))
99 return rc;
100#endif
101
102 return VINF_SUCCESS;
103}
104/* vi: set tabstop=4 shiftwidth=4 expandtab: */
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use