Init bitmap handlers, use xzalloc (part of libfreerdp-utils).
This commit is contained in:
parent
cf4d9b0c5e
commit
149ea16a6f
@ -46,8 +46,9 @@ AC_PROG_LIBTOOL
|
||||
# Checks for libraries.
|
||||
AC_CHECK_LIB([guac], [guac_client_plugin_open],, AC_MSG_ERROR("libguac must be installed first"))
|
||||
AC_CHECK_LIB([cairo], [cairo_create],, AC_MSG_ERROR("cairo is required for drawing instructions"))
|
||||
AC_CHECK_LIB([freerdp-core], [freerdp_new],, AC_MSG_ERROR("libfreerdp is required"))
|
||||
AC_CHECK_LIB([freerdp-channels], [freerdp_channels_new],, AC_MSG_ERROR("libfreerdp is required"))
|
||||
AC_CHECK_LIB([freerdp-core], [freerdp_new],, AC_MSG_ERROR("libfreerdp-core is required (part of FreeRDP)"))
|
||||
AC_CHECK_LIB([freerdp-channels], [freerdp_channels_new],, AC_MSG_ERROR("libfreerdp-channels is required (part of FreeRDP)"))
|
||||
AC_CHECK_LIB([freerdp-utils], [xzalloc],, AC_MSG_ERROR("libfreerdp-utils is required (part of FreeRDP)"))
|
||||
|
||||
# Checks for header files.
|
||||
AC_CHECK_HEADERS([guacamole/client.h guacamole/guacio.h guacamole/protocol.h])
|
||||
|
@ -42,6 +42,8 @@
|
||||
#include <errno.h>
|
||||
|
||||
#include <freerdp/freerdp.h>
|
||||
#include <freerdp/utils/memory.h>
|
||||
#include <freerdp/cache/bitmap.h>
|
||||
#include <freerdp/channels/channels.h>
|
||||
#include <freerdp/input.h>
|
||||
|
||||
@ -52,6 +54,7 @@
|
||||
#include "client.h"
|
||||
#include "guac_handlers.h"
|
||||
#include "rdp_keymap.h"
|
||||
#include "rdp_bitmap.h"
|
||||
|
||||
/* Client plugin arguments */
|
||||
const char* GUAC_CLIENT_ARGS[] = {
|
||||
@ -75,6 +78,7 @@ int guac_client_init(guac_client* client, int argc, char** argv) {
|
||||
freerdp* rdp_inst;
|
||||
rdpChannels* channels;
|
||||
rdpSettings* settings;
|
||||
rdpBitmap* bitmap;
|
||||
|
||||
char* hostname;
|
||||
int port = RDP_DEFAULT_PORT;
|
||||
@ -136,7 +140,15 @@ int guac_client_init(guac_client* client, int argc, char** argv) {
|
||||
((rdp_freerdp_context*) rdp_inst->context)->client = client;
|
||||
client->data = guac_client_data;
|
||||
|
||||
/* FIXME: Set RDP handlers */
|
||||
/* Set up bitmap handling */
|
||||
bitmap = xnew(rdpBitmap);
|
||||
bitmap->size = sizeof(guac_rdp_bitmap);
|
||||
bitmap->New = guac_rdp_bitmap_new;
|
||||
/* bitmap->Free = guac_rdp_bitmap_free; */
|
||||
/* bitmap->Paint = guac_rdp_bitmap_paint; */
|
||||
/* bitmap->Decompress = guac_rdp_bitmap_decompress; */
|
||||
/* bitmap->SetSurface = guac_rdp_bitmap_setsurface; */
|
||||
graphics_register_bitmap(rdp_inst->context->graphics, bitmap);
|
||||
|
||||
/* Init channels (pre-connect) */
|
||||
if (freerdp_channels_pre_connect(channels, rdp_inst)) {
|
||||
|
Loading…
Reference in New Issue
Block a user