ObjFW  Diff

Differences From Artifact [a50c0cfed5]:

To Artifact [52c9a087ea]:


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
@property (readonly) size_t count;
@property (readonly) size_t itemSize;
#endif

/**
 * Creates a new OFDataArray whose items all have the same size.
 *
 * \param is The size of each element in the OFDataArray
 * \return A new autoreleased OFDataArray
 */
+ dataArrayWithItemSize: (size_t)is;

/**
 * Creates a new OFDataArary with an item size of 1, containing the data of the
 * specified file.
 *
 * \param path The path of the file
 * \return A new autoreleased OFDataArray
 */
+ dataArrayWithContentsOfFile: (OFString*)path;

/**
 * Creates a new OFDataArray with an item size of 1, containing the data of the
 * Base64-encoded string.
 *
 * \param str The string with the Base64-encoded data
 * \return A new autoreleased OFDataArray
 */
+ dataArrayWithBase64EncodedString: (OFString*)str;

/**
 * Initializes an already allocated OFDataArray whose items all have the same
 * size.
 *
 * \param is The size of each element in the OFDataArray
 * \return An initialized OFDataArray
 */
- initWithItemSize: (size_t)is;

/**
 * Initializes an already allocated OFDataArray with an item size of 1,
 * containing the data of the specified file.
 *
 * \param path The path of the file
 * \return An initialized OFDataArray
 */
- initWithContentsOfFile: (OFString*)path;

/**
 * Initializes an already allocated OFDataArray with an item size of 1,
 * containing the data of the Base64-encoded string.
 *
 * \param str The string with the Base64-encoded data
 * \return A initialized OFDataArray
 */
- initWithBase64EncodedString: (OFString*)str;

/**
 * \return The number of items in the OFDataArray
 */
- (size_t)count;

/**







|


|














|


|





|


|














|


|







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
@property (readonly) size_t count;
@property (readonly) size_t itemSize;
#endif

/**
 * Creates a new OFDataArray whose items all have the same size.
 *
 * \param itemSize The size of each element in the OFDataArray
 * \return A new autoreleased OFDataArray
 */
+ dataArrayWithItemSize: (size_t)itemSize;

/**
 * Creates a new OFDataArary with an item size of 1, containing the data of the
 * specified file.
 *
 * \param path The path of the file
 * \return A new autoreleased OFDataArray
 */
+ dataArrayWithContentsOfFile: (OFString*)path;

/**
 * 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
 */
+ dataArrayWithBase64EncodedString: (OFString*)string;

/**
 * Initializes an already allocated OFDataArray whose items all have the same
 * size.
 *
 * \param itemSize The size of each element in the OFDataArray
 * \return An initialized OFDataArray
 */
- initWithItemSize: (size_t)itemSize;

/**
 * Initializes an already allocated OFDataArray with an item size of 1,
 * containing the data of the specified file.
 *
 * \param path The path of the file
 * \return An initialized OFDataArray
 */
- initWithContentsOfFile: (OFString*)path;

/**
 * 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
 */
- initWithBase64EncodedString: (OFString*)string;

/**
 * \return The number of items in the OFDataArray
 */
- (size_t)count;

/**
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
 */
- (void)addItem: (const void*)item
	atIndex: (size_t)index;

/**
 * Adds items from a C array to the OFDataArray.
 *
 * \param nitems The number of items to add
 * \param carray A C array containing the items to add
 */
- (void)addNItems: (size_t)nitems
       fromCArray: (const void*)carray;

/**
 * Adds items from a C array to the OFDataArray at the specified index.
 *
 * \param nitems The number of items to add
 * \param carray A C array containing the items to add
 * \param index The index where the items should be added
 */
- (void)addNItems: (size_t)nitems
       fromCArray: (const void*)carray
	  atIndex: (size_t)index;

/**
 * Removes the item at the specified index.
 *
 * \param index The index of the item to remove
 */
- (void)removeItemAtIndex: (size_t)index;

/**
 * Removes the specified amount of items from the end of the OFDataArray.
 *
 * \param nitems The number of items to remove
 */
- (void)removeNItems: (size_t)nitems;

/**
 * Removes the specified amount of items at the specified index.
 *
 * \param nitems The number of items to remove
 * \param index The index at which the items are removed
 */
- (void)removeNItems: (size_t)nitems
	     atIndex: (size_t)index;

/**
 * \return A string containing the data in Base64 encoding
 */
- (OFString*)stringByBase64Encoding;
@end







|
|

|
|




|
|


|
|












|

|




|


|







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
 */
- (void)addItem: (const void*)item
	atIndex: (size_t)index;

/**
 * Adds items from a C array to the OFDataArray.
 *
 * \param nItems The number of items to add
 * \param cArray A C array containing the items to add
 */
- (void)addNItems: (size_t)nItems
       fromCArray: (const void*)cArray;

/**
 * Adds items from a C array to the OFDataArray at the specified index.
 *
 * \param nItems The number of items to add
 * \param cArray A C array containing the items to add
 * \param index The index where the items should be added
 */
- (void)addNItems: (size_t)nItems
       fromCArray: (const void*)cArray
	  atIndex: (size_t)index;

/**
 * Removes the item at the specified index.
 *
 * \param index The index of the item to remove
 */
- (void)removeItemAtIndex: (size_t)index;

/**
 * Removes the specified amount of items from the end of the OFDataArray.
 *
 * \param nItems The number of items to remove
 */
- (void)removeNItems: (size_t)nItems;

/**
 * Removes the specified amount of items at the specified index.
 *
 * \param nItems The number of items to remove
 * \param index The index at which the items are removed
 */
- (void)removeNItems: (size_t)nItems
	     atIndex: (size_t)index;

/**
 * \return A string containing the data in Base64 encoding
 */
- (OFString*)stringByBase64Encoding;
@end