ObjFW  Diff

Differences From Artifact [2fa85a1a7b]:

To Artifact [7e3588642e]:


27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
 * OFBigDataArray, which allocates the memory in pages rather than in bytes.
 *
 * For security reasons, serialization and deserialization is only implemented
 * for OFDataArrays with item size 1.
 */
@interface OFDataArray: OFObject <OFCopying, OFComparing, OFSerialization>
{
	char   *data;
	size_t count;
	size_t itemSize;
}

#ifdef OF_HAVE_PROPERTIES
@property (readonly, getter=cArray) void *data;
@property (readonly) size_t count;







|







27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
 * OFBigDataArray, which allocates the memory in pages rather than in bytes.
 *
 * For security reasons, serialization and deserialization is only implemented
 * for OFDataArrays with item size 1.
 */
@interface OFDataArray: OFObject <OFCopying, OFComparing, OFSerialization>
{
	uint8_t *data;
	size_t count;
	size_t itemSize;
}

#ifdef OF_HAVE_PROPERTIES
@property (readonly, getter=cArray) void *data;
@property (readonly) size_t count;
71
72
73
74
75
76
77









78
79
80
81
82
83
84
 *	  of the specified URL.
 *
 * \param URL The URL to the contents for the OFDataArray
 * \return A new autoreleased OFDataArray
 */
+ dataArrayWithContentsOfURL: (OFURL*)URL;










/**
 * \brief Creates a new OFDataArray with an item size of 1, containing the data
 *	  of the Base64-encoded string.
 *
 * \param string The string with the Base64-encoded data
 * \return A new autoreleased OFDataArray
 */







>
>
>
>
>
>
>
>
>







71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
 *	  of the specified URL.
 *
 * \param URL The URL to the contents for the OFDataArray
 * \return A new autoreleased OFDataArray
 */
+ dataArrayWithContentsOfURL: (OFURL*)URL;

/**
 * \brief Creates a new OFDataArray with an item size of 1, containing the data
 *	  of the string representation.
 *
 * \param string The string representation of the data
 * \return A new autoreleased OFDataArray
 */
+ dataArrayWithStringRepresentation: (OFString*)string;

/**
 * \brief Creates a new OFDataArray with an item size of 1, containing the data
 *	  of the Base64-encoded string.
 *
 * \param string The string with the Base64-encoded data
 * \return A new autoreleased OFDataArray
 */
114
115
116
117
118
119
120









121
122
123
124
125
126
127
 *	  containing the data of the specified URL.
 *
 * \param URL The URL to the contents for the OFDataArray
 * \return A new autoreleased OFDataArray
 */
- initWithContentsOfURL: (OFURL*)URL;










/**
 * \brief Initializes an already allocated OFDataArray with an item size of 1,
 *	  containing the data of the Base64-encoded string.
 *
 * \param string The string with the Base64-encoded data
 * \return A initialized OFDataArray
 */







>
>
>
>
>
>
>
>
>







123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
 *	  containing the data of the specified URL.
 *
 * \param URL The URL to the contents for the OFDataArray
 * \return A new autoreleased OFDataArray
 */
- initWithContentsOfURL: (OFURL*)URL;

/**
 * \brief Initializes an already allocated OFDataArray with an item size of 1,
 *	  containing the data of the string representation.
 *
 * \param string The string representation of the data
 * \return A new autoreleased OFDataArray
 */
- initWithStringRepresentation: (OFString*)string;

/**
 * \brief Initializes an already allocated OFDataArray with an item size of 1,
 *	  containing the data of the Base64-encoded string.
 *
 * \param string The string with the Base64-encoded data
 * \return A initialized OFDataArray
 */
231
232
233
234
235
236
237







238
239
240
241
242
243
244
- (void)removeLastItem;

/**
 * \brief Removes all items.
 */
- (void)removeAllItems;








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








>
>
>
>
>
>
>







249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
- (void)removeLastItem;

/**
 * \brief Removes all items.
 */
- (void)removeAllItems;

/**
 * \brief Returns the string representation of the data array.
 *
 * \return The string representation of the data array.
 */
- (OFString*)stringRepresentation;

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