@@ -26,16 +26,17 @@ #import "OFStream.h" /** * \brief A stream that supports seeking. * - * IMPORTANT: If you want to subclass this, override _seekToOffset:, - * _seekForwardWithOffset: and _seekToOffsetRelativeToEnd:, but nothing else. - * Those are not defined in the headers, but do the actual work. - * OFSeekableStream uses those and makes them work together with the caching of - * OFStream. If you override these methods without the _ prefix, you *WILL* - * break caching, get broken results and seek to the wrong position! + * \note If you want to subclass this, override lowlevelSeekToOffset:, + * lowlevelSeekForwardWithOffset: and lowlevelSeekToOffsetRelativeToEnd:, + * but nothing else. Those are not defined in the headers, but do the + * actual work. OFSeekableStream uses those and makes them work together + * with the caching of OFStream. If you override these methods without + * the lowlevel prefix, you will break caching, get broken results + * and seek to the wrong position! */ @interface OFSeekableStream: OFStream /** * \brief Seeks to the specified absolute offset. * @@ -56,6 +57,42 @@ * * \param offset The offset relative to the end of the stream * \return The absolute offset */ - (off_t)seekToOffsetRelativeToEnd: (off_t)offset; + +/** + * \brief Seek the stream on the lowlevel. + * + * \warning Do not call this directly! + * + * Override this with this method with your actual seek implementation when + * subclassing! + * + * \param offset The offset to seek to + */ +- (void)lowlevelSeekToOffset: (off_t)offset; + +/** + * \brief Seek the stream on the lowlevel. + * + * \warning Do not call this directly! + * + * Override this with this method with your actual seek implementation when + * subclassing! + * + * \param offset The offset to seek forward to + */ +- (off_t)lowlevelSeekForwardWithOffset: (off_t)offset; + +/** + * \brief Seek the stream on the lowlevel. + * + * \warning Do not call this directly! + * + * Override this with this method with your actual seek implementation when + * subclassing! + * + * \param offset The offset to seek to, relative to the end + */ +- (off_t)lowlevelSeekToOffsetRelativeToEnd: (off_t)offset; @end