GUAC-707 support for latest FreeRDP release (1.2.0-beta1)

This commit is contained in:
Felipe Weckx 2014-07-08 10:05:22 -03:00 committed by Michael Jumper
parent 0adf16c501
commit 8c1a152467
5 changed files with 42 additions and 10 deletions

View File

@ -326,8 +326,8 @@ AC_CHECK_LIB([freerdp-core], [freerdp_new],
--------------------------------------------])
have_freerdp=no])
# libfreerdp-channels (1.0) / libfreerdp-client (1.1+)
AC_CHECK_LIB([freerdp-client], [freerdp_channels_new],
# libfreerdp-channels (1.0) / libfreerdp-client (1.1) / libfreerdp-core (1.2+)
AC_SEARCH_LIBS([freerdp_channels_new], [freerdp-core freerdp-client],
[RDP_LIBS="$RDP_LIBS -lfreerdp-client"],
[AC_CHECK_LIB([freerdp-channels], [freerdp_channels_new],
[RDP_LIBS="$RDP_LIBS -lfreerdp-channels"
@ -506,6 +506,20 @@ if test "x${rdpsettings_fastpath}" = "xyes"; then
[Whether the rdpSettings structure has FastPath settings])
fi
# Check if freerdp_channels_global_init exists
AC_SEARCH_LIBS([freerdp_channels_global_init], [freerdp-channels],
[AC_DEFINE([HAVE_FREERDP_CHANNELS_GLOBAL_INIT],,
[Wheter the freerdp_channels_global_init() is defined])],,)
# Check if the type CHANNEL_ENTRY_POINTS_FREERDP exists, if not define it to CHANNEL_ENTRY_POINTS_EX
AC_CHECK_TYPE([CHANNEL_ENTRY_POINTS_FREERDP],,
AC_DEFINE([CHANNEL_ENTRY_POINTS_FREERDP],[CHANNEL_ENTRY_POINTS_EX], [Type compatibility]),
[[#include <freerdp/svc.h>]])
# Check if the freerdp version header exists
AC_CHECK_HEADERS([freerdp/version.h])
#
# FreeRDP: rdpBitmap
#

View File

@ -67,6 +67,10 @@
#include <freerdp/client/channels.h>
#endif
#ifdef HAVE_FREERDP_VERSION_H
#include <freerdp/version.h>
#endif
#include <pthread.h>
#include <stdlib.h>
#include <string.h>
@ -128,7 +132,13 @@ enum RDP_ARGS_IDX {
RDP_ARGS_COUNT
};
#ifdef LEGACY_FREERDP
int __guac_receive_channel_data(freerdp* rdp_inst, int channelId, UINT8* data, int size, int flags, int total_size) {
#elif defined(FREERDP_VERSION_MAJOR) && (FREERDP_VERSION_MAJOR == 1 && FREERDP_VERSION_MINOR == 2)
int __guac_receive_channel_data(freerdp* rdp_inst, UINT16 channelId, BYTE* data, int size, int flags, int total_size) {
#else
int __guac_receive_channel_data(freerdp* rdp_inst, int channelId, BYTE* data, int size, int flags, int total_size) {
#endif
return freerdp_channels_data(rdp_inst, channelId, data, size, flags, total_size);
}
@ -468,7 +478,9 @@ int guac_client_init(guac_client* client, int argc, char** argv) {
srandom(time(NULL));
/* Init client */
#ifdef HAVE_FREERDP_CHANNELS_GLOBAL_INIT
freerdp_channels_global_init();
#endif
rdp_inst = freerdp_new();
rdp_inst->PreConnect = rdp_freerdp_pre_connect;
rdp_inst->PostConnect = rdp_freerdp_post_connect;

View File

@ -45,8 +45,8 @@
int VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints) {
/* Gain access to plugin data */
CHANNEL_ENTRY_POINTS_EX* entry_points_ex =
(CHANNEL_ENTRY_POINTS_EX*) pEntryPoints;
CHANNEL_ENTRY_POINTS_FREERDP* entry_points_ex =
(CHANNEL_ENTRY_POINTS_FREERDP*) pEntryPoints;
/* Allocate plugin */
guac_svcPlugin* svc_plugin =

View File

@ -130,11 +130,15 @@
/*
* Information constants.
* FreeRDP 1.1+ already defines those constants
*/
#ifdef LEGACY_FREERDP
#define FILE_SUPERSEDED 0x00000000
#define FILE_OPENED 0x00000001
#define FILE_OVERWRITTEN 0x00000003a
#define FILE_OVERWRITTEN 0x00000003
#endif
/*
* File attributes.

View File

@ -32,6 +32,7 @@
#include "config.h"
#ifndef STATUS_SUCCESS
#define STATUS_SUCCESS 0x00000000
#define STATUS_NO_MORE_FILES 0x80000006
#define STATUS_DEVICE_OFF_LINE 0x80000010
@ -50,8 +51,9 @@
#define STATUS_CANNOT_DELETE 0xC0000121
#define STATUS_FILE_DELETED 0xC0000123
#define STATUS_FILE_CLOSED 0xC0000128
#endif
#define STATUS_FILE_SYSTEM_LIMITATION 0xC0000427
#define STATUS_FILE_TOO_LARGE 0xC0000904
#endif