ObjXMPP  Check-in [715cd43518]

Overview
Comment:Adjust to ObjFW changes
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 715cd435189464337cd3331d00a4b54abe09bfca24e1fe6592e24d49e523357d
User & Date: js on 2019-12-15 13:55:59
Other Links: manifest | tags
Context
2020-01-03
23:45
Adjust to ObjFW changes check-in: 3326ea5a0a user: js tags: trunk
2019-12-15
13:55
Adjust to ObjFW changes check-in: 715cd43518 user: js tags: trunk
2019-10-03
23:42
Adjust to ObjFW changes check-in: eafae30990 user: js tags: trunk
Changes

Modified src/XMPPConnection.m from [c4d409163f] to [deaa6bbc95].

52
53
54
55
56
57
58
59

60
61
62
63
64
65
66
52
53
54
55
56
57
58

59
60
61
62
63
64
65
66







-
+







#import "XMPPStanza.h"
#import "XMPPXMLElementBuilder.h"

#import "namespaces.h"

#import <ObjFW/macros.h>

@interface XMPPConnection () <OFDNSResolverDelegate, OFTCPSocketDelegate,
@interface XMPPConnection () <OFDNSResolverQueryDelegate, OFTCPSocketDelegate,
    OFXMLParserDelegate, OFXMLElementBuilderDelegate>
- (void)xmpp_tryNextSRVRecord;
-  (bool)xmpp_parseBuffer: (const void *)buffer
		   length: (size_t)length;
- (void)xmpp_startStream;
- (void)xmpp_handleStanza: (OFXMLElement *)element;
- (void)xmpp_handleStream: (OFXMLElement *)element;
291
292
293
294
295
296
297
298
299
300
301




302
303
304
305
306
307
308
291
292
293
294
295
296
297




298
299
300
301
302
303
304
305
306
307
308







-
-
-
-
+
+
+
+







		_nextSRVRecords = nil;
	}

	[_socket asyncConnectToHost: record.target
			       port: record.port];
}

-	(void)resolver: (OFDNSResolver *)resolver
  didResolveDomainName: (OFString *)domainName
	      response: (OFDNSResponse *)response
	     exception: (id)exception
-  (void)resolver: (OFDNSResolver *)resolver
  didPerformQuery: (OFString *)domainName
	 response: (OFDNSResponse *)response
	exception: (id)exception
{
	OFMutableArray *records = [OFMutableArray array];

	if (exception != nil) {
		[_delegates
		    broadcastSelector: @selector(connection:didThrowException:)
			   withObject: self
343
344
345
346
347
348
349
350
351
352
353
354
355






356
357
358
359
360
361
362
343
344
345
346
347
348
349






350
351
352
353
354
355
356
357
358
359
360
361
362







-
-
-
-
-
-
+
+
+
+
+
+








	if (_server != nil)
		[_socket asyncConnectToHost: _server
				       port: _port];
	else {
		OFString *SRVDomain = [_domainToASCII
		    stringByPrependingString: @"_xmpp-client._tcp."];
		OFDNSRequest *request = [OFDNSRequest
		    requestWithHost: SRVDomain
			 recordClass: OF_DNS_RESOURCE_RECORD_CLASS_IN
			  recordType: OF_DNS_RESOURCE_RECORD_TYPE_SRV];
		[[OFThread DNSResolver] asyncPerformRequest: request
						   delegate: self];
		OFDNSQuery *query = [OFDNSQuery
		    queryWithDomainName: SRVDomain
			       DNSClass: OF_DNS_CLASS_IN
			     recordType: OF_DNS_RECORD_TYPE_SRV];
		[[OFThread DNSResolver] asyncPerformQuery: query
						 delegate: self];
	}

	objc_autoreleasePoolPop(pool);
}

-  (bool)xmpp_parseBuffer: (const void *)buffer
		   length: (size_t)length