Comment: | Adjust to ObjFW changes |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
2faf18cba740568fdb3ecd3cc4bb6fdf |
User & Date: | js on 2017-05-13 15:03:44 |
Other Links: | manifest | tags |
2017-07-23
| ||
11:19 | Adjust to ObjFW changes & small fixes check-in: efaee4fc4c user: js tags: trunk | |
2017-05-13
| ||
15:03 | Adjust to ObjFW changes check-in: 2faf18cba7 user: js tags: trunk | |
2017-04-30
| ||
15:04 | Fix URL in copyright header check-in: 4663b00cb4 user: js tags: trunk | |
Modified src/XMPPAuthenticator.h from [32835f9423] to [d2168a1fd5].
︙ | |||
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | 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 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 | + + - + - + - + - - + + - - - + + + - + - + + + | * 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. */ #import <ObjFW/ObjFW.h> OF_ASSUME_NONNULL_BEGIN /** * \brief A base class for classes implementing authentication mechanisms */ @interface XMPPAuthenticator: OFObject { OFString *_authzid, *_authcid, *_password; } /// \brief The authzid to get authorization for |
Modified src/XMPPAuthenticator.m from [ff883875bb] to [8f69cece0e].
︙ | |||
26 27 28 29 30 31 32 | 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | - - + + - - - + + + | #endif #import "XMPPAuthenticator.h" @implementation XMPPAuthenticator @synthesize authzid = _authzid, authcid = _authcid, password = _password; |
︙ | |||
61 62 63 64 65 66 67 | 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | - + - + | [_authzid release]; [_authcid release]; [_password release]; [super dealloc]; } |
Modified src/XMPPCallback.h from [48a5d16844] to [ee73746306].
︙ | |||
18 19 20 21 22 23 24 25 26 27 28 | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | + + - + + | * 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. */ #import <ObjFW/ObjFW.h> OF_ASSUME_NONNULL_BEGIN @class XMPPConnection; @class XMPPIQ; #ifdef OF_HAVE_BLOCKS |
︙ | |||
44 45 46 47 48 49 50 | 47 48 49 50 51 52 53 54 55 56 57 58 | - - + + + + | #endif + (instancetype)callbackWithTarget: (id)target selector: (SEL)selector; - initWithTarget: (id)target selector: (SEL)selector; |
Modified src/XMPPCallback.m from [e144c7f667] to [7b928d9476].
︙ | |||
26 27 28 29 30 31 32 | 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | + - + | #import "XMPPCallback.h" @implementation XMPPCallback #ifdef OF_HAVE_BLOCKS + (instancetype)callbackWithBlock: (xmpp_callback_block_t)block { return [[(XMPPCallback *)[self alloc] |
︙ | |||
72 73 74 75 76 77 78 | 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | - - + + - + - + | #ifdef OF_HAVE_BLOCKS [_block release]; #endif [super dealloc]; } |
Modified src/XMPPConnection.h from [d8b74359c0] to [423e3fef12].
︙ | |||
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | 23 24 25 26 27 28 29 30 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 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 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 | + + - - + + - - - - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + | */ #import <ObjFW/ObjFW.h> #import "XMPPCallback.h" #import "XMPPStorage.h" OF_ASSUME_NONNULL_BEGIN @class XMPPConnection; @class XMPPJID; @class XMPPIQ; @class XMPPMessage; @class XMPPPresence; @class XMPPAuthenticator; @class SSLSocket; @class XMPPMulticastDelegate; /** |
︙ | |||
243 244 245 246 247 248 249 | 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 | - + + | * 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 */ |
︙ | |||
265 266 267 268 269 270 271 | 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 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 | - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + | * * This is useful for handling multiple connections at once. * * \param buffer The buffer to parse * \param length The length of the buffer. If length is 0, it is assumed that * the connection was closed. */ |
Modified src/XMPPConnection.m from [26c4d1cce6] to [e5df95b15f].
︙ | |||
54 55 56 57 58 59 60 61 62 63 64 65 66 67 | 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 | + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + - - + + | #import "XMPPExceptions.h" #import "XMPPXMLElementBuilder.h" #import "namespaces.h" #import <ObjFW/macros.h> #define BUFFER_LENGTH 512 OF_ASSUME_NONNULL_BEGIN @interface XMPPConnection () - (void)XMPP_startStream; - (void)XMPP_handleStream: (OFXMLElement *)element; - (void)XMPP_handleTLS: (OFXMLElement *)element; - (void)XMPP_handleSASL: (OFXMLElement *)element; - (void)XMPP_handleStanza: (OFXMLElement *)element; - (void)XMPP_sendAuth: (OFString *)authName; - (void)XMPP_sendResourceBind; - (void)XMPP_sendStreamError: (OFString *)condition text: (nullable OFString *)text; - (void)XMPP_handleIQ: (XMPPIQ *)IQ; - (void)XMPP_handleMessage: (XMPPMessage *)message; - (void)XMPP_handlePresence: (XMPPPresence *)presence; - (void)XMPP_handleFeatures: (OFXMLElement *)element; - (void)XMPP_handleResourceBindForConnection: (XMPPConnection *)connection IQ: (XMPPIQ *)IQ; - (void)XMPP_sendSession; - (void)XMPP_handleSessionForConnection: (XMPPConnection *)connection IQ: (XMPPIQ *)IQ; - (OFString *)XMPP_IDNAToASCII: (OFString *)domain; - (XMPPMulticastDelegate *)XMPP_delegates; @end @interface XMPPConnection_ConnectThread: OFThread { OFThread *_sourceThread; XMPPConnection *_connection; } |
︙ | |||
114 115 116 117 118 119 120 | 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 | + + - + | [pool release]; return nil; } @end @implementation XMPPConnection @synthesize username = _username, resource = _resource, server = _server; @synthesize domain = _domain, password = _password, language = _language; |
︙ | |||
161 162 163 164 165 166 167 | 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 | - + | [_delegates release]; [_callbacks release]; [_authModule release]; [super dealloc]; } |
︙ | |||
187 188 189 190 191 192 193 | 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 | - - - - - - + | } } else _username = nil; [old release]; } |
︙ | |||
218 219 220 221 222 223 224 | 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 | - - - - - - + - - - - - - + | } } else _resource = nil; [old release]; } |
︙ | |||
272 273 274 275 276 277 278 | 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 | - - - - - - + | _domainToASCII = nil; } [oldDomain release]; [oldDomainToASCII release]; } |
︙ | |||
303 304 305 306 307 308 309 | 312 313 314 315 316 317 318 319 320 321 322 323 324 325 | - - - - - | } } else _password = nil; [old release]; } |
︙ | |||
378 379 380 381 382 383 384 | 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 | - + | [[[[XMPPConnection_ConnectThread alloc] initWithSourceThread: [OFThread currentThread] connection: self] autorelease] start]; [pool release]; } |
︙ | |||
400 401 402 403 404 405 406 | 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 | - + - - + + - + | [self close]; return false; } return true; } |
︙ | |||
465 466 467 468 469 470 471 | 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 | - + | } - (bool)streamOpen { return _streamOpen; } |
︙ | |||
501 502 503 504 505 506 507 | 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 | - + - + | if (!serviceSpecific && [cert hasCommonNameMatchingDomain: _domainToASCII]) return true; return false; } |
︙ | |||
541 542 543 544 545 546 547 | 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 | - + | forKey: key]; [pool release]; [self sendStanza: IQ]; } #ifdef OF_HAVE_BLOCKS |
︙ | |||
570 571 572 573 574 575 576 | 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 | - + - - - - - + + + + + - - - - + - + - - + - - + + | forKey: key]; [pool release]; [self sendStanza: IQ]; } #endif |
︙ | |||
650 651 652 653 654 655 656 | 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 | - - - - + + + + | if ([[element namespace] isEqual: XMPP_NS_STARTTLS]) [self XMPP_handleTLS: element]; if ([[element namespace] isEqual: XMPP_NS_SASL]) [self XMPP_handleSASL: element]; } |
︙ | |||
718 719 720 721 722 723 724 | 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 | - + | [_JID release]; _JID = nil; _streamOpen = _needsSession = _encrypted = false; _supportsRosterVersioning = _supportsStreamManagement = false; _lastID = 0; } |
︙ | |||
742 743 744 745 746 747 748 | 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 | - + | } [self XMPP_sendStreamError: @"unsupported-stanza-type" text: nil]; } |
︙ | |||
846 847 848 849 850 851 852 | 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 | - + | reason: reason]; return; } assert(0); } |
︙ | |||
887 888 889 890 891 892 893 | 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 | - + | if ([[element name] isEqual: @"failure"]) /* TODO: Find/create an exception to throw here */ @throw [OFException exception]; assert(0); } |
︙ | |||
935 936 937 938 939 940 941 | 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 | - + | exceptionWithConnection: self reason: [element XMLString]]; } assert(0); } |
︙ | |||
966 967 968 969 970 971 972 | 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 | - + - + - + | if (!handled && ![[IQ type] isEqual: @"error"] && ![[IQ type] isEqual: @"result"]) { [self sendStanza: [IQ errorIQWithType: @"cancel" condition: @"service-unavailable"]]; } } |
︙ | |||
1019 1020 1021 1022 1023 1024 1025 | 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 | - + | OFEnumerator *enumerator; OFXMLElement *mech; enumerator = [[mechs children] objectEnumerator]; while ((mech = [enumerator nextObject]) != nil) [mechanisms addObject: [mech stringValue]]; |
︙ | |||
1059 1060 1061 1062 1063 1064 1065 | 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 | - - + + - + | [self XMPP_sendAuth: @"PLAIN"]; return; } assert(0); } |
︙ | |||
1115 1116 1117 1118 1119 1120 1121 | 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 | - - + + - - + + - + - - + - + - + - + - - - - - + + + + + - + - - + + - - + + - + | [self sendIQ: IQ callbackTarget: self selector: @selector(XMPP_handleResourceBindForConnection: IQ:)]; } |
︙ | |||
1232 1233 1234 1235 1236 1237 1238 | 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 | - + | } - (void)removeDelegate: (id <XMPPConnectionDelegate>)delegate { [_delegates removeDelegate: delegate]; } |
Added src/XMPPContact+Private.h version [19b0cc5ea8].
Modified src/XMPPContact.h from [160c8854c7] to [3375b65268].
︙ | |||
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | 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 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | + + - + - + - - + + + - - + - - - - | * 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. */ #import <ObjFW/ObjFW.h> OF_ASSUME_NONNULL_BEGIN @class XMPPConnection; @class XMPPJID; @class XMPPRosterItem; @class XMPPMessage; @class XMPPPresence; /** * \brief A class describing a contact tracked by a XMPPContactManager */ @interface XMPPContact: OFObject { XMPPRosterItem *_rosterItem; OFMutableDictionary *_presences; XMPPJID *_lockedOnJID; } /// \brief The XMPPRosterItem corresponding to this contact |
Modified src/XMPPContact.m from [c409a8ce2b] to [f961d31c3a].
︙ | |||
18 19 20 21 22 23 24 25 26 27 28 29 30 31 | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | + | * 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. */ #import "XMPPContact.h" #import "XMPPContact+Private.h" #import "XMPPMessage.h" #import "XMPPConnection.h" @implementation XMPPContact @synthesize rosterItem = _rosterItem; @synthesize presences = _presences; |
︙ | |||
46 47 48 49 50 51 52 | 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 | - - + + - + - - + + - + - + | - (void)dealloc { [_presences release]; [super dealloc]; } |
Modified src/XMPPContactManager.h from [13b68822fb] to [ffd20ba38a].
︙ | |||
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | 22 23 24 25 26 27 28 29 30 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 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 | + + - - + + - - + + - - + + - - + + - - + + - - + + - + + - - + + - - + + + + | */ #import <ObjFW/ObjFW.h> #import "XMPPConnection.h" #import "XMPPRoster.h" OF_ASSUME_NONNULL_BEGIN @class XMPPContact; @class XMPPContactManager; @class XMPPMulticastDelegate; @class XMPPPresence; /** * \brief A protocol that should be (partially) implemented by delegates * of a XMPPContactManager */ @protocol XMPPContactManagerDelegate <OFObject> @optional /** * \brief This callback is called whenever a new contact enters the users roster * * \param manager The contact manager that added the contact * \param contact The contact that was added */ |
Modified src/XMPPContactManager.m from [3f134700d1] to [e40b256e89].
︙ | |||
17 18 19 20 21 22 23 24 | 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. */ #import "XMPPContactManager.h" #import "XMPPContact.h" |
︙ | |||
58 59 60 61 62 63 64 | 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 | - + - + - + | [_delegates release]; [_contacts release]; [super dealloc]; } |
︙ | |||
116 117 118 119 120 121 122 | 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | - - + + | [_delegates broadcastSelector: @selector(contactManager: didAddContact:) withObject: self withObject: contact]; } } |
︙ | |||
152 153 154 155 156 157 158 | 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 | - - + + | willUpdateWithRosterItem:) withObject: contact withObject: rosterItem]; [contact XMPP_setRosterItem: rosterItem]; } } |
︙ | |||
195 196 197 198 199 200 201 | 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 | - - + + | didSendPresence:) withObject: contact withObject: presence]; return; } } |
︙ |
Modified src/XMPPDiscoEntity.h from [675c041e84] to [1a213e145c].
︙ | |||
22 23 24 25 26 27 28 29 30 31 32 33 34 35 | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | + + | */ #import <ObjFW/ObjFW.h> #import "XMPPConnection.h" #import "XMPPDiscoNode.h" OF_ASSUME_NONNULL_BEGIN @class XMPPJID; /** * \brief A class representing an entity responding to Service Discovery * queries */ @interface XMPPDiscoEntity: XMPPDiscoNode <XMPPConnectionDelegate> |
︙ | |||
49 50 51 52 53 54 55 56 57 58 59 60 61 62 | 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 124 125 126 127 | + + + + + + - + - - + + + + + + + + - + - - + + - + - + + + | @property (readonly) OFDictionary *discoNodes; /** * The node advertised for the entity's capabilites. */ @property (readonly) OFString *capsNode; + (instancetype)discoNodeWithJID: (XMPPJID *)JID node: (nullable OFString *)node OF_UNAVAILABLE; + (instancetype)discoNodeWithJID: (XMPPJID *)JID node: (nullable OFString *)node name: (nullable OFString *)name OF_UNAVAILABLE; /** * \brief Creates a new autoreleased XMPPDiscoEntity with the specified * connection. * * \param connection The XMPPConnection to serve responses on. * \return A new autoreleased XMPPDiscoEntity */ |
Modified src/XMPPDiscoEntity.m from [35881ca3b2] to [f708ffe294].
︙ | |||
18 19 20 21 22 23 24 25 26 27 28 29 30 31 | 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 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 | + + - + - - + + - + + + + + + + + - - + + - + + | * 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. */ #import "XMPPDiscoEntity.h" #import "XMPPDiscoNode.h" #import "XMPPDiscoNode+Private.h" #import "XMPPDiscoIdentity.h" #import "XMPPIQ.h" #import "namespaces.h" @implementation XMPPDiscoEntity @synthesize discoNodes = _discoNodes, capsNode = _capsNode; |
︙ | |||
71 72 73 74 75 76 77 | 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | - + - + | { [_connection removeDelegate: self]; [_discoNodes release]; [super dealloc]; } |
︙ | |||
104 105 106 107 108 109 110 | 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | - - + + - - + + | [digest addItems: [hash digest] count: [OFSHA1Hash digestSize]]; return [digest stringByBase64Encoding]; } |
︙ |
Modified src/XMPPDiscoIdentity.h from [574d3c2fee] to [969a73bffe].
︙ | |||
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | 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 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 | + + - + - + - + - - - + + + - - + + + + - - - + + + - - + + + + | * 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. */ #import <ObjFW/ObjFW.h> OF_ASSUME_NONNULL_BEGIN /** * \brief A class describing a Service Discovery Identity */ @interface XMPPDiscoIdentity: OFObject <OFComparing> { OFString *_category, *_name, *_type; } /// \brief The category of the identity |
Modified src/XMPPDiscoIdentity.m from [95bd037e63] to [52a90e08e0].
︙ | |||
22 23 24 25 26 27 28 | 22 23 24 25 26 27 28 29 30 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 | - - - + + + - - + + - - - + + + - - + + - - - - - - - + - | */ #import "XMPPDiscoIdentity.h" @implementation XMPPDiscoIdentity @synthesize category = _category, name = _name, type = _type; |
︙ | |||
135 136 137 138 139 140 141 | 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 | - + | if (object == self) return OF_ORDERED_SAME; if (![object isKindOfClass: [XMPPDiscoIdentity class]]) @throw [OFInvalidArgumentException exception]; |
Added src/XMPPDiscoNode+Private.h version [e20421d02a].
Modified src/XMPPDiscoNode.h from [fa28e0da2b] to [04990bb259].
︙ | |||
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 | 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 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 124 125 126 127 | + + - + - + - + - + - + - + - - + + - - - + + + - - + + - - - + + + - + - + - + + - - + - - - | * 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. */ #import <ObjFW/ObjFW.h> OF_ASSUME_NONNULL_BEGIN @class XMPPDiscoIdentity; @class XMPPJID; /** * \brief A class describing a Service Discovery Node */ @interface XMPPDiscoNode: OFObject { XMPPJID *_JID; OFString *_node; OFString *_name; OFSortedList *_identities; OFSortedList *_features; OFMutableDictionary *_childNodes; } /// \brief The JID this node lives on |
Modified src/XMPPDiscoNode.m from [adea212c4a] to [07959d2558].
︙ | |||
17 18 19 20 21 22 23 24 25 26 27 | 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 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 | + + - - - + + - - - + + + - - + + - - - + + + | * 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. */ #import "XMPPDiscoNode.h" #import "XMPPDiscoNode+Private.h" #import "XMPPConnection.h" #import "XMPPIQ.h" #import "XMPPJID.h" #import "XMPPDiscoEntity.h" |
︙ | |||
94 95 96 97 98 99 100 | 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 | + + + + + - + - + - + - - + + | [_identities release]; [_features release]; [_childNodes release]; [super dealloc]; } - (OFDictionary *)childNodes { return [[_childNodes copy] autorelease]; } |
︙ | |||
152 153 154 155 156 157 158 | 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 | - - + + | } [connection sendStanza: resultIQ]; return true; } |
︙ |
Modified src/XMPPEXTERNALAuth.h from [87300c70b8] to [0051e84d45].
︙ | |||
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | 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 44 45 46 47 48 | + + - + + + | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #import <ObjFW/ObjFW.h> #import "XMPPAuthenticator.h" OF_ASSUME_NONNULL_BEGIN /** * \brief A class to authenticate using SASL EXTERNAL */ @interface XMPPEXTERNALAuth: XMPPAuthenticator /** * \brief Creates a new autoreleased XMPPEXTERNALAuth. * * \return A new autoreleased XMPPEXTERNALAuth */ + (instancetype)EXTERNALAuth; /** * \brief Creates a new autoreleased XMPPEXTERNALAuth with an authzid. * * \param authzid The authzid to get authorization for * \return A new autoreleased XMPPEXTERNALAuth */ |
Modified src/XMPPEXTERNALAuth.m from [4c3013d555] to [c6103d3079].
︙ | |||
29 30 31 32 33 34 35 | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | - + - + | @implementation XMPPEXTERNALAuth: XMPPAuthenticator + (instancetype)EXTERNALAuth { return [[[self alloc] initWithAuthcid: nil password: nil] autorelease]; } |
︙ |
Modified src/XMPPExceptions.h from [69b290104a] to [679b6851a0].
︙ | |||
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | 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 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 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 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 | + + - + - + + + - + + - + - + - - - + + + + + - - - + + + - + - + - - - + + + + + - - - + + + - + - + - - - + + + + + - - - + + + - + - - + + + + - - + + + + | * 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. */ #import <ObjFW/ObjFW.h> OF_ASSUME_NONNULL_BEGIN @class XMPPConnection; @class XMPPAuthenticator; /** * \brief A base class for XMPP related exceptions */ @interface XMPPException: OFException { XMPPConnection *_connection; } /// \brief The connection the exception relates to |
Modified src/XMPPExceptions.m from [d64ce8e761] to [b482b72e53].
︙ | |||
29 30 31 32 33 34 35 | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | - + - + | #import "XMPPExceptions.h" #import "XMPPConnection.h" @implementation XMPPException @synthesize connection = _connection; |
︙ | |||
64 65 66 67 68 69 70 | 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 | - - - + + + - + - - - + + + | [super dealloc]; } @end @implementation XMPPStreamErrorException @synthesize condition = _condition, reason = _reason; |
︙ | |||
103 104 105 106 107 108 109 | 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 | - + - - - + + + - + - - - + + + | { [_condition release]; [_reason release]; [super dealloc]; } |
︙ | |||
152 153 154 155 156 157 158 | 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 182 183 184 185 186 187 188 189 190 191 192 193 | - + - - - + + + - + - - - + + + | { [_profile release]; [_string release]; [super dealloc]; } |
︙ | |||
202 203 204 205 206 207 208 | 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 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 258 | - + - - + + - + - - + + - + | { [_operation release]; [_string release]; [super dealloc]; } |
Modified src/XMPPFileStorage.h from [8262bc5c51] to [7e93a8c354].
︙ | |||
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | + + + - + + + | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #import <ObjFW/OFObject.h> #import "XMPPStorage.h" OF_ASSUME_NONNULL_BEGIN @class OFMutableDictionary; @interface XMPPFileStorage: OFObject <XMPPStorage> { OFString *_file; OFMutableDictionary *_data; } - init OF_UNAVAILABLE; |
Modified src/XMPPFileStorage.m from [522ef88dbb] to [d3dafb0daf].
︙ | |||
36 37 38 39 40 41 42 | 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | - - - - - - - + - - + | #import <ObjFW/OFNotImplementedException.h> #import "XMPPFileStorage.h" @implementation XMPPFileStorage - init { |
︙ | |||
84 85 86 87 88 89 90 | 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | - + | - (void)save { [[_data messagePackRepresentation] writeToFile: _file]; } - (void)XMPP_setObject: (id)object |
︙ | |||
114 115 116 117 118 119 120 | 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 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 | - + - - - - + - - + + - + - + - + - + - + - - + + - + - - + + - + | if (object != nil) [iter setObject: object forKey: [pathComponents lastObject]]; else [iter removeObjectForKey: [pathComponents lastObject]]; } |
Modified src/XMPPIQ.h from [15421246e4] to [e565b6e506].
︙ | |||
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | 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 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 | + + - - + + - - + + - + - - - + + + - - + + + + | * 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. */ #import "XMPPStanza.h" OF_ASSUME_NONNULL_BEGIN /** * \brief A class describing an IQ stanza. */ @interface XMPPIQ: XMPPStanza /** * \brief Creates a new XMPPIQ with the specified type and ID. * * \param type The value for the stanza's type attribute * \param ID The value for the stanza's id attribute * \return A new autoreleased XMPPIQ */ |
Modified src/XMPPIQ.m from [a625c5453d] to [4202e71e12].
︙ | |||
25 26 27 28 29 30 31 | 25 26 27 28 29 30 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 | - - + + - - + + - + - - - + + + | # include "config.h" #endif #import "namespaces.h" #import "XMPPIQ.h" @implementation XMPPIQ |
︙ | |||
87 88 89 90 91 92 93 | 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | - - + + | [ret setFrom: nil]; [pool release]; return ret; } |
Modified src/XMPPJID.h from [db8b96c7e4] to [bbf76b475f].
︙ | |||
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | 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 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 | + + - + - + - + - + - + - + - + + + | * 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. */ #import <ObjFW/ObjFW.h> OF_ASSUME_NONNULL_BEGIN /** * \brief A class for easy handling of JIDs. */ @interface XMPPJID: OFObject <OFCopying> { OFString *_node, *_domain, *_resource; } /// \brief The JID's localpart |
Modified src/XMPPJID.m from [48ba6c2d57] to [bccd623ec3].
︙ | |||
29 30 31 32 33 34 35 36 37 38 39 40 | 29 30 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 | + + - + - + | #include <stringprep.h> #import "XMPPJID.h" #import "XMPPExceptions.h" @implementation XMPPJID @synthesize node = _node, domain = _domain, resource = _resource; + (instancetype)JID { return [[[self alloc] init] autorelease]; } |
︙ | |||
99 100 101 102 103 104 105 | 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 | - + | [new release]; @throw e; } return new; } |
︙ | |||
128 129 130 131 132 133 134 | 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | - - - - - - + | } @finally { free(nodepart); } [old release]; } |
︙ | |||
156 157 158 159 160 161 162 | 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 | - - - - - - + | } @finally { free(srv); } [old release]; } |
︙ | |||
190 191 192 193 194 195 196 | 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 | - - - - - - + - + - + | } @finally { free(res); } [old release]; } |
︙ |
Modified src/XMPPMessage.h from [546573fa68] to [c499d3c2dc].
︙ | |||
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 44 45 | 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 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 | + + - + - + - - + + - + - + - - + + + + | * 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. */ #import "XMPPStanza.h" OF_ASSUME_NONNULL_BEGIN /** * \brief A class describing a message stanza. */ @interface XMPPMessage: XMPPStanza /** The text content of the body of the message. */ @property (copy) OFString *body; /** * \brief Creates a new autoreleased XMPPMessage. * * \return A new autoreleased XMPPMessage */ + (instancetype)message; /** * \brief Creates a new autoreleased XMPPMessage with the specified ID. * * \param ID The value for the stanza's id attribute * \return A new autoreleased XMPPMessage */ |
Modified src/XMPPMessage.m from [19d004e57c] to [64ae4d9271].
︙ | |||
30 31 32 33 34 35 36 | 30 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 | - + - + - - + + - + - + - - + + - + - + | @implementation XMPPMessage + (instancetype)message { return [[[self alloc] init] autorelease]; } |
Modified src/XMPPMulticastDelegate.h from [9c7e2a3fbd] to [51673325c7].
︙ | |||
18 19 20 21 22 23 24 25 26 27 28 29 30 31 | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | + + | * 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. */ #import <ObjFW/OFObject.h> OF_ASSUME_NONNULL_BEGIN @class OFDataArray; /** * \brief A class to provide multiple delegates in a single class */ @interface XMPPMulticastDelegate: OFObject { |
︙ | |||
49 50 51 52 53 54 55 | 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | - + - - + + + + | /** * \brief Broadcasts a selector with an object to all registered delegates. * * \param selector The selector to broadcast * \param object The object to broadcast */ - (bool)broadcastSelector: (SEL)selector |
Modified src/XMPPPLAINAuth.h from [5dfa895145] to [3c1bd83caf].
︙ | |||
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | 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 44 45 46 47 48 49 50 51 52 53 54 55 56 | + + - - + + - - - + + + + + | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #import <ObjFW/ObjFW.h> #import "XMPPAuthenticator.h" OF_ASSUME_NONNULL_BEGIN /** * \brief A class to authenticate using SASL PLAIN */ @interface XMPPPLAINAuth: XMPPAuthenticator /** * \brief Creates a new autoreleased XMPPPLAINAuth with an authcid and password. * * \param authcid The authcid to authenticate with * \param password The password to authenticate with * \return A new autoreleased XMPPPLAINAuth */ |
Modified src/XMPPPLAINAuth.m from [9d4992173d] to [9f0783c62c].
︙ | |||
24 25 26 27 28 29 30 | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | - - + + - - - + + + - + | # include "config.h" #endif #import "XMPPPLAINAuth.h" #import "XMPPExceptions.h" @implementation XMPPPLAINAuth |
︙ |
Modified src/XMPPPresence.h from [3d03c9db92] to [0497c404f5].
︙ | |||
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | 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 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 | + + + + + + + - + - + - + - + - + - - + + - + - + - - + + + + | * 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. */ #import "XMPPStanza.h" OF_ASSUME_NONNULL_BEGIN /** * \brief A class describing a presence stanza. */ @interface XMPPPresence: XMPPStanza <OFComparing> { OFString *_status, *_show; OFNumber *_priority; } /** * The value of the stanza's type attribute. */ @property OF_NULL_RESETTABLE_PROPERTY (nonatomic, copy) OFString *type; /** * The text content of the status element. */ |
Modified src/XMPPPresence.m from [5c903aded4] to [defd4ee1a6].
︙ | |||
45 46 47 48 49 50 51 52 53 54 55 56 | 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 | + + - + - + - - + + - + - + - - + + - + | if ([show isEqual: @"xa"]) return 4; OF_ENSURE(0); } @implementation XMPPPresence @dynamic type; + (instancetype)presence { return [[[self alloc] init] autorelease]; } |
︙ | |||
131 132 133 134 135 136 137 | 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 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 | - + - - + + - + - + - - - - - - + - - - - - - + - + - - - - - - + | [_status release]; [_show release]; [_priority release]; [super dealloc]; } |
︙ |
Modified src/XMPPRoster.h from [9f74b009a4] to [7a62e71bc2].
︙ | |||
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | 22 23 24 25 26 27 28 29 30 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 | + + - - - - + - - + + | */ #import <ObjFW/ObjFW.h> #import "XMPPConnection.h" #import "XMPPStorage.h" OF_ASSUME_NONNULL_BEGIN @class XMPPRosterItem; @class XMPPIQ; @class XMPPRoster; @class XMPPMulticastDelegate; /** * \brief A protocol that should be (partially) implemented by delegates * of a XMPPRoster */ @protocol XMPPRosterDelegate |
︙ | |||
76 77 78 79 80 81 82 | 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 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 | - + - + + + + - - + + - + - + - + - + - - - - - - - + | @property (readonly, assign) XMPPConnection *connection; /** * \brief An object for data storage, conforming to the XMPPStorage protocol. * * Inherited from the connection if not overridden. */ |
Modified src/XMPPRoster.m from [8b7b6f027e] to [7642c78519].
︙ | |||
34 35 36 37 38 39 40 41 42 43 44 45 | 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 | + + + + + + + + + + + + + + + + - + | #import "XMPPRoster.h" #import "XMPPRosterItem.h" #import "XMPPConnection.h" #import "XMPPIQ.h" #import "XMPPJID.h" #import "XMPPMulticastDelegate.h" #import "namespaces.h" OF_ASSUME_NONNULL_BEGIN @interface XMPPRoster () - (void)XMPP_updateRosterItem: (XMPPRosterItem *)rosterItem; - (void)XMPP_handleInitialRosterForConnection: (XMPPConnection *)connection IQ: (XMPPIQ *)IQ; - (XMPPRosterItem *)XMPP_rosterItemWithXMLElement: (OFXMLElement *)element; @end OF_ASSUME_NONNULL_END @implementation XMPPRoster @synthesize connection = _connection, dataStorage = _dataStorage; @synthesize rosterItems = _rosterItems; - init { OF_INVALID_INIT_METHOD } |
︙ | |||
98 99 100 101 102 103 104 | 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 | - - + + - + - + - + | [_connection sendIQ: iq callbackTarget: self selector: @selector(XMPP_handleInitialRosterForConnection: IQ:)]; } |
︙ | |||
142 143 144 145 146 147 148 | 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 | - + - + - + | OFString *ver = [[rosterElement attributeForName: @"ver"] stringValue]; [_dataStorage setStringValue: ver forPath: @"roster.ver"]; [_dataStorage save]; } |
︙ | |||
181 182 183 184 185 186 187 | 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 | - + | [query addChild: item]; [IQ addChild: query]; [_connection sendStanza: IQ]; } |
︙ | |||
220 221 222 223 224 225 226 | 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 | - - - - - - - - - - - + | if (_rosterRequested) /* FIXME: Find a better exception! */ @throw [OFInvalidArgumentException exception]; _dataStorage = dataStorage; } |
︙ | |||
270 271 272 273 274 275 276 | 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 | - + | if (![[rosterItem subscription] isEqual: @"remove"]) [_rosterItems setObject: rosterItem forKey: [[rosterItem JID] bareJID]]; else [_rosterItems removeObjectForKey: [[rosterItem JID] bareJID]]; } |
︙ | |||
306 307 308 309 310 311 312 | 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 | - - + + - + - - - - - + | if ([groups count] > 0) [rosterItem setGroups: groups]; return rosterItem; } |
︙ | |||
346 347 348 349 350 351 352 | 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 | - + - | forKey: [JID bareJID]]; } } else [_dataStorage setDictionary: nil forPath: @"roster.items"]; } |
︙ |
Modified src/XMPPRosterItem.h from [fbf33416fb] to [b424f574a0].
︙ | |||
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | 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 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | + + - + - + - + - + + + | * 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. */ #import <ObjFW/ObjFW.h> OF_ASSUME_NONNULL_BEGIN @class XMPPJID; /** * \brief A class for representing an item in the roster. */ @interface XMPPRosterItem: OFObject { XMPPJID *_JID; OFString *_name; OFString *_subscription; OFArray *_groups; } /// \brief The JID of the roster item |
Modified src/XMPPRosterItem.m from [896b51646c] to [5e285f3028].
︙ | |||
62 63 64 65 66 67 68 | 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | - + | [new release]; @throw e; } return new; } |
Modified src/XMPPSCRAMAuth.h from [caa9d18a81] to [fc2ab6d5ef].
︙ | |||
20 21 22 23 24 25 26 27 28 29 30 31 32 33 | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | + + | * POSSIBILITY OF SUCH DAMAGE. */ #import <ObjFW/ObjFW.h> #import "XMPPAuthenticator.h" #import "XMPPConnection.h" OF_ASSUME_NONNULL_BEGIN /** * \brief A class to authenticate using SCRAM */ @interface XMPPSCRAMAuth: XMPPAuthenticator { Class _hashType; OFString *_cNonce; |
︙ | |||
45 46 47 48 49 50 51 | 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 | - - - + + + - - - - + + + + + + + + + + - - - + + + - - - - + + + + - + + - - + - - - - - - - - - | * \param authcid The authcid to authenticate with * \param password The password to authenticate with * \param connection The connection over which authentication is done * \param hash The class to use for calulating hashes * \param plusAvailable Whether the PLUS variant was offered * \return A new autoreleased XMPPSCRAMAuth */ |
Modified src/XMPPSCRAMAuth.m from [ec991072f9] to [e2f43c5d67].
︙ | |||
32 33 34 35 36 37 38 39 40 | 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 | + + + + + + + + + + + + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + | #import <ObjOpenSSL/SSLSocket.h> #import "XMPPSCRAMAuth.h" #import "XMPPExceptions.h" #define HMAC_IPAD 0x36 #define HMAC_OPAD 0x5c OF_ASSUME_NONNULL_BEGIN @interface XMPPSCRAMAuth () - (OFString *)XMPP_genNonce; - (const uint8_t *)XMPP_HMACWithKey: (OFDataArray *)key data: (OFDataArray *)data; - (OFDataArray *)XMPP_hiWithData: (OFDataArray *)str salt: (OFDataArray *)salt iterationCount: (intmax_t)i; - (OFDataArray *)XMPP_parseServerFirstMessage: (OFDataArray *)data; - (OFDataArray *)XMPP_parseServerFinalMessage: (OFDataArray *)data; @end OF_ASSUME_NONNULL_END @implementation XMPPSCRAMAuth |
︙ | |||
105 106 107 108 109 110 111 | 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 161 162 163 164 165 166 167 168 | - + - + - + | [_serverSignature release]; [_cNonce release]; [_connection release]; [super dealloc]; } |
︙ | |||
176 177 178 179 180 181 182 | 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 | - + - + | [ret addItems: [_clientFirstMessageBare UTF8String] count: [_clientFirstMessageBare UTF8StringLength]]; return ret; } |
︙ | |||
249 250 251 252 253 254 255 | 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 | - + + | @throw [OFInvalidServerReplyException exception]; // Add c=<base64(GS2Header+channelBindingData)> tmpArray = [OFDataArray dataArray]; [tmpArray addItems: [_GS2Header UTF8String] count: [_GS2Header UTF8StringLength]]; if (_plusAvailable && [_connection encrypted]) { |
︙ | |||
308 309 310 311 312 313 314 | 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 | - + | clientKey = [self XMPP_HMACWithKey: saltedPassword data: tmpArray]; /* * IETF RFC 5802: * StoredKey := H(ClientKey) */ |
︙ | |||
364 365 366 367 368 369 370 | 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 | - + | tmpString = [tmpArray stringByBase64Encoding]; [ret addItems: [tmpString UTF8String] count: [tmpString UTF8StringLength]]; return ret; } |
︙ | |||
394 395 396 397 398 399 400 | 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 | - + - + - - + + | } else @throw [XMPPAuthFailedException exceptionWithConnection: nil reason: value]; return nil; } |
︙ | |||
449 450 451 452 453 454 455 | 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 | - + - + - + - - - + + + | for (i = 0; i < blockSize; i++) { kI[i] ^= HMAC_IPAD; kO[i] ^= HMAC_OPAD; } hashI = [[[_hashType alloc] init] autorelease]; |
︙ |
Modified src/XMPPSRVLookup.h from [f29224bbe8] to [c9768d0ace].
︙ | |||
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | 22 23 24 25 26 27 28 29 30 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 | + + - + - + + - + - + - - + + + - - - + - + + + | */ #include <netinet/in.h> #include <arpa/nameser.h> #include <resolv.h> #import <ObjFW/ObjFW.h> OF_ASSUME_NONNULL_BEGIN @interface XMPPSRVEntry: OFObject { uint16_t _priority; uint16_t _weight; uint32_t _accumulatedWeight; uint16_t _port; OFString *_target; } @property (readonly) uint16_t priority; @property (readonly) uint16_t weight; @property uint32_t accumulatedWeight; @property (readonly) uint16_t port; |
Modified src/XMPPSRVLookup.m from [b57e70e54d] to [e13fa9dc89].
︙ | |||
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | 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 | + + + + + + + + + - + - - - - - - - + - - + | #include <netdb.h> #include <sys/types.h> #include <openssl/rand.h> #import "XMPPSRVLookup.h" #import <ObjFW/OFLocalization.h> OF_ASSUME_NONNULL_BEGIN @interface XMPPSRVLookup () - (void)XMPP_lookup; - (void)XMPP_addEntry: (XMPPSRVEntry *)item; @end OF_ASSUME_NONNULL_END @implementation XMPPSRVEntry @synthesize priority = _priority, weight = _weight; @synthesize accumulatedWeight = _accumulatedWeight, port = _port; @synthesize target = _target; + (instancetype)entryWithPriority: (uint16_t)priority weight: (uint16_t)weight port: (uint16_t)port |
︙ | |||
100 101 102 103 104 105 106 | 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | - + - + | { self = [super init]; @try { const uint16_t *rdata; char buffer[NS_MAXDNAME]; |
︙ | |||
128 129 130 131 132 133 134 | 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 161 162 163 164 165 | - + - + + + + + + - + | - (void)dealloc { [_target release]; [super dealloc]; } |
︙ | |||
227 228 229 230 231 232 233 | 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 | - + | res_ndestroy(&_resState); #endif } [pool release]; } |
︙ | |||
269 270 271 272 273 274 275 | 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 | - + + + + + + - + | beforeListObject: iter]; else [_list appendObject: subList]; [pool release]; } |
︙ | |||
317 318 319 320 321 322 323 | 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 | - + | totalWeight += [iter->object weight]; [iter->object setAccumulatedWeight: totalWeight]; } if ([_subListCopy count] > 0) { uint32_t randomWeight; |
︙ |
Modified src/XMPPStanza.h from [7ce6b98454] to [a0d35df9af].
︙ | |||
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | 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 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 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 161 162 | + + - + - + - + - + - + - + - - + + - - + + - - - + + + - + + + + + + + + + + + - + - - + + - - + + - - - + + + - + + + | * 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. */ #import <ObjFW/ObjFW.h> OF_ASSUME_NONNULL_BEGIN @class XMPPJID; /** * \brief A class describing an XMPP Stanza. */ @interface XMPPStanza: OFXMLElement { XMPPJID *_from, *_to; OFString *_type, *_ID, *_language; } /// \brief The value of the stanza's from attribute |
Modified src/XMPPStanza.m from [62c85c1076] to [26c7c49d18].
︙ | |||
26 27 28 29 30 31 32 | 26 27 28 29 30 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 | + + + - + - - + + - - + + - - - + + + - + - + + + + + + + + + + + + + + + + + + - - + + - - + + - - - + + + | #endif #import "XMPPStanza.h" #import "XMPPJID.h" #import "namespaces.h" @implementation XMPPStanza @synthesize from = _from, to = _to, type = _type, ID = _ID; @synthesize language = _language; |
︙ | |||
111 112 113 114 115 116 117 | 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 | - + | [self release]; @throw e; } return self; } |
︙ | |||
149 150 151 152 153 154 155 | 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 | - + - - - - - - + - - - - - - + - - - - - - + - - - - - - + - - - - - | [_to release]; [_type release]; [_ID release]; [super dealloc]; } |
Modified src/XMPPStorage.h from [f2a91237cc] to [1c089b9216].
︙ | |||
18 19 20 21 22 23 24 25 26 27 28 29 30 | 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 44 45 46 47 48 49 50 | + + - - - + + + - - + + - - - - - - - - + + + + + + + + + + | * 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. */ #import <ObjFW/OFObject.h> OF_ASSUME_NONNULL_BEGIN @class OFString; @class OFArray; @class OFDictionary; @protocol XMPPStorage <OFObject> - (void)save; |
Modified src/XMPPStreamManagement.h from [dbbf14c9a5] to [eba4bbe440].
︙ | |||
18 19 20 21 22 23 24 25 26 27 28 29 30 31 | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | + + + - + + + | * 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. */ #import "XMPPConnection.h" OF_ASSUME_NONNULL_BEGIN @interface XMPPStreamManagement: OFObject <XMPPConnectionDelegate> { XMPPConnection *_connection; uint32_t _receivedCount; } - init OF_UNAVAILABLE; |
Modified src/XMPPStreamManagement.m from [9dc52c523a] to [57b85a948f].
︙ | |||
22 23 24 25 26 27 28 | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | + + + + + - + | #include <inttypes.h> #import "XMPPStreamManagement.h" #import "namespaces.h" @implementation XMPPStreamManagement - init { OF_INVALID_INIT_METHOD } |
︙ | |||
44 45 46 47 48 49 50 | 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | - - + + | - (void)dealloc { [_connection removeDelegate: self]; [super dealloc]; } |
︙ | |||
81 82 83 84 85 86 87 | 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | - - + + - - + + | ([elementName isEqual: @"iq"] || [elementName isEqual: @"presence"] || [elementName isEqual: @"message"])) _receivedCount++; } /* TODO: Count outgoing stanzas here and cache them, send own ACK requests |
Modified src/XMPPXMLElementBuilder.h from [e6038a457f] to [60ea5de24d].
︙ | |||
17 18 19 20 21 22 23 24 25 26 | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | + + + + | * 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. */ #import <ObjFW/OFXMLElementBuilder.h> OF_ASSUME_NONNULL_BEGIN @interface XMPPXMLElementBuilder: OFXMLElementBuilder @end OF_ASSUME_NONNULL_END |
Modified src/XMPPXMLElementBuilder.m from [c3e2053f34] to [757efe5b8a].
︙ | |||
25 26 27 28 29 30 31 | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | - - + + - - + + | #endif #import "XMPPXMLElementBuilder.h" #import <ObjFW/OFMalformedXMLException.h> @implementation XMPPXMLElementBuilder |
Modified tests/test.m from [1e6a6151cf] to [a93ba6280b].
︙ | |||
34 35 36 37 38 39 40 | 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | - - | #import "XMPPMessage.h" #import "XMPPPresence.h" #import "XMPPRoster.h" #import "XMPPStreamManagement.h" #import "XMPPFileStorage.h" @interface AppDelegate: OFObject |
︙ | |||
127 128 129 130 131 132 133 | 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 | - - + + - - + + - + - - + + | [conn setUsername: [arguments objectAtIndex: 1]]; [conn setPassword: [arguments objectAtIndex: 2]]; [conn setResource: @"ObjXMPP"]; [conn asyncConnectAndHandle]; } |
︙ | |||
196 197 198 199 200 201 202 | 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 | - + | [discoEntity addDiscoNode: nodeClueso]; [discoEntity addDiscoNode: nodeStop]; [discoEntity addDiscoNode: nodeChicago]; [roster requestRoster]; } |
︙ | |||
220 221 222 223 224 225 226 | 218 219 220 221 222 223 224 225 226 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 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 | - + - - + + - - + + - - + + - - + + - + - + | [conn sendIQ: iq callbackBlock: ^ (XMPPConnection *c, XMPPIQ *resp) { of_log(@"Ping response: %@", resp); }]; #endif } |