@@ -12,17 +12,12 @@ * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ -#include - -#include - #import "OFException.h" - -@class OFSeekableStream; +#import "OFSeekableStream.h" /*! * @class OFSeekFailedException \ * OFSeekFailedException.h ObjFW/OFSeekFailedException.h * @@ -29,17 +24,17 @@ * @brief An exception indicating that seeking in a stream failed. */ @interface OFSeekFailedException: OFException { OFSeekableStream *_stream; - off_t _offset; + of_offset_t _offset; int _whence, _errNo; } #ifdef OF_HAVE_PROPERTIES @property (readonly, retain) OFSeekableStream *stream; -@property (readonly) off_t offset; +@property (readonly) of_offset_t offset; @property (readonly) int whence, errNo; #endif /*! * @brief Creates a new, autoreleased seek failed exception. @@ -48,11 +43,11 @@ * @param offset The offset to which seeking failed * @param whence To what the offset is relative * @return A new, autoreleased seek failed exception */ + (instancetype)exceptionWithStream: (OFSeekableStream*)stream - offset: (off_t)offset + offset: (of_offset_t)offset whence: (int)whence; /*! * @brief Initializes an already allocated seek failed exception. * @@ -60,11 +55,11 @@ * @param offset The offset to which seeking failed * @param whence To what the offset is relative * @return An initialized seek failed exception */ - initWithStream: (OFSeekableStream*)stream - offset: (off_t)offset + offset: (of_offset_t)offset whence: (int)whence; /*! * @brief Returns the stream for which seeking failed. * @@ -75,11 +70,11 @@ /*! * @brief Returns the offset to which seeking failed. * * @return The offset to which seeking failed */ -- (off_t)offset; +- (of_offset_t)offset; /*! * @brief Returns to what the offset is relative. * * @return To what the offset is relative