diff -r 000000000000 -r e4d67989cc36 ossrv_pub/crypto_utility_functions_api/inc/stdapis/openssl/comp.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ossrv_pub/crypto_utility_functions_api/inc/stdapis/openssl/comp.h Tue Feb 02 02:01:42 2010 +0200 @@ -0,0 +1,93 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + + + +#ifndef HEADER_COMP_H +#define HEADER_COMP_H + +#if (defined(__SYMBIAN32__) && !defined(SYMBIAN)) +#define SYMBIAN +#endif + +#ifdef SYMBIAN +#include +#endif +#include + +#ifdef __cplusplus +extern "C" { +#endif +#ifdef SYMBIAN +#include +#endif +typedef struct comp_ctx_st COMP_CTX; + +typedef struct comp_method_st + { + int type; /* NID for compression library */ + const char *name; /* A text string to identify the library */ + int (*init)(COMP_CTX *ctx); + void (*finish)(COMP_CTX *ctx); + int (*compress)(COMP_CTX *ctx, + unsigned char *out, unsigned int olen, + unsigned char *in, unsigned int ilen); + int (*expand)(COMP_CTX *ctx, + unsigned char *out, unsigned int olen, + unsigned char *in, unsigned int ilen); + /* The following two do NOTHING, but are kept for backward compatibility */ + long (*ctrl)(void); + long (*callback_ctrl)(void); + } COMP_METHOD; + +struct comp_ctx_st + { + COMP_METHOD *meth; + unsigned long compress_in; + unsigned long compress_out; + unsigned long expand_in; + unsigned long expand_out; + + CRYPTO_EX_DATA ex_data; + }; + + +IMPORT_C COMP_CTX *COMP_CTX_new(COMP_METHOD *meth); +IMPORT_C void COMP_CTX_free(COMP_CTX *ctx); +IMPORT_C int COMP_compress_block(COMP_CTX *ctx, unsigned char *out, int olen, + unsigned char *in, int ilen); +IMPORT_C int COMP_expand_block(COMP_CTX *ctx, unsigned char *out, int olen, + unsigned char *in, int ilen); +IMPORT_C COMP_METHOD *COMP_rle(void ); +IMPORT_C COMP_METHOD *COMP_zlib(void ); + +/* BEGIN ERROR CODES */ +/* The following lines are auto generated by the script mkerr.pl. Any changes + * made after this point may be overwritten when the script is next run. + */ +IMPORT_C void ERR_load_COMP_strings(void); + +/* Error codes for the COMP functions. */ + +/* Function codes. */ + +/* Reason codes. */ + +#ifdef __cplusplus +} +#endif +#endif