mirror of https://github.com/FreeRDP/FreeRDP
libfreerdp-core: can now receive bitmap updates
This commit is contained in:
parent
e1f48c5b28
commit
358e034187
|
@ -104,6 +104,11 @@ boolean rdp_client_connect(rdpRdp* rdp)
|
|||
|
||||
rdp_client_activate(rdp);
|
||||
|
||||
while(1)
|
||||
{
|
||||
rdp_recv(rdp);
|
||||
}
|
||||
|
||||
return True;
|
||||
}
|
||||
|
||||
|
|
|
@ -242,6 +242,32 @@ void rdp_read_set_error_info_data_pdu(STREAM* s)
|
|||
printf("Error Info: 0x%08X\n", errorInfo);
|
||||
}
|
||||
|
||||
void rdp_recv_update_data_pdu(rdpRdp* rdp, STREAM* s)
|
||||
{
|
||||
uint16 updateType;
|
||||
|
||||
stream_read_uint16(s, updateType); /* updateType (2 bytes) */
|
||||
|
||||
switch (updateType)
|
||||
{
|
||||
case UPDATE_TYPE_ORDERS:
|
||||
printf("Orders Update\n");
|
||||
break;
|
||||
|
||||
case UPDATE_TYPE_BITMAP:
|
||||
printf("Bitmap Update\n");
|
||||
break;
|
||||
|
||||
case UPDATE_TYPE_PALETTE:
|
||||
printf("Palette Update\n");
|
||||
break;
|
||||
|
||||
case UPDATE_TYPE_SYNCHRONIZE:
|
||||
printf("Synchronize Update\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void rdp_read_data_pdu(rdpRdp* rdp, STREAM* s)
|
||||
{
|
||||
uint8 type;
|
||||
|
@ -255,6 +281,7 @@ void rdp_read_data_pdu(rdpRdp* rdp, STREAM* s)
|
|||
switch (type)
|
||||
{
|
||||
case DATA_PDU_TYPE_UPDATE:
|
||||
rdp_recv_update_data_pdu(rdp, s);
|
||||
break;
|
||||
|
||||
case DATA_PDU_TYPE_CONTROL:
|
||||
|
|
|
@ -91,6 +91,11 @@ typedef struct rdp_rdp rdpRdp;
|
|||
#define DATA_PDU_TYPE_STATUS_INFO 0x36
|
||||
#define DATA_PDU_TYPE_MONITOR_LAYOUT 0x37
|
||||
|
||||
#define UPDATE_TYPE_ORDERS 0x0000
|
||||
#define UPDATE_TYPE_BITMAP 0x0001
|
||||
#define UPDATE_TYPE_PALETTE 0x0002
|
||||
#define UPDATE_TYPE_SYNCHRONIZE 0x0003
|
||||
|
||||
/* Compression Types */
|
||||
#define PACKET_COMPRESSED 0x20
|
||||
#define PACKET_AT_FRONT 0x40
|
||||
|
|
|
@ -106,9 +106,6 @@ int tls_write(rdpTls* tls, uint8* data, int length)
|
|||
int status;
|
||||
int sent = 0;
|
||||
|
||||
printf("length:%d\n", length);
|
||||
freerdp_hexdump(data, length);
|
||||
|
||||
while (sent < length)
|
||||
{
|
||||
status = SSL_write(tls->ssl, data, length);
|
||||
|
|
Loading…
Reference in New Issue