[1] | 1 | /** @file
|
---|
| 2 | *
|
---|
| 3 | * Main driver registration.
|
---|
| 4 | */
|
---|
| 5 |
|
---|
| 6 | /*
|
---|
[8155] | 7 | * Copyright (C) 2006-2007 Sun Microsystems, Inc.
|
---|
[1] | 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
|
---|
[5999] | 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.
|
---|
[8155] | 16 | *
|
---|
| 17 | * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
|
---|
| 18 | * Clara, CA 95054 USA or visit http://www.sun.com if you need
|
---|
| 19 | * additional information or have any questions.
|
---|
[1] | 20 | */
|
---|
| 21 |
|
---|
| 22 |
|
---|
| 23 | /*******************************************************************************
|
---|
| 24 | * Header Files *
|
---|
| 25 | *******************************************************************************/
|
---|
| 26 | #include "MouseImpl.h"
|
---|
| 27 | #include "KeyboardImpl.h"
|
---|
| 28 | #include "DisplayImpl.h"
|
---|
| 29 | #include "VMMDev.h"
|
---|
| 30 | #include "AudioSnifferInterface.h"
|
---|
| 31 | #include "ConsoleImpl.h"
|
---|
| 32 |
|
---|
| 33 | #include "Logging.h"
|
---|
| 34 |
|
---|
[4015] | 35 | #include <VBox/pdmdrv.h>
|
---|
[1] | 36 | #include <VBox/version.h>
|
---|
| 37 |
|
---|
| 38 | /**
|
---|
| 39 | * Register the main drivers.
|
---|
| 40 | *
|
---|
| 41 | * @returns VBox status code.
|
---|
| 42 | * @param pCallbacks Pointer to the callback table.
|
---|
| 43 | * @param u32Version VBox version number.
|
---|
| 44 | */
|
---|
| 45 | extern "C" DECLEXPORT(int) VBoxDriversRegister(PCPDMDRVREGCB pCallbacks, uint32_t u32Version)
|
---|
| 46 | {
|
---|
| 47 | LogFlow(("VBoxDriversRegister: u32Version=%#x\n", u32Version));
|
---|
| 48 | AssertReleaseMsg(u32Version == VBOX_VERSION, ("u32Version=%#x VBOX_VERSION=%#x\n", u32Version, VBOX_VERSION));
|
---|
| 49 |
|
---|
| 50 | int rc = pCallbacks->pfnRegister(pCallbacks, &Mouse::DrvReg);
|
---|
[13835] | 51 | if (RT_FAILURE(rc))
|
---|
[1] | 52 | return rc;
|
---|
| 53 |
|
---|
| 54 | rc = pCallbacks->pfnRegister(pCallbacks, &Keyboard::DrvReg);
|
---|
[13835] | 55 | if (RT_FAILURE(rc))
|
---|
[1] | 56 | return rc;
|
---|
| 57 |
|
---|
| 58 | rc = pCallbacks->pfnRegister(pCallbacks, &Display::DrvReg);
|
---|
[13835] | 59 | if (RT_FAILURE(rc))
|
---|
[1] | 60 | return rc;
|
---|
| 61 |
|
---|
| 62 | rc = pCallbacks->pfnRegister(pCallbacks, &VMMDev::DrvReg);
|
---|
[13835] | 63 | if (RT_FAILURE(rc))
|
---|
[1] | 64 | return rc;
|
---|
| 65 |
|
---|
| 66 | rc = pCallbacks->pfnRegister(pCallbacks, &AudioSniffer::DrvReg);
|
---|
[13835] | 67 | if (RT_FAILURE(rc))
|
---|
[1] | 68 | return rc;
|
---|
| 69 |
|
---|
| 70 | rc = pCallbacks->pfnRegister(pCallbacks, &Console::DrvStatusReg);
|
---|
[13835] | 71 | if (RT_FAILURE(rc))
|
---|
[1] | 72 | return rc;
|
---|
| 73 | return VINF_SUCCESS;
|
---|
| 74 | }
|
---|
[14772] | 75 | /* vi: set tabstop=4 shiftwidth=4 expandtab: */
|
---|