Logo Search packages:      
Sourcecode: harbour version File versions  Download package

CZipArchive Class Reference

#include <ziparchive.h>

List of all members.


Detailed Description

The representation of the zip archive file. This class provides all the operations on the zip archive.

Definition at line 225 of file ziparchive.h.


Public Types

enum  CallbackType {
  cbNothing = 0x0000, cbAdd = 0x0001, cbAddTmp = 0x0002, cbAddStore = 0x0004,
  cbExtract = 0x0008, cbDeleteCnt = 0x0010, cbDelete = 0x0020, cbTest = 0x0040,
  cbSave = 0x0080, cbGetFromArchive = 0x0100, cbRename = 0x0200, cbReplace = 0x0400,
  cbNextValue = 0x0800, cbSubActions = cbAddTmp | cbAddStore | cbDeleteCnt | cbReplace, cbActions = cbAdd | cbExtract | cbDelete | cbTest | cbSave | cbGetFromArchive | cbRename, cbAll = cbActions | cbSubActions
}
enum  CloseAfterException { afNoException, afAfterException, afWriteDir }
enum  FFCaseSens { ffDefault, ffCaseSens, ffNoCaseSens }
enum  OpenMode { zipOpen, zipOpenReadOnly, zipCreate, zipCreateSpan }
enum  Predict { prDir, prFile, prAuto }
enum  Smartness {
  zipsmLazy = 0x0000, zipsmCPassDir = 0x0001, zipsmCPFile0 = 0x0002, zipsmNotCompSmall = 0x0004,
  zipsmCheckForEff = 0x0008, zipsmMemoryFlag = 0x0010, zipsmCheckForEffInMem = zipsmMemoryFlag | zipsmCheckForEff, zipsmSmartPass = zipsmCPassDir | zipsmCPFile0,
  zipsmSmartAdd = zipsmNotCompSmall | zipsmCheckForEff, zipsmSafeSmart = zipsmSmartPass | zipsmNotCompSmall, zipsmSmartest = zipsmSmartPass | zipsmSmartAdd, zipsmInternal01 = 0xf000
}

Public Member Functions

bool AddNewFile (CZipMemFile &mf, LPCTSTR lpszFileNameInZip, int iComprLevel=-1, int iSmartLevel=zipsmSafeSmart, unsigned long nBufSize=65536)
bool AddNewFile (LPCTSTR lpszFilePath, LPCTSTR lpszFileNameInZip, int iComprLevel=-1, int iSmartLevel=zipsmSafeSmart, unsigned long nBufSize=65536)
bool AddNewFile (LPCTSTR lpszFilePath, int iComprLevel=-1, bool bFullPath=true, int iSmartLevel=zipsmSafeSmart, unsigned long nBufSize=65536)
bool AddNewFile (CZipAddNewFileInfo &info)
bool AddNewFileDrv (LPCTSTR lpszFilePath, int iComprLevel=-1, bool bFullPath=true, int iSmartLevel=zipsmSafeSmart, unsigned long nBufSize=65536)
bool AddNewFileDrv (CZipAddNewFileInfo &info)
void Close (int iAfterException=afNoException, bool bUpdateTimeStamp=false)
int CloseFile (LPCTSTR lpszFilePath=NULL, bool bAfterException=false)
int CloseFile (CZipFile &file)
void CloseFileAfterTestFailed ()
bool CloseNewFile (bool bAfterException=false)
void DeleteFile (WORD uIndex)
void DeleteFiles (const CZipStringArray &aNames)
void DeleteFiles (CZipWordArray &aIndexes)
void EnableFindFast (bool bEnable=true)
bool ExtractFile (WORD uIndex, CZipMemFile &mf, DWORD nBufSize=65536)
bool ExtractFile (WORD uIndex, LPCTSTR lpszPath, bool bFullPath=true, LPCTSTR lpszNewName=NULL, DWORD nBufSize=65536)
int FindFile (LPCTSTR lpszFileName, int iCaseSensitive=ffDefault, bool bFileNameOnly=false)
void FindMatches (LPCTSTR lpszPattern, CZipWordArray &ar, bool bFullPath=true) const
void Flush ()
void GetAdvanced (int *piWriteBuffer=NULL, int *piGeneralBuffer=NULL, int *piSearchBuffer=NULL)
CZipString GetArchivePath () const
bool GetAutoFlush () const
CZipActionCallbackGetCallback (CallbackType iWhich)
void GetCentralDirInfo (CZipCentralDir::Info &info) const
DWORD GetCentralDirSize (bool bWhole=true) const
int GetCount (bool bOnlyFiles=false) const
int GetCurrentDisk () const
bool GetFileInfo (CZipFileHeader &fhInfo, WORD uIndex) const
int GetFindFastIndex (int iFindFastIndex) const
bool GetFromArchive (CZipArchive &zip, CZipStringArray &aNames, bool bKeepSystComp=false)
bool GetFromArchive (CZipArchive &zip, CZipWordArray &aIndexes, bool bKeepSystComp=false)
bool GetFromArchive (CZipArchive &zip, WORD uIndex, int iReplaceIndex=-1, bool bKeepSystComp=false)
CZipString GetGlobalComment () const
void GetIndexes (const CZipStringArray &aNames, CZipWordArray &aIndexes)
int GetLocalExtraField (char *pBuf, int iSize) const
CZipString GetPassword () const
CZipString GetRootPath () const
int GetSpanMode () const
CZipStorageGetStorage ()
int GetSystemCompatibility () const
CZipString GetTempPath () const
bool IsClosed (bool bArchive=true) const
bool IsReadOnly ()
void Open (CZipMemFile &mf, int iMode=zipOpen)
void Open (LPCTSTR szPathName, int iMode=zipOpen, int iVolumeSize=0)
bool OpenFile (WORD uIndex)
bool OpenNewFile (CZipFileHeader &header, int iLevel=Z_DEFAULT_COMPRESSION, LPCTSTR lpszFilePath=NULL, DWORD uInternal=0)
CZipString PredictExtractedFileName (LPCTSTR lpszFileNameInZip, LPCTSTR lpszPath, bool bFullPath, LPCTSTR lpszNewName=NULL) const
CZipString PredictFileNameInZip (LPCTSTR lpszFilePath, bool bFullPath, int iWhat=prAuto, bool bExactly=false) const
DWORD ReadFile (void *pBuf, DWORD iSize)
bool RenameFile (WORD uIndex, LPCTSTR lpszNewName)
void SetAdvanced (int iWriteBuffer=65536, int iGeneralBuffer=65536, int iSearchBuffer=32768)
void SetAutoFlush (bool bAutoFlush=true)
void SetCallback (CZipActionCallback *pCallback=NULL, int iWhich=cbAll)
void SetCaseSensitivity (bool bCaseSensitive)
void SetConvertAfterOpen (bool bConvertAfterOpen)
void SetExtraField (const char *pBuf, WORD iSize)
bool SetFileComment (WORD uIndex, LPCTSTR lpszComment)
void SetFileHeaderAttr (CZipFileHeader &header, DWORD uAttr)
bool SetGlobalComment (LPCTSTR lpszComment)
void SetIgnoreCRC (bool bIgnore=true)
bool SetPassword (LPCTSTR lpszPassword=NULL)
void SetRootPath (LPCTSTR szPath=NULL)
void SetSpanCallback (CZipSpanCallback *pCallback=NULL)
bool SetSystemCompatibility (int iSystemComp)
void SetTempPath (LPCTSTR lpszPath=NULL, bool bForce=true)
bool TestFile (WORD uIndex, DWORD uBufSize=65536)
CZipString TrimRootPath (CZipPathComponent &zpc) const
int WillBeDuplicated (LPCTSTR lpszFilePath, bool bFullPath, bool bFileNameOnly=false, int iWhat=prAuto)
bool WriteNewFile (const void *pBuf, DWORD iSize)

Static Public Member Functions

static const DWORD * GetCRCTable ()
static bool RemovePathBeginning (LPCTSTR lpszBeginning, CZipString &szPath, ZIPSTRINGCOMPARE pCompareFunction)
static int SingleToWide (const CZipAutoBuffer &szSingle, CZipString &szWide)
static int WideToSingle (LPCTSTR lpWide, CZipAutoBuffer &szSingle)

Public Attributes

bool m_bRemoveDriveLetter

Protected Types

typedef CZipPtrList< void * >
::iterator 
CZipPtrListIter
enum  OpenFileType { extract = -1, nothing, compress }

Protected Member Functions

void CheckForError (int iErr)
bool CryptCheck ()
DWORD CryptCRC32 (DWORD l, char c)
void CryptCryptHeader (long iCrc, CZipAutoBuffer &buf)
void CryptDecode (char &c)
void CryptDecodeBuffer (DWORD uCount)
char CryptDecryptByte ()
void CryptEncode (char &c)
void CryptEncodeBuffer ()
void CryptInitKeys ()
void CryptUpdateKeys (char c)
CZipFileHeaderCurrentFile ()
void EmptyPtrList ()
bool GetFromArchive (CZipArchive &zip, WORD uIndex, int iReplaceIndex, bool bKeepSystComp, CZipActionCallback *pCallback)
void MakeSpaceForReplace (int iReplaceIndex, DWORD uTotal, LPCTSTR lpszFileName)
void MovePackedFiles (DWORD uStartOffset, DWORD uEndOffset, DWORD uMoveBy, CZipActionCallback *pCallback, bool bForward=false)
void OpenInternal (int iMode)
bool RemoveLast (bool bRemoveAnyway=false)
void ThrowError (int err, bool bZlib=false)
bool UpdateReplaceIndex (int &iReplaceIndex, LPCTSTR lpszNewFileName)
void WriteCentralDirectory (bool bFlush=true)

Static Protected Member Functions

static void * _zliballoc (void *opaque, UINT items, UINT size)
 memory allocator called by the zlib library
static void _zlibfree (void *opaque, void *address)
 memory deallocator called by the zlib library

Protected Attributes

bool m_bAutoFlush
bool m_bCaseSensitive
bool m_bIgnoreCRC
CZipClbckStrg m_callbacks
CZipCentralDir m_centralDir
int m_iArchiveSystCompatib
char m_iFileOpened
CZipInternalInfo m_info
DWORD m_keys [3]
CZipPtrList< void * > m_list
 a list holding pointers to the memory areas allocated by the zlib library
CZipAutoBuffer m_pszPassword
ZIPSTRINGCOMPARE m_pZipCompare
CZipStorage m_storage
CZipString m_szRootPath
CZipString m_szTempPath

Static Protected Attributes

static const TCHAR m_gszCopyright [] = {_T("ZipArchive library Copyright 2000 - 2003 Tadeusz Dracz")}

Classes

class  CWildcard
struct  CZipClbckStrg
struct  CZipDeleteInfo
struct  CZipInternalInfo
struct  CZipSmClrPass

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index