116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
|
/*!
* @brief This callback is called when the connection threw an exception.
*
* @param connection The connection which threw an exception
* @param exception The exception the connection threw
*/
- (void)connection: (XMPPConnection *)connection
didThrowException: (OFException *)exception;
/*!
* @brief This callback is called when the connection is about to upgrade to
* TLS.
*
* @param connection The connection that will upgraded to TLS
*/
|
|
|
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
|
/*!
* @brief This callback is called when the connection threw an exception.
*
* @param connection The connection which threw an exception
* @param exception The exception the connection threw
*/
- (void)connection: (XMPPConnection *)connection
didThrowException: (id)exception;
/*!
* @brief This callback is called when the connection is about to upgrade to
* TLS.
*
* @param connection The connection that will upgraded to TLS
*/
|
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
|
/*!
* @brief A class which abstracts a connection to an XMPP service.
*/
@interface XMPPConnection: OFObject <OFXMLParserDelegate,
OFXMLElementBuilderDelegate>
{
id _socket;
OFXMLParser *_parser, *_oldParser;
OFXMLElementBuilder *_elementBuilder, *_oldElementBuilder;
OFString *_username, *_password, *_server, *_resource;
OFString *_privateKeyFile, *_certificateFile;
const char *_privateKeyPassphrase;
OFString *_domain, *_domainToASCII;
XMPPJID *_JID;
|
|
|
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
|
/*!
* @brief A class which abstracts a connection to an XMPP service.
*/
@interface XMPPConnection: OFObject <OFXMLParserDelegate,
OFXMLElementBuilderDelegate>
{
OF_KINDOF(OFTCPSocket *) _socket;
OFXMLParser *_parser, *_oldParser;
OFXMLElementBuilder *_elementBuilder, *_oldElementBuilder;
OFString *_username, *_password, *_server, *_resource;
OFString *_privateKeyFile, *_certificateFile;
const char *_privateKeyPassphrase;
OFString *_domain, *_domainToASCII;
XMPPJID *_JID;
|
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
|
* An object for data storage, conforming to the XMPPStorage protocol.
*/
@property OF_NULLABLE_PROPERTY (nonatomic, assign) id <XMPPStorage> dataStorage;
/*!
* The socket used for the connection.
*/
@property (readonly, nonatomic) OFTCPSocket *socket;
/*!
* Whether encryption is required.
*/
@property (nonatomic) bool encryptionRequired;
/*!
|
|
|
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
|
* An object for data storage, conforming to the XMPPStorage protocol.
*/
@property OF_NULLABLE_PROPERTY (nonatomic, assign) id <XMPPStorage> dataStorage;
/*!
* The socket used for the connection.
*/
@property (readonly, nonatomic) OF_KINDOF(OFTCPSocket *) socket;
/*!
* Whether encryption is required.
*/
@property (nonatomic) bool encryptionRequired;
/*!
|