1 /**
2  * FreeRDP: A Remote Desktop Protocol Implementation
3  * Audio Input Redirection Virtual Channel
4  *
5  * Copyright 2010-2011 Vic Lee
6  * Copyright 2015 Thincast Technologies GmbH
7  * Copyright 2015 DI (FH) Martin Haimberger <martin.haimberger@thincast.com>
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  *     http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  */
21 
22 #ifndef FREERDP_CHANNEL_AUDIN_CLIENT_AUDIN_H
23 #define FREERDP_CHANNEL_AUDIN_CLIENT_AUDIN_H
24 
25 #include <freerdp/channels/audin.h>
26 #include <freerdp/freerdp.h>
27 #include <freerdp/codec/audio.h>
28 
29 /**
30  * Subsystem Interface
31  */
32 
33 typedef UINT (*AudinReceive)(const AUDIO_FORMAT* format, const BYTE* data, size_t size,
34                              void* userData);
35 
36 typedef struct _IAudinDevice IAudinDevice;
37 struct _IAudinDevice
38 {
39 	UINT (*Open)(IAudinDevice* devplugin, AudinReceive receive, void* userData);
40 	BOOL (*FormatSupported)(IAudinDevice* devplugin, const AUDIO_FORMAT* format);
41 	UINT (*SetFormat)(IAudinDevice* devplugin, const AUDIO_FORMAT* format, UINT32 FramesPerPacket);
42 	UINT (*Close)(IAudinDevice* devplugin);
43 	UINT (*Free)(IAudinDevice* devplugin);
44 };
45 
46 #define AUDIN_DEVICE_EXPORT_FUNC_NAME "freerdp_audin_client_subsystem_entry"
47 
48 typedef UINT (*PREGISTERAUDINDEVICE)(IWTSPlugin* plugin, IAudinDevice* device);
49 
50 struct _FREERDP_AUDIN_DEVICE_ENTRY_POINTS
51 {
52 	IWTSPlugin* plugin;
53 	PREGISTERAUDINDEVICE pRegisterAudinDevice;
54 	ADDIN_ARGV* args;
55 	rdpContext* rdpcontext;
56 };
57 typedef struct _FREERDP_AUDIN_DEVICE_ENTRY_POINTS FREERDP_AUDIN_DEVICE_ENTRY_POINTS;
58 typedef FREERDP_AUDIN_DEVICE_ENTRY_POINTS* PFREERDP_AUDIN_DEVICE_ENTRY_POINTS;
59 
60 typedef UINT (*PFREERDP_AUDIN_DEVICE_ENTRY)(PFREERDP_AUDIN_DEVICE_ENTRY_POINTS pEntryPoints);
61 
62 #endif /* FREERDP_CHANNEL_AUDIN_CLIENT_AUDIN_H */
63