Inkscape
Vector Graphics Editor
|
This class sits over the zlib and gzip code to implement a PKWare or Info-Zip .zip file reader and writer. More...
#include <ziptool.h>
Public Member Functions | |
ZipFile () | |
Constructor. | |
virtual | ~ZipFile () |
Destructor. | |
virtual void | setComment (const std::string &val) |
virtual std::string | getComment () |
std::vector< ZipEntry * > & | getEntries () |
Return the list of entries currently in this file. | |
virtual ZipEntry * | addFile (const std::string &fileNameArg, const std::string &commentArg) |
virtual ZipEntry * | newEntry (const std::string &fileNameArg, const std::string &commentArg) |
virtual bool | write () |
virtual bool | writeBuffer (std::vector< unsigned char > &outbuf) |
virtual bool | writeFile (const std::string &fileName) |
virtual bool | read () |
virtual bool | readBuffer (const std::vector< unsigned char > &inbuf) |
virtual bool | readFile (const std::string &fileName) |
Private Member Functions | |
void | error (char const *fmt,...) G_GNUC_PRINTF(2 |
void void | trace (char const *fmt,...) G_GNUC_PRINTF(2 |
void void bool | putLong (unsigned long val) |
bool | putInt (unsigned int val) |
bool | putByte (unsigned char val) |
bool | writeFileData () |
bool | writeCentralDirectory () |
bool | getLong (unsigned long *val) |
bool | getInt (unsigned int *val) |
bool | getByte (unsigned char *val) |
bool | readFileData () |
bool | readCentralDirectory () |
Private Attributes | |
std::vector< ZipEntry * > | entries |
std::vector< unsigned char > | fileBuf |
unsigned long | fileBufPos |
std::string | comment |
This class sits over the zlib and gzip code to implement a PKWare or Info-Zip .zip file reader and writer.
ZipFile::ZipFile | ( | ) |
Constructor.
Definition at line 2163 of file ziptool.cpp.
|
virtual |
|
virtual |
Definition at line 2243 of file ziptool.cpp.
References comment, entries, and ZipEntry::readFile().
|
private |
Definition at line 2216 of file ziptool.cpp.
References fmt, va_end(), and va_start().
Referenced by readCentralDirectory(), and readFileData().
|
private |
Definition at line 2494 of file ziptool.cpp.
References fileBuf, and fileBufPos.
Referenced by readCentralDirectory(), and readFileData().
|
virtual |
Definition at line 2196 of file ziptool.cpp.
References comment.
std::vector< ZipEntry * > & ZipFile::getEntries | ( | ) |
Return the list of entries currently in this file.
Definition at line 2205 of file ziptool.cpp.
References entries.
|
private |
Definition at line 2479 of file ziptool.cpp.
References fileBuf, and fileBufPos.
Referenced by readCentralDirectory(), and readFileData().
|
private |
Definition at line 2461 of file ziptool.cpp.
References fileBuf, and fileBufPos.
Referenced by readCentralDirectory(), and readFileData().
|
virtual |
Definition at line 2260 of file ziptool.cpp.
References comment, and entries.
Referenced by Inkscape::Extension::Internal::OdfOutput::preprocess(), Inkscape::Extension::Internal::OdfOutput::writeContent(), Inkscape::Extension::Internal::OdfOutput::writeManifest(), and Inkscape::Extension::Internal::OdfOutput::writeMeta().
|
private |
Definition at line 2299 of file ziptool.cpp.
References fileBuf.
Referenced by writeCentralDirectory(), and writeFileData().
|
private |
Definition at line 2289 of file ziptool.cpp.
References fileBuf.
Referenced by writeCentralDirectory(), and writeFileData().
|
private |
Definition at line 2276 of file ziptool.cpp.
References fileBuf.
Referenced by writeCentralDirectory(), and writeFileData().
|
virtual |
Definition at line 2983 of file ziptool.cpp.
References fileBufPos, readCentralDirectory(), and readFileData().
Referenced by readBuffer(), and readFile().
|
virtual |
Definition at line 3000 of file ziptool.cpp.
|
private |
|
virtual |
Definition at line 3012 of file ziptool.cpp.
|
private |
Definition at line 2506 of file ziptool.cpp.
References comment, entries, error(), getByte(), getInt(), getLong(), Crc32::getValue(), ZipEntry::setCompressedData(), ZipEntry::setCompressionMethod(), ZipEntry::setCrc(), ZipEntry::setUncompressedData(), trace(), and Crc32::update().
Referenced by read().
|
virtual |
Definition at line 2188 of file ziptool.cpp.
References comment.
|
private |
Definition at line 2226 of file ziptool.cpp.
References fmt, va_end(), and va_start().
Referenced by readCentralDirectory(), and readFileData().
|
virtual |
Definition at line 2410 of file ziptool.cpp.
References fileBuf, writeCentralDirectory(), and writeFileData().
Referenced by writeBuffer(), and writeFile().
|
virtual |
Definition at line 2424 of file ziptool.cpp.
|
private |
Definition at line 2353 of file ziptool.cpp.
References comment, entries, fileBuf, ZipEntry::getComment(), ZipEntry::getCompressedSize(), ZipEntry::getCompressionMethod(), ZipEntry::getCrc(), ZipEntry::getFileName(), ZipEntry::getPosition(), ZipEntry::getUncompressedSize(), putByte(), putInt(), and putLong().
Referenced by write().
|
virtual |
Definition at line 2437 of file ziptool.cpp.
References fileBuf, and write().
Referenced by Inkscape::Extension::Internal::OdfOutput::save().
|
private |
Definition at line 2308 of file ziptool.cpp.
References buf, entries, fileBuf, ZipEntry::getCompressedData(), ZipEntry::getCompressedSize(), ZipEntry::getCompressionMethod(), ZipEntry::getCrc(), ZipEntry::getFileName(), ZipEntry::getUncompressedSize(), putByte(), putInt(), putLong(), and ZipEntry::setPosition().
Referenced by write().
|
private |
Definition at line 561 of file ziptool.h.
Referenced by addFile(), getComment(), newEntry(), readCentralDirectory(), readFileData(), setComment(), and writeCentralDirectory().
|
private |
Definition at line 556 of file ziptool.h.
Referenced by addFile(), getEntries(), newEntry(), readFileData(), writeCentralDirectory(), writeFileData(), and ~ZipFile().
|
private |
Definition at line 558 of file ziptool.h.
Referenced by getByte(), getInt(), getLong(), putByte(), putInt(), putLong(), readBuffer(), readFile(), write(), writeBuffer(), writeCentralDirectory(), writeFile(), and writeFileData().
|
private |