2014-01-30 08:04:31 +00:00
|
|
|
/*
|
2016-03-25 19:59:40 +00:00
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one
|
|
|
|
* or more contributor license agreements. See the NOTICE file
|
|
|
|
* distributed with this work for additional information
|
|
|
|
* regarding copyright ownership. The ASF licenses this file
|
|
|
|
* to you under the Apache License, Version 2.0 (the
|
|
|
|
* "License"); you may not use this file except in compliance
|
|
|
|
* with the License. You may obtain a copy of the License at
|
2014-01-30 08:04:31 +00:00
|
|
|
*
|
2016-03-25 19:59:40 +00:00
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
2014-01-30 08:04:31 +00:00
|
|
|
*
|
2016-03-25 19:59:40 +00:00
|
|
|
* Unless required by applicable law or agreed to in writing,
|
|
|
|
* software distributed under the License is distributed on an
|
|
|
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
|
|
* KIND, either express or implied. See the License for the
|
|
|
|
* specific language governing permissions and limitations
|
|
|
|
* under the License.
|
2014-01-30 08:04:31 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
#include "client.h"
|
2016-03-01 05:50:00 +00:00
|
|
|
#include "rdp.h"
|
2014-01-30 08:04:31 +00:00
|
|
|
#include "rdp_rail.h"
|
2014-06-11 01:45:14 +00:00
|
|
|
#include "rdp_settings.h"
|
2014-01-30 08:04:31 +00:00
|
|
|
|
|
|
|
#include <freerdp/channels/channels.h>
|
|
|
|
#include <freerdp/freerdp.h>
|
2019-09-21 19:25:06 +00:00
|
|
|
#include <freerdp/rail.h>
|
2014-01-30 08:04:31 +00:00
|
|
|
#include <guacamole/client.h>
|
|
|
|
#include <winpr/wtypes.h>
|
2014-01-30 08:08:49 +00:00
|
|
|
|
2014-06-11 01:45:14 +00:00
|
|
|
#include <stddef.h>
|
2014-01-30 08:04:31 +00:00
|
|
|
|
|
|
|
void guac_rdp_process_rail_event(guac_client* client, wMessage* event) {
|
|
|
|
|
|
|
|
switch (GetMessageType(event->id)) {
|
|
|
|
|
|
|
|
/* Get system parameters */
|
|
|
|
case RailChannel_GetSystemParam:
|
|
|
|
guac_rdp_process_rail_get_sysparam(client, event);
|
|
|
|
break;
|
|
|
|
|
|
|
|
/* Currently ignored events */
|
|
|
|
case RailChannel_ServerSystemParam:
|
|
|
|
case RailChannel_ServerExecuteResult:
|
|
|
|
case RailChannel_ServerMinMaxInfo:
|
|
|
|
case RailChannel_ServerLocalMoveSize:
|
|
|
|
case RailChannel_ServerGetAppIdResponse:
|
|
|
|
case RailChannel_ServerLanguageBarInfo:
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
2014-11-08 00:32:19 +00:00
|
|
|
guac_client_log(client, GUAC_LOG_INFO,
|
2014-01-30 08:04:31 +00:00
|
|
|
"Unknown rail event type: 0x%x",
|
|
|
|
GetMessageType(event->id));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
void guac_rdp_process_rail_get_sysparam(guac_client* client, wMessage* event) {
|
2019-09-29 21:15:41 +00:00
|
|
|
#if 0
|
2014-01-30 08:04:31 +00:00
|
|
|
wMessage* response;
|
|
|
|
RAIL_SYSPARAM_ORDER* sysparam;
|
|
|
|
|
|
|
|
/* Get channels */
|
2016-03-01 05:50:00 +00:00
|
|
|
guac_rdp_client* rdp_client = (guac_rdp_client*) client->data;
|
|
|
|
rdpChannels* channels = rdp_client->rdp_inst->context->channels;
|
2014-01-30 08:04:31 +00:00
|
|
|
|
|
|
|
/* Get sysparam structure */
|
|
|
|
sysparam = (RAIL_SYSPARAM_ORDER*) event->wParam;
|
|
|
|
|
|
|
|
response = freerdp_event_new(RailChannel_Class,
|
|
|
|
RailChannel_ClientSystemParam,
|
|
|
|
NULL,
|
|
|
|
sysparam);
|
|
|
|
|
|
|
|
/* Work area */
|
|
|
|
sysparam->workArea.left = 0;
|
|
|
|
sysparam->workArea.top = 0;
|
2016-03-01 05:50:00 +00:00
|
|
|
sysparam->workArea.right = rdp_client->settings->width;
|
|
|
|
sysparam->workArea.bottom = rdp_client->settings->height;
|
2014-01-30 08:04:31 +00:00
|
|
|
|
|
|
|
/* Taskbar */
|
|
|
|
sysparam->taskbarPos.left = 0;
|
|
|
|
sysparam->taskbarPos.top = 0;
|
|
|
|
sysparam->taskbarPos.right = 0;
|
|
|
|
sysparam->taskbarPos.bottom = 0;
|
|
|
|
|
|
|
|
sysparam->dragFullWindows = FALSE;
|
|
|
|
|
|
|
|
/* Send response */
|
|
|
|
freerdp_channels_send_event(channels, response);
|
2019-09-29 21:15:41 +00:00
|
|
|
#endif
|
2014-01-30 08:04:31 +00:00
|
|
|
}
|
|
|
|
|