Move auth and bound handling to delegate.

This commit is contained in:
Jonathan Schleifer 2011-03-21 15:44:42 +01:00
parent b6314ccbc9
commit 4eb4d6bc9c
3 changed files with 40 additions and 13 deletions

View file

@ -32,13 +32,16 @@
@protocol XMPPConnectionDelegate
@optional
- (void)connectionWasClosed: (XMPPConnection*)conn;
- (void)connectionWasAuthenticated: (XMPPConnection*)conn;
- (void)connection: (XMPPConnection*)conn
wasBoundToJID: (XMPPJID*)jid;
- (void)connection: (XMPPConnection*)conn
didReceiveIQ: (XMPPIQ*)iq;
- (void)connection: (XMPPConnection*)conn
didReceivePresence: (XMPPPresence*)pres;
- (void)connection: (XMPPConnection*)conn
didReceiveMessage: (XMPPMessage*)msg;
- (void)connectionWasClosed: (XMPPConnection*)conn;
@end
/**
@ -64,7 +67,7 @@
short port;
/// Whether to use TLS
BOOL useTLS;
id <XMPPConnectionDelegate> delegate;
id <XMPPConnectionDelegate, OFObject> delegate;
XMPPAuthenticator *authModule;
}