CZipFile Class Reference

class CZipFile : public CZipArchive

A CZipFile represents a ZIP archive contained in a single file. Multi file zip archives are not supported.

Inherits from

Nested Classes and Structures

Public Member Functions
CZipFile(RFs &, const TDesC &)
~CZipFile()
IMPORT_C CZipFileMember *CaseInsensitiveMemberL(const TDesC &)
IMPORT_C CZipFileMember *CaseSensitiveOrCaseInsensitiveMemberL(const TDesC &)
IMPORT_C voidClose(void)
IMPORT_C TIntGetInputStreamL(const CZipFileMember *, RZipFileMemberReaderStream *&)
IMPORT_C CZipFileMemberIterator *GetMembersL(void)
IMPORT_C CZipFileMember *MemberL(const TDesC &)
IMPORT_C CZipFile *NewL(RFs &, RFile &)
IMPORT_C CZipFile *NewL(RFs &, const TDesC &)
IMPORT_C TIntOpenL(void)
IMPORT_C TIntSize(TInt &)
Protected Member Functions
IMPORT_C voidConstructL(const TDesC &)
IMPORT_C voidConstructL(RFile &)
voidDeleteMemberPointers(void)
TInt FindCentralDirectoryTrailer(TUint32 &)
const TMemberPointer *FindMemberPointer(const TDesC &, TBool)
TInt LoadMemberPointersL(void)
RZipFileMemberReaderStream *MakeInputStreamL(TUint32, TUint32, TUint32, TUint32)
CZipFileMember *MakeMemberL(TInt)
CZipFileMember *MakeMemberL(const TMemberPointer &, const TLocalHeader &)
voidOpenFileL(const TDesC &)
TInt Read(TByte *, TUint32)
TInt Read(TUint16 &)
TInt Read(TUint32 &)
TInt ReadCentralDirectoryHeaderL(TCentralDirectoryHeader &, TMemberPointer &, CCnvCharacterSetConverter *, TInt)
TInt ReadCentralDirectoryTrailer(TUint32, TCentralDirectoryTrailer &)
TInt ReadLocalHeader(TUint32, TLocalHeader &)
TInt Seek(TInt)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Public Member Enumerations
enumanonymous { KZipFileError = KZipArchiveMinError - 1, KZipFileNotFound = KZipFileError - 1, KZipFileIOError = KZipFileError - 2 }
Inherited Enumerations
CZipArchive:@53
CZipArchive:@54
CZipArchive:@55
CZipArchive:@56
CZipArchive:TCompressionMethod
Private Attributes
ContentAccess::CData *iData
TUint32 iFileLength
const TDesC &iFileName
RFs &iFs
TMemberPointer *iMemberPointers
TCentralDirectoryTrailer iTrailer

Constructor & Destructor Documentation

CZipFile(RFs &, const TDesC &)

IMPORT_CCZipFile(RFs &aFs,
const TDesC &aFileName
)

Parameters

RFs & aFs
const TDesC & aFileName

~CZipFile()

IMPORT_C~CZipFile()[virtual]

Member Functions Documentation

CaseInsensitiveMemberL(const TDesC &)

IMPORT_C CZipFileMember *CaseInsensitiveMemberL(const TDesC &aName)

Parameters

const TDesC & aName

CaseSensitiveOrCaseInsensitiveMemberL(const TDesC &)

IMPORT_C CZipFileMember *CaseSensitiveOrCaseInsensitiveMemberL(const TDesC &aName)

Parameters

const TDesC & aName

Close(void)

IMPORT_C voidClose(void)

Parameters

void

ConstructL(const TDesC &)

IMPORT_C voidConstructL(const TDesC &aFileName)[protected]

Parameters

const TDesC & aFileName

ConstructL(RFile &)

IMPORT_C voidConstructL(RFile &aFile)[protected]

Parameters

RFile & aFile

DeleteMemberPointers(void)

voidDeleteMemberPointers(void)[protected]

Parameters

void

FindCentralDirectoryTrailer(TUint32 &)

TInt FindCentralDirectoryTrailer(TUint32 &offset)[protected]

Parameters

TUint32 & offset

FindMemberPointer(const TDesC &, TBool)

const TMemberPointer *FindMemberPointer(const TDesC &,
TBool
)[protected]

Parameters

const TDesC &
TBool

GetInputStreamL(const CZipFileMember *, RZipFileMemberReaderStream *&)

IMPORT_C TIntGetInputStreamL(const CZipFileMember *aMember,
RZipFileMemberReaderStream *&aStream
)

Parameters

const CZipFileMember * aMember
RZipFileMemberReaderStream *& aStream

GetMembersL(void)

IMPORT_C CZipFileMemberIterator *GetMembersL(void)

Parameters

void

LoadMemberPointersL(void)

TInt LoadMemberPointersL(void)[protected]

Parameters

void

MakeInputStreamL(TUint32, TUint32, TUint32, TUint32)

RZipFileMemberReaderStream *MakeInputStreamL(TUint32,
TUint32,
TUint32,
TUint32
)[protected]

MakeMemberL(TInt)

CZipFileMember *MakeMemberL(TInt)[protected]

Parameters

TInt

MakeMemberL(const TMemberPointer &, const TLocalHeader &)

CZipFileMember *MakeMemberL(const TMemberPointer &,
const TLocalHeader &
)[protected]

Parameters

const TMemberPointer &
const TLocalHeader &

MemberL(const TDesC &)

IMPORT_C CZipFileMember *MemberL(const TDesC &aName)

Parameters

const TDesC & aName

NewL(RFs &, RFile &)

IMPORT_C CZipFile *NewL(RFs &aFs,
RFile &aFile
)[static]

Parameters

RFs & aFs
RFile & aFile

NewL(RFs &, const TDesC &)

IMPORT_C CZipFile *NewL(RFs &aFs,
const TDesC &aFileName
)[static]

Parameters

RFs & aFs
const TDesC & aFileName

OpenFileL(const TDesC &)

voidOpenFileL(const TDesC &aFileName)[protected]

Parameters

const TDesC & aFileName

OpenL(void)

IMPORT_C TIntOpenL(void)

Parameters

void

Read(TByte *, TUint32)

TInt Read(TByte *,
TUint32
)[protected]

Parameters

TByte *
TUint32

Read(TUint16 &)

TInt Read(TUint16 &)[protected]

Parameters

TUint16 &

Read(TUint32 &)

TInt Read(TUint32 &)[protected]

Parameters

TUint32 &

ReadCentralDirectoryHeaderL(TCentralDirectoryHeader &, TMemberPointer &, CCnvCharacterSetConverter *, TInt)

TInt ReadCentralDirectoryHeaderL(TCentralDirectoryHeader &,
TMemberPointer &,
CCnvCharacterSetConverter *aConverter,
TIntaConverterState
)[protected]

Parameters

TCentralDirectoryHeader &
TMemberPointer &
CCnvCharacterSetConverter * aConverter
TInt aConverterState

ReadCentralDirectoryTrailer(TUint32, TCentralDirectoryTrailer &)

TInt ReadCentralDirectoryTrailer(TUint32offset,
TCentralDirectoryTrailer &
)[protected]

Parameters

TUint32 offset
TCentralDirectoryTrailer &

ReadLocalHeader(TUint32, TLocalHeader &)

TInt ReadLocalHeader(TUint32,
TLocalHeader &
)[protected]

Parameters

TUint32
TLocalHeader &

Seek(TInt)

TInt Seek(TInt)[protected]

Parameters

TInt

Size(TInt &)

IMPORT_C TIntSize(TInt &aSize)const

Parameters

TInt & aSize

Member Enumerations Documentation

Enum anonymous

ZipFile error enumeration.

Enumerators

KZipFileError = KZipArchiveMinError - 1

Cannot read file directory in the archive file

KZipFileNotFound = KZipFileError - 1

File not found error. It is not used in current implemenation

KZipFileIOError = KZipFileError - 2

File IO error.Any error occurs during a archive file is readed. For examples, any error about reading number of disk, an offset of signature, or the content of file is non-readable.

Member Data Documentation

ContentAccess::CData * iData

ContentAccess::CData *iData[private]

The pointer to CData object created from a zip file

TUint32 iFileLength

TUint32 iFileLength[private]

const TDesC & iFileName

const TDesC &iFileName[private]

RFs & iFs

RFs &iFs[private]

TMemberPointer * iMemberPointers

TMemberPointer *iMemberPointers[private]

The pointer to a a compressed file in a zipfile

TCentralDirectoryTrailer iTrailer

TCentralDirectoryTrailer iTrailer[private]

The central directory of ZIP File Trailer