Public Member Functions | Protected Member Functions

zeus::TZipDataSource Class Reference

#include <ZipDataSource.h>

Inheritance diagram for zeus::TZipDataSource:
zeus::TZObject zeus::IZUnknown

List of all members.

Public Member Functions

 TZipDataSource ()
 TZipDataSource (IInputStream &rInStream)
Retval addFileEntry (const IString &rEntryName, const IString &rFileName, const IString &rPassword, bool bOverwriteIfExists, Int iZipLevel)
Retval deleteFileEntry (Int iIndex)
Retval getFileEntry (Int iIndex, TZippedFileEntry *&rpEntry) const
Retval getFileEntryByName (const IString &rEntryName, TZippedFileEntry *&rpEntry) const
void getFileEntryNames (IStringList &rNames) const
Int getFileEntryCount () const
bool isValid () const
Retval removeFileEntry (const IString &rEntryName)
Retval generateOutput (IOutputStream &rOutStream)

Protected Member Functions

virtual ~TZipDataSource ()

Detailed Description

This class is used to manage zipped data using .ZIP File Format Specification from www.pkware.com


Constructor & Destructor Documentation

TZipDataSource::TZipDataSource (  )

Creates an empty data source

TZipDataSource::TZipDataSource ( IInputStream rInStream )

Creates a zip data source

m_mapLookup.hasItem(strFileEntry)

TZipDataSource::~TZipDataSource (  ) [protected, virtual]

Destroys the zip data source


Member Function Documentation

Retval TZipDataSource::addFileEntry ( const IString rEntryName,
const IString rFileName,
const IString rPassword,
bool  bOverwriteIfExists,
Int  iZipLevel 
)

adds a new file entry to the zipped data source. If the file has been added previously and the parameter bOverwriteIfExists is set the file is recompressed

Parameters:
rEntryName: Name of the file in the zip archive
rFileName: File path and name of the file to add
rPassword: Password if the file should be encrypted
bOverwriteIfExists: if flag is set the file is recompressed
iZipLevel: Zip level (default = 4)
Returns:
error code
See also:
TZippedFileEntry::compressFile
Retval TZipDataSource::deleteFileEntry ( Int  iIndex )

Removes a file entry by index

Retval TZipDataSource::generateOutput ( IOutputStream rOutStream )

Writes the ZIP output format

Retval TZipDataSource::getFileEntry ( Int  iIndex,
TZippedFileEntry *&  rpEntry 
) const

Returns an indexed zipped file entry

Parameters:
iIndex: index
rpEntry,:return parameter of the entry
Return values:
RET_NOERROR: File entry returned
RET_REQUEST_FAILED: Invalid index
Retval zeus::TZipDataSource::getFileEntryByName ( const IString rEntryName,
TZippedFileEntry *&  rpEntry 
) const [inline]

Returns a zipped file entry by name

Parameters:
rEntryName: name of the entry (includes subpath and filename)
rpEntry,:return parameter of the entry
Return values:
RET_NOERROR: File entry returned
RET_REQUEST_FAILED: Invalid name
Int zeus::TZipDataSource::getFileEntryCount (  ) const [inline]

Returns the file entry count

void TZipDataSource::getFileEntryNames ( IStringList rNames ) const

Returns the list of entry names

bool zeus::TZipDataSource::isValid (  ) const [inline]

Checks if the format of the zip is valid

Retval zeus::TZipDataSource::removeFileEntry ( const IString rEntryName ) [inline]

Removes a file enty from the data source

Parameters:
rEntryName: name of file entry

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


Written by Benjamin Hadorn http://www.xatlantis.ch.
Last change made on Sun Jan 22 2012 15:28:43