BOOL update_recv_notification_icon_info_order(rdpUpdate* update, wStream* s, WINDOW_ORDER_INFO* orderInfo) { rdpContext* context = update->context; rdpWindowUpdate* window = update->window; if(stream_get_left(s) < 8) return FALSE; stream_read_UINT32(s, orderInfo->windowId); /* windowId (4 bytes) */ stream_read_UINT32(s, orderInfo->notifyIconId); /* notifyIconId (4 bytes) */ if (orderInfo->fieldFlags & WINDOW_ORDER_STATE_DELETED) { DEBUG_WND("Delete Notification Icon Deleted Order"); update_read_notification_icon_delete_order(s, orderInfo); IFCALL(window->NotifyIconDelete, context, orderInfo); } else { DEBUG_WND("Notification Icon State Order"); if(!update_read_notification_icon_state_order(s, orderInfo, &window->notify_icon_state)) return FALSE; if (orderInfo->fieldFlags & WINDOW_ORDER_STATE_NEW) IFCALL(window->NotifyIconCreate, context, orderInfo, &window->notify_icon_state); else IFCALL(window->NotifyIconUpdate, context, orderInfo, &window->notify_icon_state); } return TRUE; }
void update_recv_notification_icon_info_order(rdpUpdate* update, STREAM* s, WINDOW_ORDER_INFO* orderInfo) { rdpContext* context = update->context; rdpWindowUpdate* window = update->window; stream_read_uint32(s, orderInfo->windowId); /* windowId (4 bytes) */ stream_read_uint32(s, orderInfo->notifyIconId); /* notifyIconId (4 bytes) */ if (orderInfo->fieldFlags & WINDOW_ORDER_STATE_DELETED) { DEBUG_WND("Delete Notification Icon Deleted Order"); update_read_notification_icon_delete_order(s, orderInfo); IFCALL(window->NotifyIconDelete, context, orderInfo); } else { DEBUG_WND("Notification Icon State Order"); update_read_notification_icon_state_order(s, orderInfo, &window->notify_icon_state); if (orderInfo->fieldFlags & WINDOW_ORDER_STATE_NEW) IFCALL(window->NotifyIconCreate, context, orderInfo, &window->notify_icon_state); else IFCALL(window->NotifyIconUpdate, context, orderInfo, &window->notify_icon_state); } }
BOOL update_recv_notification_icon_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) < 8) return FALSE; Stream_Read_UINT32(s, orderInfo->windowId); /* windowId (4 bytes) */ Stream_Read_UINT32(s, orderInfo->notifyIconId); /* notifyIconId (4 bytes) */ if (orderInfo->fieldFlags & WINDOW_ORDER_STATE_DELETED) { update_read_notification_icon_delete_order(s, orderInfo); WLog_Print(update->log, WLOG_DEBUG, "NotifyIconDelete"); IFCALLRET(window->NotifyIconDelete, result, context, orderInfo); } else { if (!update_read_notification_icon_state_order(s, orderInfo, &window->notify_icon_state)) return FALSE; if (orderInfo->fieldFlags & WINDOW_ORDER_STATE_NEW) { WLog_Print(update->log, WLOG_DEBUG, "NotifyIconCreate"); IFCALLRET(window->NotifyIconCreate, result, context, orderInfo, &window->notify_icon_state); } else { WLog_Print(update->log, WLOG_DEBUG, "NotifyIconUpdate"); IFCALLRET(window->NotifyIconUpdate, result, context, orderInfo, &window->notify_icon_state); } } return result; }