Differences From Artifact [2df45ec20c]:
- File src/OFZIPArchiveEntry.h — part of check-in [374e1a1bfa] at 2021-01-02 22:04:26 on branch trunk — Update copyright (user: js, size: 8037) [annotate] [blame] [check-ins using] [more...]
To Artifact [e18b985df3]:
- File
src/OFZIPArchiveEntry.h
— part of check-in
[2fcf5a3052]
at
2021-04-29 23:24:22
on branch trunk
— Clean up struct and enum typedefs
With TYPEDEF_HIDES_STRUCT set, Doxygen properly handles anonymous
structs and enums that are typedef'd. (user: js, size: 8365) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
15 16 17 18 19 20 21 | #import "OFObject.h" OF_ASSUME_NONNULL_BEGIN /** @file */ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > > > | > | < > > > | | | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 | #import "OFObject.h" OF_ASSUME_NONNULL_BEGIN /** @file */ typedef enum { OFZIPArchiveEntryCompressionMethodNone = 0, OFZIPArchiveEntryCompressionMethodShrink = 1, OFZIPArchiveEntryCompressionMethodReduceFactor1 = 2, OFZIPArchiveEntryCompressionMethodReduceFactor2 = 3, OFZIPArchiveEntryCompressionMethodReduceFactor3 = 4, OFZIPArchiveEntryCompressionMethodReduceFactor4 = 5, OFZIPArchiveEntryCompressionMethodImplode = 6, OFZIPArchiveEntryCompressionMethodDeflate = 8, OFZIPArchiveEntryCompressionMethodDeflate64 = 9, OFZIPArchiveEntryCompressionMethodBZIP2 = 12, OFZIPArchiveEntryCompressionMethodLZMA = 14, OFZIPArchiveEntryCompressionMethodWavPack = 97, OFZIPArchiveEntryCompressionMethodPPMd = 98 } OFZIPArchiveEntryCompressionMethod; /** * @brief Attribute compatibility part of ZIP versions. */ typedef enum { /** MS-DOS and OS/2 */ OFZIPArchiveEntryAttributeCompatibilityMSDOS = 0, /** Amiga */ OFZIPArchiveEntryAttributeCompatibilityAmiga = 1, /** OpenVMS */ OFZIPArchiveEntryAttributeCompatibilityOpenVMS = 2, /** UNIX */ OFZIPArchiveEntryAttributeCompatibilityUNIX = 3, /** VM/CMS */ OFZIPArchiveEntryAttributeCompatibilityVM_CMS = 4, /** Atari ST */ OFZIPArchiveEntryAttributeCompatibilityAtariST = 5, /** OS/2 HPFS */ OFZIPArchiveEntryAttributeCompatibilityOS2HPFS = 6, /** Macintosh */ OFZIPArchiveEntryAttributeCompatibilityMacintosh = 7, /** Z-System */ OFZIPArchiveEntryAttributeCompatibilityZSystem = 8, /** CP/M */ OFZIPArchiveEntryAttributeCompatibilityCPM = 9, /** Windows NTFS */ OFZIPArchiveEntryAttributeCompatibilityWindowsNTFS = 10, /** MVS (OS/390 - Z/OS) */ OFZIPArchiveEntryAttributeCompatibilityMVS = 11, /** VSE */ OFZIPArchiveEntryAttributeCompatibilityVSE = 12, /** Acorn RISC OS */ OFZIPArchiveEntryAttributeCompatibilityAcornRISCOS = 13, /** VFAT */ OFZIPArchiveEntryAttributeCompatibilityVFAT = 14, /** Alternate MVS */ OFZIPArchiveEntryAttributeCompatibilityAlternateMVS = 15, /** BeOS */ OFZIPArchiveEntryAttributeCompatibilityBeOS = 16, /** Tandem */ OFZIPArchiveEntryAttributeCompatibilityTandem = 17, /** OS/400 */ OFZIPArchiveEntryAttributeCompatibilityOS400 = 18, /** OS X (Darwin) */ OFZIPArchiveEntryAttributeCompatibilityOSX = 19 } OFZIPArchiveEntryAttributeCompatibility; /** * @brief Tags for the extra field. */ typedef enum { /** ZIP64 extra field tag */ OFZIPArchiveEntryExtraFieldTagZIP64 = 0x0001 } OFZIPArchiveEntryExtraFieldTag; @class OFString; @class OFData; @class OFFile; @class OFDate; /** * @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 <OFCopying, OFMutableCopying> { OFZIPArchiveEntryAttributeCompatibility _versionMadeBy; OFZIPArchiveEntryAttributeCompatibility _minVersionNeeded; uint16_t _generalPurposeBitFlag; OFZIPArchiveEntryCompressionMethod _compressionMethod; uint16_t _lastModifiedFileTime, _lastModifiedFileDate; uint32_t _CRC32; uint64_t _compressedSize, _uncompressedSize; OFString *_fileName; OFData *_Nullable _extraField; OFString *_Nullable _fileComment; uint32_t _startDiskNumber; |
︙ | ︙ | |||
132 133 134 135 136 137 138 | @property OF_NULLABLE_PROPERTY (readonly, copy, nonatomic) OFData *extraField; /** * @brief The version which made the entry. * * The lower 8 bits are the ZIP specification version.@n * The upper 8 bits are the attribute compatibility. | | | > | | > | | | | | | > | 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 | @property OF_NULLABLE_PROPERTY (readonly, copy, nonatomic) OFData *extraField; /** * @brief The version which made the entry. * * The lower 8 bits are the ZIP specification version.@n * The upper 8 bits are the attribute compatibility. * See @ref OFZIPArchiveEntryAttributeCompatibility. */ @property (readonly, nonatomic) OFZIPArchiveEntryAttributeCompatibility versionMadeBy; /** * @brief The minimum version required to extract the file. * * The lower 8 bits are the ZIP specification version.@n * The upper 8 bits are the attribute compatibility. * 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 * --------------------------------------------|--------------- * OFZIPArchiveEntryCompressionMethodNone | No compression * OFZIPArchiveEntryCompressionMethodDeflate | Deflate * OFZIPArchiveEntryCompressionMethodDeflate64 | Deflate64 * * 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; /** |
︙ | ︙ | |||
225 226 227 228 229 230 231 | #endif /** * @brief Converts the ZIP entry version to a string. * * @param version The ZIP entry version to convert to a string * @return The ZIP entry version as a string */ | | | | | | | | 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 | #endif /** * @brief Converts the ZIP entry version to a string. * * @param version The ZIP entry version to convert to a string * @return The ZIP entry version as a string */ extern OFString *OFZIPArchiveEntryVersionToString(uint16_t version); /** * @brief Convers the ZIP entry compression method to a string. * * @param compressionMethod The ZIP entry compression method to convert to a * string * @return The ZIP entry compression method as a string */ extern OFString *OFZIPArchiveEntryCompressionMethodName( OFZIPArchiveEntryCompressionMethod compressionMethod); /** * @brief Gets a pointer to and the size of the extensible data field with the * specified tag. * * @param extraField The extra field to search for an extensible data field with * the specified tag * @param tag The tag to look for * @param size A pointer to an uint16_t that should be set to the size * @return The index at which the extra field content starts in the OFData, or * `OFNotFound` */ extern size_t OFZIPArchiveEntryExtraFieldFind(OFData *extraField, OFZIPArchiveEntryExtraFieldTag tag, uint16_t *size); #ifdef __cplusplus } #endif OF_ASSUME_NONNULL_END #import "OFMutableZIPArchiveEntry.h" |