Comment: | Get rid of BOOL. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
dd2c1286f96b2ffcd943efa2ddbcbfd8 |
User & Date: | js on 2013-06-23 19:57:46 |
Other Links: | manifest | tags |
2013-06-23
| ||
20:13 | Prefix *all* IVars with _. check-in: cce64dfcd6 user: js tags: trunk | |
19:57 | Get rid of BOOL. check-in: dd2c1286f9 user: js tags: trunk | |
14:19 | Adjust to reworked exception API. check-in: 543fb8b84d user: js tags: trunk | |
Modified src/XMPPAuthenticator.m from [e2fbdc8bf6] to [5bc209efe7].
︙ | |||
60 61 62 63 64 65 66 | 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 | - + - + - + - + - + - + | [_password release]; [super dealloc]; } - (void)setAuthzid: (OFString*)authzid { |
︙ |
Modified src/XMPPConnection.h from [c4469e22bb] to [0881649e7a].
︙ | |||
83 84 85 86 87 88 89 | 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | - + | /** * \brief This callback is called when the connection received an IQ stanza. * * \param connection The connection that received the stanza * \param iq The IQ stanza that was received */ |
︙ | |||
162 163 164 165 166 167 168 | 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 | - - - - - + + + + + | XMPPJID *_JID; uint16_t _port; id <XMPPStorage> _dataStorage; OFString *_language; XMPPMulticastDelegate *_delegates; OFMutableDictionary *_callbacks; XMPPAuthenticator *_authModule; |
︙ | |||
200 201 202 203 204 205 206 | 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 | - + - + - + - + | /// \brief The port to connect to @property uint16_t port; /// \brief An object for data storage, conforming to the XMPPStorage protocol @property (assign) id <XMPPStorage> dataStorage; /// \brief The socket used for the connection @property (readonly, retain) OFTCPSocket *socket; /// \brief Whether encryption is required |
︙ | |||
249 250 251 252 253 254 255 | 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 | - + | * pointer to the reason why the certificate is not valid * * \param reason A pointer to an OFString which is set to a reason in case the * certificate is not valid (otherwise, it does not touch it). * Passing NULL means the reason is not stored anywhere. * \return Whether the certificate is valid */ |
︙ | |||
286 287 288 289 290 291 292 | 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 | - + - + - + | - (OFTCPSocket*)socket; /** * \brief Returns whether encryption is encrypted. * * \return Whether encryption is encrypted */ |
︙ | |||
356 357 358 359 360 361 362 | 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 | - - + + | - (XMPPJID*)JID; - (void)setPort: (uint16_t)port; - (uint16_t)port; - (void)setDataStorage: (id <XMPPStorage>)dataStorage; - (id <XMPPStorage>)dataStorage; - (void)setLanguage: (OFString*)language; - (OFString*)language; |
︙ |
Modified src/XMPPConnection.m from [8415025e4d] to [0ccfb1340e].
︙ | |||
104 105 106 107 108 109 110 | 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 | - + - - | { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; [connection connect]; [self performSelector: @selector(didConnect) onThread: sourceThread |
︙ | |||
305 306 307 308 309 310 311 | 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 | - + - + - + - + | - (OFString*)password { return [[_password copy] autorelease]; } - (void)setPrivateKeyFile: (OFString*)privateKeyFile { |
︙ | |||
393 394 395 396 397 398 399 | 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 | - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + | [[[[XMPPConnection_ConnectThread alloc] initWithSourceThread: [OFThread currentThread] connection: self] autorelease] start]; [pool release]; } |
︙ | |||
719 720 721 722 723 724 725 | 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 | - + - - + + | [_socket writeFormat: @"<?xml version='1.0'?>\n" @"<stream:stream to='%@' " @"xmlns='" XMPP_NS_CLIENT @"' " @"xmlns:stream='" XMPP_NS_STREAM @"' %@" @"version='1.0'>", _domain, langString]; |
︙ | |||
889 890 891 892 893 894 895 | 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 | - + | [newSock setCertificateFile: _certificateFile]; [newSock setPrivateKeyFile: _privateKeyFile]; [newSock setPrivateKeyPassphrase: _privateKeyPassphrase]; [newSock startTLS]; [_socket release]; _socket = newSock; |
︙ | |||
958 959 960 961 962 963 964 | 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 | - + | } assert(0); } - (void)XMPP_handleIQ: (XMPPIQ*)iq { |
︙ | |||
1019 1020 1021 1022 1023 1024 1025 | 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 | - + - + | if (_encryptionRequired && !_encrypted) /* TODO: Find/create an exception to throw here */ @throw [OFException exception]; if ([element elementForName: @"ver" namespace: XMPP_NS_ROSTERVER] != nil) |
︙ | |||
1046 1047 1048 1049 1050 1051 1052 | 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 | - + - + - + | if ([mechanisms containsObject: @"SCRAM-SHA-1-PLUS"]) { _authModule = [[XMPPSCRAMAuth alloc] initWithAuthcid: _username password: _password connection: self hash: [OFSHA1Hash class] |
︙ | |||
1252 1253 1254 1255 1256 1257 1258 | 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 | - + - + | - (id <XMPPStorage>)dataStorage { return _dataStorage; } - (void)setLanguage: (OFString*)language { |
︙ |
Modified src/XMPPContact.m from [fc587e181a] to [7146d5897e].
︙ | |||
44 45 46 47 48 49 50 | 44 45 46 47 48 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 101 102 103 104 | - + - + - + - + - + - + | [_presences release]; [super dealloc]; } - (XMPPRosterItem*)rosterItem { |
Modified src/XMPPContactManager.m from [0337e14b25] to [9764686bc1].
︙ | |||
82 83 84 85 86 87 88 | 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | - + | - (void)removeDelegate: (id <XMPPContactManagerDelegate>)delegate { [_delegates removeDelegate: delegate]; } - (OFDictionary*)contacts { |
︙ |
Modified src/XMPPDiscoEntity.m from [3e8f059c34] to [f5817847ca].
︙ | |||
70 71 72 73 74 75 76 | 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 | - + - + | [_discoNodes release]; [super dealloc]; } - (OFDictionary*)discoNodes; { |
︙ | |||
117 118 119 120 121 122 123 | 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 142 143 144 145 146 147 148 149 150 151 152 | - + - + - + | - (void)connection: (XMPPConnection*)connection wasBoundToJID: (XMPPJID*)JID { _JID = [JID copy]; } |
︙ | |||
163 164 165 166 167 168 169 | 163 164 165 166 167 168 169 170 171 172 173 174 175 | - + - + | connection: connection]; XMPPDiscoNode *responder = [_discoNodes objectForKey: node]; if (responder != nil) return [responder XMPP_handleInfoIQ: IQ connection: connection]; |
Modified src/XMPPDiscoIdentity.m from [16fe7db118] to [0b7603d5d7].
︙ | |||
87 88 89 90 91 92 93 | 87 88 89 90 91 92 93 94 95 96 97 98 99 100 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 | - + - + - + - + - + - + - + - + | [_type release]; [super dealloc]; } - (OFString*)category { |
︙ |
Modified src/XMPPDiscoNode.h from [7742e7e268] to [0a98f21b19].
︙ | |||
124 125 126 127 128 129 130 | 124 125 126 127 128 129 130 131 132 133 134 135 | - + - + | - (XMPPJID*)JID; - (OFString*)node; - (OFSortedList*)identities; - (OFSortedList*)features; - (OFDictionary*)childNodes; |
Modified src/XMPPDiscoNode.m from [bd94402de0] to [443ba32ad2].
︙ | |||
90 91 92 93 94 95 96 | 90 91 92 93 94 95 96 97 98 99 100 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 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 | - + - + - + - + - + - + - + - + | [_childNodes release]; [super dealloc]; } - (XMPPJID*)JID { |
︙ | |||
173 174 175 176 177 178 179 | 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 | - + - + | stringValue: [child name]]; [response addChild: item]; } [connection sendStanza: resultIQ]; |
︙ | |||
219 220 221 222 223 224 225 | 219 220 221 222 223 224 225 226 227 228 | - + | [featureElement addAttributeWithName: @"var" stringValue: feature]; [response addChild: featureElement]; } [connection sendStanza: resultIQ]; |
Modified src/XMPPFileStorage.m from [e283a67940] to [b9ae4e6e80].
︙ | |||
150 151 152 153 154 155 156 | 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 | - + - + - + | string = [self XMPP_objectForPath: path]; [pool release]; return string; } |
︙ |
Modified src/XMPPJID.m from [9c61bb91d6] to [caa5a8f132].
︙ | |||
227 228 229 230 231 232 233 | 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 | - + - + - - + + - - + - + - + | } - (bool)isEqual: (id)object { XMPPJID *JID; if (object == self) |
︙ |
Modified src/XMPPMulticastDelegate.h from [6630339e62] to [262039b6d3].
︙ | |||
48 49 50 51 52 53 54 | 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | - + - + | /** * \brief Broadcasts a selector with an object to all registered delegates. * * \param selector The selector to broadcast * \param object The object to broadcast */ |
Modified src/XMPPMulticastDelegate.m from [3c26c3b049] to [b067f77954].
︙ | |||
66 67 68 69 70 71 72 | 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 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 | - + - + - + - + - + - + | continue; [_delegates removeItemAtIndex: i]; return; } } |
︙ |
Modified src/XMPPPresence.m from [71bd226691] to [84efc4167a].
︙ | |||
146 147 148 149 150 151 152 | 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 | - + - + | [self removeChild: oldShow]; if (show != nil) [self addChild: [OFXMLElement elementWithName: @"show" namespace: XMPP_NS_CLIENT stringValue: show]]; |
︙ | |||
194 195 196 197 198 199 200 | 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 | - + | OFString* priority_s = [OFString stringWithFormat: @"%" @PRId8, [priority int8Value]]; [self addChild: [OFXMLElement elementWithName: @"priority" namespace: XMPP_NS_CLIENT stringValue: priority_s]]; |
︙ |
Modified src/XMPPRoster.h from [d21cceae6c] to [cd389fa1d0].
︙ | |||
68 69 70 71 72 73 74 | 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | - + | <XMPPConnectionDelegate> #endif { XMPPConnection *_connection; OFMutableDictionary *_rosterItems; XMPPMulticastDelegate *_delegates; id <XMPPStorage> _dataStorage; |
︙ |
Modified src/XMPPRoster.m from [265f350014] to [3142167b8a].
︙ | |||
73 74 75 76 77 78 79 | 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 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 | - + + - + - + - + - + | } - (void)requestRoster { XMPPIQ *iq; OFXMLElement *query; |
︙ | |||
139 140 141 142 143 144 145 | 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 | - + | [_dataStorage setStringValue: ver forPath: @"roster.ver"]; [_dataStorage save]; } [connection sendStanza: [iq resultIQ]]; |
︙ |
Modified src/XMPPRosterItem.m from [aca510ff6a] to [78eee45854].
︙ | |||
67 68 69 70 71 72 73 | 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 101 102 103 104 105 106 107 108 109 110 111 | - + - + - + - + - + - + - + - + | return [OFString stringWithFormat: @"<XMPPRosterItem, JID=%@, name=%@, " @"subscription=%@, groups=%@>", _JID, _name, _subscription, _groups]; } - (void)setJID: (XMPPJID*)JID { |
Modified src/XMPPSCRAMAuth.h from [04e3d7ee03] to [b0a08a1248].
︙ | |||
31 32 33 34 35 36 37 | 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 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 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 | - - + + - + - + - + - + | { Class _hashType; OFString *_cNonce; OFString *_GS2Header; OFString *_clientFirstMessageBare; OFDataArray *_serverSignature; XMPPConnection *_connection; |
Modified src/XMPPSCRAMAuth.m from [764a5f4df5] to [5849c66f1f].
︙ | |||
38 39 40 41 42 43 44 | 38 39 40 41 42 43 44 45 46 47 48 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 | - + - + - + - + | #define HMAC_OPAD 0x5c @implementation XMPPSCRAMAuth + SCRAMAuthWithAuthcid: (OFString*)authcid password: (OFString*)password connection: (XMPPConnection*)connection hash: (Class)hash |
︙ | |||
150 151 152 153 154 155 156 | 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 | - + | /* New authentication attempt, reset status */ [_cNonce release]; _cNonce = nil; [_GS2Header release]; _GS2Header = nil; [_serverSignature release]; _serverSignature = nil; |
︙ | |||
386 387 388 389 390 391 392 | 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 | - + | if ([mess hasPrefix: @"v="]) { if (![value isEqual: [_serverSignature stringByBase64Encoding]]) @throw [XMPPAuthFailedException exceptionWithConnection: nil reason: @"Received wrong " @"ServerSignature"]; |
︙ |
Modified src/XMPPSRVLookup.h from [df58ba3514] to [648af96410].
︙ | |||
82 83 84 85 86 87 88 | 82 83 84 85 86 87 88 89 90 91 92 93 | - + | @end @interface XMPPSRVEnumerator: OFEnumerator { OFList *list; of_list_object_t *listIter; OFList *subListCopy; |
Modified src/XMPPSRVLookup.m from [54b7d6a8f6] to [0f6eec9046].
︙ | |||
154 155 156 157 158 159 160 | 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 | - + | - (uint16_t)port { return _port; } - (OFString*)target { |
︙ | |||
191 192 193 194 195 196 197 | 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 | - + | [_domain release]; [super dealloc]; } - (OFString*)domain; { |
︙ | |||
362 363 364 365 366 367 368 | 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 | - + - + | if ([subListCopy count] == 0) { [subListCopy release]; subListCopy = nil; listIter = listIter->next; if (listIter == NULL) |
Modified src/XMPPStorage.h from [8671f67e66] to [4e3fe503e3].
︙ | |||
16 17 18 19 20 21 22 | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | - + - + - + | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ |
︙ |
Modified tests/test.m from [346e30a037] to [7d532cb80f].
︙ | |||
149 150 151 152 153 154 155 | 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 | - + | } - (void)connection: (XMPPConnection*)conn_ wasBoundToJID: (XMPPJID*)jid { of_log(@"Bound to JID: %@", [jid fullJID]); of_log(@"Supports SM: %@", |
︙ | |||
240 241 242 243 244 245 246 | 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 | - + | - (void)roster: (XMPPRoster*)roster_ didReceiveRosterItem: (XMPPRosterItem*)rosterItem { of_log(@"Got roster push: %@", rosterItem); } |
︙ |