epoc32/include/stdapis/openssl/comp.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
williamr@2
     1
/*
williamr@4
     2
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
williamr@4
     3
* All rights reserved.
williamr@4
     4
* This component and the accompanying materials are made available
williamr@4
     5
* under the terms of "Eclipse Public License v1.0"
williamr@4
     6
* which accompanies this distribution, and is available
williamr@4
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
williamr@2
     8
*
williamr@4
     9
* Initial Contributors:
williamr@4
    10
* Nokia Corporation - initial contribution.
williamr@4
    11
*
williamr@4
    12
* Contributors:
williamr@4
    13
*
williamr@4
    14
* Description: 
williamr@2
    15
*
williamr@2
    16
*/
williamr@2
    17
williamr@2
    18
williamr@4
    19
williamr@2
    20
#ifndef HEADER_COMP_H
williamr@2
    21
#define HEADER_COMP_H
williamr@2
    22
williamr@2
    23
#if (defined(__SYMBIAN32__) && !defined(SYMBIAN))
williamr@2
    24
#define SYMBIAN
williamr@2
    25
#endif
williamr@2
    26
williamr@2
    27
#ifdef SYMBIAN
williamr@2
    28
#include <e32def.h>
williamr@2
    29
#endif
williamr@2
    30
#include <openssl/crypto.h>
williamr@2
    31
williamr@2
    32
#ifdef  __cplusplus
williamr@2
    33
extern "C" {
williamr@2
    34
#endif
williamr@2
    35
#ifdef SYMBIAN
williamr@2
    36
#include <e32def.h>
williamr@2
    37
#endif
williamr@2
    38
typedef struct comp_ctx_st COMP_CTX;
williamr@2
    39
williamr@2
    40
typedef struct comp_method_st
williamr@2
    41
	{
williamr@2
    42
	int type;		/* NID for compression library */
williamr@2
    43
	const char *name;	/* A text string to identify the library */
williamr@2
    44
	int (*init)(COMP_CTX *ctx);
williamr@2
    45
	void (*finish)(COMP_CTX *ctx);
williamr@2
    46
	int (*compress)(COMP_CTX *ctx,
williamr@2
    47
			unsigned char *out, unsigned int olen,
williamr@2
    48
			unsigned char *in, unsigned int ilen);
williamr@2
    49
	int (*expand)(COMP_CTX *ctx,
williamr@2
    50
		      unsigned char *out, unsigned int olen,
williamr@2
    51
		      unsigned char *in, unsigned int ilen);
williamr@2
    52
	/* The following two do NOTHING, but are kept for backward compatibility */
williamr@2
    53
	long (*ctrl)(void);
williamr@2
    54
	long (*callback_ctrl)(void);
williamr@2
    55
	} COMP_METHOD;
williamr@2
    56
williamr@2
    57
struct comp_ctx_st
williamr@2
    58
	{
williamr@2
    59
	COMP_METHOD *meth;
williamr@2
    60
	unsigned long compress_in;
williamr@2
    61
	unsigned long compress_out;
williamr@2
    62
	unsigned long expand_in;
williamr@2
    63
	unsigned long expand_out;
williamr@2
    64
williamr@2
    65
	CRYPTO_EX_DATA	ex_data;
williamr@2
    66
	};
williamr@2
    67
williamr@2
    68
williamr@2
    69
IMPORT_C COMP_CTX *COMP_CTX_new(COMP_METHOD *meth);
williamr@2
    70
IMPORT_C void COMP_CTX_free(COMP_CTX *ctx);
williamr@2
    71
IMPORT_C int COMP_compress_block(COMP_CTX *ctx, unsigned char *out, int olen,
williamr@2
    72
	unsigned char *in, int ilen);
williamr@2
    73
IMPORT_C int COMP_expand_block(COMP_CTX *ctx, unsigned char *out, int olen,
williamr@2
    74
	unsigned char *in, int ilen);
williamr@2
    75
IMPORT_C COMP_METHOD *COMP_rle(void );
williamr@2
    76
IMPORT_C COMP_METHOD *COMP_zlib(void );
williamr@2
    77
williamr@2
    78
/* BEGIN ERROR CODES */
williamr@2
    79
/* The following lines are auto generated by the script mkerr.pl. Any changes
williamr@2
    80
 * made after this point may be overwritten when the script is next run.
williamr@2
    81
 */
williamr@2
    82
IMPORT_C void ERR_load_COMP_strings(void);
williamr@2
    83
williamr@2
    84
/* Error codes for the COMP functions. */
williamr@2
    85
williamr@2
    86
/* Function codes. */
williamr@2
    87
williamr@2
    88
/* Reason codes. */
williamr@2
    89
williamr@2
    90
#ifdef  __cplusplus
williamr@2
    91
}
williamr@2
    92
#endif
williamr@2
    93
#endif