VirtualBox

source: vbox/trunk/src/VBox/Main/VBoxDriversRegister.cpp@ 2953

Last change on this file since 2953 was 1, checked in by vboxsync, 55 years ago

import

  • 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 InnoTek Systemberatung GmbH
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 as published by the Free Software Foundation,
13 * in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
14 * distribution. VirtualBox OSE is distributed in the hope that it will
15 * be useful, but WITHOUT ANY WARRANTY of any kind.
16 *
17 * If you received this file as part of a commercial VirtualBox
18 * distribution, then only the terms of your commercial VirtualBox
19 * license agreement apply instead of the previous paragraph.
20 */
21
22
23/*******************************************************************************
24* Header Files *
25*******************************************************************************/
26
27#include "MouseImpl.h"
28#include "KeyboardImpl.h"
29#include "DisplayImpl.h"
30#include "VMMDev.h"
31#include "AudioSnifferInterface.h"
32#include "ConsoleImpl.h"
33
34#include "Logging.h"
35
36#include <VBox/pdm.h>
37
38#include <VBox/version.h>
39#include <VBox/err.h>
40
41/**
42 * Register the main drivers.
43 *
44 * @returns VBox status code.
45 * @param pCallbacks Pointer to the callback table.
46 * @param u32Version VBox version number.
47 */
48extern "C" DECLEXPORT(int) VBoxDriversRegister(PCPDMDRVREGCB pCallbacks, uint32_t u32Version)
49{
50 LogFlow(("VBoxDriversRegister: u32Version=%#x\n", u32Version));
51 AssertReleaseMsg(u32Version == VBOX_VERSION, ("u32Version=%#x VBOX_VERSION=%#x\n", u32Version, VBOX_VERSION));
52
53 int rc = pCallbacks->pfnRegister(pCallbacks, &Mouse::DrvReg);
54 if (VBOX_FAILURE(rc))
55 return rc;
56
57 rc = pCallbacks->pfnRegister(pCallbacks, &Keyboard::DrvReg);
58 if (VBOX_FAILURE(rc))
59 return rc;
60
61 rc = pCallbacks->pfnRegister(pCallbacks, &Display::DrvReg);
62 if (VBOX_FAILURE(rc))
63 return rc;
64
65 rc = pCallbacks->pfnRegister(pCallbacks, &VMMDev::DrvReg);
66 if (VBOX_FAILURE(rc))
67 return rc;
68
69 rc = pCallbacks->pfnRegister(pCallbacks, &AudioSniffer::DrvReg);
70 if (VBOX_FAILURE(rc))
71 return rc;
72
73 rc = pCallbacks->pfnRegister(pCallbacks, &Console::DrvStatusReg);
74 if (VBOX_FAILURE(rc))
75 return rc;
76 return VINF_SUCCESS;
77}
78
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette