epoc32/include/stdapis/openssl/comp.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
child 4 837f303aceeb
     1.1 --- a/epoc32/include/stdapis/openssl/comp.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/stdapis/openssl/comp.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,105 @@
     1.4 -comp.h
     1.5 +/*
     1.6 +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
     1.7 +
     1.8 +* Redistribution and use in source and binary forms, with or without 
     1.9 +* modification, are permitted provided that the following conditions are met:
    1.10 +
    1.11 +* Redistributions of source code must retain the above copyright notice, this 
    1.12 +* list of conditions and the following disclaimer.
    1.13 +* Redistributions in binary form must reproduce the above copyright notice, 
    1.14 +* this list of conditions and the following disclaimer in the documentation 
    1.15 +* and/or other materials provided with the distribution.
    1.16 +* Neither the name of Nokia Corporation nor the names of its contributors 
    1.17 +* may be used to endorse or promote products derived from this software 
    1.18 +* without specific prior written permission.
    1.19 +
    1.20 +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
    1.21 +* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
    1.22 +* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
    1.23 +* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 
    1.24 +* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
    1.25 +* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 
    1.26 +* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 
    1.27 +* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 
    1.28 +* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
    1.29 +* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    1.30 +*
    1.31 +* Description:
    1.32 +*
    1.33 +*/
    1.34 +
    1.35 +
    1.36 +#ifndef HEADER_COMP_H
    1.37 +#define HEADER_COMP_H
    1.38 +
    1.39 +#if (defined(__SYMBIAN32__) && !defined(SYMBIAN))
    1.40 +#define SYMBIAN
    1.41 +#endif
    1.42 +
    1.43 +#ifdef SYMBIAN
    1.44 +#include <e32def.h>
    1.45 +#endif
    1.46 +#include <openssl/crypto.h>
    1.47 +
    1.48 +#ifdef  __cplusplus
    1.49 +extern "C" {
    1.50 +#endif
    1.51 +#ifdef SYMBIAN
    1.52 +#include <e32def.h>
    1.53 +#endif
    1.54 +typedef struct comp_ctx_st COMP_CTX;
    1.55 +
    1.56 +typedef struct comp_method_st
    1.57 +	{
    1.58 +	int type;		/* NID for compression library */
    1.59 +	const char *name;	/* A text string to identify the library */
    1.60 +	int (*init)(COMP_CTX *ctx);
    1.61 +	void (*finish)(COMP_CTX *ctx);
    1.62 +	int (*compress)(COMP_CTX *ctx,
    1.63 +			unsigned char *out, unsigned int olen,
    1.64 +			unsigned char *in, unsigned int ilen);
    1.65 +	int (*expand)(COMP_CTX *ctx,
    1.66 +		      unsigned char *out, unsigned int olen,
    1.67 +		      unsigned char *in, unsigned int ilen);
    1.68 +	/* The following two do NOTHING, but are kept for backward compatibility */
    1.69 +	long (*ctrl)(void);
    1.70 +	long (*callback_ctrl)(void);
    1.71 +	} COMP_METHOD;
    1.72 +
    1.73 +struct comp_ctx_st
    1.74 +	{
    1.75 +	COMP_METHOD *meth;
    1.76 +	unsigned long compress_in;
    1.77 +	unsigned long compress_out;
    1.78 +	unsigned long expand_in;
    1.79 +	unsigned long expand_out;
    1.80 +
    1.81 +	CRYPTO_EX_DATA	ex_data;
    1.82 +	};
    1.83 +
    1.84 +
    1.85 +IMPORT_C COMP_CTX *COMP_CTX_new(COMP_METHOD *meth);
    1.86 +IMPORT_C void COMP_CTX_free(COMP_CTX *ctx);
    1.87 +IMPORT_C int COMP_compress_block(COMP_CTX *ctx, unsigned char *out, int olen,
    1.88 +	unsigned char *in, int ilen);
    1.89 +IMPORT_C int COMP_expand_block(COMP_CTX *ctx, unsigned char *out, int olen,
    1.90 +	unsigned char *in, int ilen);
    1.91 +IMPORT_C COMP_METHOD *COMP_rle(void );
    1.92 +IMPORT_C COMP_METHOD *COMP_zlib(void );
    1.93 +
    1.94 +/* BEGIN ERROR CODES */
    1.95 +/* The following lines are auto generated by the script mkerr.pl. Any changes
    1.96 + * made after this point may be overwritten when the script is next run.
    1.97 + */
    1.98 +IMPORT_C void ERR_load_COMP_strings(void);
    1.99 +
   1.100 +/* Error codes for the COMP functions. */
   1.101 +
   1.102 +/* Function codes. */
   1.103 +
   1.104 +/* Reason codes. */
   1.105 +
   1.106 +#ifdef  __cplusplus
   1.107 +}
   1.108 +#endif
   1.109 +#endif