49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
*/
@interface XMPPConnection: OFObject <OFXMLParserDelegate,
OFXMLElementBuilderDelegate>
{
OFTCPSocket *sock;
OFXMLParser *parser;
OFXMLElementBuilder *elementBuilder;
/// The username to connect with
OFString *username;
/// The password to connect with
OFString *password;
/// The server to connect to
OFString *server;
/// The resource to connect with
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, OFObject> delegate;
XMPPAuthenticator *authModule;
BOOL needsSession;
}
@property (copy) OFString *username;
@property (copy) OFString *password;
@property (copy) OFString *server;
@property (copy) OFString *resource;
@property (copy, readonly) XMPPJID *JID;
@property (assign) short port;
@property (assign) BOOL useTLS;
@property (retain) id <XMPPConnectionDelegate> delegate;
/**
* Connects to the XMPP service.
*/
- (void)connect;
/**
* Starts a loop handling incomming data.
*/
- (void)handleConnection;
/**
* Sends an OFXMLElement, usually an XMPPStanza.
*
* \param elem The element to send
*/
- (void)sendStanza: (OFXMLElement*)elem;
@end
|
<
|
<
<
<
<
<
<
<
<
|
>
>
|
<
<
<
|
>
>
>
>
>
>
>
|
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
*/
@interface XMPPConnection: OFObject <OFXMLParserDelegate,
OFXMLElementBuilderDelegate>
{
OFTCPSocket *sock;
OFXMLParser *parser;
OFXMLElementBuilder *elementBuilder;
OFString *username, *password, *server, *resource;
XMPPJID *JID;
uint16_t port;
/// Whether to use TLS
BOOL useTLS;
id <XMPPConnectionDelegate, OFObject> delegate;
XMPPAuthenticator *authModule;
BOOL needsSession;
unsigned int lastID;
OFString *bindID, *sessionID;
}
@property (copy) OFString *username, *password, *server, *resource;
@property (copy, readonly) XMPPJID *JID;
@property (assign) uint16_t port;
@property (assign) BOOL useTLS;
@property (retain) id <XMPPConnectionDelegate> delegate;
/**
* Connects to the XMPP service.
*/
- (void)connect;
/**
* Starts a loop handling incomming data.
*/
- (void)handleConnection;
/**
* Sends an OFXMLElement, usually an XMPPStanza.
*
* \param elem The element to send
*/
- (void)sendStanza: (OFXMLElement*)elem;
/**
* Generates a new, unique stanza ID.
*
* \return A new, generated, unique stanza ID.
*/
- (OFString*)generateStanzaID;
@end
|