You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@guacamole.apache.org by jm...@apache.org on 2016/06/02 18:45:21 UTC
[14/26] incubator-guacamole-server git commit: GUACAMOLE-25: Add
support for multiple versions of IWTSVirtualChannelCallback.
GUACAMOLE-25: Add support for multiple versions of IWTSVirtualChannelCallback.
Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/commit/10883323
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/tree/10883323
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/diff/10883323
Branch: refs/heads/master
Commit: 1088332376343c52ca6c66fbd2053146e5b72d22
Parents: ac94fd4
Author: Michael Jumper <mj...@apache.org>
Authored: Sat Apr 16 23:28:50 2016 -0700
Committer: Michael Jumper <mj...@apache.org>
Committed: Wed May 25 13:50:28 2016 -0700
----------------------------------------------------------------------
configure.ac | 22 ++++++++++++++++++++++
src/protocols/rdp/guac_ai/ai_service.c | 29 +++++++++++++++++++++++++++++
2 files changed, 51 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/blob/10883323/configure.ac
----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index 485c10d..04cb6bb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -765,6 +765,28 @@ then
fi
#
+# FreeRDP: IWTSVirtualChannelCallback
+#
+
+if test "x${have_freerdp}" = "xyes"
+then
+ AC_MSG_CHECKING([whether IWTSVirtualChannelCallback.OnDataReceived() uses a wStream])
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <winpr/wtypes.h>
+ #include <freerdp/dvc.h>
+ #include <freerdp/freerdp.h>
+ int __data_received(
+ IWTSVirtualChannelCallback* channel_callback,
+ wStream* stream);
+ IWTSVirtualChannelCallback cb = {
+ .OnDataReceived = __data_received
+ };]])],
+ [AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])
+ AC_DEFINE([LEGACY_IWTSVIRTUALCHANNELCALLBACK],,
+ [Whether the legacy IWTSVirtualChannelCallback API was found])])
+fi
+
+#
# FreeRDP: Decompression function variants
#
http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/blob/10883323/src/protocols/rdp/guac_ai/ai_service.c
----------------------------------------------------------------------
diff --git a/src/protocols/rdp/guac_ai/ai_service.c b/src/protocols/rdp/guac_ai/ai_service.c
index 5b72354..e822f90 100644
--- a/src/protocols/rdp/guac_ai/ai_service.c
+++ b/src/protocols/rdp/guac_ai/ai_service.c
@@ -62,6 +62,7 @@ static void guac_rdp_ai_handle_data(guac_client* client, wStream* stream) {
}
+#if LEGACY_IWTSVIRTUALCHANNELCALLBACK
/**
* Callback which is invoked when data is received along a connection to the
* AUDIO_INPUT plugin. This callback is specific to FreeRDP 1.1 and older.
@@ -93,6 +94,34 @@ static int guac_rdp_ai_data(IWTSVirtualChannelCallback* channel_callback,
return 0;
}
+#else
+/**
+ * Callback which is invoked when data is received along a connection to the
+ * AUDIO_INPUT plugin. This callback is specific to FreeRDP 1.2 and newer.
+ *
+ * @param channel_callback
+ * The IWTSVirtualChannelCallback structure to which this callback was
+ * originally assigned.
+ *
+ * @param stream
+ * The data received.
+ *
+ * @return
+ * Always zero.
+ */
+static int guac_rdp_ai_data(IWTSVirtualChannelCallback* channel_callback,
+ wStream* stream) {
+
+ guac_rdp_ai_channel_callback* ai_channel_callback =
+ (guac_rdp_ai_channel_callback*) channel_callback;
+
+ /* Invoke generalized (API-independent) data handler */
+ guac_rdp_ai_handle_data(ai_channel_callback->client, stream);
+
+ return 0;
+
+}
+#endif
/**
* Callback which is invoked when a connection to the AUDIO_INPUT plugin is