ObjFW  Check-in [0c9206532f]

Overview
Comment:Make use of optional protocols, if available.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 0c9206532ffb7882b8da7f7f555b64d1413dd30fdbe2dc6eae792ccc54623380
User & Date: js on 2011-03-21 13:26:25
Other Links: manifest | tags
Context
2011-03-21
14:21
It seems id is already defined by clang and newer GCCs.
This fixes the checks for clang.
check-in: a77925dfb6 user: js tags: trunk
13:26
Make use of optional protocols, if available. check-in: 0c9206532f user: js tags: trunk
12:47
Check whether optional protocols are supported. check-in: 09a49963de user: js tags: trunk
Changes

Modified src/OFApplication.h from [b0da128322] to [2c20aa4c5b].

35
36
37
38
39
40
41



42
43
44
45
46
47
48
@protocol OFApplicationDelegate
/**
 * This method is called when the application was initialized and is running
 * now.
 */
- (void)applicationDidFinishLaunching;




/**
 * This method is called when the application will terminate.
 */
- (void)applicationWillTerminate;
@end

/**







>
>
>







35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
@protocol OFApplicationDelegate
/**
 * This method is called when the application was initialized and is running
 * now.
 */
- (void)applicationDidFinishLaunching;

#ifdef OF_HAVE_OPTIONAL_PROTOCOLS
@optional
#endif
/**
 * This method is called when the application will terminate.
 */
- (void)applicationWillTerminate;
@end

/**

Modified src/OFStreamObserver.h from [2d015e7afd] to [5875ec6cd6].

35
36
37
38
39
40
41
42


43
44
45
46
47
48
49
@class OFMutableDictionary;

/**
 * \brief A protocol that needs to be implemented by delegates for
 *	  OFStreamObserver.
 */
@protocol OFStreamObserverDelegate



/**
 * This callback is called when a stream did get ready for reading.
 *
 * \param stream The stream which did become ready for reading
 */
- (void)streamDidBecomeReadyForReading: (OFStream*)stream;








|
>
>







35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
@class OFMutableDictionary;

/**
 * \brief A protocol that needs to be implemented by delegates for
 *	  OFStreamObserver.
 */
@protocol OFStreamObserverDelegate
#ifdef OF_HAVE_OPTIONAL_PROTOCOLS
@optional
#endif
/**
 * This callback is called when a stream did get ready for reading.
 *
 * \param stream The stream which did become ready for reading
 */
- (void)streamDidBecomeReadyForReading: (OFStream*)stream;

Modified src/OFXMLElementBuilder.h from [41c4aae12f] to [e09c455358].

34
35
36
37
38
39
40



41
42
43
44
45
46
47
 *
 * \param builder The builder which built an OFXMLElement
 * \param elem The OFXMLElement the OFXMLElementBuilder built
 */
- (void)elementBuilder: (OFXMLElementBuilder*)builder
       didBuildElement: (OFXMLElement*)elem;




/**
 * This callback is called when the OFXMLElementBuilder gets a close tag which
 * does not belong there.
 *
 * Most likely, the OFXMLElementBuilder was used to build XML only of a child
 * of the root element and the root element was closed. Often the delegate is
 * set to the OFXMLElementBuilder when a certain element is found, this can be







>
>
>







34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
 *
 * \param builder The builder which built an OFXMLElement
 * \param elem The OFXMLElement the OFXMLElementBuilder built
 */
- (void)elementBuilder: (OFXMLElementBuilder*)builder
       didBuildElement: (OFXMLElement*)elem;

#ifdef OF_HAVE_OPTIONAL_PROTOCOLS
@optional
#endif
/**
 * This callback is called when the OFXMLElementBuilder gets a close tag which
 * does not belong there.
 *
 * Most likely, the OFXMLElementBuilder was used to build XML only of a child
 * of the root element and the root element was closed. Often the delegate is
 * set to the OFXMLElementBuilder when a certain element is found, this can be

Modified src/OFXMLParser.h from [17cae4fa38] to [1c3ea42498].

36
37
38
39
40
41
42



43
44
45
46
47
48
49
    OFString *entity);
#endif

/**
 * \brief A protocol that needs to be implemented by delegates for OFXMLParser.
 */
@protocol OFXMLParserDelegate



/**
 * This callback is called when the XML parser found processing instructions.
 *
 * \param parser The parser which found processing instructions
 * \param pi The processing instructions
 */
-		 (void)parser: (OFXMLParser*)parser







>
>
>







36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
    OFString *entity);
#endif

/**
 * \brief A protocol that needs to be implemented by delegates for OFXMLParser.
 */
@protocol OFXMLParserDelegate
#ifdef OF_HAVE_OPTIONAL_PROTOCOLS
@optional
#endif
/**
 * This callback is called when the XML parser found processing instructions.
 *
 * \param parser The parser which found processing instructions
 * \param pi The processing instructions
 */
-		 (void)parser: (OFXMLParser*)parser