Make use of optional protocols.

This commit is contained in:
Jonathan Schleifer 2011-03-21 14:56:06 +01:00
parent 932d805e95
commit b6314ccbc9
2 changed files with 4 additions and 2 deletions

View file

@ -31,6 +31,7 @@
@class XMPPAuthenticator; @class XMPPAuthenticator;
@protocol XMPPConnectionDelegate @protocol XMPPConnectionDelegate
@optional
- (void)connectionWasClosed: (XMPPConnection*)conn; - (void)connectionWasClosed: (XMPPConnection*)conn;
- (void)connection: (XMPPConnection*)conn - (void)connection: (XMPPConnection*)conn
didReceiveIQ: (XMPPIQ*)iq; didReceiveIQ: (XMPPIQ*)iq;
@ -43,7 +44,8 @@
/** /**
* \brief A class which abstracts a connection to an XMPP service. * \brief A class which abstracts a connection to an XMPP service.
*/ */
@interface XMPPConnection: OFObject <OFXMLElementBuilderDelegate> @interface XMPPConnection: OFObject <OFXMLParserDelegate,
OFXMLElementBuilderDelegate>
{ {
OFTCPSocket *sock; OFTCPSocket *sock;
OFXMLParser *parser; OFXMLParser *parser;

View file

@ -32,7 +32,7 @@
#import "XMPPMessage.h" #import "XMPPMessage.h"
#import "XMPPPresence.h" #import "XMPPPresence.h"
@interface AppDelegate: OFObject <XMPPConnectionDelegate> @interface AppDelegate: OFObject <OFApplicationDelegate, XMPPConnectionDelegate>
{ {
XMPPConnection *conn; XMPPConnection *conn;
} }