ObjFW  Diff

Differences From Artifact [94d0a087a6]:

To Artifact [bac5e3efa6]:


28
29
30
31
32
33
34





35
36
37
38
39
40
41
42
43
 * @class OFLHAArchive OFLHAArchive.h ObjFW/OFLHAArchive.h
 *
 * @brief A class for accessing and manipulating LHA files.
 */
@interface OFLHAArchive: OFObject
{
	OF_KINDOF(OFStream *) _stream;





	of_string_encoding_t _encoding;
	OFLHAArchiveEntry *_Nullable _lastEntry;
	OF_KINDOF(OFStream *) _Nullable _lastReturnedStream;
}

/*!
 * @brief The encoding to use for the archive. Defaults to ISO 8859-1.
 */
@property (nonatomic) of_string_encoding_t encoding;







>
>
>
>
>

<







28
29
30
31
32
33
34
35
36
37
38
39
40

41
42
43
44
45
46
47
 * @class OFLHAArchive OFLHAArchive.h ObjFW/OFLHAArchive.h
 *
 * @brief A class for accessing and manipulating LHA files.
 */
@interface OFLHAArchive: OFObject
{
	OF_KINDOF(OFStream *) _stream;
	enum {
		OF_LHA_ARCHIVE_MODE_READ,
		OF_LHA_ARCHIVE_MODE_WRITE,
		OF_LHA_ARCHIVE_MODE_APPEND
	} _mode;
	of_string_encoding_t _encoding;

	OF_KINDOF(OFStream *) _Nullable _lastReturnedStream;
}

/*!
 * @brief The encoding to use for the archive. Defaults to ISO 8859-1.
 */
@property (nonatomic) of_string_encoding_t encoding;
124
125
126
127
128
129
130























131
132
133
134
135
136
137
 *	    @ref OFWriteFailedException!
 *
 * @return The next entry from the LHA archive or `nil` if all entries have
 *	   been read
 */
- (nullable OFLHAArchiveEntry *)nextEntry;
























/*!
 * @brief Closes the OFLHAArchive.
 */
- (void)close;
@end

OF_ASSUME_NONNULL_END







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







128
129
130
131
132
133
134
135
136
137
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
 *	    @ref OFWriteFailedException!
 *
 * @return The next entry from the LHA archive or `nil` if all entries have
 *	   been read
 */
- (nullable OFLHAArchiveEntry *)nextEntry;

/*!
 * @brief Returns a stream for writing the specified entry.
 *
 * @note This is only available in write and append mode.
 *
 * @note The uncompressed size, compressed size and CRC16 of the specified
 *	 entry are ignored.
 *
 * @note The returned stream only conforms to @ref OFReadyForWritingObserving if
 *	 the underlying stream does so, too.
 *
 * @warning Calling @ref nextEntry will invalidate all streams returned by
 *	    @ref streamForReadingCurrentEntry or
 *	    @ref streamForWritingEntry:! Reading from or writing to an
 *	    invalidated stream will throw an @ref OFReadFailedException or
 *	    @ref OFWriteFailedException!
 *
 * @param entry The entry for which a stream for writing should be returned
 * @return A stream for writing the specified entry
 */
- (OFStream <OFReadyForWritingObserving> *)
    streamForWritingEntry: (OFLHAArchiveEntry *)entry;

/*!
 * @brief Closes the OFLHAArchive.
 */
- (void)close;
@end

OF_ASSUME_NONNULL_END