Blame libfreerdp/core/bulk.h

Packit Service fa4841
/**
Packit Service fa4841
 * FreeRDP: A Remote Desktop Protocol Implementation
Packit Service fa4841
 * Bulk Compression
Packit Service fa4841
 *
Packit Service fa4841
 * Copyright 2014 Marc-Andre Moreau <marcandre.moreau@gmail.com>
Packit Service fa4841
 *
Packit Service fa4841
 * Licensed under the Apache License, Version 2.0 (the "License");
Packit Service fa4841
 * you may not use this file except in compliance with the License.
Packit Service fa4841
 * You may obtain a copy of the License at
Packit Service fa4841
 *
Packit Service fa4841
 *     http://www.apache.org/licenses/LICENSE-2.0
Packit Service fa4841
 *
Packit Service fa4841
 * Unless required by applicable law or agreed to in writing, software
Packit Service fa4841
 * distributed under the License is distributed on an "AS IS" BASIS,
Packit Service fa4841
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Packit Service fa4841
 * See the License for the specific language governing permissions and
Packit Service fa4841
 * limitations under the License.
Packit Service fa4841
 */
Packit Service fa4841
Packit Service fa4841
#ifndef FREERDP_LIB_CORE_BULK_H
Packit Service fa4841
#define FREERDP_LIB_CORE_BULK_H
Packit Service fa4841
Packit Service fa4841
typedef struct rdp_bulk rdpBulk;
Packit Service fa4841
Packit Service fa4841
#include "rdp.h"
Packit Service fa4841
Packit Service fa4841
#include <freerdp/api.h>
Packit Service fa4841
#include <freerdp/codec/mppc.h>
Packit Service fa4841
#include <freerdp/codec/ncrush.h>
Packit Service fa4841
#include <freerdp/codec/xcrush.h>
Packit Service fa4841
Packit Service bb5c11
struct rdp_bulk
Packit Service bb5c11
{
Packit Service bb5c11
	rdpContext* context;
Packit Service bb5c11
	UINT32 CompressionLevel;
Packit Service bb5c11
	UINT32 CompressionMaxSize;
Packit Service bb5c11
	MPPC_CONTEXT* mppcSend;
Packit Service bb5c11
	MPPC_CONTEXT* mppcRecv;
Packit Service bb5c11
	NCRUSH_CONTEXT* ncrushRecv;
Packit Service bb5c11
	NCRUSH_CONTEXT* ncrushSend;
Packit Service bb5c11
	XCRUSH_CONTEXT* xcrushRecv;
Packit Service bb5c11
	XCRUSH_CONTEXT* xcrushSend;
Packit Service bb5c11
	BYTE OutputBuffer[65536];
Packit Service bb5c11
};
Packit Service bb5c11
Packit Service bb5c11
#define BULK_COMPRESSION_FLAGS_MASK	0xE0
Packit Service bb5c11
#define BULK_COMPRESSION_TYPE_MASK	0x0F
Packit Service bb5c11
Packit Service bb5c11
FREERDP_LOCAL UINT32 bulk_compression_level(rdpBulk* bulk);
Packit Service fa4841
FREERDP_LOCAL UINT32 bulk_compression_max_size(rdpBulk* bulk);
Packit Service fa4841
Packit Service bb5c11
FREERDP_LOCAL int bulk_decompress(rdpBulk* bulk, BYTE* pSrcData, UINT32 SrcSize,
Packit Service bb5c11
                                  BYTE** ppDstData, UINT32* pDstSize, UINT32 flags);
Packit Service bb5c11
FREERDP_LOCAL int bulk_compress(rdpBulk* bulk, BYTE* pSrcData, UINT32 SrcSize,
Packit Service bb5c11
                                BYTE** ppDstData, UINT32* pDstSize, UINT32* pFlags);
Packit Service fa4841
Packit Service fa4841
FREERDP_LOCAL void bulk_reset(rdpBulk* bulk);
Packit Service fa4841
Packit Service fa4841
FREERDP_LOCAL rdpBulk* bulk_new(rdpContext* context);
Packit Service fa4841
FREERDP_LOCAL void bulk_free(rdpBulk* bulk);
Packit Service fa4841
Packit Service fa4841
#endif /* FREERDP_LIB_CORE_BULK_H */