9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
+
|
#define NS_STREAM @"http://etherx.jabber.org/streams"
@implementation XMPPConnection
@synthesize username;
@synthesize password;
@synthesize server;
@synthesize resource;
@synthesize JID;
@synthesize port;
@synthesize useTLS;
@synthesize delegate;
- init
{
self = [super init];
|
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
|
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
|
+
+
-
+
-
|
- (void)_handleResourceBind: (XMPPIQ*)iq
{
OFXMLElement *bindElem = iq.children.firstObject;
if ([bindElem.name isEqual: @"bind"] &&
[bindElem.namespace isEqual: NS_BIND]) {
OFXMLElement *jidElem = bindElem.children.firstObject;
JID = [[XMPPJID alloc] initWithString:
[jidElem.children.firstObject stringValue]];
of_log(@"Bound to JID: %@", [jidElem.children.firstObject
of_log(@"Bound to JID: %@", [JID fullJID]);
stringValue]);
}
}
- (void)_handleFeatures: (OFXMLElement*)elem
{
for (OFXMLElement *child in elem.children) {
if ([[child name] isEqual: @"mechanisms"] &&
|