ObjXMPP  Check-in [284029e0de]

Overview
Comment:Detect support for roster versioning.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 284029e0deeff1502f12606ef25f62e874d9f806df1aa69f10f1b954b54df5db
User & Date: js on 2012-02-06 13:49:37
Other Links: manifest | tags
Context
2012-02-06
14:18
Add missing method in interface. check-in: 4c222a8b70 user: js tags: trunk
13:49
Detect support for roster versioning. check-in: 284029e0de user: js tags: trunk
13:32
Add storage to the connection and roster. check-in: bd076b6bc1 user: js tags: trunk
Changes

Modified src/XMPPConnection.h from [6d9f63f865] to [a6bc9aa7a1].

145
146
147
148
149
150
151

152
153
154
155
156
157
158

159
160
161
162
163
164
165
166
167
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161

162
163
164
165
166
167
168







+







+

-







	OFXMLParser *parser, *oldParser;
	OFXMLElementBuilder *elementBuilder, *oldElementBuilder;
	OFString *username, *password, *server, *resource;
	OFString *privateKeyFile, *certificateFile;
	OFString *domain, *domainToASCII;
	XMPPJID *JID;
	uint16_t port;
	id <XMPPStorage> dataStorage;
	OFString *language;
	XMPPMulticastDelegate *delegates;
	OFMutableDictionary *callbacks;
	XMPPAuthenticator *authModule;
	BOOL streamOpen;
	BOOL needsSession;
	BOOL encryptionRequired, encrypted;
	BOOL rosterVersioningSupported;
	unsigned int lastID;
	id <XMPPStorage> dataStorage;
/// \endcond
}

#ifdef OF_HAVE_PROPERTIES
/// \brief The username to use for authentication
@property (copy) OFString *username;
/// \brief The password to use for authentication
182
183
184
185
186
187
188


189
190
191
192
193
194
195
196


197
198
199
200
201
202
203
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197


198
199
200
201
202
203
204
205
206







+
+






-
-
+
+







@property (copy) OFString *privateKeyFile;
/// \brief A certificate file to use for authentication
@property (copy) OFString *certificateFile;
/// \brief The JID the server assigned to the connection after binding
@property (copy, readonly) XMPPJID *JID;
/// \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, getter=socket) OFTCPSocket *sock;
/// \brief Whether encryption is required
@property BOOL encryptionRequired;
/// \brief Whether the connection is encrypted
@property (readonly) BOOL encrypted;
/// \brief An object for data storage, conforming to the XMPPStorage protocol
@property (assign) id <XMPPStorage> dataStorage;
/// \brief Whether roster versioning is supported
@property (readonly) BOOL rosterVersioningSupported;
#endif

/**
 * \brief Creates a new autoreleased XMPPConnection.
 *
 * \return A new autoreleased XMPPConnection
 */

Modified src/XMPPConnection.m from [1a7d78a099] to [1283f67a38].

345
346
347
348
349
350
351





352
353
354
355
356
357
358
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363







+
+
+
+
+







	return encrypted;
}

- (BOOL)streamOpen
{
	return streamOpen;
}

- (BOOL)rosterVersioningSupported
{
	return rosterVersioningSupported;
}

- (BOOL)checkCertificateAndGetReason: (OFString**)reason
{
	X509Certificate *cert;
	OFDictionary *SANs;
	BOOL serviceSpecific = NO;

840
841
842
843
844
845
846




847
848
849
850
851
852
853
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862







+
+
+
+







					namespace: XMPP_NS_STARTTLS]];
		return;
	}

	if (encryptionRequired && !encrypted)
		/* TODO: Find/create an exception to throw here */
		@throw [OFException exceptionWithClass: isa];

	if ([element elementForName: @"ver"
			  namespace: XMPP_NS_ROSTERVER] != nil)
		rosterVersioningSupported = YES;

	if (mechs != nil) {
		OFEnumerator *enumerator;
		OFXMLElement *mech;

		enumerator = [[mechs children] objectEnumerator];
		while ((mech = [enumerator nextObject]) != nil)

Modified src/namespaces.h from [aa29a5479e] to [a116d8892a].

19
20
21
22
23
24
25

26

27
28
29

30
31
19
20
21
22
23
24
25
26
27
28
29
30

31
32








+

+


-
+

-
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */

#define XMPP_NS_BIND @"urn:ietf:params:xml:ns:xmpp-bind"
#define XMPP_NS_CLIENT @"jabber:client"
#define XMPP_NS_ROSTER @"jabber:iq:roster"
#define XMPP_NS_ROSTERVER @"urn:xmpp:features:rosterver"
#define XMPP_NS_SASL @"urn:ietf:params:xml:ns:xmpp-sasl"
#define XMPP_NS_SESSION @"urn:ietf:params:xml:ns:xmpp-session"
#define XMPP_NS_STARTTLS @"urn:ietf:params:xml:ns:xmpp-tls"
#define XMPP_NS_STANZAS @"urn:ietf:params:xml:ns:xmpp-stanzas"
#define XMPP_NS_SESSION @"urn:ietf:params:xml:ns:xmpp-session"
#define XMPP_NS_STREAM @"http://etherx.jabber.org/streams"
#define XMPP_NS_XMPP_STREAM @"urn:ietf:params:xml:ns:xmpp-streams"
#define XMPP_NS_STREAM @"http://etherx.jabber.org/streams"