@@ -21,21 +21,21 @@ @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(); @@ -91,17 +91,17 @@ return true; } - (unsigned long)hash { - uint32_t hash; + unsigned long hash; - OF_HASH_INIT(hash); - OF_HASH_ADD_HASH(hash, _domainName.hash); - OF_HASH_ADD(hash, _DNSClass); - OF_HASH_ADD(hash, _recordType); - OF_HASH_FINALIZE(hash); + OFHashInit(&hash); + OFHashAddHash(&hash, _domainName.hash); + OFHashAdd(&hash, _DNSClass); + OFHashAdd(&hash, _recordType); + OFHashFinalize(&hash); return hash; } - (id)copy @@ -110,9 +110,9 @@ } - (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