server: add sync and pointer update.

This commit is contained in:
Vic Lee 2011-08-25 17:03:53 +08:00
parent 0f380a8817
commit 41f16251ed
3 changed files with 32 additions and 1 deletions

View File

@ -851,6 +851,9 @@ typedef struct _SURFACE_BITS_COMMAND SURFACE_BITS_COMMAND;
#define PTR_MSG_TYPE_CACHED 0x0007
#define PTR_MSG_TYPE_POINTER 0x0008
#define SYSPTR_NULL 0x00000000
#define SYSPTR_DEFAULT 0x00007F00
#define CACHED_BRUSH 0x80
#define BMF_1BPP 0x1

View File

@ -33,7 +33,7 @@ enum SURFCMD_CMDTYPE
CMDTYPE_STREAM_SURFACE_BITS = 0x0006
};
enum SURFCMD_FRAME_ACTION
enum SURFCMD_FRAMEACTION
{
SURFACECMD_FRAMEACTION_BEGIN = 0x0000,
SURFACECMD_FRAMEACTION_END = 0x0001

View File

@ -330,10 +330,38 @@ static void update_send_surface_bits(rdpUpdate* update, SURFACE_BITS_COMMAND* su
fastpath_send_surfcmd_surface_bits(rdp->fastpath, surface_bits_command);
}
static void update_send_synchronize(rdpUpdate* update)
{
rdpRdp* rdp = (rdpRdp*)update->rdp;
STREAM* s;
s = fastpath_update_pdu_init(rdp->fastpath);
stream_write_uint8(s, FASTPATH_UPDATETYPE_SYNCHRONIZE); /* updateHeader (1 byte) */
stream_write_uint16(s, 0); /* size (2 bytes) */
fastpath_send_update_pdu(rdp->fastpath, s);
}
static void update_send_pointer_system(rdpUpdate* update, POINTER_SYSTEM_UPDATE* pointer_system)
{
rdpRdp* rdp = (rdpRdp*)update->rdp;
STREAM* s;
s = fastpath_update_pdu_init(rdp->fastpath);
/* updateHeader (1 byte) */
if (pointer_system->type == SYSPTR_NULL)
stream_write_uint8(s, FASTPATH_UPDATETYPE_PTR_NULL);
else
stream_write_uint8(s, FASTPATH_UPDATETYPE_PTR_DEFAULT);
stream_write_uint16(s, 0); /* size (2 bytes) */
fastpath_send_update_pdu(rdp->fastpath, s);
}
void update_register_server_callbacks(rdpUpdate* update)
{
update->BeginPaint = update_begin_paint;
update->EndPaint = update_end_paint;
update->Synchronize = update_send_synchronize;
update->PointerSystem = update_send_pointer_system;
update->SurfaceBits = update_send_surface_bits;
}