@@ -48,13 +48,12 @@ * @param length The length of the data that has been read * @param exception An exception which occurred while reading or `nil` on * success * @return A bool whether the same block should be used for the next read */ -typedef bool (^of_stream_async_read_block_t)( - OF_KINDOF(OFStream *) _Nonnull stream, void *_Nonnull buffer, - size_t length, id _Nullable exception); +typedef bool (^of_stream_async_read_block_t)(OFStream *_Nonnull stream, + void *_Nonnull buffer, size_t length, id _Nullable exception); /*! * @brief A block which is called when a line was read asynchronously from a * stream. * @@ -63,13 +62,12 @@ * occurred * @param exception An exception which occurred while reading or `nil` on * success * @return A bool whether the same block should be used for the next read */ -typedef bool (^of_stream_async_read_line_block_t)( - OF_KINDOF(OFStream *) _Nonnull stream, OFString *_Nullable line, - id _Nullable exception); +typedef bool (^of_stream_async_read_line_block_t)(OFStream *_Nonnull stream, + OFString *_Nullable line, id _Nullable exception); /*! * @brief A block which is called when data was written asynchronously to a * stream. * @@ -80,11 +78,11 @@ * @param exception An exception which occurred while writing or `nil` on * success * @return The data to repeat the write with or nil if it should not repeat */ typedef OFData *_Nullable (^of_stream_async_write_data_block_t)( - OF_KINDOF(OFStream *) _Nonnull stream, OFData *_Nonnull data, + OFStream *_Nonnull stream, OFData *_Nonnull data, size_t bytesWritten, id _Nullable exception); /*! * @brief A block which is called when a string was written asynchronously to a * stream. @@ -97,11 +95,11 @@ * @param exception An exception which occurred while writing or `nil` on * success * @return The string to repeat the write with or nil if it should not repeat */ typedef OFString *_Nullable (^of_stream_async_write_string_block_t)( - OF_KINDOF(OFStream *) _Nonnull stream, OFString *_Nonnull string, + OFStream *_Nonnull stream, OFString *_Nonnull string, of_string_encoding_t encoding, size_t bytesWritten, id _Nullable exception); #endif /*! * @protocol OFStreamDelegate OFStream.h ObjFW/OFStream.h @@ -118,11 +116,11 @@ * @param buffer A buffer with the data that has been read * @param length The length of the data that has been read * @param exception An exception that occurred while reading, or nil on success * @return A bool whether the read should be repeated */ -- (bool)stream: (OF_KINDOF(OFStream *))stream +- (bool)stream: (OFStream *)stream didReadIntoBuffer: (void *)buffer length: (size_t)length exception: (nullable id)exception; /*! @@ -133,11 +131,11 @@ * @param line The line which has been read or `nil` when the end of stream * occurred * @param exception An exception that occurred while reading, or nil on success * @return A bool whether the read should be repeated */ -- (bool)stream: (OF_KINDOF(OFStream *))stream +- (bool)stream: (OFStream *)stream didReadLine: (nullable OFString *)line exception: (nullable id)exception; /*! * @brief This method is called when data was written asynchronously to a @@ -149,11 +147,11 @@ * matches the length of the specified data on the * asynchronous write if no exception was encountered. * @param exception An exception that occurred while writing, or nil on success * @return The data to repeat the write with or nil if it should not repeat */ -- (nullable OFData *)stream: (OF_KINDOF(OFStream *))stream +- (nullable OFData *)stream: (OFStream *)stream didWriteData: (OFData *)data bytesWritten: (size_t)bytesWritten exception: (nullable id)exception; /*! @@ -167,11 +165,11 @@ * matches the length of the specified data on the * asynchronous write if no exception was encountered. * @param exception An exception that occurred while writing, or nil on success * @return The string to repeat the write with or nil if it should not repeat */ -- (nullable OFString *)stream: (OF_KINDOF(OFStream *))stream +- (nullable OFString *)stream: (OFStream *)stream didWriteString: (OFString *)string encoding: (of_string_encoding_t)encoding bytesWritten: (size_t)bytesWritten exception: (nullable id)exception; @end