void update_recv_window_info_order(rdpUpdate* update, STREAM* s, WINDOW_ORDER_INFO* orderInfo) { stream_read_uint32(s, orderInfo->windowId); /* windowId (4 bytes) */ if (orderInfo->fieldFlags & WINDOW_ORDER_ICON) { DEBUG_WND("Window Icon Order"); update_read_window_icon_order(s, orderInfo, &update->window_icon); IFCALL(update->WindowIcon, update, orderInfo, &update->window_icon); } else if (orderInfo->fieldFlags & WINDOW_ORDER_CACHED_ICON) { DEBUG_WND("Window Cached Icon Order"); update_read_window_cached_icon_order(s, orderInfo, &update->window_cached_icon); IFCALL(update->WindowCachedIcon, update, orderInfo, &update->window_cached_icon); } else if (orderInfo->fieldFlags & WINDOW_ORDER_STATE_DELETED) { DEBUG_WND("Window Deleted Order"); update_read_window_delete_order(s, orderInfo); IFCALL(update->WindowDelete, update, orderInfo); } else { DEBUG_WND("Window State Order"); update_read_window_state_order(s, orderInfo, &update->window_state); if (orderInfo->fieldFlags & WINDOW_ORDER_STATE_NEW) IFCALL(update->WindowCreate, update, orderInfo, &update->window_state); else IFCALL(update->WindowUpdate, update, orderInfo, &update->window_state); } }
BOOL update_recv_window_info_order(rdpUpdate* update, wStream* s, WINDOW_ORDER_INFO* orderInfo) { rdpContext* context = update->context; rdpWindowUpdate* window = update->window; BOOL result = TRUE; if (Stream_GetRemainingLength(s) < 4) return FALSE; Stream_Read_UINT32(s, orderInfo->windowId); /* windowId (4 bytes) */ if (orderInfo->fieldFlags & WINDOW_ORDER_ICON) { if (!update_read_window_icon_order(s, orderInfo, &window->window_icon)) return FALSE; WLog_Print(update->log, WLOG_DEBUG, "WindowIcon"); IFCALLRET(window->WindowIcon, result, context, orderInfo, &window->window_icon); } else if (orderInfo->fieldFlags & WINDOW_ORDER_CACHED_ICON) { if (!update_read_window_cached_icon_order(s, orderInfo, &window->window_cached_icon)) return FALSE; WLog_Print(update->log, WLOG_DEBUG, "WindowCachedIcon"); IFCALLRET(window->WindowCachedIcon, result, context, orderInfo, &window->window_cached_icon); } else if (orderInfo->fieldFlags & WINDOW_ORDER_STATE_DELETED) { update_read_window_delete_order(s, orderInfo); WLog_Print(update->log, WLOG_DEBUG, "WindowDelete"); IFCALLRET(window->WindowDelete, result, context, orderInfo); } else { if (!update_read_window_state_order(s, orderInfo, &window->window_state)) return FALSE; if (orderInfo->fieldFlags & WINDOW_ORDER_STATE_NEW) { WLog_Print(update->log, WLOG_DEBUG, "WindowCreate"); IFCALLRET(window->WindowCreate, result, context, orderInfo, &window->window_state); } else { WLog_Print(update->log, WLOG_DEBUG, "WindowUpdate"); IFCALLRET(window->WindowUpdate, result, context, orderInfo, &window->window_state); } } return result; }
BOOL update_recv_window_info_order(rdpUpdate* update, wStream* s, WINDOW_ORDER_INFO* orderInfo) { rdpContext* context = update->context; rdpWindowUpdate* window = update->window; if(stream_get_left(s) < 4) return FALSE; stream_read_UINT32(s, orderInfo->windowId); /* windowId (4 bytes) */ if (orderInfo->fieldFlags & WINDOW_ORDER_ICON) { DEBUG_WND("Window Icon Order"); if(!update_read_window_icon_order(s, orderInfo, &window->window_icon)) return FALSE; IFCALL(window->WindowIcon, context, orderInfo, &window->window_icon); } else if (orderInfo->fieldFlags & WINDOW_ORDER_CACHED_ICON) { DEBUG_WND("Window Cached Icon Order"); if(!update_read_window_cached_icon_order(s, orderInfo, &window->window_cached_icon)) return FALSE; IFCALL(window->WindowCachedIcon, context, orderInfo, &window->window_cached_icon); } else if (orderInfo->fieldFlags & WINDOW_ORDER_STATE_DELETED) { DEBUG_WND("Window Deleted Order"); update_read_window_delete_order(s, orderInfo); IFCALL(window->WindowDelete, context, orderInfo); } else { DEBUG_WND("Window State Order"); if(!update_read_window_state_order(s, orderInfo, &window->window_state)) return FALSE; if (orderInfo->fieldFlags & WINDOW_ORDER_STATE_NEW) IFCALL(window->WindowCreate, context, orderInfo, &window->window_state); else IFCALL(window->WindowUpdate, context, orderInfo, &window->window_state); } return TRUE; }