home *** CD-ROM | disk | FTP | other *** search
/ Software Recommendations - 1998 Season 1 / DNBCD4.iso / develop / lib / addzip / ADDZIP.ZIP / C / ADDZIP.H < prev    next >
Encoding:
C/C++ Source or Header  |  1997-08-15  |  5.4 KB  |  171 lines

  1. // addzip.h
  2. //
  3. // C/C++ header file for addZIP compression libraries
  4. //
  5. // Copyright ⌐ 1995,1997 Stephen Darlington. All rights reserved.
  6.  
  7. #ifndef _ADDZIP_H_
  8. #define _ADDZIP_H_
  9.  
  10. #ifdef _BUILD_DLL
  11. #    define DLLENTRY CALLBACK _export
  12. #else
  13. #    if defined(_WIN32) && defined(_MSC_VER)
  14. #        define DLLENTRY _declspec(dllimport)
  15. #    else
  16. #        define DLLENTRY CALLBACK
  17. #    endif
  18. #endif
  19.  
  20. typedef unsigned char BYTE;
  21. typedef unsigned short UINT16;
  22. typedef unsigned long UINT32;
  23. typedef char CHAR;
  24. typedef short INT16;
  25. typedef long INT32;
  26.  
  27. typedef INT16 (CALLBACK *CALLBACKFN)(INT16, INT16, LPSTR);
  28.  
  29. #ifdef __cplusplus
  30. extern "C"
  31. {
  32. #endif
  33. INT16 DLLENTRY addZIP(void);
  34. INT16 DLLENTRY addZIP_Abort(INT16 bAbort);
  35. INT16 DLLENTRY addZIP_ArchiveName(LPCSTR);
  36. INT16 DLLENTRY addZIP_BuildSFX(INT16 bBuildSFX);
  37. INT16 DLLENTRY addZIP_ClearAttributes(INT16);
  38. INT16 DLLENTRY addZIP_Comment(LPCSTR);
  39. INT16 DLLENTRY addZIP_Delete(INT16);
  40. INT16 DLLENTRY addZIP_DeleteComment(INT16);
  41. INT16 DLLENTRY addZIP_DisplayComment(INT16);
  42. INT16 DLLENTRY addZIP_Encrypt(LPCSTR);
  43. INT16 DLLENTRY addZIP_Exclude(LPCSTR);
  44. INT16 DLLENTRY addZIP_ExcludeListFile(LPCSTR);
  45. INT16 DLLENTRY addZIP_Freshen(INT16 iFlag);
  46. INT16 DLLENTRY addZIP_GetLastError(void);
  47. INT16 DLLENTRY addZIP_GetLastWarning(void);
  48. void DLLENTRY addZIP_GetVersion(UINT16 *, UINT16 *);
  49. INT16 DLLENTRY addZIP_Include(LPCSTR);
  50. INT16 DLLENTRY addZIP_IncludeFilesNewer(LPSTR cDate);
  51. INT16 DLLENTRY addZIP_IncludeFilesOlder(LPSTR cDate);
  52. INT16 DLLENTRY addZIP_IncludeArchive(INT16 iFlag);
  53. INT16 DLLENTRY addZIP_IncludeDirectoryEntries(INT16 flag);
  54. INT16 DLLENTRY addZIP_IncludeHidden(INT16 iFlag);
  55. INT16 DLLENTRY addZIP_IncludeReadOnly(INT16 iFlag);
  56. INT16 DLLENTRY addZIP_IncludeSystem(INT16 iFlag);
  57. INT16 DLLENTRY addZIP_IncludeListFile(LPCSTR);
  58. void DLLENTRY addZIP_Initialise(void);
  59. INT16 DLLENTRY addZIP_InstallCallback(CALLBACKFN cbFunction);
  60. INT16 DLLENTRY addZIP_Overwrite(INT16);
  61. INT16 DLLENTRY addZIP_Register(LPCSTR, UINT32);
  62. INT16 DLLENTRY addZIP_Recurse(INT16);
  63. INT16 DLLENTRY addZIP_SaveAttributes(INT16);
  64. INT16 DLLENTRY addZIP_SaveRelativeTo(LPCSTR cPath);
  65. INT16 DLLENTRY addZIP_SaveStructure(INT16);
  66. INT16 DLLENTRY addZIP_SetArchiveDate(INT16);
  67. INT16 DLLENTRY addZIP_SetCompressionLevel(INT16);
  68. INT16 DLLENTRY addZIP_SetParentWindowHandle(HWND);
  69. INT16 DLLENTRY addZIP_SetTempDrive(LPCSTR);
  70. INT16 DLLENTRY addZIP_SetWindowHandle(HWND);
  71. INT16 DLLENTRY addZIP_Span(INT16);
  72. INT16 DLLENTRY addZIP_Store(LPCSTR);
  73. INT16 DLLENTRY addZIP_Update(INT16 iFlag);
  74. INT16 DLLENTRY addZIP_UseLFN(INT16);
  75. INT16 DLLENTRY addZIP_View(INT16);
  76. #ifdef __cplusplus
  77. }
  78. #endif
  79.  
  80. // constants for addZIP_SetCompressionLevel(...)
  81. #define azCOMPRESSION_NONE    0x00
  82. #define azCOMPRESSION_MINIMUM 0x01
  83. #define azCOMPRESSION_NORMAL  0x02
  84. #define azCOMPRESSION_MAXIMUM 0x03
  85.  
  86. // constants for addZIP_SaveStructure(...)
  87. #define azSTRUCTURE_NONE     0x00
  88. #define azSTRUCTURE_RELATIVE 0x01
  89. #define azSTRUCTURE_ABSOLUTE 0x02
  90.  
  91. // constants for addZIP_Overwrite(...)
  92. #define azOVERWRITE_QUERY 0x0a
  93. #define azOVERWRITE_ALL   0x0b
  94. #define azOVERWRITE_NONE  0x0c
  95.  
  96. // constants for addZIP_SetArchiveDate();
  97. #define DATE_ORIGINAL  0x00
  98. #define DATE_TODAY     0x01
  99. #define DATE_OLDEST    0x02
  100. #define DATE_NEWEST    0x03
  101.  
  102. // constants for addZIP_IncludeXXX attribute functions
  103. #define azNEVER  0x00  // files must never have this attribute set
  104. #define azYES    0x01  // files may or may not have this attribute set
  105. #define azALWAYS 0xff  // files must always have this attribute set
  106.  
  107. // constants for addZIP_ClearAttributes(...)
  108. #define azATTR_NONE 0
  109. #define azATTR_READONLY 1
  110. #define azATTR_HIDDEN 2
  111. #define azATTR_SYSTEM 4
  112. #define azATTR_ARCHIVE 32
  113. #define azATTR_ALL 39
  114.  
  115. // constants used in messages to identify library
  116. #define azLIBRARY_ADDZIP 0
  117.  
  118. //
  119. #define AM_SEARCHING      0x0a
  120. #define AM_ZIPCOMMENT     0x0b
  121. #define AM_ZIPPING        0x0c
  122. #define AM_ZIPPED         0x0d
  123. #define AM_UNZIPPING      0x0e
  124. #define AM_UNZIPPED       0x0f
  125. #define AM_TESTING        0x10
  126. #define AM_TESTED         0x11
  127. #define AM_DELETING       0x12
  128. #define AM_DELETED        0x13
  129. #define AM_DISKCHANGE     0x14
  130. #define AM_VIEW           0x15
  131. #define AM_ERROR          0x16
  132. #define AM_WARNING        0x17
  133. #define AM_QUERYOVERWRITE 0x18
  134. #define AM_COPYING        0x19
  135. #define AM_COPIED         0x1a
  136. //#define AM_REPAIRING      0x1b
  137. //#define AM_FILECOMMENT    0x1c
  138. //#define AM_PASSWORD       0x1d
  139. #define AM_ABORT          0xff
  140.  
  141. // Constants for compression method in AM_VIEW
  142. #define azCM_NONE 0              0x00
  143. #define azCM_SHRUNK              0x0a
  144. #define azCM_REDUCED_1           0x14
  145. #define azCM_REDUCED_2           0x1e
  146. #define azCM_REDUCED_3           0x28
  147. #define azCM_REDUCED_4           0x32
  148. #define azCM_IMPLODED            0x3c
  149. #define azCM_TOKENISED           0x46
  150. #define azCM_DEFLATED_NORMAL     0x50
  151. #define azCM_DEFLATED_MAXIMUM    0x51
  152. #define azCM_DEFLATED_FAST       0x52
  153. #define azCM_DEFLATED_SUPERFAST  0x53
  154. #define azCM_UNKNOWN             0xff
  155.  
  156. //Constants for whether file is encrypted or not in AM_VIEW
  157. #define azFT_NOT_ENCRYPTED 0x00
  158. #define azFT_ENCRYPTED     0x01
  159.  
  160. //Constants for whether file is text or binary in AM_VIEW
  161. #define azFT_TEXT   0x00
  162. #define azFT_BINARY 0x01
  163.  
  164. // Constants used in returning from a AM_QUERYOVERWRITE message
  165. #define azOW_YES        0x00
  166. #define azOW_YES_TO_ALL 0x01
  167. #define azOW_NO         0x02
  168. #define azOW_NO_TO_ALL  0x03
  169.  
  170. #endif
  171.