Index: src/OFApplication.h ================================================================== --- src/OFApplication.h +++ src/OFApplication.h @@ -43,13 +43,11 @@ * @brief A method which is called when the application was initialized and is * running now. */ - (void)applicationDidFinishLaunching; -#ifdef OF_HAVE_OPTIONAL_PROTOCOLS @optional -#endif /*! * @brief A method which is called when the application will terminate. */ - (void)applicationWillTerminate; @@ -220,13 +218,10 @@ * @param status The status with which the application will terminate */ - (void)terminateWithStatus: (int)status OF_NO_RETURN; @end -@interface OFObject (OFApplicationDelegate) -@end - #ifdef __cplusplus extern "C" { #endif extern int of_application_main(int *_Nonnull, char *_Nonnull *_Nonnull[], Class); Index: src/OFHTTPClient.h ================================================================== --- src/OFHTTPClient.h +++ src/OFHTTPClient.h @@ -34,13 +34,11 @@ * @protocol OFHTTPClientDelegate OFHTTPClient.h ObjFW/OFHTTPClient.h * * @brief A delegate for OFHTTPClient. */ @protocol OFHTTPClientDelegate -#ifdef OF_HAVE_OPTIONAL_PROTOCOLS @optional -#endif /*! * @brief A callback which is called when an OFHTTPClient creates a socket. * * This is useful if the connection is using HTTPS and the server requires a * client certificate. This callback can then be used to tell the TLS socket @@ -149,9 +147,6 @@ * @brief Closes connections that are still open due to keep-alive. */ - (void)close; @end -@interface OFObject (OFHTTPClientDelegate) -@end - OF_ASSUME_NONNULL_END Index: src/OFHTTPServer.h ================================================================== --- src/OFHTTPServer.h +++ src/OFHTTPServer.h @@ -44,13 +44,11 @@ */ - (void)server: (OFHTTPServer*)server didReceiveRequest: (OFHTTPRequest*)request response: (OFHTTPResponse*)response; -#ifdef OF_HAVE_OPTIONAL_PROTOCOLS @optional -#endif /*! * @brief This method is called when the HTTP server's listening socket * encountered an exception. * * @param server The HTTP server which encountered an exception @@ -116,9 +114,6 @@ * finished or timed out. */ - (void)stop; @end -@interface OFObject (OFHTTPServerDelegate) -@end - OF_ASSUME_NONNULL_END Index: src/OFKernelEventObserver.h ================================================================== --- src/OFKernelEventObserver.h +++ src/OFKernelEventObserver.h @@ -34,13 +34,11 @@ * * @brief A protocol that needs to be implemented by delegates for * OFKernelEventObserver. */ @protocol OFKernelEventObserverDelegate -#ifdef OF_HAVE_OPTIONAL_PROTOCOLS @optional -#endif /*! * @brief This callback is called when an object did get ready for reading. * * @note If the object is a subclass of @ref OFStream and * @ref OFStream::tryReadLine or @ref OFStream::tryReadTillDelimiter: has @@ -213,10 +211,6 @@ * manually stop the observe running in another thread. */ - (void)cancel; @end -@interface OFObject (OFKernelEventObserverDelegate) - -@end - OF_ASSUME_NONNULL_END Index: src/OFRunLoop.h ================================================================== --- src/OFRunLoop.h +++ src/OFRunLoop.h @@ -36,10 +36,13 @@ * @class OFRunLoop OFRunLoop.h ObjFW/OFRunLoop.h * * @brief A class providing a run loop for the application and its processes. */ @interface OFRunLoop: OFObject +#ifdef OF_HAVE_SOCKETS + +#endif { OFSortedList *_timersQueue; #ifdef OF_HAVE_THREADS OFMutex *_timersQueueLock; #endif Index: src/OFTLSSocket.h ================================================================== --- src/OFTLSSocket.h +++ src/OFTLSSocket.h @@ -26,13 +26,11 @@ * @protocol OFTLSSocketDelegate OFTLSSocket.h ObjFW/OFTLSSocket.h * * @brief A delegate for classes implementing the OFTLSSocket protocol. */ @protocol OFTLSSocketDelegate -#ifdef OF_HAVE_OPTIONAL_PROTOCOLS @optional -#endif /*! * @brief This callback is called when the TLS socket wants to know if it * should accept the received certificate. * * @note This is only used to verify certain fields of a certificate to allow Index: src/OFXMLElement.m ================================================================== --- src/OFXMLElement.m +++ src/OFXMLElement.m @@ -45,10 +45,11 @@ static Class charactersClass = Nil; static Class CDATAClass = Nil; @interface OFXMLElement_OFXMLElementBuilderDelegate: OFObject + { @public OFXMLElement *_element; } @end Index: src/OFXMLElementBuilder.h ================================================================== --- src/OFXMLElementBuilder.h +++ src/OFXMLElementBuilder.h @@ -42,14 +42,11 @@ * @param element The OFXMLElement the OFXMLElementBuilder built */ - (void)elementBuilder: (OFXMLElementBuilder*)builder didBuildElement: (OFXMLElement*)element; -#ifdef OF_HAVE_OPTIONAL_PROTOCOLS @optional -#endif - /*! * @brief This callback is called when the OFXMLElementBuilder built an * OFXMLNode which is not inside an element. * * This is usually called for comments or whitespace character data before the @@ -124,9 +121,6 @@ * @return A new, autoreleased OFXMLElementBuilder */ + (instancetype)elementBuilder; @end -@interface OFObject (OFXMLElementBuilderDelegate) -@end - OF_ASSUME_NONNULL_END Index: src/OFXMLParser.h ================================================================== --- src/OFXMLParser.h +++ src/OFXMLParser.h @@ -33,13 +33,11 @@ * @protocol OFXMLParserDelegate OFXMLParser.h ObjFW/OFXMLParser.h * * @brief A protocol that needs to be implemented by delegates for OFXMLParser. */ @protocol OFXMLParserDelegate -#ifdef OF_HAVE_OPTIONAL_PROTOCOLS @optional -#endif /*! * @brief This callback is called when the XML parser found processing * instructions. * * @param parser The parser which found processing instructions @@ -243,9 +241,6 @@ * @return Whether the XML parser has finished parsing */ - (bool)hasFinishedParsing; @end -@interface OFObject (OFXMLParserDelegate) -@end - OF_ASSUME_NONNULL_END Index: tests/OFKernelEventObserverTests.m ================================================================== --- tests/OFKernelEventObserverTests.m +++ tests/OFKernelEventObserverTests.m @@ -39,11 +39,11 @@ #define EXPECTED_EVENTS 3 static OFString *module; -@interface ObserverTest: OFObject +@interface ObserverTest: OFObject { @public TestsAppDelegate *_testsAppDelegate; OFKernelEventObserver *_observer; OFTCPSocket *_server, *_client, *_accepted; Index: tests/TestsAppDelegate.h ================================================================== --- tests/TestsAppDelegate.h +++ tests/TestsAppDelegate.h @@ -198,8 +198,9 @@ @interface TestsAppDelegate (OFXMLNodeTests) - (void)XMLNodeTests; @end -@interface TestsAppDelegate (OFXMLParserTests) +@interface TestsAppDelegate (OFXMLParserTests) + - (void)XMLParserTests; @end Index: utils/ofhttp/OFHTTP.m ================================================================== --- utils/ofhttp/OFHTTP.m +++ utils/ofhttp/OFHTTP.m @@ -47,11 +47,11 @@ #define GIBIBYTE (1024 * 1024 * 1024) #define MEBIBYTE (1024 * 1024) #define KIBIBYTE (1024) -@interface OFHTTP: OFObject +@interface OFHTTP: OFObject { OFArray OF_GENERIC(OFString*) *_URLs; size_t _URLIndex; int _errorCode; OFString *_outputPath;