Back to index

php5  5.3.10
Classes | Defines | Typedefs | Enumerations | Functions | Variables
zip.h File Reference
#include "main/php.h"
#include <sys/types.h>
#include <stdio.h>
#include <time.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  zip_stat

Defines

#define ZIP_EXTERN(rt)   rt
#define ZIP_CREATE   1
#define ZIP_EXCL   2
#define ZIP_CHECKCONS   4
#define ZIP_OVERWRITE   8
#define ZIP_FL_NOCASE   1 /* ignore case on name lookup */
#define ZIP_FL_NODIR   2 /* ignore directory component */
#define ZIP_FL_COMPRESSED   4 /* read compressed data */
#define ZIP_FL_UNCHANGED   8 /* use original data, ignoring changes */
#define ZIP_FL_RECOMPRESS   16 /* force recompression of data */
#define ZIP_AFL_TORRENT   1 /* torrent zipped */
#define ZIP_ER_OK   0 /* N No error */
#define ZIP_ER_MULTIDISK   1 /* N Multi-disk zip archives not supported */
#define ZIP_ER_RENAME   2 /* S Renaming temporary file failed */
#define ZIP_ER_CLOSE   3 /* S Closing zip archive failed */
#define ZIP_ER_SEEK   4 /* S Seek error */
#define ZIP_ER_READ   5 /* S Read error */
#define ZIP_ER_WRITE   6 /* S Write error */
#define ZIP_ER_CRC   7 /* N CRC error */
#define ZIP_ER_ZIPCLOSED   8 /* N Containing zip archive was closed */
#define ZIP_ER_NOENT   9 /* N No such file */
#define ZIP_ER_EXISTS   10 /* N File already exists */
#define ZIP_ER_OPEN   11 /* S Can't open file */
#define ZIP_ER_TMPOPEN   12 /* S Failure to create temporary file */
#define ZIP_ER_ZLIB   13 /* Z Zlib error */
#define ZIP_ER_MEMORY   14 /* N Malloc failure */
#define ZIP_ER_CHANGED   15 /* N Entry has been changed */
#define ZIP_ER_COMPNOTSUPP   16 /* N Compression method not supported */
#define ZIP_ER_EOF   17 /* N Premature EOF */
#define ZIP_ER_INVAL   18 /* N Invalid argument */
#define ZIP_ER_NOZIP   19 /* N Not a zip archive */
#define ZIP_ER_INTERNAL   20 /* N Internal error */
#define ZIP_ER_INCONS   21 /* N Zip archive inconsistent */
#define ZIP_ER_REMOVE   22 /* S Can't remove file */
#define ZIP_ER_DELETED   23 /* N Entry has been deleted */
#define ZIP_ET_NONE   0 /* sys_err unused */
#define ZIP_ET_SYS   1 /* sys_err is errno */
#define ZIP_ET_ZLIB   2 /* sys_err is zlib error code */
#define ZIP_CM_DEFAULT   -1 /* better of deflate or store */
#define ZIP_CM_STORE   0 /* stored (uncompressed) */
#define ZIP_CM_SHRINK   1 /* shrunk */
#define ZIP_CM_REDUCE_1   2 /* reduced with factor 1 */
#define ZIP_CM_REDUCE_2   3 /* reduced with factor 2 */
#define ZIP_CM_REDUCE_3   4 /* reduced with factor 3 */
#define ZIP_CM_REDUCE_4   5 /* reduced with factor 4 */
#define ZIP_CM_IMPLODE   6 /* imploded */
#define ZIP_CM_DEFLATE   8 /* deflated */
#define ZIP_CM_DEFLATE64   9 /* deflate64 */
#define ZIP_CM_PKWARE_IMPLODE   10 /* PKWARE imploding */
#define ZIP_CM_BZIP2   12 /* compressed using BZIP2 algorithm */
#define ZIP_CM_LZMA   14 /* LZMA (EFS) */
#define ZIP_CM_TERSE   18 /* compressed using IBM TERSE (new) */
#define ZIP_CM_LZ77   19 /* IBM LZ77 z Architecture (PFS) */
#define ZIP_CM_WAVPACK   97 /* WavPack compressed data */
#define ZIP_CM_PPMD   98 /* PPMd version I, Rev 1 */
#define ZIP_EM_NONE   0 /* not encrypted */
#define ZIP_EM_TRAD_PKWARE   1 /* traditional PKWARE encryption */
#define ZIP_EM_UNKNOWN   0xffff /* unknown algorithm */

Typedefs

typedef ssize_t(* zip_source_callback )(void *state, void *data, size_t len, enum zip_source_cmd cmd)

Enumerations

enum  zip_source_cmd {
  ZIP_SOURCE_OPEN, ZIP_SOURCE_READ, ZIP_SOURCE_CLOSE, ZIP_SOURCE_STAT,
  ZIP_SOURCE_ERROR, ZIP_SOURCE_FREE
}

Functions

 ZIP_EXTERN (int) zip_add(struct zip *
 ZIP_EXTERN (void) zip_error_clear(struct zip *)
int intZIP_EXTERN (const char *) zip_file_strerror(struct zip_file *)
 ZIP_EXTERN (struct zip_file *) zip_fopen(struct zip *
 ZIP_EXTERN (ssize_t) zip_fread(struct zip_file *
 ZIP_EXTERN (struct zip *) zip_open(const char *
 ZIP_EXTERN (struct zip_source *) zip_source_buffer(struct zip *
 END_EXTERN_C ()

Variables

 int
 size_t
const void off_t

Class Documentation

struct zip_stat

Definition at line 168 of file zip.h.

Class Members
unsigned short comp_method
off_t comp_size
unsigned int crc
unsigned short encryption_method
int index
time_t mtime
const char * name
off_t size

Define Documentation

#define ZIP_AFL_TORRENT   1 /* torrent zipped */

Definition at line 77 of file zip.h.

#define ZIP_CHECKCONS   4

Definition at line 63 of file zip.h.

#define ZIP_CM_BZIP2   12 /* compressed using BZIP2 algorithm */

Definition at line 128 of file zip.h.

#define ZIP_CM_DEFAULT   -1 /* better of deflate or store */

Definition at line 115 of file zip.h.

#define ZIP_CM_DEFLATE   8 /* deflated */

Definition at line 124 of file zip.h.

#define ZIP_CM_DEFLATE64   9 /* deflate64 */

Definition at line 125 of file zip.h.

#define ZIP_CM_IMPLODE   6 /* imploded */

Definition at line 122 of file zip.h.

#define ZIP_CM_LZ77   19 /* IBM LZ77 z Architecture (PFS) */

Definition at line 133 of file zip.h.

#define ZIP_CM_LZMA   14 /* LZMA (EFS) */

Definition at line 130 of file zip.h.

#define ZIP_CM_PKWARE_IMPLODE   10 /* PKWARE imploding */

Definition at line 126 of file zip.h.

#define ZIP_CM_PPMD   98 /* PPMd version I, Rev 1 */

Definition at line 135 of file zip.h.

#define ZIP_CM_REDUCE_1   2 /* reduced with factor 1 */

Definition at line 118 of file zip.h.

#define ZIP_CM_REDUCE_2   3 /* reduced with factor 2 */

Definition at line 119 of file zip.h.

#define ZIP_CM_REDUCE_3   4 /* reduced with factor 3 */

Definition at line 120 of file zip.h.

#define ZIP_CM_REDUCE_4   5 /* reduced with factor 4 */

Definition at line 121 of file zip.h.

#define ZIP_CM_SHRINK   1 /* shrunk */

Definition at line 117 of file zip.h.

#define ZIP_CM_STORE   0 /* stored (uncompressed) */

Definition at line 116 of file zip.h.

#define ZIP_CM_TERSE   18 /* compressed using IBM TERSE (new) */

Definition at line 132 of file zip.h.

#define ZIP_CM_WAVPACK   97 /* WavPack compressed data */

Definition at line 134 of file zip.h.

#define ZIP_CREATE   1

Definition at line 61 of file zip.h.

#define ZIP_EM_NONE   0 /* not encrypted */

Definition at line 139 of file zip.h.

#define ZIP_EM_TRAD_PKWARE   1 /* traditional PKWARE encryption */

Definition at line 140 of file zip.h.

#define ZIP_EM_UNKNOWN   0xffff /* unknown algorithm */

Definition at line 152 of file zip.h.

#define ZIP_ER_CHANGED   15 /* N Entry has been changed */

Definition at line 96 of file zip.h.

#define ZIP_ER_CLOSE   3 /* S Closing zip archive failed */

Definition at line 84 of file zip.h.

#define ZIP_ER_COMPNOTSUPP   16 /* N Compression method not supported */

Definition at line 97 of file zip.h.

#define ZIP_ER_CRC   7 /* N CRC error */

Definition at line 88 of file zip.h.

#define ZIP_ER_DELETED   23 /* N Entry has been deleted */

Definition at line 104 of file zip.h.

#define ZIP_ER_EOF   17 /* N Premature EOF */

Definition at line 98 of file zip.h.

#define ZIP_ER_EXISTS   10 /* N File already exists */

Definition at line 91 of file zip.h.

#define ZIP_ER_INCONS   21 /* N Zip archive inconsistent */

Definition at line 102 of file zip.h.

#define ZIP_ER_INTERNAL   20 /* N Internal error */

Definition at line 101 of file zip.h.

#define ZIP_ER_INVAL   18 /* N Invalid argument */

Definition at line 99 of file zip.h.

#define ZIP_ER_MEMORY   14 /* N Malloc failure */

Definition at line 95 of file zip.h.

#define ZIP_ER_MULTIDISK   1 /* N Multi-disk zip archives not supported */

Definition at line 82 of file zip.h.

#define ZIP_ER_NOENT   9 /* N No such file */

Definition at line 90 of file zip.h.

#define ZIP_ER_NOZIP   19 /* N Not a zip archive */

Definition at line 100 of file zip.h.

#define ZIP_ER_OK   0 /* N No error */

Definition at line 81 of file zip.h.

#define ZIP_ER_OPEN   11 /* S Can't open file */

Definition at line 92 of file zip.h.

#define ZIP_ER_READ   5 /* S Read error */

Definition at line 86 of file zip.h.

#define ZIP_ER_REMOVE   22 /* S Can't remove file */

Definition at line 103 of file zip.h.

#define ZIP_ER_RENAME   2 /* S Renaming temporary file failed */

Definition at line 83 of file zip.h.

#define ZIP_ER_SEEK   4 /* S Seek error */

Definition at line 85 of file zip.h.

#define ZIP_ER_TMPOPEN   12 /* S Failure to create temporary file */

Definition at line 93 of file zip.h.

#define ZIP_ER_WRITE   6 /* S Write error */

Definition at line 87 of file zip.h.

#define ZIP_ER_ZIPCLOSED   8 /* N Containing zip archive was closed */

Definition at line 89 of file zip.h.

#define ZIP_ER_ZLIB   13 /* Z Zlib error */

Definition at line 94 of file zip.h.

#define ZIP_ET_NONE   0 /* sys_err unused */

Definition at line 109 of file zip.h.

#define ZIP_ET_SYS   1 /* sys_err is errno */

Definition at line 110 of file zip.h.

#define ZIP_ET_ZLIB   2 /* sys_err is zlib error code */

Definition at line 111 of file zip.h.

#define ZIP_EXCL   2

Definition at line 62 of file zip.h.

#define ZIP_EXTERN (   rt)    rt

Definition at line 50 of file zip.h.

#define ZIP_FL_COMPRESSED   4 /* read compressed data */

Definition at line 71 of file zip.h.

#define ZIP_FL_NOCASE   1 /* ignore case on name lookup */

Definition at line 69 of file zip.h.

#define ZIP_FL_NODIR   2 /* ignore directory component */

Definition at line 70 of file zip.h.

#define ZIP_FL_RECOMPRESS   16 /* force recompression of data */

Definition at line 73 of file zip.h.

#define ZIP_FL_UNCHANGED   8 /* use original data, ignoring changes */

Definition at line 72 of file zip.h.

#define ZIP_OVERWRITE   8

Definition at line 64 of file zip.h.


Typedef Documentation

Definition at line 165 of file zip.h.


Enumeration Type Documentation

Enumerator:
ZIP_SOURCE_OPEN 
ZIP_SOURCE_READ 
ZIP_SOURCE_CLOSE 
ZIP_SOURCE_STAT 
ZIP_SOURCE_ERROR 
ZIP_SOURCE_FREE 

Definition at line 156 of file zip.h.

                    {
    ZIP_SOURCE_OPEN, /* prepare for reading */
    ZIP_SOURCE_READ,        /* read data */
    ZIP_SOURCE_CLOSE,       /* reading is done */
    ZIP_SOURCE_STAT, /* get meta information */
    ZIP_SOURCE_ERROR,       /* get error information */
    ZIP_SOURCE_FREE  /* cleanup and free resources */
};

Function Documentation

ZIP_EXTERN ( int  ) [read]
const char struct zip_stat struct zip_stat * ZIP_EXTERN ( void  ) [read]
ZIP_EXTERN ( const char *  )
ZIP_EXTERN ( struct zip_file )
ZIP_EXTERN ( struct zip ) const
void * ZIP_EXTERN ( struct zip_source )

Variable Documentation

int

Definition at line 188 of file zip.h.

void struct zip off_t

Definition at line 212 of file zip.h.

void size_t

Definition at line 192 of file zip.h.