@@ -12,10 +12,11 @@ * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #import "OFObject.h" +#import "OFArchiveEntry.h" OF_ASSUME_NONNULL_BEGIN /** @file */ @@ -98,19 +99,20 @@ * @class OFZIPArchiveEntry OFZIPArchiveEntry.h ObjFW/OFZIPArchiveEntry.h * * @brief A class which represents an entry in the central directory of a ZIP * archive. */ -@interface OFZIPArchiveEntry: OFObject +@interface OFZIPArchiveEntry: OFObject { OFZIPArchiveEntryAttributeCompatibility _versionMadeBy; OFZIPArchiveEntryAttributeCompatibility _minVersionNeeded; uint16_t _generalPurposeBitFlag; OFZIPArchiveEntryCompressionMethod _compressionMethod; uint16_t _lastModifiedFileTime, _lastModifiedFileDate; uint32_t _CRC32; - uint64_t _compressedSize, _uncompressedSize; + unsigned long long _compressedSize, _uncompressedSize; OFString *_fileName; OFData *_Nullable _extraField; OFString *_Nullable _fileComment; uint32_t _startDiskNumber; uint16_t _internalAttributes; @@ -117,21 +119,10 @@ uint32_t _versionSpecificAttributes; int64_t _localFileHeaderOffset; OF_RESERVE_IVARS(OFZIPArchiveEntry, 4) } -/** - * @brief The file name of the entry. - */ -@property (readonly, copy, nonatomic) OFString *fileName; - -/** - * @brief The comment of the entry's file. - */ -@property OF_NULLABLE_PROPERTY (readonly, copy, nonatomic) - OFString *fileComment; - /** * @brief The extra field of the entry. * * The item size *must* be 1! */ @@ -155,17 +146,10 @@ * See @ref OFZIPArchiveEntryAttributeCompatibility. */ @property (readonly, nonatomic) OFZIPArchiveEntryAttributeCompatibility minVersionNeeded; -/** - * @brief The last modification date of the entry's file. - * - * @note Due to limitations of the ZIP format, this has only 2 second precision. - */ -@property (readonly, retain, nonatomic) OFDate *modificationDate; - /** * @brief The compression method of the entry. * * Supported values are: * Value | Description @@ -177,20 +161,10 @@ * Other values may be returned, but the file cannot be extracted then. */ @property (readonly, nonatomic) OFZIPArchiveEntryCompressionMethod compressionMethod; -/** - * @brief The compressed size of the entry's file. - */ -@property (readonly, nonatomic) uint64_t compressedSize; - -/** - * @brief The uncompressed size of the entry's file. - */ -@property (readonly, nonatomic) uint64_t uncompressedSize; - /** * @brief The CRC32 checksum of the entry's file. */ @property (readonly, nonatomic) uint32_t CRC32; @@ -207,28 +181,11 @@ * * See the ZIP specification for details. */ @property (readonly, nonatomic) uint16_t generalPurposeBitFlag; -/** - * @brief Creates a new OFZIPArchiveEntry with the specified file name. - * - * @param fileName The file name for the OFZIPArchiveEntry - * @return A new, autoreleased OFZIPArchiveEntry - */ -+ (instancetype)entryWithFileName: (OFString *)fileName; - - (instancetype)init OF_UNAVAILABLE; - -/** - * @brief Initializes an already allocated OFZIPArchiveEntry with the specified - * file name. - * - * @param fileName The file name for the OFZIPArchiveEntry - * @return An initialized OFZIPArchiveEntry - */ -- (instancetype)initWithFileName: (OFString *)fileName; @end #ifdef __cplusplus extern "C" { #endif