@@ -159,11 +159,11 @@ * @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: (OFStream *)stream didWriteString: (OFString *)string - encoding: (of_string_encoding_t)encoding + encoding: (OFStringEncoding)encoding bytesWritten: (size_t)bytesWritten exception: (nullable id)exception; @end /** @@ -790,11 +790,11 @@ * @param encoding The encoding of the string to read from the stream * @param length The length (in bytes) of the string to read from the stream * @return A string with the specified length */ - (OFString *)readStringWithLength: (size_t)length - encoding: (of_string_encoding_t)encoding; + encoding: (OFStringEncoding)encoding; /** * @brief Reads until a newline, `\0` or end of stream occurs. * * @return The line that was read, autoreleased, or `nil` if the end of the @@ -808,11 +808,11 @@ * * @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 *)readLineWithEncoding: (of_string_encoding_t)encoding; +- (nullable OFString *)readLineWithEncoding: (OFStringEncoding)encoding; #ifdef OF_HAVE_SOCKETS /** * @brief Asynchronously reads until a newline, `\0`, end of stream or an * exception occurs. @@ -829,11 +829,11 @@ * @note The stream must conform to @ref OFReadyForReadingObserving in order * for this to work! * * @param encoding The encoding used by the stream */ -- (void)asyncReadLineWithEncoding: (of_string_encoding_t)encoding; +- (void)asyncReadLineWithEncoding: (OFStringEncoding)encoding; /** * @brief Asynchronously reads with the specified encoding until a newline, * `\0`, end of stream or an exception occurs. * @@ -841,11 +841,11 @@ * for this to work! * * @param encoding The encoding used by the stream * @param runLoopMode The run loop mode in which to perform the async read */ -- (void)asyncReadLineWithEncoding: (of_string_encoding_t)encoding +- (void)asyncReadLineWithEncoding: (OFStringEncoding)encoding runLoopMode: (of_run_loop_mode_t)runLoopMode; # ifdef OF_HAVE_BLOCKS /** * @brief Asynchronously reads until a newline, `\0`, end of stream or an @@ -874,11 +874,11 @@ * If the block returns true, it will be called again when the next * line has been received. If you want the next block in the queue * to handle the next line, you need to return false from the * block. */ -- (void)asyncReadLineWithEncoding: (of_string_encoding_t)encoding +- (void)asyncReadLineWithEncoding: (OFStringEncoding)encoding block: (of_stream_async_read_line_block_t)block; /** * @brief Asynchronously reads with the specified encoding until a newline, * `\0`, end of stream or an exception occurs. @@ -892,11 +892,11 @@ * If the block returns true, it will be called again when the next * line has been received. If you want the next block in the queue * to handle the next line, you need to return false from the * block. */ -- (void)asyncReadLineWithEncoding: (of_string_encoding_t)encoding +- (void)asyncReadLineWithEncoding: (OFStringEncoding)encoding runLoopMode: (of_run_loop_mode_t)runLoopMode block: (of_stream_async_read_line_block_t)block; # endif #endif @@ -916,11 +916,11 @@ * * @param encoding The encoding used by the stream * @return The line that was read, autoreleased, or `nil` if the line is not * complete yet */ -- (nullable OFString *)tryReadLineWithEncoding: (of_string_encoding_t)encoding; +- (nullable OFString *)tryReadLineWithEncoding: (OFStringEncoding)encoding; /** * @brief Reads until the specified string or `\0` is found or the end of * stream occurs. * @@ -938,11 +938,11 @@ * @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 *)readTillDelimiter: (OFString *)delimiter - encoding: (of_string_encoding_t)encoding; + encoding: (OFStringEncoding)encoding; /** * @brief Tries to reads until the specified string or `\0` is found or the end * of stream (see @ref readTillDelimiter:) and returns `nil` if not * enough data has been received yet. @@ -962,11 +962,11 @@ * @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; + encoding: (OFStringEncoding)encoding; /** * @brief Writes everything in the write buffer to the stream. */ - (void)flushWriteBuffer; @@ -1024,11 +1024,11 @@ * @param string The string which is written into the stream * @param encoding The encoding in which the string should be written to the * stream */ - (void)asyncWriteString: (OFString *)string - encoding: (of_string_encoding_t)encoding; + encoding: (OFStringEncoding)encoding; /** * @brief Asynchronously writes a string in the specified encoding into the * stream. * @@ -1039,11 +1039,11 @@ * @param encoding The encoding in which the string should be written to the * stream * @param runLoopMode The run loop mode in which to perform the async write */ - (void)asyncWriteString: (OFString *)string - encoding: (of_string_encoding_t)encoding + encoding: (OFStringEncoding)encoding runLoopMode: (of_run_loop_mode_t)runLoopMode; # ifdef OF_HAVE_BLOCKS /** * @brief Asynchronously writes data into the stream. @@ -1102,11 +1102,11 @@ * @param block The block to call when the string has been written. It should * return the string for the next write with the same callback or * nil if it should not repeat. */ - (void)asyncWriteString: (OFString *)string - encoding: (of_string_encoding_t)encoding + encoding: (OFStringEncoding)encoding block: (of_stream_async_write_string_block_t)block; /** * @brief Asynchronously writes a string in the specified encoding into the * stream. @@ -1121,11 +1121,11 @@ * @param block The block to call when the string has been written. It should * return the string for the next write with the same callback or * nil if it should not repeat. */ - (void)asyncWriteString: (OFString *)string - encoding: (of_string_encoding_t)encoding + encoding: (OFStringEncoding)encoding runLoopMode: (of_run_loop_mode_t)runLoopMode block: (of_stream_async_write_string_block_t)block; # endif #endif @@ -1341,12 +1341,11 @@ * * @param string The string from which the data is written to the stream * @param encoding The encoding in which to write the string to the stream * @return The number of bytes written */ -- (size_t)writeString: (OFString *)string - encoding: (of_string_encoding_t)encoding; +- (size_t)writeString: (OFString *)string encoding: (OFStringEncoding)encoding; /** * @brief Writes a string into the stream with a trailing newline. * * @param string The string from which the data is written to the stream @@ -1360,12 +1359,11 @@ * * @param string The string from which the data is written to the stream * @param encoding The encoding in which to write the string to the stream * @return The number of bytes written */ -- (size_t)writeLine: (OFString *)string - encoding: (of_string_encoding_t)encoding; +- (size_t)writeLine: (OFString *)string encoding: (OFStringEncoding)encoding; /** * @brief Writes a formatted string into the stream. * * See printf for the format syntax. As an addition, `%@` is available as