1 | /* $Id: DrvAudioVRDE.h 88382 2021-04-07 09:16:12Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VirtualBox driver interface to VRDE backend.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2014-2020 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 | #ifndef MAIN_INCLUDED_DrvAudioVRDE_h
|
---|
19 | #define MAIN_INCLUDED_DrvAudioVRDE_h
|
---|
20 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
21 | # pragma once
|
---|
22 | #endif
|
---|
23 |
|
---|
24 | #include <VBox/com/ptr.h>
|
---|
25 | #include <VBox/com/string.h>
|
---|
26 |
|
---|
27 | #include <VBox/RemoteDesktop/VRDE.h>
|
---|
28 |
|
---|
29 | #include <VBox/vmm/pdmdrv.h>
|
---|
30 | #include <VBox/vmm/pdmifs.h>
|
---|
31 |
|
---|
32 | #include "AudioDriver.h"
|
---|
33 |
|
---|
34 | using namespace com;
|
---|
35 |
|
---|
36 | class Console;
|
---|
37 |
|
---|
38 | class AudioVRDE : public AudioDriver
|
---|
39 | {
|
---|
40 |
|
---|
41 | public:
|
---|
42 |
|
---|
43 | AudioVRDE(Console *pConsole);
|
---|
44 | virtual ~AudioVRDE(void);
|
---|
45 |
|
---|
46 | public:
|
---|
47 |
|
---|
48 | static const PDMDRVREG DrvReg;
|
---|
49 |
|
---|
50 | public:
|
---|
51 |
|
---|
52 | void onVRDEClientConnect(uint32_t uClientID);
|
---|
53 | void onVRDEClientDisconnect(uint32_t uClientID);
|
---|
54 | int onVRDEControl(bool fEnable, uint32_t uFlags);
|
---|
55 | int onVRDEInputBegin(void *pvContext, PVRDEAUDIOINBEGIN pVRDEAudioBegin);
|
---|
56 | int onVRDEInputData(void *pvContext, const void *pvData, uint32_t cbData);
|
---|
57 | int onVRDEInputEnd(void *pvContext);
|
---|
58 | int onVRDEInputIntercept(bool fIntercept);
|
---|
59 |
|
---|
60 | public:
|
---|
61 |
|
---|
62 | static DECLCALLBACK(int) drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags);
|
---|
63 | static DECLCALLBACK(void) drvDestruct(PPDMDRVINS pDrvIns);
|
---|
64 | static DECLCALLBACK(void) drvPowerOff(PPDMDRVINS pDrvIns);
|
---|
65 |
|
---|
66 | private:
|
---|
67 |
|
---|
68 | int configureDriver(PCFGMNODE pLunCfg);
|
---|
69 |
|
---|
70 | /** Pointer to the associated VRDE audio driver. */
|
---|
71 | struct DRVAUDIOVRDE *mpDrv;
|
---|
72 | };
|
---|
73 |
|
---|
74 | #endif /* !MAIN_INCLUDED_DrvAudioVRDE_h */
|
---|
75 |
|
---|