ObjFW  Diff

Differences From Artifact [a81f7a9a95]:

To Artifact [cdb0825a65]:


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
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







-
-
+
+







-
-
+
+







#import "OFString.h"

@implementation OFDNSQuery
@synthesize domainName = _domainName, DNSClass = _DNSClass;
@synthesize recordType = _recordType;

+ (instancetype)queryWithDomainName: (OFString *)domainName
			   DNSClass: (of_dns_class_t)DNSClass
			 recordType: (of_dns_record_type_t)recordType
			   DNSClass: (OFDNSClass)DNSClass
			 recordType: (OFDNSRecordType)recordType
{
	return [[[self alloc] initWithDomainName: domainName
					DNSClass: DNSClass
				      recordType: recordType] autorelease];
}

- (instancetype)initWithDomainName: (OFString *)domainName
			  DNSClass: (of_dns_class_t)DNSClass
			recordType: (of_dns_record_type_t)recordType
			  DNSClass: (OFDNSClass)DNSClass
			recordType: (OFDNSRecordType)recordType
{
	self = [super init];

	@try {
		void *pool = objc_autoreleasePoolPush();

		if (![domainName hasSuffix: @"."])
108
109
110
111
112
113
114
115
116


117
118
108
109
110
111
112
113
114


115
116
117
118







-
-
+
+


{
	return [self retain];
}

- (OFString *)description
{
	return [OFString stringWithFormat: @"<%@ %@ %@ %@>",
	    self.className, _domainName, of_dns_class_to_string(_DNSClass),
	    of_dns_record_type_to_string(_recordType)];
	    self.className, _domainName, OFDNSClassName(_DNSClass),
	    OFDNSRecordTypeName(_recordType)];
}
@end