Overview
Comment: | Add very basic Stream Management (XEP-0198) support
This implementation only counts incomming stanzas and |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
a618f77f451105da657b03c25a5420ba |
User & Date: | js on 2012-08-10 12:08:23 |
Other Links: | manifest | tags |
Context
2012-09-20
| ||
00:35 | Handle the connection in the run loop. check-in: 71cf6454e4 user: js tags: trunk | |
2012-08-10
| ||
12:08 | Add very basic Stream Management (XEP-0198) support check-in: a618f77f45 user: js tags: trunk | |
12:08 | Close the stream when restricted XML is received check-in: f848b17360 user: js tags: trunk | |
Changes
Modified src/Makefile from [542ec87a49] to [b1583dc3ac].
︙ | |||
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | + | XMPPPLAINAuth.m \ XMPPPresence.m \ XMPPRoster.m \ XMPPRosterItem.m \ XMPPSCRAMAuth.m \ XMPPSRVLookup.m \ XMPPStanza.m \ XMPPStreamManagement.m \ XMPPXMLElementBuilder.m INCLUDES = ${SRCS:.m=.h} \ namespaces.h \ ObjXMPP.h \ XMPPStorage.h include ../buildsys.mk CPPFLAGS += -I.. -DHAVE_CONFIG_H LD = ${OBJC} |
Modified src/XMPPConnection.h from [d1760a91eb] to [1fc410e031].
︙ | |||
154 155 156 157 158 159 160 161 162 163 164 165 166 167 | 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 | + | XMPPMulticastDelegate *delegates; OFMutableDictionary *callbacks; XMPPAuthenticator *authModule; BOOL streamOpen; BOOL needsSession; BOOL encryptionRequired, encrypted; BOOL supportsRosterVersioning; BOOL supportsStreamManagement; unsigned int lastID; /// \endcond } #ifdef OF_HAVE_PROPERTIES /// \brief The username to use for authentication @property (copy) OFString *username; |
︙ | |||
193 194 195 196 197 198 199 200 201 202 203 204 205 206 | 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 | + + | @property (readonly, retain, getter=socket) OFTCPSocket *sock; /// \brief Whether encryption is required @property BOOL encryptionRequired; /// \brief Whether the connection is encrypted @property (readonly) BOOL encrypted; /// \brief Whether roster versioning is supported @property (readonly) BOOL supportsRosterVersioning; /// \brief Whether stream management is supported @property (readonly) BOOL supportsStreamManagement; #endif /** * \brief Creates a new autoreleased XMPPConnection. * * \return A new autoreleased XMPPConnection */ |
︙ |
Modified src/XMPPConnection.m from [cfbc33f443] to [934072be7a].
︙ | |||
356 357 358 359 360 361 362 363 364 365 366 367 368 369 | 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 | + + + + + | return streamOpen; } - (BOOL)supportsRosterVersioning { return supportsRosterVersioning; } - (BOOL)supportsStreamManagement { return supportsStreamManagement; } - (BOOL)checkCertificateAndGetReason: (OFString**)reason { X509Certificate *cert; OFDictionary *SANs; BOOL serviceSpecific = NO; |
︙ | |||
856 857 858 859 860 861 862 863 864 865 866 867 868 869 | 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 | + + + + | if (encryptionRequired && !encrypted) /* TODO: Find/create an exception to throw here */ @throw [OFException exceptionWithClass: [self class]]; if ([element elementForName: @"ver" namespace: XMPP_NS_ROSTERVER] != nil) supportsRosterVersioning = YES; if ([element elementForName: @"sm" namespace: XMPP_NS_SM] != nil) supportsStreamManagement = YES; if (mechs != nil) { OFEnumerator *enumerator; OFXMLElement *mech; enumerator = [[mechs children] objectEnumerator]; while ((mech = [enumerator nextObject]) != nil) |
︙ |
Added src/XMPPStreamManagement.h version [b1e66795db].
|
Added src/XMPPStreamManagement.m version [b0ffeb590a].