cliprdr: add cliprdr->ui sync event.

This commit is contained in:
Vic Lee 2011-07-12 22:09:56 +08:00
parent f5adaa10c1
commit 128901d60a
3 changed files with 14 additions and 4 deletions

View File

@ -87,7 +87,12 @@ static void cliprdr_send_clip_caps(cliprdrPlugin* cliprdr)
static void cliprdr_process_monitor_ready(cliprdrPlugin* cliprdr)
{
FRDP_EVENT* event;
cliprdr_send_clip_caps(cliprdr);
event = freerdp_event_new(FRDP_EVENT_TYPE_CB_SYNC, NULL, NULL);
svc_plugin_send_event((rdpSvcPlugin*)cliprdr, event);
}
static void cliprdr_process_receive(rdpSvcPlugin* plugin, STREAM* data_in)

View File

@ -87,8 +87,13 @@ void test_cliprdr(void)
freerdp_chanman_data(&inst, 0, (char*)test_monitor_ready_data, sizeof(test_monitor_ready_data) - 1,
CHANNEL_FLAG_FIRST | CHANNEL_FLAG_LAST, sizeof(test_monitor_ready_data) - 1);
sleep(1);
freerdp_chanman_check_fds(chan_man, &inst);
while ((event = freerdp_chanman_pop_event(chan_man)) == NULL)
{
freerdp_chanman_check_fds(chan_man, &inst);
}
printf("Got event %d\n", event->event_type);
CU_ASSERT(event->event_type == FRDP_EVENT_TYPE_CB_SYNC);
freerdp_event_free(event);
freerdp_chanman_close(chan_man, &inst);
freerdp_chanman_free(chan_man);

View File

@ -169,7 +169,7 @@ typedef FRDP_EVENT FRDP_CB_SYNC_EVENT;
struct _FRDP_CB_FORMAT_LIST_EVENT
{
FRDP_EVENT event;
uint16* formats;
uint32* formats;
uint16 num_formats;
};
typedef struct _FRDP_CB_FORMAT_LIST_EVENT FRDP_CB_FORMAT_LIST_EVENT;
@ -177,7 +177,7 @@ typedef struct _FRDP_CB_FORMAT_LIST_EVENT FRDP_CB_FORMAT_LIST_EVENT;
struct _FRDP_CB_DATA_REQUEST_EVENT
{
FRDP_EVENT event;
uint16 format;
uint32 format;
};
typedef struct _FRDP_CB_DATA_REQUEST_EVENT FRDP_CB_DATA_REQUEST_EVENT;