Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

api.h

00001 /*
00002   Copyright (c) 1990-1999 Info-ZIP.  All rights reserved.
00003 
00004   See the accompanying file LICENSE, version 1999-Oct-05 or later
00005   (the contents of which are also included in zip.h) for terms of use.
00006   If, for some reason, both of these files are missing, the Info-ZIP license
00007   also may be found at:  ftp://ftp.cdrom.com/pub/infozip/license.html
00008 */
00009 /* Only the Windows DLL is currently supported */
00010 #ifndef _ZIPAPI_H
00011 #define _ZIPAPI_H
00012 
00013 #include "zip.h"
00014 
00015 #ifdef WIN32
00016 #   ifndef PATH_MAX
00017 #      define PATH_MAX 260
00018 #   endif
00019 #else
00020 #   ifndef PATH_MAX
00021 #      define PATH_MAX 128
00022 #   endif
00023 #endif
00024 
00025 #if defined(WINDLL) || defined(API)
00026 #include <windows.h>
00027 /* Porting definations between Win 3.1x and Win32 */
00028 #ifdef WIN32
00029 #  define far
00030 #  define _far
00031 #  define __far
00032 #  define near
00033 #  define _near
00034 #  define __near
00035 #endif
00036 
00037 /*---------------------------------------------------------------------------
00038     Prototypes for public Zip API (DLL) functions.
00039   ---------------------------------------------------------------------------*/
00040 
00041 #define ZPVER_LEN    sizeof(ZpVer)
00042 /* These defines are set to zero for now, until OS/2 comes out
00043    with a dll.
00044  */
00045 #define D2_MAJORVER 0
00046 #define D2_MINORVER 0
00047 #define D2_PATCHLEVEL 0
00048 
00049 /* intended to be a private struct: */
00050 typedef struct _zip_ver {
00051     uch major;              /* e.g., integer 5 */
00052     uch minor;              /* e.g., 2 */
00053     uch patchlevel;         /* e.g., 0 */
00054     uch not_used;
00055 } _zip_version_type;
00056 
00057 typedef struct _ZpVer {
00058     ulg structlen;          /* length of the struct being passed */
00059     ulg flag;               /* bit 0: is_beta   bit 1: uses_zlib */
00060     char betalevel[10];     /* e.g., "g BETA" or "" */
00061     char date[20];          /* e.g., "4 Sep 95" (beta) or "4 September 1995" */
00062     char zlib_version[10];  /* e.g., "0.95" or NULL */
00063     _zip_version_type zip;
00064     _zip_version_type os2dll;
00065     _zip_version_type windll;
00066 } ZpVer;
00067 
00068 #  ifndef EXPENTRY
00069 #    define EXPENTRY WINAPI
00070 #  endif
00071 
00072 #ifndef DEFINED_ONCE
00073 #define DEFINED_ONCE
00074 typedef int (WINAPI DLLPRNT) (LPSTR, unsigned long);
00075 typedef int (WINAPI DLLPASSWORD) (LPSTR, int, LPCSTR, LPCSTR);
00076 typedef int (WINAPI DLLSERVICE) (LPCSTR, unsigned long);
00077 #endif
00078 typedef int (WINAPI DLLCOMMENT)(LPSTR);
00079 
00080 /* Structures */
00081 
00082 typedef struct {        /* zip options */
00083 LPSTR Date;             /* Date to include after */
00084 LPSTR szRootDir;        /* Directory to use as base for zipping */
00085 LPSTR szTempDir;        /* Temporary directory used during zipping */
00086 BOOL fTemp;             /* Use temporary directory '-b' during zipping */
00087 BOOL fSuffix;           /* include suffixes (not implemented) */
00088 BOOL fEncrypt;          /* encrypt files */
00089 BOOL fSystem;           /* include system and hidden files */
00090 BOOL fVolume;           /* Include volume label */
00091 BOOL fExtra;            /* Exclude extra attributes */
00092 BOOL fNoDirEntries;     /* Do not add directory entries */
00093 BOOL fExcludeDate;      /* Exclude files newer than specified date */
00094 BOOL fIncludeDate;      /* Include only files newer than specified date */
00095 BOOL fVerbose;          /* Mention oddities in zip file structure */
00096 BOOL fQuiet;            /* Quiet operation */
00097 BOOL fCRLF_LF;          /* Translate CR/LF to LF */
00098 BOOL fLF_CRLF;          /* Translate LF to CR/LF */
00099 BOOL fJunkDir;          /* Junk directory names */
00100 BOOL fGrow;             /* Allow appending to a zip file */
00101 BOOL fForce;            /* Make entries using DOS names (k for Katz) */
00102 BOOL fMove;             /* Delete files added or updated in zip file */
00103 BOOL fDeleteEntries;    /* Delete files from zip file */
00104 BOOL fUpdate;           /* Update zip file--overwrite only if newer */
00105 BOOL fFreshen;          /* Freshen zip file--overwrite only */
00106 BOOL fJunkSFX;          /* Junk SFX prefix */
00107 BOOL fLatestTime;       /* Set zip file time to time of latest file in it */
00108 BOOL fComment;          /* Put comment in zip file */
00109 BOOL fOffsets;          /* Update archive offsets for SFX files */
00110 BOOL fPrivilege;        /* Use privileges (WIN32 only) */
00111 BOOL fEncryption;       /* TRUE if encryption supported, else FALSE.
00112                            this is a read only flag */
00113 int  fRecurse;          /* Recurse into subdirectories. 1 => -r, 2 => -R */
00114 int  fRepair;           /* Repair archive. 1 => -F, 2 => -FF */
00115 char fLevel;            /* Compression level (0 - 9) */
00116 } ZPOPT, _far *LPZPOPT;
00117 
00118 typedef struct {
00119 int  argc;              /* Count of files to zip */
00120 LPSTR lpszZipFN;        /* name of archive to create/update */
00121 char **FNV;             /* array of file names to zip up */
00122 } ZCL, _far *LPZCL;
00123 
00124 typedef struct {
00125 DLLPRNT *print;
00126 DLLCOMMENT *comment;
00127 DLLPASSWORD *password;
00128 DLLSERVICE *ServiceApplication;
00129 } ZIPUSERFUNCTIONS, far * LPZIPUSERFUNCTIONS;
00130 
00131 extern LPZIPUSERFUNCTIONS lpZipUserFunctions;
00132 
00133 void  EXPENTRY ZpVersion(ZpVer far *);
00134 int   EXPENTRY ZpInit(LPZIPUSERFUNCTIONS lpZipUserFunc);
00135 BOOL  EXPENTRY ZpSetOptions(LPZPOPT Opts);
00136 ZPOPT EXPENTRY ZpGetOptions(void);
00137 int   EXPENTRY ZpArchive(ZCL C);
00138 
00139 #if defined(ZIPLIB) || defined(COM_OBJECT)
00140 #   define ydays zp_ydays
00141 #endif
00142 
00143 
00144 
00145 /* Functions not yet supported */
00146 #if 0
00147 int      EXPENTRY ZpMain            (int argc, char **argv);
00148 int      EXPENTRY ZpAltMain         (int argc, char **argv, ZpInit *init);
00149 #endif
00150 #endif /* WINDLL? || API? */
00151 
00152 #endif /* _ZIPAPI_H */

Generated on Wed Oct 26 14:46:48 2005 for Lgi by  doxygen 1.4.1