#include <ZipDataSource.h>

Public Member Functions | |
| TZippedFileEntry (const IString &rFileEntryName, TypeFile &rEntry) | |
| TZippedFileEntry (const IString &rFileEntryName, const IString &rFileNameToCompress) | |
| Retval | compressFile (const IString &rPassword, Int iZipLevel=4) |
| Uint32 | getChecksum () const |
| returns the check sum | |
| Uint | getCompressedSize () const |
| returns the compressed size of the source | |
| ECompressionMethod | getCompressionMethod () const |
| returns the compression method | |
| Float | getCompressionRate () const |
| TString | getComment () const |
| returns the comment | |
| TString | getFileEntryName () const |
| Returns the name of the file entry. | |
| Timeval | getModificationTime () const |
| Uint64 | getSize () const |
| Retval | getUnzippedData (IByteArray &rData) const |
| Retval | getUnzippedData (IByteArray &rData, const IString &rPassword) const |
| bool | isCompressed () const |
| checks if the file entry is compressed | |
| bool | isDirectory () const |
| bool | isEncrypted () const |
| void | setComment (const IString &rValue) |
| Sets the file comment. | |
Protected Member Functions | |
| virtual | ~TZippedFileEntry () |
| Uint | generateOutput (IOutputStream &rOutStream) |
| Uint | generateOutputForCentralDirectory (IOutputStream &rOutStream, Uint uiOffsetToLocalHeader) |
| TypeFile & | getFileEntryStructure () |
| void | setSourceFile (const IString &rFileName) |
Friends | |
| class | TZipDataSource |
Creates a zipped file entry out of read data from zip file.
| rEntry | : attached file structure pointer. The structure will be deleted, if this object dies. |
Creates a new zipped file entry
| TZippedFileEntry::~TZippedFileEntry | ( | ) | [protected, virtual] |
Destroys the zipped file entry
| Retval TZippedFileEntry::compressFile | ( | const IString & | rPassword, | |
| Int | iZipLevel = 4 | |||
| ) |
Compresses a file entry. The file entry must be created manualy giving a valid file name as data source.
| rPassword | : Password to encrypt (password not empty) | |
| iZipLevel | : Compression level must be set between 0 and 9. 0 = no compression; 1 = best speed and 9 = best compression (default is 4) |
| RET_NOERROR | : file entry compressed | |
| RET_REQUEST_FAILED | : Invalid file name | |
| RET_ACCESS_DENIED | : Could not read file |
| Uint32 zeus::TZippedFileEntry::getChecksum | ( | ) | const [inline] |
returns the check sum
| Uint zeus::TZippedFileEntry::getCompressedSize | ( | ) | const [inline] |
returns the compressed size of the source
| ECompressionMethod zeus::TZippedFileEntry::getCompressionMethod | ( | ) | const [inline] |
returns the compression method
| Float TZippedFileEntry::getCompressionRate | ( | ) | const |
returns the compression rate of the file entry
| TString zeus::TZippedFileEntry::getComment | ( | ) | const [inline] |
returns the comment
| TString zeus::TZippedFileEntry::getFileEntryName | ( | ) | const [inline] |
Returns the name of the file entry.
| Timeval TZippedFileEntry::getModificationTime | ( | ) | const |
Returns the modification time value.
| Uint64 TZippedFileEntry::getSize | ( | ) | const |
returns the uncompressed size of the source
| Retval zeus::TZippedFileEntry::getUnzippedData | ( | IByteArray & | rData | ) | const [inline] |
returns the unzipped data using no password
| Retval TZippedFileEntry::getUnzippedData | ( | IByteArray & | rData, | |
| const IString & | rPassword | |||
| ) | const |
returns the unzipped data
| RET_NOERROR | : Data unzipped | |
| RET_REQUEST_FAILED | : No data to be uncompressed (directory) | |
| RET_INVALID_DATA | : Check sum error | |
| RET_FEATURE_UNAVAILABLE | : Compression method not available yet |
| bool zeus::TZippedFileEntry::isCompressed | ( | ) | const [inline] |
checks if the file entry is compressed
| bool zeus::TZippedFileEntry::isDirectory | ( | ) | const [inline] |
| bool zeus::TZippedFileEntry::isEncrypted | ( | ) | const [inline] |
| void zeus::TZippedFileEntry::setComment | ( | const IString & | rValue | ) | [inline] |
Sets the file comment.
| Uint TZippedFileEntry::generateOutput | ( | IOutputStream & | rOutStream | ) | [protected] |
writes the file entry out to the out-stream and returns the number of bytes written
| Uint TZippedFileEntry::generateOutputForCentralDirectory | ( | IOutputStream & | rOutStream, | |
| Uint | uiOffsetToLocalHeader | |||
| ) | [protected] |
writes the file entry out to the out-stream and returns the number of bytes written
| TypeFile& zeus::TZippedFileEntry::getFileEntryStructure | ( | ) | [inline, protected] |
| void zeus::TZippedFileEntry::setSourceFile | ( | const IString & | rFileName | ) | [inline, protected] |
friend class TZipDataSource [friend] |