1 /* 2 * Copyright 2009-2011, Ingo Weinhold, ingo_weinhold@gmx.de. 3 * Copyright 2011, Oliver Tappe <zooey@hirschkaefer.de> 4 * Distributed under the terms of the MIT License. 5 */ 6 #ifndef PACKAGE_WRITER_LISTENER_H 7 #define PACKAGE_WRITER_LISTENER_H 8 9 10 #include <package/hpkg/PackageWriter.h> 11 12 13 using BPackageKit::BHPKG::BPackageWriterListener; 14 using BPackageKit::BHPKG::BPackageWriter; 15 16 17 class PackageWriterListener : public BPackageWriterListener { 18 public: 19 PackageWriterListener(bool verbose, bool quiet); 20 21 virtual void PrintErrorVarArgs(const char* format, 22 va_list args); 23 24 virtual void OnEntryAdded(const char* path); 25 virtual void OnTOCSizeInfo(uint64 uncompressedStringsSize, 26 uint64 uncompressedMainSize, 27 uint64 uncompressedTOCSize); 28 virtual void OnPackageAttributesSizeInfo(uint32 stringCount, 29 uint32 uncompressedSize); 30 virtual void OnPackageSizeInfo(uint32 headerSize, 31 uint64 heapSize, uint64 tocSize, 32 uint32 packageAttributesSize, 33 uint64 totalSize); 34 35 private: 36 bool fVerbose; 37 bool fQuiet; 38 }; 39 40 41 #endif // PACKAGE_WRITER_LISTENER_H 42