Overview
Comment: | Move auth and bound handling to delegate. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
15c050df4982c7dc78bb9d431a33a0ce |
User & Date: | js on 2011-03-21 14:44:42 |
Other Links: | manifest | tags |
Context
2011-03-21
| ||
15:15 | Request session and send initial presence in tests. check-in: ae80606d3d user: js tags: trunk | |
14:44 | Move auth and bound handling to delegate. check-in: 15c050df49 user: js tags: trunk | |
13:56 | Make use of optional protocols. check-in: 57b5811d80 user: js tags: trunk | |
Changes
Modified src/XMPPConnection.h from [06bcbbdead] to [5712350844].
︙ | |||
28 29 30 31 32 33 34 | 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; |
︙ | |||
60 61 62 63 64 65 66 | 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; |
︙ |
Modified src/XMPPConnection.m from [b2823f282f] to [bdd589660a].
︙ | |||
187 188 189 190 191 192 193 | 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 | - + + | { char buf[512]; for (;;) { size_t len = [sock readNBytes: 512 intoBuffer: buf]; |
︙ | |||
262 263 264 265 266 267 268 | 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 | - + + + + + | 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]]; |
︙ | |||
309 310 311 312 313 314 315 | 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 | + - - + + + + - - + + + + - - + + | { // FIXME: More checking! if ([iq.ID isEqual: @"bind0"] && [iq.type isEqual: @"result"]) { [self _handleResourceBind: iq]; return; } if ([delegate respondsToSelector: @selector(connection:didReceiveIQ:)]) |
︙ | |||
404 405 406 407 408 409 410 | 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 | - + + + + | return; } if ([elem.name isEqual: @"success"]) { [authModule parseServerFinalMessage: [OFDataArray dataArrayWithBase64EncodedString: [elem.children.firstObject stringValue]]]; |
︙ |
Modified tests/test.m from [ddd6016310] to [8016af6ff2].
︙ | |||
101 102 103 104 105 106 107 | 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | - + + + - + + + + + + + + + + | @try { [conn handleConnection]; } @catch (id e) { of_log(@"%@", e); } } |