Partial conversion to WinPR + compat.

This commit is contained in:
Michael Jumper 2013-07-16 19:40:35 -07:00
parent 20ca4ef6f6
commit bdc5d862db
5 changed files with 63 additions and 7 deletions

View File

@ -89,6 +89,11 @@ noinst_HEADERS = \
rdp_pointer.h \
wav_encoder.h
# Add compatibility layer for WinPR if not available
if ! ENABLE_WINPR
noinst_HEADERS += winpr-compat/stream.h
endif
# Compile OGG support if available
if ENABLE_OGG
libguac_client_rdp_la_SOURCES += ogg_encoder.c

View File

@ -40,9 +40,14 @@
#include <string.h>
#include <freerdp/constants.h>
#include <freerdp/types.h>
#include <freerdp/utils/stream.h>
#include <freerdp/utils/svc_plugin.h>
#ifdef ENABLE_WINPR
#include <winpr/stream.h>
#else
#include "winpr-compat/stream.h"
#endif
#include <guacamole/client.h>
#include "audio.h"

View File

@ -127,35 +127,35 @@ typedef struct guac_rdpsnd_pdu_header {
* Handler for the SNDC_FORMATS (Server Audio Formats and Version) PDU.
*/
void guac_rdpsnd_formats_handler(guac_rdpsndPlugin* rdpsnd,
audio_stream* audio, STREAM* input_stream,
audio_stream* audio, wStream* input_stream,
guac_rdpsnd_pdu_header* header);
/**
* Handler for the SNDC_TRAINING (Training) PDU.
*/
void guac_rdpsnd_training_handler(guac_rdpsndPlugin* rdpsnd,
audio_stream* audio, STREAM* input_stream,
audio_stream* audio, wStream* input_stream,
guac_rdpsnd_pdu_header* header);
/**
* Handler for the SNDC_WAVE (WaveInfo) PDU.
*/
void guac_rdpsnd_wave_info_handler(guac_rdpsndPlugin* rdpsnd,
audio_stream* audio, STREAM* input_stream,
audio_stream* audio, wStream* input_stream,
guac_rdpsnd_pdu_header* header);
/**
* Handler for the SNDWAV (Wave) PDU which follows any WaveInfo PDU.
*/
void guac_rdpsnd_wave_handler(guac_rdpsndPlugin* rdpsnd,
audio_stream* audio, STREAM* input_stream,
audio_stream* audio, wStream* input_stream,
guac_rdpsnd_pdu_header* header);
/**
* Handler for the SNDC_CLOSE (Close) PDU.
*/
void guac_rdpsnd_close_handler(guac_rdpsndPlugin* rdpsnd,
audio_stream* audio, STREAM* input_stream,
audio_stream* audio, wStream* input_stream,
guac_rdpsnd_pdu_header* header);
#endif

View File

@ -129,7 +129,7 @@ void guac_rdpsnd_process_connect(rdpSvcPlugin* plugin);
* Handler called when this plugin receives data along its designated channel.
*/
void guac_rdpsnd_process_receive(rdpSvcPlugin* plugin,
STREAM* input_stream);
wStream* input_stream);
/**
* Handler called when this plugin is being unloaded.

View File

@ -0,0 +1,46 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is libguac-client-rdp.
*
* The Initial Developer of the Original Code is
* Michael Jumper.
* Portions created by the Initial Developer are Copyright (C) 2010
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef __GUAC_WINPR_STREAM_COMPAT_H
#define __GUAC_WINPR_STREAM_COMPAT_H
/* FreeRDP 1.0 streams */
#define Stream_Write_UINT8 stream_write_uint8
#define wStream STREAM
#endif