No longer export ncrush, xcrush and mppc codecs

This commit is contained in:
akallabeth 2022-04-28 10:15:31 +02:00 committed by akallabeth
parent 507722aca4
commit bba427e71a
16 changed files with 92 additions and 89 deletions

View File

@ -1,54 +0,0 @@
/**
* FreeRDP: A Remote Desktop Protocol Implementation
* MPPC Bulk Data Compression
*
* Copyright 2014 Marc-Andre Moreau <marcandre.moreau@gmail.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef FREERDP_MPPC_H
#define FREERDP_MPPC_H
#include <freerdp/api.h>
#include <freerdp/types.h>
#include <winpr/bitstream.h>
#include <freerdp/codec/bulk.h>
typedef struct s_MPPC_CONTEXT MPPC_CONTEXT;
#ifdef __cplusplus
extern "C"
{
#endif
FREERDP_API int mppc_compress(MPPC_CONTEXT* mppc, const BYTE* pSrcData, UINT32 SrcSize,
BYTE* pDstBuffer, const BYTE** ppDstData, UINT32* pDstSize,
UINT32* pFlags);
FREERDP_API int mppc_decompress(MPPC_CONTEXT* mppc, const BYTE* pSrcData, UINT32 SrcSize,
const BYTE** ppDstData, UINT32* pDstSize, UINT32 flags);
FREERDP_API void mppc_set_compression_level(MPPC_CONTEXT* mppc, DWORD CompressionLevel);
FREERDP_API void mppc_context_reset(MPPC_CONTEXT* mppc, BOOL flush);
FREERDP_API MPPC_CONTEXT* mppc_context_new(DWORD CompressionLevel, BOOL Compressor);
FREERDP_API void mppc_context_free(MPPC_CONTEXT* mppc);
#ifdef __cplusplus
}
#endif
#endif /* FREERDP_MPPC_H */

View File

@ -125,6 +125,8 @@ endif ()
# codec
set(CODEC_SRCS
codec/bulk.c
codec/bulk.h
codec/dsp.c
codec/color.c
codec/audio.c

View File

@ -22,6 +22,9 @@
#include <freerdp/config.h>
#include "bulk.h"
#include "../codec/mppc.h"
#include "../codec/ncrush.h"
#include "../codec/xcrush.h"
#define TAG "com.freerdp.core"

View File

@ -22,12 +22,8 @@
typedef struct rdp_bulk rdpBulk;
#include "rdp.h"
#include <freerdp/api.h>
#include <freerdp/codec/mppc.h>
#include <freerdp/codec/ncrush.h>
#include <freerdp/codec/xcrush.h>
#include <freerdp/freerdp.h>
#define BULK_COMPRESSION_FLAGS_MASK 0xE0
#define BULK_COMPRESSION_TYPE_MASK 0x0F

View File

@ -26,7 +26,7 @@
#include <winpr/bitstream.h>
#include <freerdp/log.h>
#include <freerdp/codec/mppc.h>
#include "mppc.h"
#define TAG FREERDP_TAG("codec.mppc")

View File

@ -1,6 +1,6 @@
/**
* FreeRDP: A Remote Desktop Protocol Implementation
* NCrush (RDP6) Bulk Data Compression
* MPPC Bulk Data Compression
*
* Copyright 2014 Marc-Andre Moreau <marcandre.moreau@gmail.com>
*
@ -17,36 +17,38 @@
* limitations under the License.
*/
#ifndef FREERDP_CODEC_NCRUSH_H
#define FREERDP_CODEC_NCRUSH_H
#ifndef FREERDP_MPPC_H
#define FREERDP_MPPC_H
#include <freerdp/api.h>
#include <freerdp/types.h>
#include <freerdp/codec/mppc.h>
#include <winpr/bitstream.h>
typedef struct s_NCRUSH_CONTEXT NCRUSH_CONTEXT;
#include <freerdp/codec/bulk.h>
typedef struct s_MPPC_CONTEXT MPPC_CONTEXT;
#ifdef __cplusplus
extern "C"
{
#endif
FREERDP_API int ncrush_compress(NCRUSH_CONTEXT* ncrush, const BYTE* pSrcData, UINT32 SrcSize,
FREERDP_LOCAL int mppc_compress(MPPC_CONTEXT* mppc, const BYTE* pSrcData, UINT32 SrcSize,
BYTE* pDstBuffer, const BYTE** ppDstData, UINT32* pDstSize,
UINT32* pFlags);
FREERDP_API int ncrush_decompress(NCRUSH_CONTEXT* ncrush, const BYTE* pSrcData, UINT32 SrcSize,
FREERDP_LOCAL int mppc_decompress(MPPC_CONTEXT* mppc, const BYTE* pSrcData, UINT32 SrcSize,
const BYTE** ppDstData, UINT32* pDstSize, UINT32 flags);
FREERDP_API void ncrush_context_reset(NCRUSH_CONTEXT* ncrush, BOOL flush);
FREERDP_LOCAL void mppc_set_compression_level(MPPC_CONTEXT* mppc, DWORD CompressionLevel);
FREERDP_API NCRUSH_CONTEXT* ncrush_context_new(BOOL Compressor);
FREERDP_API void ncrush_context_free(NCRUSH_CONTEXT* ncrush);
FREERDP_LOCAL void mppc_context_reset(MPPC_CONTEXT* mppc, BOOL flush);
FREERDP_LOCAL MPPC_CONTEXT* mppc_context_new(DWORD CompressionLevel, BOOL Compressor);
FREERDP_LOCAL void mppc_context_free(MPPC_CONTEXT* mppc);
#ifdef __cplusplus
}
#endif
#endif /* FREERDP_CODEC_NCRUSH_H */
#endif /* FREERDP_MPPC_H */

View File

@ -28,7 +28,7 @@
#include <winpr/bitstream.h>
#include <freerdp/log.h>
#include <freerdp/codec/ncrush.h>
#include "ncrush.h"
#define TAG FREERDP_TAG("codec")

53
libfreerdp/codec/ncrush.h Normal file
View File

@ -0,0 +1,53 @@
/**
* FreeRDP: A Remote Desktop Protocol Implementation
* NCrush (RDP6) Bulk Data Compression
*
* Copyright 2014 Marc-Andre Moreau <marcandre.moreau@gmail.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef FREERDP_CODEC_NCRUSH_H
#define FREERDP_CODEC_NCRUSH_H
#include <freerdp/api.h>
#include <freerdp/types.h>
#include "mppc.h"
#include <winpr/bitstream.h>
typedef struct s_NCRUSH_CONTEXT NCRUSH_CONTEXT;
#ifdef __cplusplus
extern "C"
{
#endif
FREERDP_LOCAL int ncrush_compress(NCRUSH_CONTEXT* ncrush, const BYTE* pSrcData, UINT32 SrcSize,
BYTE* pDstBuffer, const BYTE** ppDstData, UINT32* pDstSize,
UINT32* pFlags);
FREERDP_LOCAL int ncrush_decompress(NCRUSH_CONTEXT* ncrush, const BYTE* pSrcData,
UINT32 SrcSize, const BYTE** ppDstData, UINT32* pDstSize,
UINT32 flags);
FREERDP_LOCAL void ncrush_context_reset(NCRUSH_CONTEXT* ncrush, BOOL flush);
FREERDP_LOCAL NCRUSH_CONTEXT* ncrush_context_new(BOOL Compressor);
FREERDP_LOCAL void ncrush_context_free(NCRUSH_CONTEXT* ncrush);
#ifdef __cplusplus
}
#endif
#endif /* FREERDP_CODEC_NCRUSH_H */

View File

@ -3,9 +3,10 @@
#include <winpr/bitstream.h>
#include <freerdp/freerdp.h>
#include <freerdp/codec/mppc.h>
#include <freerdp/log.h>
#include "../mppc.h"
static const BYTE TEST_RDP5_COMPRESSED_DATA[] = {
0x24, 0x02, 0x03, 0x09, 0x00, 0x20, 0x0c, 0x05, 0x10, 0x01, 0x40, 0x0a, 0xbf, 0xdf, 0xc3, 0x20,
0x80, 0x00, 0x1f, 0x0a, 0x00, 0x00, 0x07, 0x43, 0x4e, 0x00, 0x68, 0x02, 0x00, 0x22, 0x00, 0x34,

View File

@ -1,7 +1,7 @@
#include <winpr/crt.h>
#include <winpr/print.h>
#include <freerdp/codec/ncrush.h>
#include "../ncrush.h"
static const BYTE TEST_BELLS_DATA[] = "for.whom.the.bell.tolls,.the.bell.tolls.for.thee!";

View File

@ -1,7 +1,7 @@
#include <winpr/crt.h>
#include <winpr/print.h>
#include <freerdp/codec/xcrush.h>
#include "../xcrush.h"
static const BYTE TEST_BELLS_DATA[] = "for.whom.the.bell.tolls,.the.bell.tolls.for.thee!";

View File

@ -27,7 +27,7 @@
#include <winpr/bitstream.h>
#include <freerdp/log.h>
#include <freerdp/codec/xcrush.h>
#include "xcrush.h"
#define TAG FREERDP_TAG("codec")

View File

@ -23,7 +23,7 @@
#include <freerdp/api.h>
#include <freerdp/types.h>
#include <freerdp/codec/mppc.h>
#include "mppc.h"
typedef struct s_XCRUSH_CONTEXT XCRUSH_CONTEXT;
@ -32,16 +32,17 @@ extern "C"
{
#endif
FREERDP_API int xcrush_compress(XCRUSH_CONTEXT* xcrush, const BYTE* pSrcData, UINT32 SrcSize,
BYTE* pDstBuffer, const BYTE** ppDstData, UINT32* pDstSize,
UINT32* pFlags);
FREERDP_API int xcrush_decompress(XCRUSH_CONTEXT* xcrush, const BYTE* pSrcData, UINT32 SrcSize,
const BYTE** ppDstData, UINT32* pDstSize, UINT32 flags);
FREERDP_LOCAL int xcrush_compress(XCRUSH_CONTEXT* xcrush, const BYTE* pSrcData, UINT32 SrcSize,
BYTE* pDstBuffer, const BYTE** ppDstData, UINT32* pDstSize,
UINT32* pFlags);
FREERDP_LOCAL int xcrush_decompress(XCRUSH_CONTEXT* xcrush, const BYTE* pSrcData,
UINT32 SrcSize, const BYTE** ppDstData, UINT32* pDstSize,
UINT32 flags);
FREERDP_API void xcrush_context_reset(XCRUSH_CONTEXT* xcrush, BOOL flush);
FREERDP_LOCAL void xcrush_context_reset(XCRUSH_CONTEXT* xcrush, BOOL flush);
FREERDP_API XCRUSH_CONTEXT* xcrush_context_new(BOOL Compressor);
FREERDP_API void xcrush_context_free(XCRUSH_CONTEXT* xcrush);
FREERDP_LOCAL XCRUSH_CONTEXT* xcrush_context_new(BOOL Compressor);
FREERDP_LOCAL void xcrush_context_free(XCRUSH_CONTEXT* xcrush);
#ifdef __cplusplus
}

View File

@ -52,8 +52,6 @@ set(${MODULE_PREFIX}_GATEWAY_SRCS
set(${MODULE_PREFIX}_SRCS
utils.c
utils.h
bulk.c
bulk.h
streamdump.c
activation.c
activation.h

View File

@ -31,6 +31,7 @@
#include "mcs.h"
#include "redirection.h"
#include <freerdp/codec/bulk.h>
#include <freerdp/crypto/per.h>
#include <freerdp/log.h>

View File

@ -26,7 +26,7 @@
#include "nla.h"
#include "mcs.h"
#include "tpkt.h"
#include "bulk.h"
#include "../codec/bulk.h"
#include "fastpath.h"
#include "tpdu.h"
#include "nego.h"