Index: src/Makefile ================================================================== --- src/Makefile +++ src/Makefile @@ -23,12 +23,12 @@ OFObject.m \ ${OFPLUGIN_M} \ OFSeekableStream.m \ OFSHA1Hash.m \ OFSocket.m \ - OFSocketObserver.m \ OFStream.m \ + OFStreamObserver.m \ OFString.m \ OFString+Hashing.m \ OFString+URLEncoding.m \ OFString+XMLEscaping.m \ OFString+XMLUnescaping.m \ Index: src/OFFile.h ================================================================== --- src/OFFile.h +++ src/OFFile.h @@ -19,11 +19,11 @@ /** * \brief A class which provides functions to read, write and manipulate files. */ @interface OFFile: OFSeekableStream { - int fd; + int fd; BOOL closable; BOOL eos; } /** Index: src/OFFile.m ================================================================== --- src/OFFile.m +++ src/OFFile.m @@ -514,10 +514,15 @@ if ((ret = lseek(fd, offset, SEEK_END)) == -1) @throw [OFSeekFailedException newWithClass: isa]; return ret; } + +- (int)fileDescriptor +{ + return fd; +} - (void)close { if (fd != -1) close(fd); Index: src/OFSocket.m ================================================================== --- src/OFSocket.m +++ src/OFSocket.m @@ -117,6 +117,11 @@ if (ioctlsocket(sock, FIONBIO, &v) == SOCKET_ERROR) @throw [OFSetOptionFailedException newWithClass: isa]; #endif } + +- (int)fileDescriptor +{ + return sock; +} @end Index: src/OFStream.h ================================================================== --- src/OFStream.h +++ src/OFStream.h @@ -303,10 +303,15 @@ * \return The number of bytes written */ - (size_t)writeFormat: (OFString*)fmt withArguments: (va_list)args; +/** + * \return The file descriptor for the stream. + */ +- (int)fileDescriptor; + /** * Closes the stream. */ - (void)close; @end Index: src/OFStream.m ================================================================== --- src/OFStream.m +++ src/OFStream.m @@ -645,12 +645,18 @@ } /* Get rid of a warning, never reached anyway */ assert(0); } + +- (int)fileDescriptor +{ + @throw [OFNotImplementedException newWithClass: isa + selector: _cmd]; +} - (void)close { @throw [OFNotImplementedException newWithClass: isa selector: _cmd]; } @end Index: tests/OFXMLElementBuilderTests.m ================================================================== --- tests/OFXMLElementBuilderTests.m +++ tests/OFXMLElementBuilderTests.m @@ -12,12 +12,13 @@ #include "config.h" #include #include -#import "OFXMLElementBuilder.h" +#import "OFXMLElement.h" #import "OFXMLParser.h" +#import "OFXMLElementBuilder.h" #import "OFAutoreleasePool.h" #import "TestsAppDelegate.h" static OFString *module = @"OFXMLElementBuilder";