28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
+
-
+
+
+
|
@class XMPPIQ;
@class XMPPMessage;
@class XMPPPresence;
@class XMPPAuthenticator;
@protocol XMPPConnectionDelegate
@optional
- (void)connectionWasAuthenticated: (XMPPConnection*)conn;
- (void)connectionWasClosed: (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
/**
* \brief A class which abstracts a connection to an XMPP service.
*/
@interface XMPPConnection: OFObject <OFXMLParserDelegate,
OFXMLElementBuilderDelegate>
|
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
-
+
|
OFString *resource;
/// The JID bound to this connection (this is determined by the server)
XMPPJID *JID;
/// The port to connect to
short port;
/// Whether to use TLS
BOOL useTLS;
id <XMPPConnectionDelegate> delegate;
id <XMPPConnectionDelegate, OFObject> delegate;
XMPPAuthenticator *authModule;
}
@property (copy) OFString *username;
@property (copy) OFString *password;
@property (copy) OFString *server;
@property (copy) OFString *resource;
|