fdi.h revision 3194da424708abdd288b28d96892b3a5f3f7df0b
/*
* Copyright (C) 2002 Patrik Stridvall
*
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __WINE_FDI_H
#define __WINE_FDI_H
#include <basetsd.h>
#ifdef __cplusplus
extern "C" {
#endif /* defined(__cplusplus) */
#ifndef _WIN64
#include <pshpack4.h>
#endif
#ifndef INCLUDED_TYPES_FCI_FDI
#define INCLUDED_TYPES_FCI_FDI 1
/***********************************************************************
*/
/**********************************************************************/
typedef struct {
/**********************************************************************/
#define CB_MAX_CHUNK 32768U
#define CB_MAX_FILENAME 256
#define CB_MAX_CABINET_NAME 256
#define CB_MAX_CAB_PATH 256
#define CB_MAX_DISK_NAME 256
/**********************************************************************/
typedef unsigned short TCOMP;
/**********************************************************************/
#define CompressionTypeFromTCOMP(tc) \
((tc) & tcompMASK_TYPE)
#define CompressionLevelFromTCOMP(tc) \
#define CompressionMemoryFromTCOMP(tc) \
#define TCOMPfromTypeLevelMemory(t, l, m) \
(((m) << tcompSHIFT_QUANTUM_MEM ) | \
((l) << tcompSHIFT_QUANTUM_LEVEL) | \
( t ))
#define LZXCompressionWindowFromTCOMP(tc) \
#define TCOMPfromLZXWindow(w) \
(((w) << tcompSHIFT_LZX_WINDOW) | \
( tcompTYPE_LZX ))
#endif /* !defined(INCLUDED_TYPES_FCI_FDI) */
/***********************************************************************
* FDI declarations
*/
typedef enum {
} FDIERROR;
/**********************************************************************/
#ifndef _A_NAME_IS_UTF
#define _A_NAME_IS_UTF 0x80
#endif
#ifndef _A_EXEC
#define _A_EXEC 0x40
#endif
/**********************************************************************/
typedef void *HFDI;
/**********************************************************************/
typedef struct {
/**********************************************************************/
typedef enum {
fdidtNEW_CABINET, /* New cabinet */
fdidtNEW_FOLDER, /* New folder */
fdidtDECRYPT, /* Decrypt a data block */
/**********************************************************************/
typedef struct {
void *pvUser; /* Decryption context */
union {
struct { /* fdidtNEW_CABINET */
void *pHeaderReserve; /* RESERVE section from CFHEADER */
int iCabinet; /* Cabinet number in set (0 based) */
} cabinet;
struct { /* fdidtNEW_FOLDER */
void *pFolderReserve; /* RESERVE section from CFFOLDER */
} folder;
struct { /* fdidtDECRYPT */
void *pDataReserve; /* RESERVE section from CFDATA */
void *pbData; /* Data buffer */
* the first piece of a split block;
* Greater than 0 if this is the
* second piece of a split block.
*/
} decrypt;
} FDIDECRYPT, *PFDIDECRYPT;
/**********************************************************************/
typedef struct {
char *psz1;
char *psz2;
char *psz3; /* Points to a 256 character buffer */
void *pv; /* Value for client */
typedef enum {
fdintCABINET_INFO, /* General information about cabinet */
fdintPARTIAL_FILE, /* First file in cabinet is continuation */
fdintCOPY_FILE, /* File to be copied */
fdintCLOSE_FILE_INFO, /* Close the file, set relevant info */
fdintNEXT_CABINET, /* File continued to next cabinet */
fdintENUMERATE, /* Enumeration status */
#ifndef _WIN64
#include <pshpack1.h>
#endif
typedef struct {
#ifndef _WIN64
#include <poppack.h>
#endif
#define cpu80286 (0) /* '286 opcodes only */
/**********************************************************************/
PFNFDIDECRYPT, void *pvUser);
/**********************************************************************/
#ifndef _WIN64
#include <poppack.h>
#endif
#ifdef __cplusplus
} /* extern "C" */
#endif /* defined(__cplusplus) */
#endif /* __WINE_FDI_H */