Stub most handlers, fix signedness, reply to server announce.
This commit is contained in:
parent
48c27d74ce
commit
49711709a7
@ -50,16 +50,94 @@
|
||||
#include "rdpdr_messages.h"
|
||||
#include "client.h"
|
||||
|
||||
|
||||
static void guac_rdpdr_send_client_announce_reply(guac_rdpdrPlugin* rdpdr,
|
||||
unsigned int major, unsigned int minor, unsigned int client_id) {
|
||||
|
||||
STREAM* output_stream = stream_new(12);
|
||||
|
||||
/* Write header */
|
||||
stream_write_uint16(output_stream, RDPDR_CTYP_CORE);
|
||||
stream_write_uint16(output_stream, PAKID_CORE_CLIENTID_CONFIRM);
|
||||
|
||||
/* Write content */
|
||||
stream_write_uint16(output_stream, major);
|
||||
stream_write_uint16(output_stream, minor);
|
||||
stream_write_uint32(output_stream, client_id);
|
||||
|
||||
svc_plugin_send((rdpSvcPlugin*) rdpdr, output_stream);
|
||||
|
||||
}
|
||||
|
||||
void guac_rdpdr_process_server_announce(guac_rdpdrPlugin* rdpdr,
|
||||
STREAM* input_stream) {
|
||||
|
||||
int major, minor, client_id;
|
||||
unsigned int major, minor, client_id;
|
||||
|
||||
stream_read_uint16(input_stream, major);
|
||||
stream_read_uint16(input_stream, minor);
|
||||
stream_read_uint32(input_stream, client_id);
|
||||
|
||||
guac_client_log_info(rdpdr->client, "Connected to RDPDR %i.%i as client %i", major, minor, client_id);
|
||||
guac_client_log_info(rdpdr->client, "Connected to RDPDR %u.%u as client 0x%04x", major, minor, client_id);
|
||||
|
||||
/* Respond to announce */
|
||||
guac_rdpdr_send_client_announce_reply(rdpdr, major, minor, client_id);
|
||||
|
||||
}
|
||||
|
||||
void guac_rdpdr_process_clientid_confirm(guac_rdpdrPlugin* rdpdr, STREAM* input_stream) {
|
||||
|
||||
/* STUB */
|
||||
guac_client_log_info(rdpdr->client, "STUB: clientid_confirm");
|
||||
|
||||
}
|
||||
|
||||
void guac_rdpdr_process_device_reply(guac_rdpdrPlugin* rdpdr, STREAM* input_stream) {
|
||||
|
||||
/* STUB */
|
||||
guac_client_log_info(rdpdr->client, "STUB: device_reply");
|
||||
|
||||
}
|
||||
|
||||
void guac_rdpdr_process_device_iorequest(guac_rdpdrPlugin* rdpdr, STREAM* input_stream) {
|
||||
|
||||
/* STUB */
|
||||
guac_client_log_info(rdpdr->client, "STUB: device_iorequest");
|
||||
|
||||
}
|
||||
|
||||
void guac_rdpdr_process_device_iocompletion(guac_rdpdrPlugin* rdpdr, STREAM* input_stream) {
|
||||
|
||||
/* STUB */
|
||||
guac_client_log_info(rdpdr->client, "STUB: device_iocompletion");
|
||||
|
||||
}
|
||||
|
||||
void guac_rdpdr_process_server_capability(guac_rdpdrPlugin* rdpdr, STREAM* input_stream) {
|
||||
|
||||
/* STUB */
|
||||
guac_client_log_info(rdpdr->client, "STUB: server_capability");
|
||||
|
||||
}
|
||||
|
||||
void guac_rdpdr_process_user_loggedon(guac_rdpdrPlugin* rdpdr, STREAM* input_stream) {
|
||||
|
||||
/* STUB */
|
||||
guac_client_log_info(rdpdr->client, "STUB: user_loggedon");
|
||||
|
||||
}
|
||||
|
||||
void guac_rdpdr_process_prn_cache_data(guac_rdpdrPlugin* rdpdr, STREAM* input_stream) {
|
||||
|
||||
/* STUB */
|
||||
guac_client_log_info(rdpdr->client, "STUB: prn_cache_data");
|
||||
|
||||
}
|
||||
|
||||
void guac_rdpdr_process_prn_using_xps(guac_rdpdrPlugin* rdpdr, STREAM* input_stream) {
|
||||
|
||||
/* STUB */
|
||||
guac_client_log_info(rdpdr->client, "STUB: prn_using_xps");
|
||||
|
||||
}
|
||||
|
||||
|
@ -73,6 +73,14 @@
|
||||
*/
|
||||
|
||||
void guac_rdpdr_process_server_announce(guac_rdpdrPlugin* rdpdr, STREAM* input_stream);
|
||||
void guac_rdpdr_process_clientid_confirm(guac_rdpdrPlugin* rdpdr, STREAM* input_stream);
|
||||
void guac_rdpdr_process_device_reply(guac_rdpdrPlugin* rdpdr, STREAM* input_stream);
|
||||
void guac_rdpdr_process_device_iorequest(guac_rdpdrPlugin* rdpdr, STREAM* input_stream);
|
||||
void guac_rdpdr_process_device_iocompletion(guac_rdpdrPlugin* rdpdr, STREAM* input_stream);
|
||||
void guac_rdpdr_process_server_capability(guac_rdpdrPlugin* rdpdr, STREAM* input_stream);
|
||||
void guac_rdpdr_process_user_loggedon(guac_rdpdrPlugin* rdpdr, STREAM* input_stream);
|
||||
void guac_rdpdr_process_prn_cache_data(guac_rdpdrPlugin* rdpdr, STREAM* input_stream);
|
||||
void guac_rdpdr_process_prn_using_xps(guac_rdpdrPlugin* rdpdr, STREAM* input_stream);
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -108,21 +108,27 @@ void guac_rdpdr_process_receive(rdpSvcPlugin* plugin,
|
||||
break;
|
||||
|
||||
case PAKID_CORE_CLIENTID_CONFIRM:
|
||||
guac_rdpdr_process_clientid_confirm(rdpdr, input_stream);
|
||||
break;
|
||||
|
||||
case PAKID_CORE_DEVICE_REPLY:
|
||||
guac_rdpdr_process_device_reply(rdpdr, input_stream);
|
||||
break;
|
||||
|
||||
case PAKID_CORE_DEVICE_IOREQUEST:
|
||||
guac_rdpdr_process_device_iorequest(rdpdr, input_stream);
|
||||
break;
|
||||
|
||||
case PAKID_CORE_DEVICE_IOCOMPLETION:
|
||||
guac_rdpdr_process_device_iocompletion(rdpdr, input_stream);
|
||||
break;
|
||||
|
||||
case PAKID_CORE_SERVER_CAPABILITY:
|
||||
guac_rdpdr_process_server_capability(rdpdr, input_stream);
|
||||
break;
|
||||
|
||||
case PAKID_CORE_USER_LOGGEDON:
|
||||
guac_rdpdr_process_user_loggedon(rdpdr, input_stream);
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -139,9 +145,11 @@ void guac_rdpdr_process_receive(rdpSvcPlugin* plugin,
|
||||
switch (packet_id) {
|
||||
|
||||
case PAKID_PRN_CACHE_DATA:
|
||||
guac_rdpdr_process_prn_cache_data(rdpdr, input_stream);
|
||||
break;
|
||||
|
||||
case PAKID_PRN_USING_XPS:
|
||||
guac_rdpdr_process_prn_using_xps(rdpdr, input_stream);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user