ObjFW  Check-in [f3ccf14461]

Overview
Comment:Convert methods to properties where appropriate

This improves Swift compatibility.

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: f3ccf144611b4f3309c6043c1a03699a60de4d4a013d94619f02d44d6ae086ae
User & Date: js on 2017-10-29 21:58:14
Other Links: manifest | tags
Context
2017-10-29
22:22
macros.h: Add OF_SWIFT_NAME check-in: 68b3d08ac1 user: js tags: trunk
21:58
Convert methods to properties where appropriate check-in: f3ccf14461 user: js tags: trunk
15:23
OFURL: Properties store unencoded strings now check-in: c1c9443c1a user: js tags: trunk
Changes

Modified src/OFApplication.h from [45023093c6] to [5c5c92ace5].

149
150
151
152
153
154
155






156
157
158
159
160
161
162

/*!
 * The environment of the application.
 */
@property (readonly, nonatomic)
    OFDictionary OF_GENERIC(OFString *, OFString *) *environment;







/*!
 * @brief Returns the only OFApplication instance in the application.
 *
 * @return The only OFApplication instance in the application
 */
+ (nullable OFApplication *)sharedApplication;








>
>
>
>
>
>







149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168

/*!
 * The environment of the application.
 */
@property (readonly, nonatomic)
    OFDictionary OF_GENERIC(OFString *, OFString *) *environment;

/*!
 * The delegate of the application.
 */
@property OF_NULLABLE_PROPERTY (assign, nonatomic)
    id <OFApplicationDelegate> delegate;

/*!
 * @brief Returns the only OFApplication instance in the application.
 *
 * @return The only OFApplication instance in the application
 */
+ (nullable OFApplication *)sharedApplication;

211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
 *
 * @param argc A pointer where a pointer to argc should be stored
 * @param argv A pointer where a pointer to argv should be stored
 */
- (void)getArgumentCount: (int *_Nonnull *_Nonnull)argc
       andArgumentValues: (char *_Nonnull *_Nonnull *_Nonnull[_Nonnull])argv;

/*!
 * @brief Returns the delegate of the application.
 *
 * @return The delegate of the application
 */
- (nullable id <OFApplicationDelegate>)delegate;

/*!
 * @brief Sets the delegate of the application.
 *
 * @param delegate The delegate for the application
 */
- (void)setDelegate: (nullable id <OFApplicationDelegate>)delegate;

/*!
 * @brief Terminates the application.
 */
- (void)terminate OF_NO_RETURN;

/*!
 * @brief Terminates the application with the specified status.







<
<
<
<
<
<
<
<
<
<
<
<
<
<







217
218
219
220
221
222
223














224
225
226
227
228
229
230
 *
 * @param argc A pointer where a pointer to argc should be stored
 * @param argv A pointer where a pointer to argv should be stored
 */
- (void)getArgumentCount: (int *_Nonnull *_Nonnull)argc
       andArgumentValues: (char *_Nonnull *_Nonnull *_Nonnull[_Nonnull])argv;















/*!
 * @brief Terminates the application.
 */
- (void)terminate OF_NO_RETURN;

/*!
 * @brief Terminates the application with the specified status.

Modified src/OFArray.h from [0a6a732f59] to [420b1d0ef7].

131
132
133
134
135
136
137




































138
139
140
141
142
143
144
 * @param count The length of the C array
 * @return A new autoreleased OFArray
 */
+ (instancetype)
    arrayWithObjects: (ObjectType const _Nonnull *_Nonnull)objects
	       count: (size_t)count;





































/*!
 * @brief Initializes an OFArray with the specified object.
 *
 * @param object An object
 * @return An initialized OFArray
 */
- (instancetype)initWithObject: (ObjectType)object;







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







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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
 * @param count The length of the C array
 * @return A new autoreleased OFArray
 */
+ (instancetype)
    arrayWithObjects: (ObjectType const _Nonnull *_Nonnull)objects
	       count: (size_t)count;

/*!
 * The objects of the array as a C array.
 *
 * The result is valid until the autorelease pool is released. If you want to
 * use the result outside the scope of the current autorelease pool, you have to
 * copy it.
 */
@property (readonly, nonatomic)
    ObjectType const __unsafe_unretained _Nonnull *_Nonnull objects;

/*!
 * The first object of the array or `nil`.
 *
 * @warning The returned object is *not* retained and autoreleased for
 *	    performance reasons!
 */
@property OF_NULLABLE_PROPERTY (readonly, nonatomic) ObjectType firstObject;

/*!
 * The last object of the array or `nil`.
 *
 * @warning The returned object is *not* retained and autoreleased for
 *	    performance reasons!
 */
@property OF_NULLABLE_PROPERTY (readonly, nonatomic) ObjectType lastObject;

/*!
 * The array sorted in ascending order.
 */
@property (readonly, nonatomic) OFArray OF_GENERIC(ObjectType) *sortedArray;

/*!
 * The array with the order reversed.
 */
@property (readonly, nonatomic) OFArray OF_GENERIC(ObjectType) *reversedArray;

/*!
 * @brief Initializes an OFArray with the specified object.
 *
 * @param object An object
 * @return An initialized OFArray
 */
- (instancetype)initWithObject: (ObjectType)object;
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
 *
 * @param buffer The buffer to copy the objects to
 * @param range The range to copy
 */
- (void)getObjects: (ObjectType __unsafe_unretained _Nonnull *_Nonnull)buffer
	   inRange: (of_range_t)range;

/*!
 * @brief Returns the objects of the array as a C array.
 *
 * @return The objects of the array as a C array
 */
- (ObjectType const __unsafe_unretained _Nonnull *_Nonnull)objects;

/*!
 * @brief Returns the index of the first object that is equivalent to the
 *	  specified object or `OF_NOT_FOUND` if it was not found.
 *
 * @param object The object whose index is returned
 * @return The index of the first object equivalent to the specified object
 *	   or `OF_NOT_FOUND` if it was not found







<
<
<
<
<
<
<







264
265
266
267
268
269
270







271
272
273
274
275
276
277
 *
 * @param buffer The buffer to copy the objects to
 * @param range The range to copy
 */
- (void)getObjects: (ObjectType __unsafe_unretained _Nonnull *_Nonnull)buffer
	   inRange: (of_range_t)range;








/*!
 * @brief Returns the index of the first object that is equivalent to the
 *	  specified object or `OF_NOT_FOUND` if it was not found.
 *
 * @param object The object whose index is returned
 * @return The index of the first object equivalent to the specified object
 *	   or `OF_NOT_FOUND` if it was not found
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
 *
 * @param object The object which is checked for being in the array
 * @return A boolean whether the array contains an object with the specified
 *	   address
 */
- (bool)containsObjectIdenticalTo: (ObjectType)object;

/*!
 * @brief Returns the first object of the array or `nil`.
 *
 * @warning The returned object is *not* retained and autoreleased for
 *	    performance reasons!
 *
 * @return The first object of the array or `nil`
 */
- (nullable ObjectType)firstObject;

/*!
 * @brief Returns the last object of the array or `nil`.
 *
 * @warning The returned object is *not* retained and autoreleased for
 *	    performance reasons!
 *
 * @return The last object of the array or `nil`
 */
- (nullable ObjectType)lastObject;

/*!
 * @brief Returns the objects in the specified range as a new OFArray.
 *
 * @param range The range for the subarray
 * @return The subarray as a new autoreleased OFArray
 */
- (OFArray OF_GENERIC(ObjectType) *)objectsInRange: (of_range_t)range;







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







303
304
305
306
307
308
309




















310
311
312
313
314
315
316
 *
 * @param object The object which is checked for being in the array
 * @return A boolean whether the array contains an object with the specified
 *	   address
 */
- (bool)containsObjectIdenticalTo: (ObjectType)object;





















/*!
 * @brief Returns the objects in the specified range as a new OFArray.
 *
 * @param range The range for the subarray
 * @return The subarray as a new autoreleased OFArray
 */
- (OFArray OF_GENERIC(ObjectType) *)objectsInRange: (of_range_t)range;
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
 * @param selector The selector to perform on all objects in the array
 * @param object The object to perform the selector with on all objects in the
 *	      array
 */
- (void)makeObjectsPerformSelector: (SEL)selector
			withObject: (nullable id)object;

/*!
 * @brief Returns a copy of the array sorted in ascending order.
 *
 * @return A sorted copy of the array
 */
- (OFArray OF_GENERIC(ObjectType) *)sortedArray;

/*!
 * @brief Returns a copy of the array sorted using the specified selector and
 *	  options.
 *
 * @param selector The selector to use to sort the array. It's signature
 *		   should be the same as that of @ref compare:.
 * @param options The options to use when sorting the array.@n







<
<
<
<
<
<
<







379
380
381
382
383
384
385







386
387
388
389
390
391
392
 * @param selector The selector to perform on all objects in the array
 * @param object The object to perform the selector with on all objects in the
 *	      array
 */
- (void)makeObjectsPerformSelector: (SEL)selector
			withObject: (nullable id)object;








/*!
 * @brief Returns a copy of the array sorted using the specified selector and
 *	  options.
 *
 * @param selector The selector to use to sort the array. It's signature
 *		   should be the same as that of @ref compare:.
 * @param options The options to use when sorting the array.@n
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
 * @return A sorted copy of the array
 */
- (OFArray OF_GENERIC(ObjectType) *)
    sortedArrayUsingComparator: (of_comparator_t)comparator
		       options: (int)options;
#endif

/*!
 * @brief Returns a copy of the array with the order reversed.
 *
 * @return A copy of the array with the order reversed
 */
- (OFArray OF_GENERIC(ObjectType) *)reversedArray;

/*!
 * @brief Creates a new array with the specified object added.
 *
 * @param object The object to add
 * @return A new array with the specified object added
 */
- (OFArray OF_GENERIC(ObjectType) *)arrayByAddingObject: (ObjectType)object;







<
<
<
<
<
<
<







413
414
415
416
417
418
419







420
421
422
423
424
425
426
 * @return A sorted copy of the array
 */
- (OFArray OF_GENERIC(ObjectType) *)
    sortedArrayUsingComparator: (of_comparator_t)comparator
		       options: (int)options;
#endif








/*!
 * @brief Creates a new array with the specified object added.
 *
 * @param object The object to add
 * @return A new array with the specified object added
 */
- (OFArray OF_GENERIC(ObjectType) *)arrayByAddingObject: (ObjectType)object;
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
 * @brief Creates a new array with the specified object removed.
 *
 * @param object The object to remove
 * @return A new array with the specified object removed
 */
- (OFArray OF_GENERIC(ObjectType) *)arrayByRemovingObject: (ObjectType)object;

/*!
 * @brief Returns an OFEnumerator to enumerate through all objects of the
 *	  array.
 *
 * @returns An OFEnumerator to enumerate through all objects of the array
 */
- (OFEnumerator OF_GENERIC(ObjectType) *)objectEnumerator;

#ifdef OF_HAVE_BLOCKS
/*!
 * @brief Executes a block for each object.
 *
 * @param block The block to execute for each object
 */
- (void)enumerateObjectsUsingBlock: (of_array_enumeration_block_t)block;







<
<
<
<
<
<
<
<







438
439
440
441
442
443
444








445
446
447
448
449
450
451
 * @brief Creates a new array with the specified object removed.
 *
 * @param object The object to remove
 * @return A new array with the specified object removed
 */
- (OFArray OF_GENERIC(ObjectType) *)arrayByRemovingObject: (ObjectType)object;









#ifdef OF_HAVE_BLOCKS
/*!
 * @brief Executes a block for each object.
 *
 * @param block The block to execute for each object
 */
- (void)enumerateObjectsUsingBlock: (of_array_enumeration_block_t)block;

Modified src/OFCollection.h from [835760a641] to [6da8efa84a].

21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*!
 * @protocol OFCollection OFCollection.h ObjFW/OFCollection.h
 *
 * @brief A protocol with methods common for all collections.
 */
@protocol OFCollection <OFEnumerating, OFFastEnumeration>
/*!
 * @brief Returns the number of objects in the collection.
 *
 * @return The number of objects in the collection
 */
- (size_t)count;

/*!
 * @brief Checks whether the collection contains an object equal to the
 *	  specified object.
 *
 * @param object The object which is checked for being in the collection
 * @return A boolean whether the collection contains the specified object
 */
- (bool)containsObject: (id)object;
@end

OF_ASSUME_NONNULL_END







<
<


|












21
22
23
24
25
26
27


28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*!
 * @protocol OFCollection OFCollection.h ObjFW/OFCollection.h
 *
 * @brief A protocol with methods common for all collections.
 */
@protocol OFCollection <OFEnumerating, OFFastEnumeration>
/*!


 * @return The number of objects in the collection
 */
@property (readonly, nonatomic) size_t count;

/*!
 * @brief Checks whether the collection contains an object equal to the
 *	  specified object.
 *
 * @param object The object which is checked for being in the collection
 * @return A boolean whether the collection contains the specified object
 */
- (bool)containsObject: (id)object;
@end

OF_ASSUME_NONNULL_END

Modified src/OFCryptoHash.h from [c3a8ed0de1] to [ab2417692f].

29
30
31
32
33
34
35









36
37
38
39
40
41
42
 */
@protocol OFCryptoHash <OFObject, OFCopying>
/*!
 * A boolean whether the hash has already been calculated.
 */
@property (readonly, nonatomic, getter=isCalculated) bool calculated;










/*!
 * @brief Creates a new cryptographic hash.
 *
 * @return A new autoreleased OFCryptoHash
 */
+ (instancetype)cryptoHash;








>
>
>
>
>
>
>
>
>







29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
 */
@protocol OFCryptoHash <OFObject, OFCopying>
/*!
 * A boolean whether the hash has already been calculated.
 */
@property (readonly, nonatomic, getter=isCalculated) bool calculated;

/*!
 * A buffer containing the cryptographic hash.
 *
 * The size of the buffer depends on the hash used. The buffer is part of the
 * receiver's memory pool.
 */
@property (readonly, nonatomic) const unsigned char *digest
    OF_RETURNS_INNER_POINTER;

/*!
 * @brief Creates a new cryptographic hash.
 *
 * @return A new autoreleased OFCryptoHash
 */
+ (instancetype)cryptoHash;

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
 *
 * @param buffer The buffer which should be included into the calculation
 * @param length The length of the buffer
 */
- (void)updateWithBuffer: (const void *)buffer
		  length: (size_t)length;

/*!
 * @brief Returns a buffer containing the cryptographic hash.
 *
 * The size of the buffer depends on the hash used. The buffer is part of the
 * receiver's memory pool.
 *
 * @return A buffer containing the hash
 */
- (const unsigned char *)digest OF_RETURNS_INNER_POINTER;

/*!
 * @brief Resets all state so that a new hash can be calculated.
 *
 * @warning This invalidates any pointer previously returned by @ref digest. If
 *	    you are still interested in the previous digest, you need to memcpy
 *	    it yourself before calling @ref reset!
 */
- (void)reset;
@end

OF_ASSUME_NONNULL_END







<
<
<
<
<
<
<
<
<
<











68
69
70
71
72
73
74










75
76
77
78
79
80
81
82
83
84
85
 *
 * @param buffer The buffer which should be included into the calculation
 * @param length The length of the buffer
 */
- (void)updateWithBuffer: (const void *)buffer
		  length: (size_t)length;











/*!
 * @brief Resets all state so that a new hash can be calculated.
 *
 * @warning This invalidates any pointer previously returned by @ref digest. If
 *	    you are still interested in the previous digest, you need to memcpy
 *	    it yourself before calling @ref reset!
 */
- (void)reset;
@end

OF_ASSUME_NONNULL_END

Modified src/OFData+CryptoHashing.h from [04b637648a] to [0008631388].

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
extern int _OFData_CryptoHashing_reference;
#ifdef __cplusplus
}
#endif

@interface OFData (CryptoHashing)
/*!
 * @brief Returns the MD5 hash of the data array as an autoreleased OFString.
 *
 * @return The MD5 hash of the data array as an autoreleased OFString
 */
- (OFString *)MD5Hash;

/*!
 * @brief Returns the RIPEMD-160 hash of the data array as an autoreleased
 *	  OFString.
 *
 * @return The RIPEMD-160 hash of the data array as an autoreleased OFString
 */
- (OFString *)RIPEMD160Hash;

/*!
 * @brief Returns the SHA-1 hash of the data array as an autoreleased OFString.
 *
 * @return The SHA-1 hash of the data array as an autoreleased OFString
 */
- (OFString *)SHA1Hash;

/*!
 * @brief Returns the SHA-224 hash of the data array as an autoreleased
 *	  OFString.
 *
 * @return The SHA-224 hash of the data array as an autoreleased OFString
 */
- (OFString *)SHA224Hash;

/*!
 * @brief Returns the SHA-256 hash of the data array as an autoreleased
 *	  OFString.
 *
 * @return The SHA-256 hash of the data array as an autoreleased OFString
 */
- (OFString *)SHA256Hash;

/*!
 * @brief Returns the SHA-384 hash of the data array as an autoreleased
 *	  OFString.
 *
 * @return The SHA-384 hash of the data array as an autoreleased OFString
 */
- (OFString *)SHA384Hash;

/*!
 * @brief Returns the SHA-512 hash of the data array as an autoreleased
 *	  OFString.
 *
 * @return The SHA-512 hash of the data array as an autoreleased OFString
 */
- (OFString *)SHA512Hash;
@end

OF_ASSUME_NONNULL_END







<
<
|

|


<
<
<
|

|


<
<
|

|


<
<
<
|

|


<
<
<
|

|


<
<
<
|

|


<
<
<
|

|



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
extern int _OFData_CryptoHashing_reference;
#ifdef __cplusplus
}
#endif

@interface OFData (CryptoHashing)
/*!


 * The MD5 hash of the data as a string.
 */
@property (readonly, nonatomic) OFString *MD5Hash;

/*!



 * The RIPEMD-160 hash of the data as a string.
 */
@property (readonly, nonatomic) OFString *RIPEMD160Hash;

/*!


 * The SHA-1 hash of the data as a string.
 */
@property (readonly, nonatomic) OFString *SHA1Hash;

/*!



 * The SHA-224 hash of the data as a string.
 */
@property (readonly, nonatomic) OFString *SHA224Hash;

/*!



 * The SHA-256 hash of the data as a string.
 */
@property (readonly, nonatomic) OFString *SHA256Hash;

/*!



 * The SHA-384 hash of the data as a string.
 */
@property (readonly, nonatomic) OFString *SHA384Hash;

/*!



 * @return The SHA-512 hash of the data as a string.
 */
@property (readonly, nonatomic) OFString *SHA512Hash;
@end

OF_ASSUME_NONNULL_END

Modified src/OFData+MessagePackValue.h from [1003ac6c46] to [7771c81a20].

24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
extern int _OFData_MessagePackValue_reference;
#ifdef __cplusplus
}
#endif

@interface OFData (MessagePackValue)
/*!
 * @brief Parses the MessagePack representation and returns it as an object.
 *
 * @return The MessagePack representation as an object
 */
- (id)messagePackValue;

/*!
 * @brief Parses the MessagePack representation and returns it as an object.
 *
 * @param depthLimit The maximum depth the parser should accept (defaults to 32
 *		     if not specified, 0 means no limit (insecure!))
 * @return The MessagePack representation as an object
 */
- (id)messagePackValueWithDepthLimit: (size_t)depthLimit;
@end

OF_ASSUME_NONNULL_END







<
<
|

|












24
25
26
27
28
29
30


31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
extern int _OFData_MessagePackValue_reference;
#ifdef __cplusplus
}
#endif

@interface OFData (MessagePackValue)
/*!


 * The data interpreted as MessagePack representation and parsed as an object.
 */
@property (readonly, nonatomic) id messagePackValue;

/*!
 * @brief Parses the MessagePack representation and returns it as an object.
 *
 * @param depthLimit The maximum depth the parser should accept (defaults to 32
 *		     if not specified, 0 means no limit (insecure!))
 * @return The MessagePack representation as an object
 */
- (id)messagePackValueWithDepthLimit: (size_t)depthLimit;
@end

OF_ASSUME_NONNULL_END

Modified src/OFData.h from [3a6c360dd5] to [d1decb9e79].

40
41
42
43
44
45
46






































47
48
49
50
51
52
53
}

/*!
 * The size of a single item in the OFData in bytes.
 */
@property (readonly, nonatomic) size_t itemSize;







































/*!
 * @brief Creates a new OFData with the specified `count` items of size 1.
 *
 * @param items The items to store in the OFData
 * @param count The number of items
 * @return A new autoreleased OFData
 */







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







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
}

/*!
 * The size of a single item in the OFData in bytes.
 */
@property (readonly, nonatomic) size_t itemSize;

/*!
 * The number of items in the OFData.
 */
@property (readonly, nonatomic) size_t count;

/*!
 * All elements of the OFData as a C array.
 *
 * @warning The pointer is only valid until the OFData is changed!
 *
 */
@property (readonly, nonatomic) const void *items OF_RETURNS_INNER_POINTER;

/*!
 * The first item of the OFData or NULL.
 */
@property OF_NULLABLE_PROPERTY (readonly, nonatomic) const void *firstItem
    OF_RETURNS_INNER_POINTER;

/*!
 * The last item of the OFData or NULL.
 */
@property OF_NULLABLE_PROPERTY (readonly, nonatomic) const void *lastItem
    OF_RETURNS_INNER_POINTER;

/*!
 * The string representation of the data.
 *
 * The string representation is a hex dump of the data, grouped by itemSize
 * bytes.
 */
@property (readonly, nonatomic) OFString *stringRepresentation;

/*!
 * A string containing the data in Base64 encoding.
 */
@property (readonly, nonatomic) OFString *stringByBase64Encoding;

/*!
 * @brief Creates a new OFData with the specified `count` items of size 1.
 *
 * @param items The items to store in the OFData
 * @param count The number of items
 * @return A new autoreleased OFData
 */
231
232
233
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
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
 *	  containing the data of the Base64-encoded string.
 *
 * @param string The string with the Base64-encoded data
 * @return An initialized OFData
 */
- (instancetype)initWithBase64EncodedString: (OFString *)string;

/*!
 * @brief Returns the number of items in the OFData.
 *
 * @return The number of items in the OFData
 */
- (size_t)count;

/*!
 * @brief Returns all items of the OFData as a C array.
 *
 * @warning The pointer is only valid until the OFData is changed!
 *
 * @return All elements of the OFData as a C array
 */
- (const void *)items OF_RETURNS_INNER_POINTER;

/*!
 * @brief Returns a specific item of the OFData.
 *
 * @param index The number of the item to return
 * @return The specified item of the OFData
 */
- (const void *)itemAtIndex: (size_t)index OF_RETURNS_INNER_POINTER;

/*!
 * @brief Returns the first item of the OFData.
 *
 * @return The first item of the OFData or NULL
 */
- (nullable const void *)firstItem OF_RETURNS_INNER_POINTER;

/*!
 * @brief Returns the last item of the OFData.
 *
 * @return The last item of the OFData or NULL
 */
- (nullable const void *)lastItem OF_RETURNS_INNER_POINTER;

/*!
 * @brief Returns the string representation of the data.
 *
 * The string representation is a hex dump of the data, grouped by itemSize
 * bytes.
 *
 * @return The string representation of the data.
 */
- (OFString *)stringRepresentation;

/*!
 * @brief Returns a string containing the data in Base64 encoding.
 *
 * @return A string containing the data in Base64 encoding
 */
- (OFString *)stringByBase64Encoding;

#ifdef OF_HAVE_FILES
/*!
 * @brief Writes the OFData into the specified file.
 *
 * @param path The path of the file to write to
 */
- (void)writeToFile: (OFString *)path;







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







269
270
271
272
273
274
275
















276
277
278
279
280
281
282
283































284
285
286
287
288
289
290
 *	  containing the data of the Base64-encoded string.
 *
 * @param string The string with the Base64-encoded data
 * @return An initialized OFData
 */
- (instancetype)initWithBase64EncodedString: (OFString *)string;

















/*!
 * @brief Returns a specific item of the OFData.
 *
 * @param index The number of the item to return
 * @return The specified item of the OFData
 */
- (const void *)itemAtIndex: (size_t)index OF_RETURNS_INNER_POINTER;
































#ifdef OF_HAVE_FILES
/*!
 * @brief Writes the OFData into the specified file.
 *
 * @param path The path of the file to write to
 */
- (void)writeToFile: (OFString *)path;

Modified src/OFDate.h from [728f213f2d] to [c8a7ef20f0].

28
29
30
31
32
33
34


























































































35
36
37
38
39
40
41
 * @brief A class for storing, accessing and comparing dates.
 */
@interface OFDate: OFObject <OFCopying, OFComparing, OFSerialization>
{
	of_time_interval_t _seconds;
}



























































































/*!
 * @brief Creates a new OFDate with the current date and time.
 *
 * @return A new, autoreleased OFDate with the current date and time
 */
+ (instancetype)date;








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







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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
 * @brief A class for storing, accessing and comparing dates.
 */
@interface OFDate: OFObject <OFCopying, OFComparing, OFSerialization>
{
	of_time_interval_t _seconds;
}

/*!
 * The microsecond of the date.
 */
@property (readonly, nonatomic) uint32_t microsecond;

/*!
 * The second of the date.
 */
@property (readonly, nonatomic) uint8_t second;

/*!
 * The minute of the date.
 */
@property (readonly, nonatomic) uint8_t minute;

/*!
 * The minute of the date in local time.
 */
@property (readonly, nonatomic) uint8_t localMinute;

/*!
 * The hour of the date.
 */
@property (readonly, nonatomic) uint8_t hour;

/*!
 * The hour of the date in local time.
 */
@property (readonly, nonatomic) uint8_t localHour;

/*!
 * The day of the month of the date.
 */
@property (readonly, nonatomic) uint8_t dayOfMonth;

/*!
 * The day of the month of the date in local time.
 */
@property (readonly, nonatomic) uint8_t localDayOfMonth;

/*!
 * The month of the year of the date.
 */
@property (readonly, nonatomic) uint8_t monthOfYear;

/*!
 * The month of the year of the date in local time.
 */
@property (readonly, nonatomic) uint8_t localMonthOfYear;

/*!
 * The year of the date.
 */
@property (readonly, nonatomic) uint16_t year;

/*!
 * The year of the date in local time.
 */
@property (readonly, nonatomic) uint16_t localYear;

/*!
 * The day of the week of the date.
 */
@property (readonly, nonatomic) uint8_t dayOfWeek;

/*!
 * The day of the week of the date in local time.
 */
@property (readonly, nonatomic) uint8_t localDayOfWeek;

/*!
 * The day of the year of the date.
 */
@property (readonly, nonatomic) uint16_t dayOfYear;

/*!
 * The day of the year of the date in local time.
 */
@property (readonly, nonatomic) uint16_t localDayOfYear;

/*!
 * The seconds since 1970-01-01T00:00:00Z.
 */
@property (readonly, nonatomic) of_time_interval_t timeIntervalSince1970;

/*!
 * The seconds the date is in the future.
 */
@property (readonly, nonatomic) of_time_interval_t timeIntervalSinceNow;

/*!
 * @brief Creates a new OFDate with the current date and time.
 *
 * @return A new, autoreleased OFDate with the current date and time
 */
+ (instancetype)date;

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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
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
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
 * @param string The string describing the date
 * @param format The format of the string describing the date
 * @return An initialized OFDate with the specified date and time
 */
- (instancetype)initWithLocalDateString: (OFString *)string
				 format: (OFString *)format;

/*!
 * @brief Returns the microsecond of the date.
 *
 * @return The microsecond of the date
 */
- (uint32_t)microsecond;

/*!
 * @brief Returns the second of the date.
 *
 * @return The second of the date
 */
- (uint8_t)second;

/*!
 * @brief Returns the minute of the date.
 *
 * @return The minute of the date
 */
- (uint8_t)minute;

/*!
 * @brief Returns the minute of the date in local time.
 *
 * @return The minute of the date in local time
 */
- (uint8_t)localMinute;

/*!
 * @brief Returns the hour of the date.
 *
 * @return The hour of the date
 */
- (uint8_t)hour;

/*!
 * @brief Returns the hour of the date in local time.
 *
 * @return The hour of the date in local time
 */
- (uint8_t)localHour;

/*!
 * @brief Returns the day of the month.
 *
 * @return The day of the month of the date
 */
- (uint8_t)dayOfMonth;

/*!
 * @brief Returns the day of the month of the date in local time.
 *
 * @return The day of the month of the date in local time
 */
- (uint8_t)localDayOfMonth;

/*!
 * @brief Returns the month of the year of the date.
 *
 * @return The month of the year of the date
 */
- (uint8_t)monthOfYear;

/*!
 * @brief Returns the month of the year of the date in local time.
 *
 * @return The month of the year of the date in local time
 */
- (uint8_t)localMonthOfYear;

/*!
 * @brief Returns the year of the date.
 *
 * @return The year of the date
 */
- (uint16_t)year;

/*!
 * @brief Returns the year of the date in local time.
 *
 * @return The year of the date in local time
 */
- (uint16_t)localYear;

/*!
 * @brief Returns the day of the week of the date.
 *
 * @return The day of the week of the date
 */
- (uint8_t)dayOfWeek;

/*!
 * @brief Returns the day of the week of the date in local time.
 *
 * @return The day of the week of the date in local time
 */
- (uint8_t)localDayOfWeek;

/*!
 * @brief Returns the day of the year of the date.
 *
 * @return The day of the year of the date
 */
- (uint16_t)dayOfYear;

/*!
 * @brief Returns the day of the year of the date in local time.
 *
 * @return The day of the year of the date in local time
 */
- (uint16_t)localDayOfYear;

/*!
 * @brief Creates a string of the date with the specified format.
 *
 * See the man page for `strftime` for information on the format.
 *
 * @param format The format for the date string
 * @return A new, autoreleased OFString







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







253
254
255
256
257
258
259
















































































































260
261
262
263
264
265
266
 * @param string The string describing the date
 * @param format The format of the string describing the date
 * @return An initialized OFDate with the specified date and time
 */
- (instancetype)initWithLocalDateString: (OFString *)string
				 format: (OFString *)format;

















































































































/*!
 * @brief Creates a string of the date with the specified format.
 *
 * See the man page for `strftime` for information on the format.
 *
 * @param format The format for the date string
 * @return A new, autoreleased OFString
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
 * If the argument is `nil`, it returns the receiver.
 *
 * @param otherDate Another date
 * @return The later date of the two dates
 */
- (OFDate *)laterDate: (nullable OFDate *)otherDate;

/*!
 * @brief Returns the seconds since 1970-01-01T00:00:00Z.
 *
 * @return The seconds since 1970-01-01T00:00:00Z
 */
- (of_time_interval_t)timeIntervalSince1970;

/*!
 * @brief Returns the seconds the receiver is after the date.
 *
 * @param otherDate Date date to generate the difference with receiver
 * @return The seconds the receiver is after the date.
 */
- (of_time_interval_t)timeIntervalSinceDate: (OFDate *)otherDate;

/*!
 * @brief Returns the seconds the receiver is in the future.
 *
 * @return The seconds the receiver is in the future
 */
- (of_time_interval_t)timeIntervalSinceNow;

/*!
 * @brief Creates a new date with the specified time interval added.
 *
 * @param seconds The seconds after the date
 * @return A new, autoreleased OFDate
 */
- (OFDate *)dateByAddingTimeInterval: (of_time_interval_t)seconds;
@end

OF_ASSUME_NONNULL_END







<
<
<
<
<
<
<








<
<
<
<
<
<
<










293
294
295
296
297
298
299







300
301
302
303
304
305
306
307







308
309
310
311
312
313
314
315
316
317
 * If the argument is `nil`, it returns the receiver.
 *
 * @param otherDate Another date
 * @return The later date of the two dates
 */
- (OFDate *)laterDate: (nullable OFDate *)otherDate;








/*!
 * @brief Returns the seconds the receiver is after the date.
 *
 * @param otherDate Date date to generate the difference with receiver
 * @return The seconds the receiver is after the date.
 */
- (of_time_interval_t)timeIntervalSinceDate: (OFDate *)otherDate;








/*!
 * @brief Creates a new date with the specified time interval added.
 *
 * @param seconds The seconds after the date
 * @return A new, autoreleased OFDate
 */
- (OFDate *)dateByAddingTimeInterval: (of_time_interval_t)seconds;
@end

OF_ASSUME_NONNULL_END

Modified src/OFDictionary.h from [72d79ae93c] to [d4aab8a73d].

113
114
115
116
117
118
119















120
121
122
123
124
125
126
 *
 * @param firstKey The first key
 * @return A new autoreleased OFDictionary
 */
+ (instancetype)dictionaryWithKeysAndObjects: (KeyType)firstKey, ...
    OF_SENTINEL;
















/*!
 * @brief Initializes an already allocated OFDictionary with the specified
 *	  OFDictionary.
 *
 * @param dictionary An OFDictionary
 * @return An initialized OFDictionary
 */







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







113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
 *
 * @param firstKey The first key
 * @return A new autoreleased OFDictionary
 */
+ (instancetype)dictionaryWithKeysAndObjects: (KeyType)firstKey, ...
    OF_SENTINEL;

/*!
 * An array of all keys.
 */
@property (readonly, nonatomic) OFArray OF_GENERIC(KeyType) *allKeys;

/*!
 * An array of all objects.
 */
@property (readonly, nonatomic) OFArray OF_GENERIC(ObjectType) *allObjects;

/*!
 * A URL-encoded string with the contents of the dictionary.
 */
@property (readonly, nonatomic) OFString *stringByURLEncoding;

/*!
 * @brief Initializes an already allocated OFDictionary with the specified
 *	  OFDictionary.
 *
 * @param dictionary An OFDictionary
 * @return An initialized OFDictionary
 */
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
273
 *
 * @param object The object which is checked for being in the dictionary
 * @return A boolean whether the dictionary contains an object with the
 *	   specified address
 */
- (bool)containsObjectIdenticalTo: (ObjectType)object;

/*!
 * @brief Returns an array of all keys.
 *
 * @return An array of all keys
 */
- (OFArray OF_GENERIC(KeyType) *)allKeys;

/*!
 * @brief Returns an array of all objects.
 *
 * @return An array of all objects
 */
- (OFArray OF_GENERIC(ObjectType) *)allObjects;

/*!
 * @brief Creates a string by URL-encoding the contents of the dictionary.
 *
 * @return A URL-encoded string with the contents of the dictionary
 */
- (OFString *)stringByURLEncoding;

/*!
 * @brief Returns an OFEnumerator to enumerate through the dictionary's keys.
 *
 * @return An OFEnumerator to enumerate through the dictionary's keys
 */
- (OFEnumerator OF_GENERIC(KeyType) *)keyEnumerator;








<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







254
255
256
257
258
259
260





















261
262
263
264
265
266
267
 *
 * @param object The object which is checked for being in the dictionary
 * @return A boolean whether the dictionary contains an object with the
 *	   specified address
 */
- (bool)containsObjectIdenticalTo: (ObjectType)object;






















/*!
 * @brief Returns an OFEnumerator to enumerate through the dictionary's keys.
 *
 * @return An OFEnumerator to enumerate through the dictionary's keys
 */
- (OFEnumerator OF_GENERIC(KeyType) *)keyEnumerator;

Modified src/OFEnumerator.h from [fe479ba326] to [ba066f3027].

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
 * @brief A protocol for getting an enumerator for the object.
 */
@protocol OFEnumerating
/*!
 * @brief Returns an OFEnumerator to enumerate through all objects of the
 *	  collection.
 *
 * @returns An OFEnumerator to enumerate through all objects of the collection
 */
- (OFEnumerator *)objectEnumerator;
@end

/*!
 * @class OFEnumerator OFEnumerator.h ObjFW/OFEnumerator.h
 *
 * @brief A class which provides methods to enumerate through collections.
 */
@interface OFEnumerator OF_GENERIC(ObjectType): OFObject
#if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN)
# define ObjectType id
#endif
/*!





 * @brief Returns the next object or `nil` if there is none left.
 *
 * @return The next object or `nil` if there is none left
 */
- (nullable ObjectType)nextObject;

/*!
 * @brief Returns an array of all remaining objects in the collection.
 *
 * @return An array of all remaining objects in the collection
 */
- (OFArray OF_GENERIC(ObjectType) *)allObjects;

/*!
 * @brief Resets the enumerator, so the next call to nextObject returns the
 *	  first object again.
 */
- (void)reset;
#if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN)
# undef ObjectType







|














>
>
>
>
>
|





<
<
<
<
<
<
<







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
 * @brief A protocol for getting an enumerator for the object.
 */
@protocol OFEnumerating
/*!
 * @brief Returns an OFEnumerator to enumerate through all objects of the
 *	  collection.
 *
 * @return An OFEnumerator to enumerate through all objects of the collection
 */
- (OFEnumerator *)objectEnumerator;
@end

/*!
 * @class OFEnumerator OFEnumerator.h ObjFW/OFEnumerator.h
 *
 * @brief A class which provides methods to enumerate through collections.
 */
@interface OFEnumerator OF_GENERIC(ObjectType): OFObject
#if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN)
# define ObjectType id
#endif
/*!
 * An array of all remaining objects in the collection.
 */
@property (readonly, nonatomic) OFArray OF_GENERIC(ObjectType) *allObjects;

/*!
 * Returns the next object or `nil` if there is none left.
 *
 * @return The next object or `nil` if there is none left
 */
- (nullable ObjectType)nextObject;








/*!
 * @brief Resets the enumerator, so the next call to nextObject returns the
 *	  first object again.
 */
- (void)reset;
#if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN)
# undef ObjectType

Modified src/OFFileManager.h from [a89fad782a] to [b207ab823b].

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
/*!
 * @class OFFileManager OFFileManager.h ObjFW/OFFileManager.h
 *
 * @brief A class which provides management for files, e.g. reading contents of
 *	  directories, deleting files, renaming files, etc.
 */
@interface OFFileManager: OFObject










/*!
 * @brief Returns the default file manager.
 */
+ (OFFileManager *)defaultManager;

/*!
 * @brief Returns the path for the current working directory.
 *
 * @return The path of the current working directory
 */
- (OFString *)currentDirectoryPath;

/*!
 * @brief Returns the URL for the current working directory.
 *
 * @return The URL of the current working directory
 */
- (OFURL *)currentDirectoryURL;

/*!
 * @brief Checks whether a file exists at the specified path.
 *
 * @param path The path to check
 * @return A boolean whether there is a file at the specified path
 */
- (bool)fileExistsAtPath: (OFString *)path;







>
>
>
>
>
>
>
>
>
>





<
<
<
<
<
<
<
<
<
<
<
<
<
<







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
/*!
 * @class OFFileManager OFFileManager.h ObjFW/OFFileManager.h
 *
 * @brief A class which provides management for files, e.g. reading contents of
 *	  directories, deleting files, renaming files, etc.
 */
@interface OFFileManager: OFObject
/*!
 * The path of the current working directory.
 */
@property (readonly, nonatomic) OFString *currentDirectoryPath;

/*!
 * The URL of the current working directory.
 */
@property (readonly, nonatomic) OFURL *currentDirectoryURL;

/*!
 * @brief Returns the default file manager.
 */
+ (OFFileManager *)defaultManager;















/*!
 * @brief Checks whether a file exists at the specified path.
 *
 * @param path The path to check
 * @return A boolean whether there is a file at the specified path
 */
- (bool)fileExistsAtPath: (OFString *)path;

Modified src/OFHMAC.h from [aaa867eca5] to [0c8ac23177].

28
29
30
31
32
33
34

35

36
37














38
39
40
41
42
43
44
{
	Class <OFCryptoHash> _hashClass;
	id <OFCryptoHash> _Nullable _outerHash, _innerHash;
	id <OFCryptoHash> _Nullable _outerHashCopy, _innerHashCopy;
	bool _calculated;
}


/*! The class for the cryptographic hash used by the HMAC. */

@property (readonly, nonatomic) Class <OFCryptoHash> hashClass;















/*!
 * @brief Returns a new OFHMAC with the specified hashing algorithm.
 *
 * @param hashClass The class of the hashing algorithm
 * @return A new, autoreleased OFHMAC
 */
+ (instancetype)HMACWithHashClass: (Class <OFCryptoHash>)hashClass;







>
|
>


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







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
{
	Class <OFCryptoHash> _hashClass;
	id <OFCryptoHash> _Nullable _outerHash, _innerHash;
	id <OFCryptoHash> _Nullable _outerHashCopy, _innerHashCopy;
	bool _calculated;
}

/*!
 * The class for the cryptographic hash used by the HMAC.
 */
@property (readonly, nonatomic) Class <OFCryptoHash> hashClass;

/*!
 * A buffer containing the HMAC.
 *
 * The size of the buffer depends on the hash used. The buffer is part of the
 * receiver's memory pool.
 */
@property (readonly, nonatomic) const unsigned char *digest
    OF_RETURNS_INNER_POINTER;

/*!
 * The size of the digest.
 */
@property (readonly, nonatomic) size_t digestSize;

/*!
 * @brief Returns a new OFHMAC with the specified hashing algorithm.
 *
 * @param hashClass The class of the hashing algorithm
 * @return A new, autoreleased OFHMAC
 */
+ (instancetype)HMACWithHashClass: (Class <OFCryptoHash>)hashClass;
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
 *
 * @param buffer The buffer which should be included into the calculation
 * @param length The length of the buffer
 */
- (void)updateWithBuffer: (const void *)buffer
		  length: (size_t)length;

/*!
 * @brief Returns a buffer containing the HMAC.
 *
 * The size of the buffer depends on the hash used. The buffer is part of the
 * receiver's memory pool.
 *
 * @return A buffer containing the hash
 */
- (const unsigned char *)digest OF_RETURNS_INNER_POINTER;

/*!
 * @brief Returns the size of the digest.
 *
 * @return The size of the digest.
 */
- (size_t)digestSize;

/*!
 * @brief Resets the HMAC so that it can be calculated for a new message.
 *
 * @note This does not reset the key so that a new HMAC with the same key can
 *	 be calculated efficiently. If you want to reset both, use
 *	 @ref setKey:length:.
 *







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







91
92
93
94
95
96
97

















98
99
100
101
102
103
104
 *
 * @param buffer The buffer which should be included into the calculation
 * @param length The length of the buffer
 */
- (void)updateWithBuffer: (const void *)buffer
		  length: (size_t)length;


















/*!
 * @brief Resets the HMAC so that it can be calculated for a new message.
 *
 * @note This does not reset the key so that a new HMAC with the same key can
 *	 be calculated efficiently. If you want to reset both, use
 *	 @ref setKey:length:.
 *

Modified src/OFHTTPRequest.h from [c4033f68e4] to [0bad35c687].

77
78
79
80
81
82
83










84
85
86
87
88
89
90
}

/*!
 * The URL of the HTTP request.
 */
@property (copy, nonatomic) OFURL *URL;











/*!
 * The request method of the HTTP request.
 */
@property (nonatomic) of_http_request_method_t method;

/*!
 * The headers for the HTTP request.







>
>
>
>
>
>
>
>
>
>







77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
}

/*!
 * The URL of the HTTP request.
 */
@property (copy, nonatomic) OFURL *URL;

/*!
 * The protocol version of the HTTP request.
 */
@property (nonatomic) of_http_request_protocol_version_t protocolVersion;

/*!
 * The protocol version of the HTTP request as a string.
 */
@property (readonly, nonatomic) OFString *protocolVersionString;

/*!
 * The request method of the HTTP request.
 */
@property (nonatomic) of_http_request_method_t method;

/*!
 * The headers for the HTTP request.
121
122
123
124
125
126
127
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
 * @brief Initializes an already allocated OFHTTPRequest with the specified URL.
 *
 * @param URL The URL for the request
 * @return An initialized OFHTTPRequest
 */
- (instancetype)initWithURL: (OFURL *)URL;

/*!
 * @brief Sets the protocol version of the HTTP request.
 *
 * @param protocolVersion The protocol version of the HTTP request
 */
- (void)setProtocolVersion: (of_http_request_protocol_version_t)protocolVersion;

/*!
 * @brief Returns the protocol version of the HTTP request.
 *
 * @return The protocol version of the HTTP request
 */
- (of_http_request_protocol_version_t)protocolVersion;

/*!
 * @brief Sets the protocol version of the HTTP request to the version
 *	  described by the specified string.
 *
 * @param string A string describing an HTTP version
 */
- (void)setProtocolVersionFromString: (OFString *)string;

/*!
 * @brief Returns the protocol version of the HTTP request as a string.
 *
 * @return The protocol version of the HTTP request as a string
 */
- (OFString *)protocolVersionString;

/*!
 * @brief Sets the entity body of the HTTP request to the specified string
 *	  encoded in UTF-8.
 *
 * @param string The string to use for the entity body
 */
- (void)setBodyFromString: (OFString *)string;







<
<
<
<
<
<
<
<
<
<
<
<
<
<








<
<
<
<
<
<
<







131
132
133
134
135
136
137














138
139
140
141
142
143
144
145







146
147
148
149
150
151
152
 * @brief Initializes an already allocated OFHTTPRequest with the specified URL.
 *
 * @param URL The URL for the request
 * @return An initialized OFHTTPRequest
 */
- (instancetype)initWithURL: (OFURL *)URL;















/*!
 * @brief Sets the protocol version of the HTTP request to the version
 *	  described by the specified string.
 *
 * @param string A string describing an HTTP version
 */
- (void)setProtocolVersionFromString: (OFString *)string;








/*!
 * @brief Sets the entity body of the HTTP request to the specified string
 *	  encoded in UTF-8.
 *
 * @param string The string to use for the entity body
 */
- (void)setBodyFromString: (OFString *)string;

Modified src/OFHTTPResponse.h from [50360976c1] to [60a317d162].

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
@interface OFHTTPResponse: OFStream
{
	of_http_request_protocol_version_t _protocolVersion;
	short _statusCode;
	OFDictionary OF_GENERIC(OFString *, OFString *) *_headers;
}











/*!
 * The status code of the reply to the HTTP request.
 */
@property (nonatomic) short statusCode;

/*!
 * The headers of the reply to the HTTP request.
 */
@property (copy, nonatomic) OFDictionary OF_GENERIC(OFString *, OFString *)
    *headers;

/*!
 * @brief Sets the protocol version of the HTTP request reply.
 *
 * @param protocolVersion The protocol version of the HTTP request reply
 */
- (void)setProtocolVersion: (of_http_request_protocol_version_t)protocolVersion;

/*!
 * @brief Returns the protocol version of the HTTP request reply.
 *
 * @return The protocol version of the HTTP request reply
 */
- (of_http_request_protocol_version_t)protocolVersion;

/*!
 * @brief Sets the protocol version of the HTTP request reply to the version
 *	  described by the specified string.
 *
 * @param string A string describing an HTTP version
 */
- (void)setProtocolVersionFromString: (OFString *)string;

/*!
 * @brief Returns the protocol version of the HTTP request reply as a string.
 *
 * @return The protocol version of the HTTP request reply as a string
 */
- (OFString *)protocolVersionString;

/*!
 * @brief Returns the reply as a string, trying to detect the encoding.
 *
 * @return The reply as a string
 */
- (OFString *)string;

/*!
 * @brief Returns the reply as a string, trying to detect the encoding and
 *	  falling back to the specified encoding if not detectable.
 *
 * @return The reply as a string
 */
- (OFString *)stringWithEncoding: (of_string_encoding_t)encoding;
@end

OF_ASSUME_NONNULL_END







>
>
>
>
>
>
>
>
>
>












|
<
<

<
|
<
<
<
<
<
<









<
<
<
<
<
<
<
<
<
<
<
<
<
<










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
@interface OFHTTPResponse: OFStream
{
	of_http_request_protocol_version_t _protocolVersion;
	short _statusCode;
	OFDictionary OF_GENERIC(OFString *, OFString *) *_headers;
}

/*!
 * The protocol version of the HTTP request reply.
 */
@property (nonatomic) of_http_request_protocol_version_t protocolVersion;

/*!
 * The protocol version of the HTTP request reply as a string.
 */
@property (readonly, nonatomic) OFString *protocolVersionString;

/*!
 * The status code of the reply to the HTTP request.
 */
@property (nonatomic) short statusCode;

/*!
 * The headers of the reply to the HTTP request.
 */
@property (copy, nonatomic) OFDictionary OF_GENERIC(OFString *, OFString *)
    *headers;

/*!
 * The reply as a string, trying to detect the encoding.


 */

@property (readonly, nonatomic) OFString *string;







/*!
 * @brief Sets the protocol version of the HTTP request reply to the version
 *	  described by the specified string.
 *
 * @param string A string describing an HTTP version
 */
- (void)setProtocolVersionFromString: (OFString *)string;















/*!
 * @brief Returns the reply as a string, trying to detect the encoding and
 *	  falling back to the specified encoding if not detectable.
 *
 * @return The reply as a string
 */
- (OFString *)stringWithEncoding: (of_string_encoding_t)encoding;
@end

OF_ASSUME_NONNULL_END

Modified src/OFIntrospection.h from [5b3e73bb9a] to [b6e5a88492].

69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
 * @class OFProperty OFIntrospection.h ObjFW/OFIntrospection.h
 *
 * @brief A class for describing a property.
 */
@interface OFProperty: OFObject
{
	OFString *_name;
	unsigned _attributes;
	OFString *_Nullable _getter, *_Nullable _setter;
}

/*!
 * The name of the property.
 */
@property (readonly, nonatomic) OFString *name;







|







69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
 * @class OFProperty OFIntrospection.h ObjFW/OFIntrospection.h
 *
 * @brief A class for describing a property.
 */
@interface OFProperty: OFObject
{
	OFString *_name;
	unsigned int _attributes;
	OFString *_Nullable _getter, *_Nullable _setter;
}

/*!
 * The name of the property.
 */
@property (readonly, nonatomic) OFString *name;
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
 * OF_PROPERTY_COPY              | The property is declared `copy`
 * OF_PROPERTY_NONATOMIC         | The property is declared `nonatomic`
 * OF_PROPERTY_ATOMIC            | The property is declared `atomic`
 * OF_PROPERTY_WEAK              | The property is declared `weak`
 * OF_PROPERTY_SYNTHESIZED       | The property is synthesized
 * OF_PROPERTY_DYNAMIC           | The property is dynamic
 */
@property (readonly, nonatomic) unsigned attributes;

/*!
 * The name of the getter.
 */
@property OF_NULLABLE_PROPERTY (readonly, nonatomic) OFString *getter;

/*!







|







95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
 * OF_PROPERTY_COPY              | The property is declared `copy`
 * OF_PROPERTY_NONATOMIC         | The property is declared `nonatomic`
 * OF_PROPERTY_ATOMIC            | The property is declared `atomic`
 * OF_PROPERTY_WEAK              | The property is declared `weak`
 * OF_PROPERTY_SYNTHESIZED       | The property is synthesized
 * OF_PROPERTY_DYNAMIC           | The property is dynamic
 */
@property (readonly, nonatomic) unsigned int attributes;

/*!
 * The name of the getter.
 */
@property OF_NULLABLE_PROPERTY (readonly, nonatomic) OFString *getter;

/*!

Modified src/OFJSONRepresentation.h from [e14744365e] to [48d477f9f2].

33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
 *
 * @warning Although this method can be called directly on classes other than
 *	    OFArray and OFDictionary, this will generate invalid JSON, as JSON
 *	    requires all data to be encapsulated in an array or a dictionary!
 */
@protocol OFJSONRepresentation
/*!
 * @brief Returns the JSON representation of the object as a string.
 *
 * @return The JSON representation of the object as a string
 */
- (OFString *)JSONRepresentation;

/*!
 * @brief Returns the JSON representation of the object as a string.
 *
 * @param options The options to use when creating a JSON representation.@n
 *		  Possible values are:
 *		  Value                           | Description







<
<
|

|







33
34
35
36
37
38
39


40
41
42
43
44
45
46
47
48
49
 *
 * @warning Although this method can be called directly on classes other than
 *	    OFArray and OFDictionary, this will generate invalid JSON, as JSON
 *	    requires all data to be encapsulated in an array or a dictionary!
 */
@protocol OFJSONRepresentation
/*!


 * The JSON representation of the object as a string.
 */
@property (readonly, nonatomic) OFString *JSONRepresentation;

/*!
 * @brief Returns the JSON representation of the object as a string.
 *
 * @param options The options to use when creating a JSON representation.@n
 *		  Possible values are:
 *		  Value                           | Description

Modified src/OFKernelEventObserver.h from [aeb3ba4046] to [81ef5bf556].

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
 *	     OFKernelEventObserver.h ObjFW/OFKernelEventObserver.h
 *
 * @brief This protocol is implemented by classes which can be observed for
 *	  readiness for reading by OFKernelEventObserver.
 */
@protocol OFReadyForReadingObserving <OFObject>
/*!
 * @brief Returns the file descriptor for reading that should be checked by the
 *	  OFKernelEventObserver.
 *
 * @return The file descriptor for reading that should be checked by the
 *	   OFKernelEventObserver
 */
- (int)fileDescriptorForReading;
@end

/*!
 * @protocol OFReadyForWritingObserving
 *	     OFKernelEventObserver.h ObjFW/OFKernelEventObserver.h
 *
 * @brief This protocol is implemented by classes which can be observed for
 *	  readiness for writing by OFKernelEventObserver.
 */
@protocol OFReadyForWritingObserving <OFObject>
/*!
 * @brief Returns the file descriptor for writing that should be checked by the
 *	  OFKernelEventObserver.
 *
 * @return The file descriptor for writing that should be checked by the
 *	   OFKernelEventObserver
 */
- (int)fileDescriptorForWriting;
@end

/*!
 * @class OFKernelEventObserver
 *	  OFKernelEventObserver.h ObjFW/OFKernelEventObserver.h
 *
 * @brief A class that can observe multiple kernel events (e.g. streams being







<
<
<
|
|

|











<
<
<
|
|

|







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
 *	     OFKernelEventObserver.h ObjFW/OFKernelEventObserver.h
 *
 * @brief This protocol is implemented by classes which can be observed for
 *	  readiness for reading by OFKernelEventObserver.
 */
@protocol OFReadyForReadingObserving <OFObject>
/*!



 * The file descriptor for reading that should be checked by the
 * OFKernelEventObserver.
 */
@property (readonly, nonatomic) int fileDescriptorForReading;
@end

/*!
 * @protocol OFReadyForWritingObserving
 *	     OFKernelEventObserver.h ObjFW/OFKernelEventObserver.h
 *
 * @brief This protocol is implemented by classes which can be observed for
 *	  readiness for writing by OFKernelEventObserver.
 */
@protocol OFReadyForWritingObserving <OFObject>
/*!



 * The file descriptor for writing that should be checked by the
 * OFKernelEventObserver.
 */
@property (readonly, nonatomic) int fileDescriptorForWriting;
@end

/*!
 * @class OFKernelEventObserver
 *	  OFKernelEventObserver.h ObjFW/OFKernelEventObserver.h
 *
 * @brief A class that can observe multiple kernel events (e.g. streams being

Modified src/OFList.h from [9a9431e042] to [767ebca506].

58
59
60
61
62
63
64








65
66
67
68
69
70








71
72
73
74
75
76
77

/*!
 * The first list object of the list.
 */
@property OF_NULLABLE_PROPERTY (readonly, nonatomic)
    of_list_object_t *firstListObject;









/*!
 * The last list object of the list.
 */
@property OF_NULLABLE_PROPERTY (readonly, nonatomic)
    of_list_object_t *lastListObject;









/*!
 * @brief Creates a new OFList.
 *
 * @return A new autoreleased OFList
 */
+ (instancetype)list;








>
>
>
>
>
>
>
>






>
>
>
>
>
>
>
>







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

/*!
 * The first list object of the list.
 */
@property OF_NULLABLE_PROPERTY (readonly, nonatomic)
    of_list_object_t *firstListObject;

/*!
 * The first object of the list or `nil`.
 *
 * @warning The returned object is *not* retained and autoreleased for
 *	    performance reasons!
 */
@property OF_NULLABLE_PROPERTY (readonly, nonatomic) ObjectType firstObject;

/*!
 * The last list object of the list.
 */
@property OF_NULLABLE_PROPERTY (readonly, nonatomic)
    of_list_object_t *lastListObject;

/*!
 * The last object of the list or `nil`.
 *
 * @warning The returned object is *not* retained and autoreleased for
 *	    performance reasons!
 */
@property OF_NULLABLE_PROPERTY (readonly, nonatomic) ObjectType lastObject;

/*!
 * @brief Creates a new OFList.
 *
 * @return A new autoreleased OFList
 */
+ (instancetype)list;

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
 *
 * @param object The object which is checked for being in the list
 * @return A boolean whether the list contains an object with the specified
 *	   address
 */
- (bool)containsObjectIdenticalTo: (ObjectType)object;

/*!
 * @brief Returns an OFEnumerator to enumerate through all objects of the list.
 *
 * @returns An OFEnumerator to enumerate through all objects of the list
 */
- (OFEnumerator OF_GENERIC(ObjectType) *)objectEnumerator;

/*!
 * @brief Returns the first object of the list or `nil`.
 *
 * @warning The returned object is *not* retained and autoreleased for
 *	    performance reasons!
 *
 * @return The first object of the list or `nil`
 */
- (nullable ObjectType)firstObject;

/*!
 * @brief Returns the last object of the list or `nil`.
 *
 * @warning The returned object is *not* retained and autoreleased for
 *	    performance reasons!
 *
 * @return The last object of the list or `nil`
 */
- (nullable ObjectType)lastObject;

/*!
 * @brief Removes all objects from the list.
 */
- (void)removeAllObjects;
#if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN)
# undef ObjectType
#endif







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







158
159
160
161
162
163
164



























165
166
167
168
169
170
171
 *
 * @param object The object which is checked for being in the list
 * @return A boolean whether the list contains an object with the specified
 *	   address
 */
- (bool)containsObjectIdenticalTo: (ObjectType)object;




























/*!
 * @brief Removes all objects from the list.
 */
- (void)removeAllObjects;
#if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN)
# undef ObjectType
#endif

Modified src/OFMapTable.h from [df99b8af7c] to [36496cd646].

84
85
86
87
88
89
90





91
92
93
94
95
96
97
@property (readonly, nonatomic) of_map_table_functions_t keyFunctions;

/*!
 * The object functions used by the map table.
 */
@property (readonly, nonatomic) of_map_table_functions_t objectFunctions;






/*!
 * @brief Creates a new OFMapTable with the specified key and object functions.
 *
 * @param keyFunctions A structure of functions for handling keys
 * @param objectFunctions A structure of functions for handling objects
 * @return A new autoreleased OFMapTable
 */







>
>
>
>
>







84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
@property (readonly, nonatomic) of_map_table_functions_t keyFunctions;

/*!
 * The object functions used by the map table.
 */
@property (readonly, nonatomic) of_map_table_functions_t objectFunctions;

/*!
 * The number of objects in the map table.
 */
@property (readonly, nonatomic) size_t count;

/*!
 * @brief Creates a new OFMapTable with the specified key and object functions.
 *
 * @param keyFunctions A structure of functions for handling keys
 * @param objectFunctions A structure of functions for handling objects
 * @return A new autoreleased OFMapTable
 */
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
 * @return An initialized OFMapTable
 */
- (instancetype)initWithKeyFunctions: (of_map_table_functions_t)keyFunctions
		     objectFunctions: (of_map_table_functions_t)objectFunctions
			    capacity: (size_t)capacity
    OF_DESIGNATED_INITIALIZER;

/*!
 * @brief Returns the number of objects in the map table.
 *
 * @return The number of objects in the map table
 */
- (size_t)count;

/*!
 * @brief Returns the object for the given key or NULL if the key was not found.
 *
 * @param key The key whose object should be returned
 * @return The object for the given key or NULL if the key was not found
 */
- (nullable void *)objectForKey: (void *)key;







<
<
<
<
<
<
<







143
144
145
146
147
148
149







150
151
152
153
154
155
156
 * @return An initialized OFMapTable
 */
- (instancetype)initWithKeyFunctions: (of_map_table_functions_t)keyFunctions
		     objectFunctions: (of_map_table_functions_t)objectFunctions
			    capacity: (size_t)capacity
    OF_DESIGNATED_INITIALIZER;








/*!
 * @brief Returns the object for the given key or NULL if the key was not found.
 *
 * @param key The key whose object should be returned
 * @return The object for the given key or NULL if the key was not found
 */
- (nullable void *)objectForKey: (void *)key;

Modified src/OFMessagePackRepresentation.h from [90f8ea281b] to [3923f91f5a].

25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
 *	     OFMessagePackRepresentation.h ObjFW/OFMessagePackRepresentation.h
 *
 * @brief A protocol implemented by classes that support encoding to a
 *	  MessagePack representation.
 */
@protocol OFMessagePackRepresentation
/*!
 * @brief Returns the MessagePack representation of the object as OFData.
 *
 * @return The MessagePack representation of the object as OFData.
 */
- (OFData *)messagePackRepresentation;
@end

OF_ASSUME_NONNULL_END







<
<


|



25
26
27
28
29
30
31


32
33
34
35
36
37
 *	     OFMessagePackRepresentation.h ObjFW/OFMessagePackRepresentation.h
 *
 * @brief A protocol implemented by classes that support encoding to a
 *	  MessagePack representation.
 */
@protocol OFMessagePackRepresentation
/*!


 * @return The MessagePack representation of the object as OFData.
 */
@property (readonly, nonatomic) OFData *messagePackRepresentation;
@end

OF_ASSUME_NONNULL_END

Modified src/OFMutableData.h from [f022240c55] to [277ddc5595].

193
194
195
196
197
198
199
200
201
202
203
204
205


206










207



208

209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
 * @brief Converts the mutable URL to an immutable URL.
 */
- (void)makeImmutable;
@end

@interface OFMutableData (MutableRetrieving)
/*!
 * @brief Returns all items of the OFMutableData as a C array.
 *
 * @warning The pointer is only valid until the OFMutableData is changed!
 *
 * Modifying the returned array directly is allowed and will change the contents
 * of the data array.


 *










 * @return All elements of the OFMutableData as a C array



 */

- (void *)items OF_RETURNS_INNER_POINTER;

/*!
 * @brief Returns a specific item of the OFMutableData.
 *
 * Modifying the returned item directly is allowed and will change the contents
 * of the data array.
 *
 * @param index The number of the item to return
 * @return The specified item of the OFMutableData
 */
- (void *)itemAtIndex: (size_t)index OF_RETURNS_INNER_POINTER;

/*!
 * @brief Returns the first item of the OFMutableData.
 *
 * Modifying the returned item directly is allowed and will change the contents
 * of the data array.
 *
 * @return The first item of the OFMutableData or NULL
 */
- (nullable void *)firstItem OF_RETURNS_INNER_POINTER;

/*!
 * @brief Returns the last item of the OFMutableData.
 *
 * Modifying the returned item directly is allowed and will change the contents
 * of the data array.
 *
 * @return The last item of the OFMutableData or NULL
 */
- (nullable void *)lastItem OF_RETURNS_INNER_POINTER;
@end

OF_ASSUME_NONNULL_END







|





>
>
|
>
>
>
>
>
>
>
>
>
>
|
>
>
>

>
|











<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<



193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236




















237
238
239
 * @brief Converts the mutable URL to an immutable URL.
 */
- (void)makeImmutable;
@end

@interface OFMutableData (MutableRetrieving)
/*!
 * All items of the OFMutableData as a C array.
 *
 * @warning The pointer is only valid until the OFMutableData is changed!
 *
 * Modifying the returned array directly is allowed and will change the contents
 * of the data array.
 */
@property (readonly, nonatomic) void *items OF_RETURNS_INNER_POINTER;

/*!
 * The first item of the OFMutableData or NULL.
 *
 * Modifying the returned item directly is allowed and will change the contents
 * of the data array.
 */
@property OF_NULLABLE_PROPERTY (readonly, nonatomic) void *firstItem
    OF_RETURNS_INNER_POINTER;

/*!
 * Last item of the OFMutableData or NULL.
 *
 * Modifying the returned item directly is allowed and will change the contents
 * of the data array.
 */
@property OF_NULLABLE_PROPERTY (readonly, nonatomic) void *lastItem
    OF_RETURNS_INNER_POINTER;

/*!
 * @brief Returns a specific item of the OFMutableData.
 *
 * Modifying the returned item directly is allowed and will change the contents
 * of the data array.
 *
 * @param index The number of the item to return
 * @return The specified item of the OFMutableData
 */
- (void *)itemAtIndex: (size_t)index OF_RETURNS_INNER_POINTER;




















@end

OF_ASSUME_NONNULL_END

Modified src/OFNumber.h from [8625e9c54a] to [0a882a919b].

152
153
154
155
156
157
158












































































































































159
160
161
162
163
164
165
}

/*!
 * The type of the number.
 */
@property (readonly, nonatomic) of_number_type_t type;













































































































































/*!
 * @brief Creates a new OFNumber with the specified bool.
 *
 * @param bool_ A bool which the OFNumber should contain
 * @return A new autoreleased OFNumber
 */
+ (instancetype)numberWithBool: (bool)bool_;







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







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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
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
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
}

/*!
 * The type of the number.
 */
@property (readonly, nonatomic) of_number_type_t type;

/*!
 * Returns the OFNumber as a bool.
 */
@property (readonly, nonatomic) bool boolValue;

/*!
 * The OFNumber as a signed char.
 */
@property (readonly, nonatomic) signed char charValue;

/*!
 * The OFNumber as a signed short.
 */
@property (readonly, nonatomic) signed short shortValue;

/*!
 * The OFNumber as a signed int.
 */
@property (readonly, nonatomic) signed int intValue;

/*!
 * The OFNumber as a signed long.
 */
@property (readonly, nonatomic) signed long longValue;

/*!
 * The OFNumber as a signed long long.
 */
@property (readonly, nonatomic) signed long long longLongValue;

/*!
 * The OFNumber as an unsigned char.
 */
@property (readonly, nonatomic) unsigned char unsignedCharValue;

/*!
 * The OFNumber as an unsigned short.
 */
@property (readonly, nonatomic) unsigned short unsignedShortValue;

/*!
 * The OFNumber as an unsigned int.
 */
@property (readonly, nonatomic) unsigned int unsignedIntValue;

/*!
 * The OFNumber as an unsigned long.
 */
@property (readonly, nonatomic) unsigned long unsignedLongValue;

/*!
 * The OFNumber as an unsigned long long.
 */
@property (readonly, nonatomic) unsigned long long unsignedLongLongValue;

/*!
 * The OFNumber as an int8_t.
 */
@property (readonly, nonatomic) int8_t int8Value;

/*!
 * The OFNumber as an int16_t.
 */
@property (readonly, nonatomic) int16_t int16Value;

/*!
 * The OFNumber as an int32_t.
 */
@property (readonly, nonatomic) int32_t int32Value;

/*!
 * The OFNumber as an int64_t.
 */
@property (readonly, nonatomic) int64_t int64Value;

/*!
 * The OFNumber as a uint8_t.
 */
@property (readonly, nonatomic) uint8_t uInt8Value;

/*!
 * The OFNumber as a uint16_t.
 */
@property (readonly, nonatomic) uint16_t uInt16Value;

/*!
 * The OFNumber as a uint32_t.
 */
@property (readonly, nonatomic) uint32_t uInt32Value;

/*!
 * The OFNumber as a uint64_t.
 */
@property (readonly, nonatomic) uint64_t uInt64Value;

/*!
 * The OFNumber as a size_t.
 */
@property (readonly, nonatomic) size_t sizeValue;

/*!
 * The OFNumber as an ssize_t.
 */
@property (readonly, nonatomic) ssize_t sSizeValue;

/*!
 * The OFNumber as an intmax_t.
 */
@property (readonly, nonatomic) intmax_t intMaxValue;

/*!
 * The OFNumber as a uintmax_t.
 */
@property (readonly, nonatomic) uintmax_t uIntMaxValue;

/*!
 * The OFNumber as a ptrdiff_t.
 */
@property (readonly, nonatomic) ptrdiff_t ptrDiffValue;

/*!
 * The OFNumber as an intptr_t.
 */
@property (readonly, nonatomic) intptr_t intPtrValue;

/*!
 * The OFNumber as a uintptr_t.
 */
@property (readonly, nonatomic) uintptr_t uIntPtrValue;

/*!
 * The OFNumber as a float.
 */
@property (readonly, nonatomic) float floatValue;

/*!
 * The OFNumber as a double.
 */
@property (readonly, nonatomic) double doubleValue;

/*!
 * @brief Creates a new OFNumber with the specified bool.
 *
 * @param bool_ A bool which the OFNumber should contain
 * @return A new autoreleased OFNumber
 */
+ (instancetype)numberWithBool: (bool)bool_;
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
/*!
 * @brief Initializes an already allocated OFNumber with the specified double.
 *
 * @param double_ A double which the OFNumber should contain
 * @return An initialized OFNumber
 */
- (instancetype)initWithDouble: (double)double_;

/*!
 * @brief Returns the OFNumber as a bool.
 *
 * @return The OFNumber as a bool
 */
- (bool)boolValue;

/*!
 * @brief Returns the OFNumber as a signed char.
 *
 * @return The OFNumber as a signed char
 */
- (signed char)charValue;

/*!
 * @brief Returns the OFNumber as a signed short.
 *
 * @return The OFNumber as a signed short
 */
- (signed short)shortValue;

/*!
 * @brief Returns the OFNumber as a signed int.
 *
 * @return The OFNumber as a signed int
 */
- (signed int)intValue;

/*!
 * @brief Returns the OFNumber as a signed long.
 *
 * @return The OFNumber as a signed long
 */
- (signed long)longValue;

/*!
 * @brief Returns the OFNumber as a signed long long.
 *
 * @return The OFNumber as a signed long long
 */
- (signed long long)longLongValue;

/*!
 * @brief Returns the OFNumber as an unsigned char.
 *
 * @return The OFNumber as an unsigned char
 */
- (unsigned char)unsignedCharValue;

/*!
 * @brief Returns the OFNumber as an unsigned short.
 *
 * @return The OFNumber as an unsigned short
 */
- (unsigned short)unsignedShortValue;

/*!
 * @brief Returns the OFNumber as an unsigned int.
 *
 * @return The OFNumber as an unsigned int
 */
- (unsigned int)unsignedIntValue;

/*!
 * @brief Returns the OFNumber as an unsigned long.
 *
 * @return The OFNumber as an unsigned long
 */
- (unsigned long)unsignedLongValue;

/*!
 * @brief Returns the OFNumber as an unsigned long long.
 *
 * @return The OFNumber as an unsigned long long
 */
- (unsigned long long)unsignedLongLongValue;

/*!
 * @brief Returns the OFNumber as an int8_t.
 *
 * @return The OFNumber as an int8_t
 */
- (int8_t)int8Value;

/*!
 * @brief Returns the OFNumber as an int16_t.
 *
 * @return The OFNumber as an int16_t
 */
- (int16_t)int16Value;

/*!
 * @brief Returns the OFNumber as an int32_t.
 *
 * @return The OFNumber as an int32_t
 */
- (int32_t)int32Value;

/*!
 * @brief Returns the OFNumber as an int64_t.
 *
 * @return The OFNumber as an int64_t
 */
- (int64_t)int64Value;

/*!
 * @brief Returns the OFNumber as a uint8_t.
 *
 * @return The OFNumber as a uint8_t
 */
- (uint8_t)uInt8Value;

/*!
 * @brief Returns the OFNumber as a uint16_t.
 *
 * @return The OFNumber as a uint16_t
 */
- (uint16_t)uInt16Value;

/*!
 * @brief Returns the OFNumber as a uint32_t.
 *
 * @return The OFNumber as a uint32_t
 */
- (uint32_t)uInt32Value;

/*!
 * @brief Returns the OFNumber as a uint64_t.
 *
 * @return The OFNumber as a uint64_t
 */
- (uint64_t)uInt64Value;

/*!
 * @brief Returns the OFNumber as a size_t.
 *
 * @return The OFNumber as a size_t
 */
- (size_t)sizeValue;

/*!
 * @brief Returns the OFNumber as an ssize_t.
 *
 * @return The OFNumber as an ssize_t
 */
- (ssize_t)sSizeValue;

/*!
 * @brief Returns the OFNumber as an intmax_t.
 *
 * @return The OFNumber as an intmax_t
 */
- (intmax_t)intMaxValue;

/*!
 * @brief Returns the OFNumber as a uintmax_t.
 *
 * @return The OFNumber as a uintmax_t
 */
- (uintmax_t)uIntMaxValue;

/*!
 * @brief Returns the OFNumber as a ptrdiff_t.
 *
 * @return The OFNumber as a ptrdiff_t
 */
- (ptrdiff_t)ptrDiffValue;

/*!
 * @brief Returns the OFNumber as an intptr_t.
 *
 * @return The OFNumber as an intptr_t
 */
- (intptr_t)intPtrValue;

/*!
 * @brief Returns the OFNumber as a uintptr_t.
 *
 * @return The OFNumber as a uintptr_t
 */
- (uintptr_t)uIntPtrValue;

/*!
 * @brief Returns the OFNumber as a float.
 *
 * @return The OFNumber as a float
 */
- (float)floatValue;

/*!
 * @brief Returns the OFNumber as a double.
 *
 * @return The OFNumber as a double
 */
- (double)doubleValue;
@end

OF_ASSUME_NONNULL_END

#if !defined(NSINTEGER_DEFINED) && !__has_feature(modules)
/* Required for number literals to work */
@compatibility_alias NSNumber OFNumber;
#endif







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








754
755
756
757
758
759
760




































































































































































































761
762
763
764
765
766
767
768
/*!
 * @brief Initializes an already allocated OFNumber with the specified double.
 *
 * @param double_ A double which the OFNumber should contain
 * @return An initialized OFNumber
 */
- (instancetype)initWithDouble: (double)double_;




































































































































































































@end

OF_ASSUME_NONNULL_END

#if !defined(NSINTEGER_DEFINED) && !__has_feature(modules)
/* Required for number literals to work */
@compatibility_alias NSNumber OFNumber;
#endif

Modified src/OFObject+Serialization.h from [26f370712f] to [f8a88520ac].

26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
extern int _OFObject_Serialization_reference;
#ifdef __cplusplus
}
#endif

@interface OFObject (OFSerialization)
/*!
 * @brief Creates a string by serializing the receiver.
 *
 * @return The object serialized as a string
 */
- (OFString *)stringBySerializing;
@end

OF_ASSUME_NONNULL_END







<
<
|

|



26
27
28
29
30
31
32


33
34
35
36
37
38
extern int _OFObject_Serialization_reference;
#ifdef __cplusplus
}
#endif

@interface OFObject (OFSerialization)
/*!


 * The object serialized as a string.
 */
@property (readonly, nonatomic) OFString *stringBySerializing;
@end

OF_ASSUME_NONNULL_END

Modified src/OFObject.h from [39e5e50197] to [1f2c48e5a0].

195
196
197
198
199
200
201
202


203

204
205
206
207
208










209


210

211


212

213




214
215
216
217
218
219
220
/*!
 * @protocol OFObject OFObject.h ObjFW/OFObject.h
 *
 * @brief The protocol which all root classes implement.
 */
@protocol OFObject
/*!
 * @brief Returns the class of the object.


 *

 * @return The class of the object
 */
- (Class)class;

/*!










 * @brief Returns the superclass of the object.


 *

 * @return The superclass of the object


 */

- (nullable Class)superclass;





/*!
 * @brief Returns a boolean whether the object of the specified kind.
 *
 * @param class_ The class whose kind is checked
 * @return A boolean whether the object is of the specified kind
 */







|
>
>
|
>
|

|


>
>
>
>
>
>
>
>
>
>
|
>
>
|
>
|
>
>

>
|
>
>
>
>







195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
/*!
 * @protocol OFObject OFObject.h ObjFW/OFObject.h
 *
 * @brief The protocol which all root classes implement.
 */
@protocol OFObject
/*!
 * The class of the object.
 */
@property (readonly, nonatomic) Class class;

/*!
 * The superclass of the object.
 */
@property OF_NULLABLE_PROPERTY (readonly, nonatomic) Class superclass;

/*!
 * A 32 bit hash for the object.
 *
 * Classes containing data (like strings, arrays, lists etc.) should reimplement
 * this!
 *
 * @warning If you reimplement this, you also need to reimplement @ref isEqual:
 *	    to behave in a way compatible to your reimplementation of this
 *	    method!
 */
@property (readonly, nonatomic) uint32_t hash;

/*!
 * The retain count.
 */
@property (readonly, nonatomic) unsigned int retainCount;

/*!
 * Whether the object is a proxy object.
 */
@property (readonly, nonatomic) bool isProxy;

/*!
 * Whether the object allows weak references.
 */
@property (readonly, nonatomic) bool allowsWeakReference;

/*!
 * @brief Returns a boolean whether the object of the specified kind.
 *
 * @param class_ The class whose kind is checked
 * @return A boolean whether the object is of the specified kind
 */
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
 *	    return the same hash for objects which are equal!
 *
 * @param object The object which should be tested for equality
 * @return A boolean whether the object is equal to the specified object
 */
- (bool)isEqual: (nullable id)object;

/*!
 * @brief Calculates a hash for the object.
 *
 * Classes containing data (like strings, arrays, lists etc.) should reimplement
 * this!
 *
 * @warning If you reimplement this, you also need to reimplement @ref isEqual:
 *	    to behave in a way compatible to your reimplementation of this
 *	    method!
 *
 * @return A 32 bit hash for the object
 */
- (uint32_t)hash;

/*!
 * @brief Increases the retain count.
 *
 * Each time an object is released, the retain count gets decreased and the
 * object deallocated if it reaches 0.
 */
- (instancetype)retain;

/*!
 * @brief Returns the retain count.
 *
 * @return The retain count
 */
- (unsigned int)retainCount;

/*!
 * @brief Decreases the retain count.
 *
 * Each time an object is released, the retain count gets decreased and the
 * object deallocated if it reaches 0.
 */
- (void)release;







<
<
<
<
<
<
<
<
<
<
<
<
<
<








<
<
<
<
<
<
<







357
358
359
360
361
362
363














364
365
366
367
368
369
370
371







372
373
374
375
376
377
378
 *	    return the same hash for objects which are equal!
 *
 * @param object The object which should be tested for equality
 * @return A boolean whether the object is equal to the specified object
 */
- (bool)isEqual: (nullable id)object;















/*!
 * @brief Increases the retain count.
 *
 * Each time an object is released, the retain count gets decreased and the
 * object deallocated if it reaches 0.
 */
- (instancetype)retain;








/*!
 * @brief Decreases the retain count.
 *
 * Each time an object is released, the retain count gets decreased and the
 * object deallocated if it reaches 0.
 */
- (void)release;
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
/*!
 * @brief Returns the receiver.
 *
 * @return The receiver
 */
- (instancetype)self;

/*!
 * @brief Returns whether the object is a proxy object.
 *
 * @return A boolean whether the object is a proxy object
 */
- (bool)isProxy;

/*!
 * @brief Returns whether the class allows weak references.
 *
 * @return Whether the class allows weak references
 */
- (bool)allowsWeakReference;

/*!
 * @brief Retain a weak reference to this object.
 *
 * @return Whether a weak reference to this object has been retained
 */
- (bool)retainWeakReference;
@end







<
<
<
<
<
<
<
<
<
<
<
<
<
<







388
389
390
391
392
393
394














395
396
397
398
399
400
401
/*!
 * @brief Returns the receiver.
 *
 * @return The receiver
 */
- (instancetype)self;















/*!
 * @brief Retain a weak reference to this object.
 *
 * @return Whether a weak reference to this object has been retained
 */
- (bool)retainWeakReference;
@end
424
425
426
427
428
429
430













431
432
433
434
435
436
437
#ifndef __clang_analyzer__
	Class _isa;
#else
	Class _isa __attribute__((__unused__));
#endif
}














/*!
 * @brief A method which is called once when the class is loaded into the
 *	  runtime.
 *
 * Derived classes can override this to execute their own code when the class
 * is loaded.
 */







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







412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
#ifndef __clang_analyzer__
	Class _isa;
#else
	Class _isa __attribute__((__unused__));
#endif
}

/*!
 * The name of the object's class.
 */
@property (readonly, nonatomic) OFString *className;

/*!
 * A description for the object.
 *
 * This is used when the object is used in a format string and for debugging
 * purposes.
 */
@property (readonly, nonatomic) OFString *description;

/*!
 * @brief A method which is called once when the class is loaded into the
 *	  runtime.
 *
 * Derived classes can override this to execute their own code when the class
 * is loaded.
 */
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
 *
 * @param selector The selector for which the method signature should be
 *		   returned
 * @return The method signature for the specified selector
 */
- (nullable OFMethodSignature *)methodSignatureForSelector: (SEL)selector;

/*!
 * @brief Returns the name of the object's class.
 *
 * @return The name of the object's class
 */
- (OFString *)className;

/*!
 * @brief Returns a description for the object.
 *
 * This is mostly for debugging purposes.
 *
 * @return A description for the object
 */
- (OFString *)description;

/*!
 * @brief Allocates memory and stores it in the object's memory pool.
 *
 * It will be freed automatically when the object is deallocated.
 *
 * @param size The size of the memory to allocate
 * @return A pointer to the allocated memory. May return NULL if the specified







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







649
650
651
652
653
654
655
















656
657
658
659
660
661
662
 *
 * @param selector The selector for which the method signature should be
 *		   returned
 * @return The method signature for the specified selector
 */
- (nullable OFMethodSignature *)methodSignatureForSelector: (SEL)selector;

















/*!
 * @brief Allocates memory and stores it in the object's memory pool.
 *
 * It will be freed automatically when the object is deallocated.
 *
 * @param size The size of the memory to allocate
 * @return A pointer to the allocated memory. May return NULL if the specified

Modified src/OFOptionsParser.h from [77474cff80] to [c6cbbc43b2].

105
106
107
108
109
110
111






112
113
114
115
116
117
118

/*!
 * The argument for the last parsed option, or `nil` if the last parsed option
 * takes no argument.
 */
@property OF_NULLABLE_PROPERTY (readonly, nonatomic) OFString *argument;







/*!
 * @brief Creates a new OFOptionsParser which accepts the specified options.
 *
 * @param options An array of @ref of_options_parser_option_t specifying all
 *		  accepted options, terminated with an option whose short
 *		  option is `\0` and long option is `nil`.
 *







>
>
>
>
>
>







105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124

/*!
 * The argument for the last parsed option, or `nil` if the last parsed option
 * takes no argument.
 */
@property OF_NULLABLE_PROPERTY (readonly, nonatomic) OFString *argument;

/*!
 * The arguments following the last option.
 */
@property (readonly, nonatomic)
    OFArray OF_GENERIC(OFString *) *remainingArguments;

/*!
 * @brief Creates a new OFOptionsParser which accepts the specified options.
 *
 * @param options An array of @ref of_options_parser_option_t specifying all
 *		  accepted options, terminated with an option whose short
 *		  option is `\0` and long option is `nil`.
 *
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
 * @note You need to call @ref nextOption repeatedly until it returns `\0` to
 *	 make sure all options have been parsed, even if you only rely on the
 *	 optional pointers specified and don't do any parsing yourself.
 *
 * @return The next option
 */
- (of_unichar_t)nextOption;

/*!
 * @brief Returns the arguments following the last option.
 *
 * @return The arguments following the last option
 */
- (OFArray OF_GENERIC(OFString *) *)remainingArguments;
@end

OF_ASSUME_NONNULL_END







<
<
<
<
<
<
<



156
157
158
159
160
161
162







163
164
165
 * @note You need to call @ref nextOption repeatedly until it returns `\0` to
 *	 make sure all options have been parsed, even if you only rely on the
 *	 optional pointers specified and don't do any parsing yourself.
 *
 * @return The next option
 */
- (of_unichar_t)nextOption;







@end

OF_ASSUME_NONNULL_END

Modified src/OFSerialization.h from [678a1fbe4d] to [4ac25035a0].

24
25
26
27
28
29
30





31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47

/*!
 * @protocol OFSerialization OFSerialization.h ObjFW/OFSerialization.h
 *
 * @brief A protocol for serializing objects.
 */
@protocol OFSerialization





/*!
 * @brief Initializes the object with the specified XML element serialization.
 *
 * @param element An OFXMLElement with the serialized object
 * @return An initialized object
 */
- (instancetype)initWithSerialization: (OFXMLElement *)element;

/*!
 * @brief Serializes the object into an XML element.
 *
 * @return The object serialized into an XML element
 */
- (OFXMLElement *)XMLElementBySerializing;
@end

OF_ASSUME_NONNULL_END







>
>
>
>
>







<
<
<
<
<
<
<



24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42







43
44
45

/*!
 * @protocol OFSerialization OFSerialization.h ObjFW/OFSerialization.h
 *
 * @brief A protocol for serializing objects.
 */
@protocol OFSerialization
/*!
 * The object serialized into an XML element.
 */
@property (readonly, nonatomic) OFXMLElement *XMLElementBySerializing;

/*!
 * @brief Initializes the object with the specified XML element serialization.
 *
 * @param element An OFXMLElement with the serialized object
 * @return An initialized object
 */
- (instancetype)initWithSerialization: (OFXMLElement *)element;







@end

OF_ASSUME_NONNULL_END

Modified src/OFSet.h from [6c82eb5230] to [62a20daa00].

61
62
63
64
65
66
67










68
69
70
71
72
73
74
 *	    objects in a set breaks the internal representation of the set!
 */
@interface OFSet OF_GENERIC(ObjectType): OFObject <OFCollection, OFCopying,
    OFMutableCopying, OFSerialization>
#if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN)
# define ObjectType id
#endif










/*!
 * @brief Creates a new set.
 *
 * @return A new, autoreleased set
 */
+ (instancetype)set;








>
>
>
>
>
>
>
>
>
>







61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
 *	    objects in a set breaks the internal representation of the set!
 */
@interface OFSet OF_GENERIC(ObjectType): OFObject <OFCollection, OFCopying,
    OFMutableCopying, OFSerialization>
#if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN)
# define ObjectType id
#endif
/*!
 * An array of all objects in the set.
 */
@property (readonly, nonatomic) OFArray OF_GENERIC(ObjectType) *allObjects;

/*!
 * @return An arbitrary object in the set.
 */
@property OF_NULLABLE_PROPERTY (readonly, nonatomic) ObjectType anyObject;

/*!
 * @brief Creates a new set.
 *
 * @return A new, autoreleased set
 */
+ (instancetype)set;

190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
 *	  specified set.
 *
 * @param set The set to create the union with
 */
- (OFSet OF_GENERIC(ObjectType) *)setByAddingSet:
    (OFSet OF_GENERIC(ObjectType) *)set;

/*!
 * @brief Returns an array of all objects in the set.
 *
 * @return An array of all objects in the set
 */
- (OFArray OF_GENERIC(ObjectType) *)allObjects;

/*!
 * @brief Returns an arbitrary object in the set.
 *
 * @return An arbitrary object in the set
 */
- (nullable ObjectType)anyObject;

/*!
 * @brief Checks whether the set contains an object equal to the specified
 *	  object.
 *
 * @param object The object which is checked for being in the set
 * @return A boolean whether the set contains the specified object
 */







<
<
<
<
<
<
<
<
<
<
<
<
<
<







200
201
202
203
204
205
206














207
208
209
210
211
212
213
 *	  specified set.
 *
 * @param set The set to create the union with
 */
- (OFSet OF_GENERIC(ObjectType) *)setByAddingSet:
    (OFSet OF_GENERIC(ObjectType) *)set;















/*!
 * @brief Checks whether the set contains an object equal to the specified
 *	  object.
 *
 * @param object The object which is checked for being in the set
 * @return A boolean whether the set contains the specified object
 */
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
 *
 * @param value The value for the specified key
 * @param key The key of the value to set
 */
- (void)setValue: (id)value
	  forKey: (OFString *)key;

/*!
 * @brief Returns an OFEnumerator to enumerate through all objects of the set.
 *
 * @returns An OFEnumerator to enumerate through all objects of the set
 */
- (OFEnumerator OF_GENERIC(ObjectType) *)objectEnumerator;

#ifdef OF_HAVE_BLOCKS
/*!
 * @brief Executes a block for each object in the set.
 *
 * @param block The block to execute for each object in the set
 */
- (void)enumerateObjectsUsingBlock: (of_set_enumeration_block_t)block;







<
<
<
<
<
<
<







240
241
242
243
244
245
246







247
248
249
250
251
252
253
 *
 * @param value The value for the specified key
 * @param key The key of the value to set
 */
- (void)setValue: (id)value
	  forKey: (OFString *)key;








#ifdef OF_HAVE_BLOCKS
/*!
 * @brief Executes a block for each object in the set.
 *
 * @param block The block to execute for each object in the set
 */
- (void)enumerateObjectsUsingBlock: (of_set_enumeration_block_t)block;

Modified src/OFStdIOStream.h from [4a5715f270] to [32be342324].

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
#else
	BPTR _handle;
	bool _closable;
#endif
	bool _atEndOfStream;
}

- (instancetype)init OF_UNAVAILABLE;

/*!
 * @brief Query the underlying terminal for the number of columns.
 *
 * @return The number of columns, or -1 if there is no underlying terminal or
 *	   the number of columns could not be queried
 */
- (int)columns;

/*!
 * @brief Query the underlying terminal for the number of rows.
 *
 * @return The number of rows, or -1 if there is no underlying terminal or the
 *	   number of rows could not be queried
 */

- (int)rows;

@end

#ifdef __cplusplus
extern "C" {
#endif
/*! @file */








<
<

<
<
|
|

|


<
<
|
|

>
|
>







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
#else
	BPTR _handle;
	bool _closable;
#endif
	bool _atEndOfStream;
}



/*!


 * The number of columns, or -1 if there is no underlying terminal or the
 * number of columns could not be queried.
 */
@property (readonly, nonatomic) int columns;

/*!


 * The number of rows, or -1 if there is no underlying terminal or the number
 * of rows could not be queried
 */
@property (readonly, nonatomic) int rows;

- (instancetype)init OF_UNAVAILABLE;
@end

#ifdef __cplusplus
extern "C" {
#endif
/*! @file */

Modified src/OFStream.h from [af410db94f] to [7eb7553262].

118
119
120
121
122
123
124
125


126




127


128

129

















130
131
132
133
134
135
136
	size_t _readBufferLength, _writeBufferLength;
	bool _writeBuffered, _waitingForDelimiter;
@protected
	bool _blocking;
}

/*!
 * @brief Returns a boolean whether the end of the stream has been reached.


 *




 * @return A boolean whether the end of the stream has been reached


 */

- (bool)isAtEndOfStream;


















/*!
 * @brief Reads *at most* size bytes from the stream into a buffer.
 *
 * On network streams, this might read less than the specified number of bytes.
 * If you want to read exactly the specified number of bytes, use
 * @ref readIntoBuffer:exactLength:. Note that a read can even return 0 bytes -







|
>
>
|
>
>
>
>
|
>
>

>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







118
119
120
121
122
123
124
125
126
127
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
	size_t _readBufferLength, _writeBufferLength;
	bool _writeBuffered, _waitingForDelimiter;
@protected
	bool _blocking;
}

/*!
 * Whether the end of the stream has been reached.
 */
@property (readonly, nonatomic, getter=isAtEndOfStream) bool atEndOfStream;

/*!
 * Whether writes are buffered.
 */
@property (nonatomic, nonatomic, getter=isWriteBuffered) bool writeBuffered;

/*!
 * Whether data is present in the internal read buffer.
 */
@property (readonly, nonatomic) bool hasDataInReadBuffer;

/*!
 * Whether the stream is in blocking mode.
 *
 * By default, a stream is in blocking mode.
 * On Win32, setting this currently only works for sockets!
 */
@property (readonly, nonatomic, getter=isBlocking) bool blocking;

/*!
 * The file descriptor for the read end of the stream.
 */
@property (readonly, nonatomic) int fileDescriptorForReading;

/*!
 * The file descriptor for the write end of the stream.
 */
@property (readonly, nonatomic) int fileDescriptorForWriting;

/*!
 * @brief Reads *at most* size bytes from the stream into a buffer.
 *
 * On network streams, this might read less than the specified number of bytes.
 * If you want to read exactly the specified number of bytes, use
 * @ref readIntoBuffer:exactLength:. Note that a read can even return 0 bytes -
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
 * @param encoding The encoding used by the stream
 * @return The line that was read, autoreleased, or `nil` if the end of the
 *	   stream has been reached.
 */
- (nullable OFString *)tryReadTillDelimiter: (OFString *)delimiter
				   encoding: (of_string_encoding_t)encoding;

/*!
 * @brief Returns a boolean whether writes are buffered.
 *
 * @return A boolean whether writes are buffered
 */
- (bool)isWriteBuffered;

/*!
 * @brief Enables or disables the write buffer.
 *
 * @param enable Whether the write buffer should be enabled or disabled
 */
- (void)setWriteBuffered: (bool)enable;

/*!
 * @brief Writes everything in the write buffer to the stream.
 */
- (void)flushWriteBuffer;

/*!
 * @brief Writes from a buffer into the stream.







<
<
<
<
<
<
<
<
<
<
<
<
<
<







799
800
801
802
803
804
805














806
807
808
809
810
811
812
 * @param encoding The encoding used by the stream
 * @return The line that was read, autoreleased, or `nil` if the end of the
 *	   stream has been reached.
 */
- (nullable OFString *)tryReadTillDelimiter: (OFString *)delimiter
				   encoding: (of_string_encoding_t)encoding;















/*!
 * @brief Writes everything in the write buffer to the stream.
 */
- (void)flushWriteBuffer;

/*!
 * @brief Writes from a buffer into the stream.
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
 * @param format A string used as format
 * @param arguments The arguments used in the format string
 * @return The number of bytes written
 */
- (size_t)writeFormat: (OFConstantString *)format
	    arguments: (va_list)arguments;

/*!
 * @brief Returns whether data is present in the internal read buffer.
 *
 * @return Whether data is present in the internal read buffer
 */
- (bool)hasDataInReadBuffer;

/*!
 * @brief Returns whether the stream is in blocking mode.
 *
 * @return Whether the stream is in blocking mode
 */
- (bool)isBlocking;

/*!
 * @brief Enables or disables non-blocking I/O.
 *
 * By default, a stream is in blocking mode.
 * On Win32, this currently only works for sockets!
 *
 * @param enable Whether the stream should be blocking
 */
- (void)setBlocking: (bool)enable;

/*!
 * @brief Returns the file descriptor for the read end of the stream.
 *
 * @return The file descriptor for the read end of the stream
 */
- (int)fileDescriptorForReading;

/*!
 * @brief Returns the file descriptor for the write end of the stream.
 *
 * @return The file descriptor for the write end of the stream
 */
- (int)fileDescriptorForWriting;

#ifdef OF_HAVE_SOCKETS
/*!
 * @brief Cancels all pending asynchronous requests on the stream.
 */
- (void)cancelAsyncRequests;
#endif








<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







1133
1134
1135
1136
1137
1138
1139






































1140
1141
1142
1143
1144
1145
1146
 * @param format A string used as format
 * @param arguments The arguments used in the format string
 * @return The number of bytes written
 */
- (size_t)writeFormat: (OFConstantString *)format
	    arguments: (va_list)arguments;







































#ifdef OF_HAVE_SOCKETS
/*!
 * @brief Cancels all pending asynchronous requests on the stream.
 */
- (void)cancelAsyncRequests;
#endif

Modified src/OFString+CryptoHashing.h from [f63a3a4a9b] to [60e0201519].

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
extern int _OFString_CryptoHashing_reference;
#ifdef __cplusplus
}
#endif

@interface OFString (CryptoHashing)
/*!
 * @brief Returns the MD5 hash of the string as an autoreleased OFString.
 *
 * @return The MD5 hash of the string as an autoreleased OFString
 */
- (OFString *)MD5Hash;

/*!
 * @brief Returns the RIPEMD-160 hash of the string as an autoreleased OFString.
 *
 * @return The RIPEMD-160 hash of the string as an autoreleased OFString
 */
- (OFString *)RIPEMD160Hash;

/*!
 * @brief Returns the SHA-1 hash of the string as an autoreleased OFString.
 *
 * @return The SHA-1 hash of the string as an autoreleased OFString
 */
- (OFString *)SHA1Hash;

/*!
 * @brief Returns the SHA-224 hash of the string as an autoreleased OFString.
 *
 * @return The SHA-224 hash of the string as an autoreleased OFString
 */
- (OFString *)SHA224Hash;

/*!
 * @brief Returns the SHA-256 hash of the string as an autoreleased OFString.
 *
 * @return The SHA-256 hash of the string as an autoreleased OFString
 */
- (OFString *)SHA256Hash;

/*!
 * @brief Returns the SHA-384 hash of the string as an autoreleased OFString.
 *
 * @return The SHA-384 hash of the string as an autoreleased OFString
 */
- (OFString *)SHA384Hash;

/*!
 * @brief Returns the SHA-512 hash of the string as an autoreleased OFString.
 *
 * @return The SHA-512 hash of the string as an autoreleased OFString
 */
- (OFString *)SHA512Hash;
@end

OF_ASSUME_NONNULL_END







<
<
|

|


<
<
|

|


<
<
|

|


<
<
|

|


<
<
|

|


<
<
|

|


<
<
|

|



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
extern int _OFString_CryptoHashing_reference;
#ifdef __cplusplus
}
#endif

@interface OFString (CryptoHashing)
/*!


 * The MD5 hash of the string as a string.
 */
@property (readonly, nonatomic) OFString *MD5Hash;

/*!


 * The RIPEMD-160 hash of the string as a string.
 */
@property (readonly, nonatomic) OFString *RIPEMD160Hash;

/*!


 * The SHA-1 hash of the string as a string.
 */
@property (readonly, nonatomic) OFString *SHA1Hash;

/*!


 * The SHA-224 hash of the string as a string.
 */
@property (readonly, nonatomic) OFString *SHA224Hash;

/*!


 * The SHA-256 hash of the string as a string.
 */
@property (readonly, nonatomic) OFString *SHA256Hash;

/*!


 * The SHA-384 hash of the string as a string.
 */
@property (readonly, nonatomic) OFString *SHA384Hash;

/*!


 * The SHA-512 hash of the string as a string.
 */
@property (readonly, nonatomic) OFString *SHA512Hash;
@end

OF_ASSUME_NONNULL_END

Modified src/OFString+JSONValue.h from [e98963daf6] to [1672f0f914].

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
extern int _OFString_JSONValue_reference;
#ifdef __cplusplus
}
#endif

@interface OFString (JSONValue)
/*!
 * @brief Creates an object from the JSON value of the string.
 *
 * @note This also allows parsing JSON5, an extension of JSON. See
 *	 http://json5.org/ for more details.
 *
 * @warning Although not specified by the JSON specification, this can also
 *          return primitives like strings and numbers. The rationale behind
 *          this is that most JSON parsers allow JSON data just consisting of a
 *          single primitive, leading to real world JSON files sometimes only
 *          consisting of a single primitive. Therefore, you should not make any
 *          assumptions about the object returned by this method if you don't
 *          want your program to terminate due to a message not understood, but
 *          instead check the returned object using @ref isKindOfClass:.
 *
 * @return An object
 */
- (id)JSONValue;

/*!
 * @brief Creates an object from the JSON value of the string.
 *
 * @note This also allows parsing JSON5, an extension of JSON. See
 *	 http://json5.org/ for more details.
 *







|












<
<

|







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
extern int _OFString_JSONValue_reference;
#ifdef __cplusplus
}
#endif

@interface OFString (JSONValue)
/*!
 * The string interpreted as JSON and parsed as an object.
 *
 * @note This also allows parsing JSON5, an extension of JSON. See
 *	 http://json5.org/ for more details.
 *
 * @warning Although not specified by the JSON specification, this can also
 *          return primitives like strings and numbers. The rationale behind
 *          this is that most JSON parsers allow JSON data just consisting of a
 *          single primitive, leading to real world JSON files sometimes only
 *          consisting of a single primitive. Therefore, you should not make any
 *          assumptions about the object returned by this method if you don't
 *          want your program to terminate due to a message not understood, but
 *          instead check the returned object using @ref isKindOfClass:.


 */
@property (readonly, nonatomic) id JSONValue;

/*!
 * @brief Creates an object from the JSON value of the string.
 *
 * @note This also allows parsing JSON5, an extension of JSON. See
 *	 http://json5.org/ for more details.
 *

Modified src/OFString+Serialization.h from [ced555ab9d] to [76573f3900].

24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
extern int _OFString_Serialization_reference;
#ifdef __cplusplus
}
#endif

@interface OFString (Serialization)
/*!
 * @brief Deserializes the receiver into an object.
 *
 * @return The deserialized object
 */
- (id)objectByDeserializing;
@end

OF_ASSUME_NONNULL_END







|
<
<

|



24
25
26
27
28
29
30
31


32
33
34
35
36
extern int _OFString_Serialization_reference;
#ifdef __cplusplus
}
#endif

@interface OFString (Serialization)
/*!
 * The string interpreted as serialization and parsed as an object.


 */
@property (readonly, nonatomic) id objectByDeserializing;
@end

OF_ASSUME_NONNULL_END

Modified src/OFString+URLEncoding.h from [f16f9f6de1] to [c9eff89f3c].

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
extern int _OFString_URLEncoding_reference;
#ifdef __cplusplus
}
#endif

@interface OFString (URLEncoding)
/*!
 * @brief Encodes a string for use in a URL.
 *

 * @return A new autoreleased string


 */
- (OFString *)stringByURLEncoding;

/*!
 * @brief Encodes a string for use in a URL, but does not escape the specified
 *	  ignored characters.
 *
 * @param allowed A C string of characters that should not be escaped
 *
 * @return A new autoreleased string
 */
- (OFString *)stringByURLEncodingWithAllowedCharacters: (const char *)allowed;

/*!
 * @brief Decodes a string used in a URL.
 *
 * @return A new autoreleased string
 */
- (OFString *)stringByURLDecoding;
@end

OF_ASSUME_NONNULL_END







|
|
>
|
>
>

|










<
<
<
<
<
<
<



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
extern int _OFString_URLEncoding_reference;
#ifdef __cplusplus
}
#endif

@interface OFString (URLEncoding)
/*!
 * The string as an URL encoded string for use in a URL.
 */
@property (readonly, nonatomic) OFString *stringByURLEncoding;

/*!
 * The string as an URL decoded string.
 */
@property (readonly, nonatomic) OFString *stringByURLDecoding;

/*!
 * @brief Encodes a string for use in a URL, but does not escape the specified
 *	  ignored characters.
 *
 * @param allowed A C string of characters that should not be escaped
 *
 * @return A new autoreleased string
 */
- (OFString *)stringByURLEncodingWithAllowedCharacters: (const char *)allowed;







@end

OF_ASSUME_NONNULL_END

Modified src/OFString+XMLEscaping.h from [54cf47bc37] to [6735941add].

24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
extern int _OFString_XMLEscaping_reference;
#ifdef __cplusplus
}
#endif

@interface OFString (XMLEscaping)
/*!
 * @brief Escapes a string for use in an XML document.
 *
 * @return A new autoreleased string
 */
- (OFString *)stringByXMLEscaping;
@end

OF_ASSUME_NONNULL_END







|
<
<

|



24
25
26
27
28
29
30
31


32
33
34
35
36
extern int _OFString_XMLEscaping_reference;
#ifdef __cplusplus
}
#endif

@interface OFString (XMLEscaping)
/*!
 * The string in a form escaped for use in an XML document.


 */
@property (readonly, nonatomic) OFString *stringByXMLEscaping;
@end

OF_ASSUME_NONNULL_END

Modified src/OFString+XMLUnescaping.h from [48a186039b] to [8f5669758e].

62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
 */
- (nullable OFString *)string: (OFString *)string
   containsUnknownEntityNamed: (OFString *)entity;
@end

@interface OFString (XMLUnescaping)
/*!
 * @brief Unescapes XML in the string.
 */
- (OFString *)stringByXMLUnescaping;

/*!
 * @brief Unescapes XML in the string and uses the specified delegate for
 *	  unknown entities.
 *
 * @param delegate An OFXMLUnescapingDelegate as a handler for unknown entities
 */







|

|







62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
 */
- (nullable OFString *)string: (OFString *)string
   containsUnknownEntityNamed: (OFString *)entity;
@end

@interface OFString (XMLUnescaping)
/*!
 * The string with XML entities unescapted.
 */
@property (readonly, nonatomic) OFString *stringByXMLUnescaping;

/*!
 * @brief Unescapes XML in the string and uses the specified delegate for
 *	  unknown entities.
 *
 * @param delegate An OFXMLUnescapingDelegate as a handler for unknown entities
 */

Modified src/OFString.h from [54b5ea6d82] to [37d4036ea2].

109
110
111
112
113
114
115



































































































































































































116
117
118
119
120
121
122
/*!
 * @class OFString OFString.h ObjFW/OFString.h
 *
 * @brief A class for handling strings.
 */
@interface OFString: OFObject <OFCopying, OFMutableCopying, OFComparing,
    OFSerialization, OFJSONRepresentation, OFMessagePackRepresentation>



































































































































































































/*!
 * @brief Creates a new OFString.
 *
 * @return A new, autoreleased OFString
 */
+ (instancetype)string;








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







109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
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
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
/*!
 * @class OFString OFString.h ObjFW/OFString.h
 *
 * @brief A class for handling strings.
 */
@interface OFString: OFObject <OFCopying, OFMutableCopying, OFComparing,
    OFSerialization, OFJSONRepresentation, OFMessagePackRepresentation>

/*!
 * The length of the string in Unicode codepoints.
 */
@property (readonly, nonatomic) size_t length;

/*!
 * The OFString as a UTF-8 encoded C string.
 *
 * The result is valid until the autorelease pool is released. If you want to
 * use the result outside the scope of the current autorelease pool, you have to
 * copy it.
 */
@property (readonly, nonatomic) const char *UTF8String OF_RETURNS_INNER_POINTER;

/*!
 * The number of bytes the string needs in UTF-8 encoding.
 */
@property (readonly, nonatomic) size_t UTF8StringLength;

/*!
 * The components of the string when interpreted as a path.
 */
@property (readonly, nonatomic) OFArray OF_GENERIC(OFString *) *pathComponents;

/*!
 * The last path component of the string when interpreted as a path.
 */
@property (readonly, nonatomic) OFString *lastPathComponent;

/*!
 * The file extension of string when interpreted as a path.
 */
@property (readonly, nonatomic) OFString *pathExtension;

/*!
 * The string in uppercase.
 */
@property (readonly, nonatomic) OFString *uppercaseString;

/*!
 * The string in lowercase.
 */
@property (readonly, nonatomic) OFString *lowercaseString;

/*!
 * The string in capitalized form.
 *
 * @note This only considers spaces, tabs and newlines to be word delimiters!
 *	 Also note that this might change in the future to all word delimiters
 *	 specified by Unicode!
 */
@property (readonly, nonatomic) OFString *capitalizedString;

/*!
 * The decimal value of the string as an `intmax_t`.
 *
 * Leading and trailing whitespaces are ignored.
 *
 * If the string contains any non-number characters, an
 * @ref OFInvalidEncodingException is thrown.
 *
 * If the number is too big to fit into an `intmax_t`, an
 * @ref OFOutOfRangeException is thrown.
 */
@property (readonly, nonatomic) intmax_t decimalValue;

/*!
 * The hexadecimal value of the string as an `uintmax_t`.
 *
 * Leading and trailing whitespaces are ignored.
 *
 * If the string contains any non-number characters, an
 * @ref OFInvalidEncodingException is thrown.
 *
 * If the number is too big to fit into an `uintmax_t`, an
 * @ref OFOutOfRangeException is thrown.
 */
@property (readonly, nonatomic) uintmax_t hexadecimalValue;

/*!
 * The octal value of the string as an `uintmax_t`.
 *
 * Leading and trailing whitespaces are ignored.
 *
 * If the string contains any non-number characters, an
 * @ref OFInvalidEncodingException is thrown.
 *
 * If the number is too big to fit into an `uintmax_t`, an
 * @ref OFOutOfRangeException is thrown.
 */
@property (readonly, nonatomic) uintmax_t octalValue;

/*!
 * The float value of the string as a float.
 *
 * If the string contains any non-number characters, an
 * @ref OFInvalidEncodingException is thrown.
 */
@property (readonly, nonatomic) float floatValue;

/*!
 * The double value of the string as a double.
 *
 * If the string contains any non-number characters, an
 * OFInvalidEncodingException is thrown.
 */
@property (readonly, nonatomic) double doubleValue;

/*!
 * The directory name of the string when interpreted as a path.
 */
@property (readonly, nonatomic) OFString *stringByDeletingLastPathComponent;

/*!
 * The string with the file extension of the path removed.
 */
@property (readonly, nonatomic) OFString *stringByDeletingPathExtension;

/*!
 * The string interpreted as a path with relative sub paths resolved.
 */
@property (readonly, nonatomic) OFString *stringByStandardizingPath;

/*!
 * The string interpreted as a URL path with relative sub paths resolved.
 *
 * This works similar to @ref stringByStandardizingPath, but is intended for
 * standardization of paths that are part of a URL.
 */
@property (readonly, nonatomic) OFString *stringByStandardizingURLPath;

/*!
 * The string as an array of Unicode characters.
 *
 * The result is valid until the autorelease pool is released. If you want to
 * use the result outside the scope of the current autorelease pool, you have to
 * copy it.
 */
@property (readonly, nonatomic) const of_unichar_t *characters
    OF_RETURNS_INNER_POINTER;

/*!
 * The string in UTF-16 encoding with native byte order.
 *
 * The result is valid until the autorelease pool is released. If you want to
 * use the result outside the scope of the current autorelease pool, you have to
 * copy it.
 */
@property (readonly, nonatomic) const char16_t *UTF16String
    OF_RETURNS_INNER_POINTER;

/*!
 * The length of the string in UTF-16 characters.
 */
@property (readonly, nonatomic) size_t UTF16StringLength;

/*!
 * The string in UTF-32 encoding with native byte order.
 *
 * The result is valid until the autorelease pool is released. If you want to
 * use the result outside the scope of the current autorelease pool, you have to
 * copy it.
 */
@property (readonly, nonatomic) const char32_t *UTF32String
    OF_RETURNS_INNER_POINTER;

/*!
 * The string with leading whitespaces deleted.
 */
@property (readonly, nonatomic) OFString *stringByDeletingLeadingWhitespaces;

/*!
 * The string with trailing whitespaces deleted.
 */
@property (readonly, nonatomic) OFString *stringByDeletingTrailingWhitespaces;

/*!
 * The string with leading and trailing whitespaces deleted.
 */
@property (readonly, nonatomic) OFString *stringByDeletingEnclosingWhitespaces;

#ifdef OF_HAVE_UNICODE_TABLES
/*!
 * The string in Unicode Normalization Form D (NFD).
 */
@property (readonly, nonatomic) OFString *decomposedStringWithCanonicalMapping;

/*!
 * The string in Unicode Normalization Form KD (NFKD).
 */
@property (readonly, nonatomic)
    OFString *decomposedStringWithCompatibilityMapping;
#endif

/*!
 * @brief Creates a new OFString.
 *
 * @return A new, autoreleased OFString
 */
+ (instancetype)string;

667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
 *
 * @param encoding The encoding for the C string
 * @return The OFString as a C string in the specified encoding
 */
- (const char *)lossyCStringWithEncoding: (of_string_encoding_t)encoding
    OF_RETURNS_INNER_POINTER;

/*!
 * @brief Returns the OFString as a UTF-8 encoded C string.
 *
 * The result is valid until the autorelease pool is released. If you want to
 * use the result outside the scope of the current autorelease pool, you have to
 * copy it.
 *
 * @return The OFString as a UTF-8 encoded C string
 */
- (const char *)UTF8String OF_RETURNS_INNER_POINTER;

/*!
 * @brief Returns the length of the string in Unicode codepoints.
 *
 * @return The length of the string in Unicode codepoints
 */
- (size_t)length;

/*!
 * @brief Returns the number of bytes the string needs in the specified
 *	  encoding.
 *
 * @param encoding The encoding for the string
 * @return The number of bytes the string needs in the specified encoding.
 */
- (size_t)cStringLengthWithEncoding: (of_string_encoding_t)encoding;

/*!
 * @brief Returns the number of bytes the string needs in UTF-8 encoding.
 *
 * @return The number of bytes the string needs in UTF-8 encoding.
 */
- (size_t)UTF8StringLength;

/*!
 * @brief Compares the OFString to another OFString without caring about the
 *	  case.
 *
 * @param otherString A string to compare with
 * @return An of_comparison_result_t
 */







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<









<
<
<
<
<
<
<







862
863
864
865
866
867
868


















869
870
871
872
873
874
875
876
877







878
879
880
881
882
883
884
 *
 * @param encoding The encoding for the C string
 * @return The OFString as a C string in the specified encoding
 */
- (const char *)lossyCStringWithEncoding: (of_string_encoding_t)encoding
    OF_RETURNS_INNER_POINTER;



















/*!
 * @brief Returns the number of bytes the string needs in the specified
 *	  encoding.
 *
 * @param encoding The encoding for the string
 * @return The number of bytes the string needs in the specified encoding.
 */
- (size_t)cStringLengthWithEncoding: (of_string_encoding_t)encoding;








/*!
 * @brief Compares the OFString to another OFString without caring about the
 *	  case.
 *
 * @param otherString A string to compare with
 * @return An of_comparison_result_t
 */
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
 * @return A new string with the occurrences of the specified string replaced
 */
- (OFString *)stringByReplacingOccurrencesOfString: (OFString *)string
					withString: (OFString *)replacement
					   options: (int)options
					     range: (of_range_t)range;

/*!
 * @brief Returns the string in uppercase.
 *
 * @return The string in uppercase
 */
- (OFString *)uppercaseString;

/*!
 * @brief Returns the string in lowercase.
 *
 * @return The string in lowercase
 */
- (OFString *)lowercaseString;

/*!
 * @brief Returns the string capitalized.
 *
 * @note This only considers spaces, tabs and newlines to be word delimiters!
 *	 Also note that this might change in the future to all word delimiters
 *	 specified by Unicode!
 *
 * @return The capitalized string
 */
- (OFString *)capitalizedString;

/*!
 * @brief Creates a new string by deleting leading whitespaces.
 *
 * @return A new autoreleased OFString with leading whitespaces deleted
 */
- (OFString *)stringByDeletingLeadingWhitespaces;

/*!
 * @brief Creates a new string by deleting trailing whitespaces.
 *
 * @return A new autoreleased OFString with trailing whitespaces deleted
 */
- (OFString *)stringByDeletingTrailingWhitespaces;

/*!
 * @brief Creates a new string by deleting leading and trailing whitespaces.
 *
 * @return A new autoreleased OFString with leading and trailing whitespaces
 *	   deleted
 */
- (OFString *)stringByDeletingEnclosingWhitespaces;

/*!
 * @brief Checks whether the string has the specified prefix.
 *
 * @param prefix The prefix to check for
 * @return A boolean whether the string has the specified prefix
 */
- (bool)hasPrefix: (OFString *)prefix;







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







1025
1026
1027
1028
1029
1030
1031















































1032
1033
1034
1035
1036
1037
1038
 * @return A new string with the occurrences of the specified string replaced
 */
- (OFString *)stringByReplacingOccurrencesOfString: (OFString *)string
					withString: (OFString *)replacement
					   options: (int)options
					     range: (of_range_t)range;
















































/*!
 * @brief Checks whether the string has the specified prefix.
 *
 * @param prefix The prefix to check for
 * @return A boolean whether the string has the specified prefix
 */
- (bool)hasPrefix: (OFString *)prefix;
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
 * 		  `OF_STRING_SKIP_EMPTY` | Skip empty components
 * @return An autoreleased OFArray with the separated string
 */
- (OFArray OF_GENERIC(OFString *) *)
    componentsSeparatedByString: (OFString *)delimiter
			options: (int)options;

/*!
 * @brief Returns the components of the path.
 *
 * @return The components of the path
 */
- (OFArray OF_GENERIC(OFString *) *)pathComponents;

/*!
 * @brief Returns the last component of the path.
 *
 * @return The last component of the path
 */
- (OFString *)lastPathComponent;

/*!
 * @brief Returns the file extension of the path.
 *
 * @return The file extension of the path
 */
- (OFString *)pathExtension;

/*!
 * @brief Returns the directory name of the path.
 *
 * @return The directory name of the path
 */
- (OFString *)stringByDeletingLastPathComponent;

/*!
 * @brief Returns a new string with the file extension of the path removed.
 *
 * @return A new string with the file extension of the path removed
 */
- (OFString *)stringByDeletingPathExtension;

/*!
 * @brief Returns the path with relative sub paths resolved.
 *
 * @return The path with relative sub paths resolved
 */
- (OFString *)stringByStandardizingPath;

/*!
 * @brief Returns the URL path with relative sub paths resolved.
 *
 * This works similar to @ref stringByStandardizingPath, but is intended for
 * standardization of paths that are part of a URL.
 *
 * @return The URL path with relative sub paths resolved
 */
- (OFString *)stringByStandardizingURLPath;

/*!
 * @brief Returns the decimal value of the string as an `intmax_t`.
 *
 * Leading and trailing whitespaces are ignored.
 *
 * If the string contains any non-number characters, an
 * @ref OFInvalidEncodingException is thrown.
 *
 * If the number is too big to fit into an `intmax_t`, an
 * @ref OFOutOfRangeException is thrown.
 *
 * @return An `intmax_t` with the value of the string
 */
- (intmax_t)decimalValue;

/*!
 * @brief Returns the hexadecimal value of the string as an `uintmax_t`.
 *
 * Leading and trailing whitespaces are ignored.
 *
 * If the string contains any non-number characters, an
 * @ref OFInvalidEncodingException is thrown.
 *
 * If the number is too big to fit into an `uintmax_t`, an
 * @ref OFOutOfRangeException is thrown.
 *
 * @return A `uintmax_t` with the value of the string
 */
- (uintmax_t)hexadecimalValue;

/*!
 * @brief Returns the octal value of the string as an `uintmax_t`.
 *
 * Leading and trailing whitespaces are ignored.
 *
 * If the string contains any non-number characters, an
 * @ref OFInvalidEncodingException is thrown.
 *
 * If the number is too big to fit into an `uintmax_t`, an
 * @ref OFOutOfRangeException is thrown.
 *
 * @return A `uintmax_t` with the value of the string
 */
- (uintmax_t)octalValue;

/*!
 * @brief Returns the float value of the string as a float.
 *
 * If the string contains any non-number characters, an
 * OFInvalidEncodingException is thrown.
 *
 * @return A float with the value of the string
 */
- (float)floatValue;

/*!
 * @brief Returns the double value of the string as a double.
 *
 * If the string contains any non-number characters, an
 * OFInvalidEncodingException is thrown.
 *
 * @return A double with the value of the string
 */
- (double)doubleValue;

/*!
 * @brief Returns the string as an array of Unicode characters.
 *
 * The result is valid until the autorelease pool is released. If you want to
 * use the result outside the scope of the current autorelease pool, you have to
 * copy it.
 *
 * @return The string as an array of Unicode characters
 */
- (const of_unichar_t *)characters OF_RETURNS_INNER_POINTER;

/*!
 * @brief Returns the string in UTF-16 encoding with native byte order.
 *
 * The result is valid until the autorelease pool is released. If you want to
 * use the result outside the scope of the current autorelease pool, you have to
 * copy it.
 *
 * @return The string in UTF-16 encoding with native byte order
 */
- (const char16_t *)UTF16String OF_RETURNS_INNER_POINTER;

/*!
 * @brief Returns the string in UTF-16 encoding with the specified byte order.
 *
 * The result is valid until the autorelease pool is released. If you want to
 * use the result outside the scope of the current autorelease pool, you have to
 * copy it.
 *
 * @param byteOrder The byte order for the UTF-16 encoding
 * @return The string in UTF-16 encoding with the specified byte order
 */
- (const char16_t *)UTF16StringWithByteOrder: (of_byte_order_t)byteOrder
    OF_RETURNS_INNER_POINTER;

/*!
 * @brief Returns the length of the string in UTF-16 characters.
 *
 * @return The length of string in UTF-16 characters
 */
- (size_t)UTF16StringLength;

/*!
 * @brief Returns the string in UTF-32 encoding with native byte order.
 *
 * The result is valid until the autorelease pool is released. If you want to
 * use the result outside the scope of the current autorelease pool, you have to
 * copy it.
 *
 * @return The string in UTF-32 encoding with native byte order
 */
- (const char32_t *)UTF32String OF_RETURNS_INNER_POINTER;

/*!
 * @brief Returns the string in UTF-32 encoding with the specified byte order.
 *
 * The result is valid until the autorelease pool is released. If you want to
 * use the result outside the scope of the current autorelease pool, you have to
 * copy it.
 *







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<













<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







1065
1066
1067
1068
1069
1070
1071











































































































































1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084


















1085
1086
1087
1088
1089
1090
1091
 * 		  `OF_STRING_SKIP_EMPTY` | Skip empty components
 * @return An autoreleased OFArray with the separated string
 */
- (OFArray OF_GENERIC(OFString *) *)
    componentsSeparatedByString: (OFString *)delimiter
			options: (int)options;












































































































































/*!
 * @brief Returns the string in UTF-16 encoding with the specified byte order.
 *
 * The result is valid until the autorelease pool is released. If you want to
 * use the result outside the scope of the current autorelease pool, you have to
 * copy it.
 *
 * @param byteOrder The byte order for the UTF-16 encoding
 * @return The string in UTF-16 encoding with the specified byte order
 */
- (const char16_t *)UTF16StringWithByteOrder: (of_byte_order_t)byteOrder
    OF_RETURNS_INNER_POINTER;



















/*!
 * @brief Returns the string in UTF-32 encoding with the specified byte order.
 *
 * The result is valid until the autorelease pool is released. If you want to
 * use the result outside the scope of the current autorelease pool, you have to
 * copy it.
 *
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
 * @brief Returns the string as OFData with the specified encoding.
 *
 * @param encoding The encoding to use for the returned OFData
 * @return The string as OFData with the specified encoding
 */
- (OFData *)dataWithEncoding: (of_string_encoding_t)encoding;

#ifdef OF_HAVE_UNICODE_TABLES
/*!
 * @brief Returns the string in Unicode Normalization Form D (NFD).
 *
 * @return The string in Unicode Normalization Form D (NFD)
 */
- (OFString *)decomposedStringWithCanonicalMapping;

/*!
 * @brief Returns the string in Unicode Normalization Form KD (NFKD).
 *
 * @return The string in Unicode Normalization Form KD (NFKD)
 */
- (OFString *)decomposedStringWithCompatibilityMapping;
#endif

#ifdef OF_HAVE_FILES
/*!
 * @brief Writes the string into the specified file using UTF-8 encoding.
 *
 * @param path The path of the file to write to
 */
- (void)writeToFile: (OFString *)path;







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







1099
1100
1101
1102
1103
1104
1105
















1106
1107
1108
1109
1110
1111
1112
 * @brief Returns the string as OFData with the specified encoding.
 *
 * @param encoding The encoding to use for the returned OFData
 * @return The string as OFData with the specified encoding
 */
- (OFData *)dataWithEncoding: (of_string_encoding_t)encoding;

















#ifdef OF_HAVE_FILES
/*!
 * @brief Writes the string into the specified file using UTF-8 encoding.
 *
 * @param path The path of the file to write to
 */
- (void)writeToFile: (OFString *)path;

Modified src/OFTCPSocket.h from [a227914da5] to [710f0fdfb9].

66
67
68
69
70
71
72






























73
74
75
76
77
78
79
	OFString *_Nullable _SOCKS5Host;
	uint16_t _SOCKS5Port;
#ifdef OF_WII
	uint16_t _port;
#endif
}































/*!
 * The host to use as a SOCKS5 proxy.
 */
@property OF_NULLABLE_PROPERTY (copy, nonatomic) OFString *SOCKS5Host;

/*!
 * The port to use on the SOCKS5 proxy.







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







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
	OFString *_Nullable _SOCKS5Host;
	uint16_t _SOCKS5Port;
#ifdef OF_WII
	uint16_t _port;
#endif
}

/*!
 * Whether the socket is a listening socket.
 */
@property (readonly, nonatomic, getter=isListening) bool listening;

/*!
 * The remote address as a string
 *
 * @note This only works for accepted sockets!
 */
@property OF_NULLABLE_PROPERTY (readonly, nonatomic) OFString *remoteAddress;

#if !defined(OF_WII) && !defined(OF_NINTENDO_3DS)
/*!
 * Whether keep alives are enabled for the connection.
 *
 * @warning This is not available on the Wii or Nintendo 3DS!
 */
@property (nonatomic, getter=isKeepAliveEnabled) bool keepAliveEnabled;
#endif

#ifndef OF_WII
/*!
 * Whether TCP_NODELAY is enabled for the connection
 *
 * @warning This is not available on the Wii!
 */
@property (nonatomic, getter=isTCPNoDelayEnabled) bool TCPNoDelayEnabled;
#endif

/*!
 * The host to use as a SOCKS5 proxy.
 */
@property OF_NULLABLE_PROPERTY (copy, nonatomic) OFString *SOCKS5Host;

/*!
 * The port to use on the SOCKS5 proxy.
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
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
273
274
275
276
 *
 * @param block The block to execute when a new connection has been accepted.
 *		Returns whether the next incoming connection should be accepted
 *		by the specified block as well.
 */
- (void)asyncAcceptWithBlock: (of_tcp_socket_async_accept_block_t)block;
#endif

/*!
 * @brief Returns the remote address of the socket.
 *
 * Only works with accepted sockets!
 *
 * @return The remote address as a string
 */
- (nullable OFString *)remoteAddress;

/*!
 * @brief Returns whether the socket is a listening socket.
 *
 * @return Whether the socket is a listening socket
 */
- (bool)isListening;

#if !defined(OF_WII) && !defined(OF_NINTENDO_3DS)
/*!
 * @brief Enable or disable keep alive for the connection.
 *
 * @warning This is not available on the Wii or Nintendo 3DS!
 *
 * @param enabled Whether to enable or disable keep alives for the connection
 */
- (void)setKeepAliveEnabled: (bool)enabled;

/*!
 * @brief Returns whether keep alive is enabled for the connection.
 *
 * @warning This is not available on the Wii or Nintendo 3DS!
 *
 * @return Whether keep alives are enabled for the connection
 */
- (bool)isKeepAliveEnabled;
#endif

#ifndef OF_WII
/*!
 * @brief Enable or disable TCP_NODELAY for the connection.
 *
 * @warning This is not available on the Wii!
 *
 * @param enabled Whether to enable or disable TCP_NODELAY for the connection
 */
- (void)setTCPNoDelayEnabled: (bool)enabled;

/*!
 * @brief Returns whether TCP_NODELAY is enabled for the connection.
 *
 * @warning This is not available on the Wii!
 *
 * @return Whether TCP_NODELAY is enabled for the connection
 */
- (bool)isTCPNoDelayEnabled;
#endif
@end

#ifdef __cplusplus
extern "C" {
#endif
extern Class _Nullable of_tls_socket_class;
#ifdef __cplusplus
}
#endif

OF_ASSUME_NONNULL_END







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<











233
234
235
236
237
238
239
























































240
241
242
243
244
245
246
247
248
249
250
 *
 * @param block The block to execute when a new connection has been accepted.
 *		Returns whether the next incoming connection should be accepted
 *		by the specified block as well.
 */
- (void)asyncAcceptWithBlock: (of_tcp_socket_async_accept_block_t)block;
#endif
























































@end

#ifdef __cplusplus
extern "C" {
#endif
extern Class _Nullable of_tls_socket_class;
#ifdef __cplusplus
}
#endif

OF_ASSUME_NONNULL_END

Modified src/OFTarArchive.h from [c8036d2b06] to [e55df33ec2].

34
35
36
37
38
39
40







41
42
43
44
45
46
47
		OF_TAR_ARCHIVE_MODE_READ,
		OF_TAR_ARCHIVE_MODE_WRITE,
		OF_TAR_ARCHIVE_MODE_APPEND
	} _mode;
	OF_KINDOF(OFStream *) _Nullable _lastReturnedStream;
}








/*!
 * @brief Creates a new OFTarArchive object with the specified stream.
 *
 * @param stream A stream from which the tar archive will be read.
 *		 For append mode, this needs to be an OFSeekableStream.
 * @param mode The mode for the tar file. Valid modes are "r" for reading,
 *	       "w" for creating a new file and "a" for appending to an existing







>
>
>
>
>
>
>







34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
		OF_TAR_ARCHIVE_MODE_READ,
		OF_TAR_ARCHIVE_MODE_WRITE,
		OF_TAR_ARCHIVE_MODE_APPEND
	} _mode;
	OF_KINDOF(OFStream *) _Nullable _lastReturnedStream;
}

/*!
 * @return A stream for reading the current entry
 *
 * @note This is only available in read mode.
 */
@property (readonly, nonatomic) OFStream *streamForReadingCurrentEntry;

/*!
 * @brief Creates a new OFTarArchive object with the specified stream.
 *
 * @param stream A stream from which the tar archive will be read.
 *		 For append mode, this needs to be an OFSeekableStream.
 * @param mode The mode for the tar file. Valid modes are "r" for reading,
 *	       "w" for creating a new file and "a" for appending to an existing
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
 *	    @ref OFWriteFailedException!
 *
 * @return The next entry from the tar archive or `nil` if all entries have
 *	   been read
 */
- (nullable OFTarArchiveEntry *)nextEntry;

/*!
 * @brief Returns a stream for reading the current entry.
 *
 * @note This is only available in read mode.
 *
 * @return A stream for reading the current entry
 */
- (OFStream *)streamForReadingCurrentEntry;

/*!
 * @brief Returns a stream for writing the specified entry.
 *
 * @note This is only available in write and append mode.
 *
 * @warning Calling @ref nextEntry will invalidate all streams returned by
 *	    @ref streamForReadingCurrentEntry or







<
<
<
<
<
<
<
<
<







114
115
116
117
118
119
120









121
122
123
124
125
126
127
 *	    @ref OFWriteFailedException!
 *
 * @return The next entry from the tar archive or `nil` if all entries have
 *	   been read
 */
- (nullable OFTarArchiveEntry *)nextEntry;










/*!
 * @brief Returns a stream for writing the specified entry.
 *
 * @note This is only available in write and append mode.
 *
 * @warning Calling @ref nextEntry will invalidate all streams returned by
 *	    @ref streamForReadingCurrentEntry or

Modified src/OFThread.h from [42f39cebaf] to [a03e0a91d4].

91
92
93
94
95
96
97























98
99
100
101
102
103
104
/*!
 * The block to execute in the thread.
 */
@property OF_NULLABLE_PROPERTY (readonly, nonatomic)
    of_thread_block_t threadBlock;
# endif
























/*!
 * @brief Creates a new thread.
 *
 * @return A new, autoreleased thread
 */
+ (instancetype)thread;








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







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
116
117
118
119
120
121
122
123
124
125
126
127
/*!
 * The block to execute in the thread.
 */
@property OF_NULLABLE_PROPERTY (readonly, nonatomic)
    of_thread_block_t threadBlock;
# endif

/*!
 * The run loop for the thread.
 */
@property (readonly, nonatomic) OFRunLoop *runLoop;

/*!
 * The priority of the thread.
 *
 * @note This has to be set before the thread is started!
 *
 * This is a value between -1.0 (meaning lowest priority that still schedules)
 * and +1.0 (meaning highest priority that still allows getting preempted)
 * with normal priority being 0.0 (meaning being the same as the main thread).
 */
@property (nonatomic) float priority;

/*!
 * The stack size of the thread.
 *
 * @note This has to be set before the thread is started!
 */
@property (nonatomic) size_t stackSize;

/*!
 * @brief Creates a new thread.
 *
 * @return A new, autoreleased thread
 */
+ (instancetype)thread;

218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
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
273
274
275
276
277

/*!
 * @brief Joins a thread.
 *
 * @return The object returned by the main method of the thread.
 */
- (id)join;

/*!
 * @brief Returns the run loop for the thread.
 *
 * @return The run loop for the thread
 */
- (OFRunLoop *)runLoop;

/*!
 * @brief Returns the priority of the thread.
 *
 * This is a value between -1.0 (meaning lowest priority that still schedules)
 * and +1.0 (meaning highest priority that still allows getting preempted)
 * with normal priority being 0.0 (meaning being the same as the main thread).
 *
 * @return The priority of the thread
 */
- (float)priority;

/*!
 * @brief Sets the priority of the thread.
 *
 * @note This has to be set before the thread is started!
 *
 * @param priority The priority of the thread. This is a value between -1.0
 *		   (meaning lowest priority that still schedules) and +1.0
 *		   (meaning highest priority that still allows getting
 *		   preempted) with normal priority being 0.0 (meaning being
 *		   the same as the main thread).
 */
- (void)setPriority: (float)priority;

/*!
 * @brief Returns the stack size of the thread.
 *
 * @return The stack size of the thread
 */
- (size_t)stackSize;

/*!
 * @brief Sets the stack size of the thread.
 *
 * @note This has to be set before the thread is started!
 *
 * @param stackSize The stack size for the thread
 */
- (void)setStackSize: (size_t)stackSize;
#else
- (instancetype)init OF_UNAVAILABLE;
#endif
@end

OF_ASSUME_NONNULL_END







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






241
242
243
244
245
246
247















































248
249
250
251
252
253

/*!
 * @brief Joins a thread.
 *
 * @return The object returned by the main method of the thread.
 */
- (id)join;















































#else
- (instancetype)init OF_UNAVAILABLE;
#endif
@end

OF_ASSUME_NONNULL_END

Modified src/OFThreadPool.h from [eee48469e5] to [ddc1820eca].

48
49
50
51
52
53
54





55
56
57
58
59
60
61
@public
	OFList *_queue;
	OFCondition *_queueCondition;
	volatile int _doneCount;
	OFCondition *_countCondition;
}






/*!
 * @brief Returns a new thread pool with one thread for each core in the system.
 *
 * @warning If for some reason the number of cores in the system could not be
 *	    determined, the pool will only have one thread!
 *
 * @return A new thread pool with one thread for each core in the system







>
>
>
>
>







48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
@public
	OFList *_queue;
	OFCondition *_queueCondition;
	volatile int _doneCount;
	OFCondition *_countCondition;
}

/*!
 * The size of the thread pool.
 */
@property (readonly, nonatomic) size_t size;

/*!
 * @brief Returns a new thread pool with one thread for each core in the system.
 *
 * @warning If for some reason the number of cores in the system could not be
 *	    determined, the pool will only have one thread!
 *
 * @return A new thread pool with one thread for each core in the system
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
- (void)dispatchWithBlock: (of_thread_pool_block_t)block;
#endif

/*!
 * @brief Waits until all jobs are done.
 */
- (void)waitUntilDone;

/*!
 * @brief Returns the size of the thread pool.
 *
 * @return The size of the thread pool
 */
- (size_t)size;
@end

OF_ASSUME_NONNULL_END







<
<
<
<
<
<
<



105
106
107
108
109
110
111







112
113
114
- (void)dispatchWithBlock: (of_thread_pool_block_t)block;
#endif

/*!
 * @brief Waits until all jobs are done.
 */
- (void)waitUntilDone;







@end

OF_ASSUME_NONNULL_END

Modified src/OFTimer.h from [47d5c258ad] to [b9c72c484e].

73
74
75
76
77
78
79










80
81
82
83
84
85
86
@property (readonly, nonatomic, getter=isRepeating) bool repeating;

/*!
 * Whether the timer is valid.
 */
@property (readonly, nonatomic, getter=isValid) bool valid;











/*!
 * @brief Creates and schedules a new timer with the specified time interval.
 *
 * @param timeInterval The time interval after which the timer should be fired
 * @param target The target on which to call the selector
 * @param selector The selector to call on the target
 * @param repeats Whether the timer repeats after it has been executed







>
>
>
>
>
>
>
>
>
>







73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
@property (readonly, nonatomic, getter=isRepeating) bool repeating;

/*!
 * Whether the timer is valid.
 */
@property (readonly, nonatomic, getter=isValid) bool valid;

/*!
 * The next date at which the timer will fire.
 *
 * If the timer is already scheduled in a run loop, it will be rescheduled.
 * Note that rescheduling is an expensive operation, though it still might be
 * preferable to reschedule instead of invalidating the timer and creating a
 * new one.
 */
@property (copy, nonatomic) OFDate *fireDate;

/*!
 * @brief Creates and schedules a new timer with the specified time interval.
 *
 * @param timeInterval The time interval after which the timer should be fired
 * @param target The target on which to call the selector
 * @param selector The selector to call on the target
 * @param repeats Whether the timer repeats after it has been executed
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476

/*!
 * @brief Fires the timer, meaning it will execute the specified selector on the
 *	  target.
 */
- (void)fire;

/*!
 * @brief Returns the next date at which the timer will fire.
 *
 * @return The next date at which the timer will fire
 */
- (OFDate *)fireDate;

/*!
 * @brief Sets the next date at which the timer will fire.
 *
 * If the timer is already scheduled in a run loop, it will be rescheduled.
 * Note that rescheduling is an expensive operation, though it still might be
 * preferable to reschedule instead of invalidating the timer and creating a
 * new one.
 *
 * @param fireDate The next date at which the timer will fire
 */
- (void)setFireDate: (OFDate *)fireDate;

/*!
 * @brief Invalidates the timer, preventing it from firing.
 */
- (void)invalidate;

#ifdef OF_HAVE_THREADS
/*!







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







454
455
456
457
458
459
460



















461
462
463
464
465
466
467

/*!
 * @brief Fires the timer, meaning it will execute the specified selector on the
 *	  target.
 */
- (void)fire;




















/*!
 * @brief Invalidates the timer, preventing it from firing.
 */
- (void)invalidate;

#ifdef OF_HAVE_THREADS
/*!

Modified src/OFURL.h from [6ad21dffff] to [cb95b72aba].

94
95
96
97
98
99
100















101
102
103
104
105
106
107
@property OF_NULLABLE_PROPERTY (readonly, copy, nonatomic) OFString *query;

/*!
 * The fragment part of the URL.
 */
@property OF_NULLABLE_PROPERTY (readonly, copy, nonatomic) OFString *fragment;
















/*!
 * @brief Creates a new URL with the specified string.
 *
 * @param string A string describing a URL
 * @return A new, autoreleased OFURL
 */
+ (instancetype)URLWithString: (OFString *)string;







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







94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
@property OF_NULLABLE_PROPERTY (readonly, copy, nonatomic) OFString *query;

/*!
 * The fragment part of the URL.
 */
@property OF_NULLABLE_PROPERTY (readonly, copy, nonatomic) OFString *fragment;

/*!
 * The URL as a string.
 */
@property (readonly, nonatomic) OFString *string;

/*!
 * The local file system representation for a file URL.
 *
 * @note This only exists for URLs with the file scheme and throws an exception
 *	 otherwise.
 *
 */
@property OF_NULLABLE_PROPERTY (readonly, nonatomic)
    OFString *fileSystemRepresentation;

/*!
 * @brief Creates a new URL with the specified string.
 *
 * @param string A string describing a URL
 * @return A new, autoreleased OFURL
 */
+ (instancetype)URLWithString: (OFString *)string;
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
 * @param isDirectory Whether the path is a directory, in which case a slash is
 *		      appened if there is no slash yet
 * @return An Initialized OFURL
 */
+ (instancetype)fileURLWithPath: (OFString *)path
		    isDirectory: (bool)isDirectory;
#endif

/*!
 * @brief Returns the URL as a string.
 *
 * @return The URL as a string
 */
- (OFString *)string;

/*!
 * @brief Returns the local file system representation for a file URL.
 *
 * This only exists for URLs with the file scheme and throws an exception
 * otherwise.
 *
 * @return The local file system representation for a file URL
 */
- (nullable OFString *)fileSystemRepresentation;
@end

OF_ASSUME_NONNULL_END

#import "OFMutableURL.h"







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<





198
199
200
201
202
203
204

















205
206
207
208
209
 * @param isDirectory Whether the path is a directory, in which case a slash is
 *		      appened if there is no slash yet
 * @return An Initialized OFURL
 */
+ (instancetype)fileURLWithPath: (OFString *)path
		    isDirectory: (bool)isDirectory;
#endif

















@end

OF_ASSUME_NONNULL_END

#import "OFMutableURL.h"

Modified src/OFXMLElement+Serialization.h from [b12f08ceb4] to [befef63d14].

24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
extern int _OFXMLElement_Serialization_reference;
#ifdef __cplusplus
}
#endif

@interface OFXMLElement (OFSerialization)
/*!
 * @brief Deserializes the receiver into an object.
 *
 * @return The deserialized object
 */
- (id)objectByDeserializing;
@end

OF_ASSUME_NONNULL_END







|
<
<

|



24
25
26
27
28
29
30
31


32
33
34
35
36
extern int _OFXMLElement_Serialization_reference;
#ifdef __cplusplus
}
#endif

@interface OFXMLElement (OFSerialization)
/*!
 * The XML element interpreted as serialization and parsed into an object.


 */
@property (readonly, nonatomic) id objectByDeserializing;
@end

OF_ASSUME_NONNULL_END

Modified src/OFXMLElement.h from [0e0aeff41f] to [38861a1e42].

55
56
57
58
59
60
61

















62
63
64
65
66
67
68
#endif

/*!
 * The default namespace for the element to be used if there is no parent.
 */
@property OF_NULLABLE_PROPERTY (copy, nonatomic) OFString *defaultNamespace;


















/*!
 * @brief Creates a new XML element with the specified name.
 *
 * @param name The name for the element
 * @return A new autoreleased OFXMLElement with the specified element name
 */
+ (instancetype)elementWithName: (OFString *)name;







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







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
#endif

/*!
 * The default namespace for the element to be used if there is no parent.
 */
@property OF_NULLABLE_PROPERTY (copy, nonatomic) OFString *defaultNamespace;

/*!
 * An array with the attributes of the element
 */
@property OF_NULLABLE_PROPERTY (readonly, nonatomic)
    OFArray OF_GENERIC(OFXMLAttribute *) *attributes;

/*!
 * An array of OFXMLNodes with all children of the element.
 */
@property OF_NULLABLE_PROPERTY (nonatomic, copy)
    OFArray OF_GENERIC(OFXMLNode *) *children;

/*!
 * All children that are elements.
 */
@property (readonly, nonatomic) OFArray OF_GENERIC(OFXMLElement *) *elements;

/*!
 * @brief Creates a new XML element with the specified name.
 *
 * @param name The name for the element
 * @return A new autoreleased OFXMLElement with the specified element name
 */
+ (instancetype)elementWithName: (OFString *)name;
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
 *
 * @param prefix The prefix for the namespace
 * @param namespace_ The namespace for which the prefix is bound
 */
- (void)bindPrefix: (OFString *)prefix
      forNamespace: (OFString *)namespace_;

/*!
 * @brief Returns an OFArray with the attributes of the element.
 *
 * @return An OFArray with the attributes of the element
 */
- (nullable OFArray OF_GENERIC(OFXMLAttribute *) *)attributes;

/*!
 * @brief Adds the specified attribute.
 *
 * If an attribute with the same name and namespace already exists, it is not
 * added.
 *
 * @param attribute The attribute to add







<
<
<
<
<
<
<







242
243
244
245
246
247
248







249
250
251
252
253
254
255
 *
 * @param prefix The prefix for the namespace
 * @param namespace_ The namespace for which the prefix is bound
 */
- (void)bindPrefix: (OFString *)prefix
      forNamespace: (OFString *)namespace_;








/*!
 * @brief Adds the specified attribute.
 *
 * If an attribute with the same name and namespace already exists, it is not
 * added.
 *
 * @param attribute The attribute to add
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
 *
 * @param attributeName The name of the attribute
 * @param attributeNS The namespace of the attribute
 */
- (void)removeAttributeForName: (OFString *)attributeName
		     namespace: (nullable OFString *)attributeNS;

/*!
 * @brief Removes all children and adds the children from the specified array.
 *
 * @param children The new children to add
 */
- (void)setChildren: (nullable OFArray OF_GENERIC(OFXMLNode *) *)children;

/*!
 * @brief Returns an array of OFXMLNodes with all children of the element.
 *
 * @return An array of OFXMLNodes with all children of the element
 */
- (nullable OFArray OF_GENERIC(OFXMLNode *) *)children;

/*!
 * @brief Adds a child to the OFXMLElement.
 *
 * @param child An OFXMLNode which is added as a child
 */
- (void)addChild: (OFXMLNode *)child;








<
<
<
<
<
<
<
<
<
<
<
<
<
<







313
314
315
316
317
318
319














320
321
322
323
324
325
326
 *
 * @param attributeName The name of the attribute
 * @param attributeNS The namespace of the attribute
 */
- (void)removeAttributeForName: (OFString *)attributeName
		     namespace: (nullable OFString *)attributeNS;















/*!
 * @brief Adds a child to the OFXMLElement.
 *
 * @param child An OFXMLNode which is added as a child
 */
- (void)addChild: (OFXMLNode *)child;

375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
 *
 * @param index The index of the child to replace
 * @param node The node to replace the child with
 */
- (void)replaceChildAtIndex: (size_t)index
		   withNode: (OFXMLNode *)node;

/*!
 * @brief Returns all children that are elements.
 *
 * @return All children that are elements
 */
- (OFArray OF_GENERIC(OFXMLElement *) *)elements;

/*!
 * @brief Returns all children that have the specified namespace.
 *
 * @return All children that have the specified namespace
 */
- (OFArray OF_GENERIC(OFXMLElement *) *)elementsForNamespace:
    (nullable OFString *)elementNS;







<
<
<
<
<
<
<







371
372
373
374
375
376
377







378
379
380
381
382
383
384
 *
 * @param index The index of the child to replace
 * @param node The node to replace the child with
 */
- (void)replaceChildAtIndex: (size_t)index
		   withNode: (OFXMLNode *)node;








/*!
 * @brief Returns all children that have the specified namespace.
 *
 * @return All children that have the specified namespace
 */
- (OFArray OF_GENERIC(OFXMLElement *) *)elementsForNamespace:
    (nullable OFString *)elementNS;

Modified src/OFXMLElement.m from [e09b35486d] to [fe80c58b63].

377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
{
	return [[_attributes copy] autorelease];
}

- (void)setChildren: (OFArray *)children
{
	OFArray *old = _children;
	_children = [children copy];
	[old release];
}

- (OFArray *)children
{
	return [[_children copy] autorelease];
}







|







377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
{
	return [[_attributes copy] autorelease];
}

- (void)setChildren: (OFArray *)children
{
	OFArray *old = _children;
	_children = [children mutableCopy];
	[old release];
}

- (OFArray *)children
{
	return [[_children copy] autorelease];
}

Modified src/OFXMLNode.h from [2716730e4a] to [54f69129e9].

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

/*!
 * @class OFXMLNode OFXMLNode.h ObjFW/OFXMLNode.h
 *
 * @brief A class which stores an XML element.
 */
@interface OFXMLNode: OFObject <OFCopying, OFSerialization>
- (instancetype)init OF_UNAVAILABLE;
- (instancetype)initWithSerialization: (OFXMLElement *)element OF_UNAVAILABLE;

/*!
 * @brief Returns the contents of the receiver as a string value.
 *

 * @return A string with the string value
 */
- (OFString *)stringValue;

/*!
 * @brief Sets the string value of the receiver to the specified string.
 *
 * For an @ref OFXMLElement, it removes all children and creates a single child
 * with the specified string value.
 *
 * @param stringValue The new string value for the node
 */
- (void)setStringValue: (OFString *)stringValue;

/*!
 * @brief Returns the contents of the receiver as a decimal value.
 *
 * @return An integer with the decimal value
 */
- (intmax_t)decimalValue;

/*!
 * @brief Returns the contents of the receiver as a hexadecimal value.
 *
 * @return An integer with the hexadecimal value
 */
- (uintmax_t)hexadecimalValue;

/*!
 * @brief Returns the contents of the receiver as a float value.
 *
 * @return A float with the float value
 */
- (float)floatValue;

/*!
 * @brief Returns the contents of the receiver as a double value.
 *
 * @return A double with the double value
 */
- (double)doubleValue;

/*!
 * @brief Returns an OFString representing the OFXMLNode as an XML string.
 *
 * @return An OFString representing the OFXMLNode as an XML string
 */
- (OFString *)XMLString;


/*!
 * @brief Returns an OFString representing the OFXMLNode as an XML string with
 *	  indentation.
 *
 * @param indentation The indentation for the XML string
 * @return An OFString representing the OFXMLNode as an XML string with







<
<
<

|

>
|

|


|
<
<
<
<
<

|


|
<
<

|


<
<
<
<
<
<
<
|
<
<

|


|
<
<

|


|
|
|
|
|
>







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

/*!
 * @class OFXMLNode OFXMLNode.h ObjFW/OFXMLNode.h
 *
 * @brief A class which stores an XML element.
 */
@interface OFXMLNode: OFObject <OFCopying, OFSerialization>



/*!
 * The contents of the node as a string value.
 *
 * For an @ref OFXMLElement, setting it removes all children and creates a
 * single child with the specified string value.
 */
@property (nonatomic, copy) OFString *stringValue;

/*!
 * The contents of the receiver as a decimal value.





 */
@property (readonly, nonatomic) intmax_t decimalValue;

/*!
 * The contents of the receiver as a hexadecimal value.


 */
@property (readonly, nonatomic) uintmax_t hexadecimalValue;

/*!







 * The contents of the receiver as a float value.


 */
@property (readonly, nonatomic) float floatValue;

/*!
 * The contents of the receiver as a double value.


 */
@property (readonly, nonatomic) double doubleValue;

/*!
 * A string representing the node as an XML string.
 */
@property (readonly, nonatomic) OFString *XMLString;

- (instancetype)init OF_UNAVAILABLE;
- (instancetype)initWithSerialization: (OFXMLElement *)element OF_UNAVAILABLE;

/*!
 * @brief Returns an OFString representing the OFXMLNode as an XML string with
 *	  indentation.
 *
 * @param indentation The indentation for the XML string
 * @return An OFString representing the OFXMLNode as an XML string with

Modified src/OFXMLParser.h from [789b07e235] to [42011eb439].

175
176
177
178
179
180
181










182
183
184
185
186
187
188

/*!
 * The delegate that is used by the XML parser.
 */
@property OF_NULLABLE_PROPERTY (assign, nonatomic)
    id <OFXMLParserDelegate> delegate;











/*!
 * The depth limit for the XML parser.
 *
 * If the depth limit is exceeded, an OFMalformedXMLException is thrown.
 *
 * The default is 32. 0 means unlimited (insecure!).
 */







>
>
>
>
>
>
>
>
>
>







175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198

/*!
 * The delegate that is used by the XML parser.
 */
@property OF_NULLABLE_PROPERTY (assign, nonatomic)
    id <OFXMLParserDelegate> delegate;

/*!
 * The current line number.
 */
@property (readonly, nonatomic) size_t lineNumber;

/*!
 * @return Whether the XML parser has finished parsing.
 */
@property (readonly, nonatomic) bool hasFinishedParsing;

/*!
 * The depth limit for the XML parser.
 *
 * If the depth limit is exceeded, an OFMalformedXMLException is thrown.
 *
 * The default is 32. 0 means unlimited (insecure!).
 */
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
/*!
 * @brief Parses the specified file.
 *
 * @param path The path to the file to parse
*/
- (void)parseFile: (OFString *)path;
#endif

/*!
 * @brief Returns the current line number.
 *
 * @return The current line number
 */
- (size_t)lineNumber;

/*!
 * @brief Returns whether the XML parser has finished parsing.
 *
 * @return Whether the XML parser has finished parsing
 */
- (bool)hasFinishedParsing;
@end

OF_ASSUME_NONNULL_END







<
<
<
<
<
<
<
<
<
<
<
<
<
<



232
233
234
235
236
237
238














239
240
241
/*!
 * @brief Parses the specified file.
 *
 * @param path The path to the file to parse
*/
- (void)parseFile: (OFString *)path;
#endif














@end

OF_ASSUME_NONNULL_END

Modified src/OFZIPArchive.h from [f753feb424] to [29c18aa319].

51
52
53
54
55
56
57











58
59
60
61
62
63
64
}

/*!
 * The archive comment.
 */
@property OF_NULLABLE_PROPERTY (copy, nonatomic) OFString *archiveComment;












/*!
 * @brief Creates a new OFZIPArchive object with the specified stream.
 *
 * @param stream A stream from which the ZIP archive will be read.
 *		 For read and append mode, this needs to be an OFSeekableStream.
 * @param mode The mode for the ZIP file. Valid modes are "r" for reading,
 *	       "w" for creating a new file and "a" for appending to an existing







>
>
>
>
>
>
>
>
>
>
>







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
}

/*!
 * The archive comment.
 */
@property OF_NULLABLE_PROPERTY (copy, nonatomic) OFString *archiveComment;

/*!
 * The entries in the central directory of the archive as an array of objects
 * of class @ref OFZIPArchiveEntry.
 *
 * The objects of the array have the same order as the entries in the central
 * directory, which does not need to be the order in which the actual files are
 * stored.
 */
@property (readonly, nonatomic)
    OFArray OF_GENERIC(OFZIPArchiveEntry *) *entries;

/*!
 * @brief Creates a new OFZIPArchive object with the specified stream.
 *
 * @param stream A stream from which the ZIP archive will be read.
 *		 For read and append mode, this needs to be an OFSeekableStream.
 * @param mode The mode for the ZIP file. Valid modes are "r" for reading,
 *	       "w" for creating a new file and "a" for appending to an existing
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
 *	       archive.
 * @return An initialized OFZIPArchive
 */
- (instancetype)initWithPath: (OFString *)path
			mode: (OFString *)mode;
#endif

/*!
 * @brief Returns the entries of the central directory of the archive as an
 * 	  array of objects of class @ref OFZIPArchiveEntry.
 *
 * The objects of the array have the same order as the entries in the central
 * directory, which does not need to be the order in which the actual files are
 * stored.
 *
 * @return The entries of the central directory of the archive as an array
 */
- (OFArray OF_GENERIC(OFZIPArchiveEntry *) *)entries;

/*!
 * @brief Returns a stream for reading the specified file from the archive.
 *
 * @note This method is only available in read mode.
 *
 * @warning Calling @ref streamForReadingFile: will invalidate all streams
 *	    previously returned by @ref streamForReadingFile: or







<
<
<
<
<
<
<
<
<
<
<
<







120
121
122
123
124
125
126












127
128
129
130
131
132
133
 *	       archive.
 * @return An initialized OFZIPArchive
 */
- (instancetype)initWithPath: (OFString *)path
			mode: (OFString *)mode;
#endif













/*!
 * @brief Returns a stream for reading the specified file from the archive.
 *
 * @note This method is only available in read mode.
 *
 * @warning Calling @ref streamForReadingFile: will invalidate all streams
 *	    previously returned by @ref streamForReadingFile: or