ObjIRC  Check-in [52008e00b1]

Overview
Comment:Revert "Adjust to new async API."

This reverts commit 6add878e280540ff5359704bed44bcc24c1e8be1.

The API has been changed back in ObjFW.

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 52008e00b1016a0073ce9bc325d7d2a7b736d6dbd2e9b5baa3e6ab34cb5cf5be
User & Date: js on 2012-11-08 15:57:50
Other Links: manifest | tags
Context
2012-11-24
10:02
API improvements. check-in: 50a9cc56c6 user: js tags: trunk
2012-11-08
15:57
Revert "Adjust to new async API." check-in: 52008e00b1 user: js tags: trunk
2012-10-30
20:27
Port to ObjC1. check-in: 7f37e545cf user: js tags: trunk
Changes

Modified src/IRCConnection.m from [42cd345c04] to [afa44fa97c].

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
556
557
558
559
560
561
562

563
564
565
566
567
568
569
570
571
572

573
574
575
576
577
578
579
580
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
556
557
558

559

560
561
562
563
564
565
566
567

568

569
570
571
572
573
574
575







-






-
-
+
+
-







-












-
+
-








-
+
-







	[self IRC_processLine: line];

	[pool release];
}

-	  (BOOL)connection: (OFTCPSocket*)connection
    didReceiveISO88591Line: (OFString*)line
		   context: (id)context
		 exception: (OFException*)exception
{
	if (line != nil) {
		[self IRC_processLine: line];
		[sock asyncReadLineWithTarget: self
				     selector: @selector(connection:
						   didReceiveLine:context:
						   exception:)
						   didReceiveLine:
						   exception:)];
				      context: nil];
	}

	return NO;
}

- (BOOL)connection: (OFTCPSocket*)connection
    didReceiveLine: (OFString*)line
	   context: (id)context
	 exception: (OFException*)exception
{
	if (line != nil) {
		[self IRC_processLine: line];
		return YES;
	}

	if ([exception isKindOfClass: [OFInvalidEncodingException class]])
		[sock asyncReadLineWithEncoding: OF_STRING_ENCODING_ISO_8859_1
					 target: self
				       selector: @selector(connection:
						     didReceiveISO88591Line:
						     context:exception:)
						     exception:)];
					context: nil];

	return NO;
}

- (void)handleConnection
{
	[sock asyncReadLineWithTarget: self
			     selector: @selector(connection:didReceiveLine:
					   context:exception:)
					   exception:)];
			      context: nil];
}

- (void)dealloc
{
	[sock release];
	[server release];
	[nickname release];