1 /** 2 * FreeRDP: A Remote Desktop Protocol Implementation 3 * Graphics Pipeline Extension 4 * 5 * Copyright 2013 Marc-Andre Moreau <marcandre.moreau@gmail.com> 6 * Copyright 2015 Thincast Technologies GmbH 7 * Copyright 2015 DI (FH) Martin Haimberger <martin.haimberger@thincast.com> 8 * 9 * Licensed under the Apache License, Version 2.0 (the "License"); 10 * you may not use this file except in compliance with the License. 11 * You may obtain a copy of the License at 12 * 13 * http://www.apache.org/licenses/LICENSE-2.0 14 * 15 * Unless required by applicable law or agreed to in writing, software 16 * distributed under the License is distributed on an "AS IS" BASIS, 17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 * See the License for the specific language governing permissions and 19 * limitations under the License. 20 */ 21 22 #ifndef FREERDP_CHANNEL_RDPGFX_COMMON_H 23 #define FREERDP_CHANNEL_RDPGFX_COMMON_H 24 25 #include <winpr/crt.h> 26 #include <winpr/stream.h> 27 28 #include <freerdp/channels/rdpgfx.h> 29 #include <freerdp/api.h> 30 31 FREERDP_LOCAL const char* rdpgfx_get_cmd_id_string(UINT16 cmdId); 32 FREERDP_LOCAL const char* rdpgfx_get_codec_id_string(UINT16 codecId); 33 34 FREERDP_LOCAL UINT rdpgfx_read_header(wStream* s, RDPGFX_HEADER* header); 35 FREERDP_LOCAL UINT rdpgfx_write_header(wStream* s, const RDPGFX_HEADER* header); 36 37 FREERDP_LOCAL UINT rdpgfx_read_point16(wStream* s, RDPGFX_POINT16* pt16); 38 FREERDP_LOCAL UINT rdpgfx_write_point16(wStream* s, const RDPGFX_POINT16* point16); 39 40 FREERDP_LOCAL UINT rdpgfx_read_rect16(wStream* s, RECTANGLE_16* rect16); 41 FREERDP_LOCAL UINT rdpgfx_write_rect16(wStream* s, const RECTANGLE_16* rect16); 42 43 FREERDP_LOCAL UINT rdpgfx_read_color32(wStream* s, RDPGFX_COLOR32* color32); 44 FREERDP_LOCAL UINT rdpgfx_write_color32(wStream* s, const RDPGFX_COLOR32* color32); 45 46 #ifdef WITH_DEBUG_RDPGFX 47 #define DEBUG_RDPGFX(_LOGGER, ...) WLog_Print(_LOGGER, WLOG_DEBUG, __VA_ARGS__) 48 #else 49 #define DEBUG_RDPGFX(_LOGGER, ...) \ 50 do \ 51 { \ 52 } while (0) 53 #endif 54 55 #endif /* FREERDP_CHANNEL_RDPGFX_COMMON_H */ 56