00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef zz_zip_h
00010 #define zz_zip_h
00011
00012 #pragma warning(disable:4786)
00013
00014 extern "C"
00015 {
00016 #include <structs.h>
00017 }
00018
00019 #include <windows.h>
00020 #include <direct.h>
00021 #include <map>
00022 #include <string>
00023 #include <zz_file.h>
00024 #include <zz_exception.h>
00025 #include <zz_string.h>
00026
00027 using namespace std;
00028
00029 extern "C"
00030 {
00031
00032
00033 typedef int ( __stdcall FUNC_ZPINIT )( ZIPUSERFUNCTIONS* );
00034
00035
00036 typedef BOOL ( __stdcall FUNC_ZPSETOPTIONS )( ZPOPT );
00037
00038
00039 typedef int ( __stdcall FUNC_ZPARCHIVE )( ZCL );
00040
00041 }
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061 class ZZ_API CzzZip : public CzzFile
00062 {
00063 public:
00064
00065
00066
00067
00068
00069
00070
00071
00072 CzzZip( const char* archive
00073 );
00074
00075 virtual ~CzzZip();
00076
00077
00078
00079
00080
00081
00082
00083
00084 void AddFile( const char* file
00085 );
00086
00087
00088
00089
00090
00091
00092
00093
00094 void Compress( void );
00095
00096 private:
00097
00098 void InitOptions( void );
00099
00100 map<int, string > m_Files;
00101 HINSTANCE m_hDLL;
00102 string m_Name;
00103 ZPOPT m_Options;
00104 ZCL m_Archive;
00105 ZIPUSERFUNCTIONS m_UserFuncs;
00106 FUNC_ZPSETOPTIONS* m_pfZpSetOptions;
00107 FUNC_ZPINIT* m_pfZpInit;
00108 FUNC_ZPARCHIVE* m_pfZpArchive;
00109 };
00110
00111 #endif // zz_zip_h
00112