@@ -199,29 +199,32 @@ - (const of_socket_address_t *)address { return &_address; } -- (bool)isEqual: (id)otherObject -{ - OFADNSResourceRecord *otherRecord; - - if (![otherObject isKindOfClass: [OFADNSResourceRecord class]]) - return false; - - otherRecord = otherObject; - - if (otherRecord->_name != _name && ![otherRecord->_name isEqual: _name]) - return false; - - if (otherRecord->_DNSClass != _DNSClass) - return false; - - if (otherRecord->_recordType != _recordType) - return false; - - if (!of_socket_address_equal(&otherRecord->_address, &_address)) +- (bool)isEqual: (id)object +{ + OFADNSResourceRecord *record; + + if (object == self) + return true; + + if (![object isKindOfClass: [OFADNSResourceRecord class]]) + return false; + + record = object; + + if (record->_name != _name && ![record->_name isEqual: _name]) + return false; + + if (record->_DNSClass != _DNSClass) + return false; + + if (record->_recordType != _recordType) + return false; + + if (!of_socket_address_equal(&record->_address, &_address)) return false; return true; } @@ -282,29 +285,32 @@ - (const of_socket_address_t *)address { return &_address; } -- (bool)isEqual: (id)otherObject -{ - OFAAAADNSResourceRecord *otherRecord; - - if (![otherObject isKindOfClass: [OFAAAADNSResourceRecord class]]) - return false; - - otherRecord = otherObject; - - if (otherRecord->_name != _name && ![otherRecord->_name isEqual: _name]) - return false; - - if (otherRecord->_DNSClass != _DNSClass) - return false; - - if (otherRecord->_recordType != _recordType) - return false; - - if (!of_socket_address_equal(&otherRecord->_address, &_address)) +- (bool)isEqual: (id)object +{ + OFAAAADNSResourceRecord *record; + + if (object == self) + return true; + + if (![object isKindOfClass: [OFAAAADNSResourceRecord class]]) + return false; + + record = object; + + if (record->_name != _name && ![record->_name isEqual: _name]) + return false; + + if (record->_DNSClass != _DNSClass) + return false; + + if (record->_recordType != _recordType) + return false; + + if (!of_socket_address_equal(&record->_address, &_address)) return false; return true; } @@ -375,30 +381,32 @@ [_alias release]; [super dealloc]; } -- (bool)isEqual: (id)otherObject -{ - OFCNAMEDNSResourceRecord *otherRecord; - - if (![otherObject isKindOfClass: [OFCNAMEDNSResourceRecord class]]) - return false; - - otherRecord = otherObject; - - if (otherRecord->_name != _name && ![otherRecord->_name isEqual: _name]) - return false; - - if (otherRecord->_DNSClass != _DNSClass) - return false; - - if (otherRecord->_recordType != _recordType) - return false; - - if (otherRecord->_alias != _alias && - ![otherRecord->_alias isEqual: _alias]) +- (bool)isEqual: (id)object +{ + OFCNAMEDNSResourceRecord *record; + + if (object == self) + return true; + + if (![object isKindOfClass: [OFCNAMEDNSResourceRecord class]]) + return false; + + record = object; + + if (record->_name != _name && ![record->_name isEqual: _name]) + return false; + + if (record->_DNSClass != _DNSClass) + return false; + + if (record->_recordType != _recordType) + return false; + + if (record->_alias != _alias && ![record->_alias isEqual: _alias]) return false; return true; } @@ -473,32 +481,35 @@ [_OS release]; [super dealloc]; } -- (bool)isEqual: (id)otherObject -{ - OFHINFODNSResourceRecord *otherRecord; - - if (![otherObject isKindOfClass: [OFHINFODNSResourceRecord class]]) - return false; - - otherRecord = otherObject; - - if (otherRecord->_name != _name && ![otherRecord->_name isEqual: _name]) - return false; - - if (otherRecord->_DNSClass != _DNSClass) - return false; - - if (otherRecord->_recordType != _recordType) - return false; - - if (otherRecord->_CPU != _CPU && ![otherRecord->_CPU isEqual: _CPU]) - return false; - - if (otherRecord->_OS != _OS && ![otherRecord->_OS isEqual: _OS]) +- (bool)isEqual: (id)object +{ + OFHINFODNSResourceRecord *record; + + if (object == self) + return true; + + if (![object isKindOfClass: [OFHINFODNSResourceRecord class]]) + return false; + + record = object; + + if (record->_name != _name && ![record->_name isEqual: _name]) + return false; + + if (record->_DNSClass != _DNSClass) + return false; + + if (record->_recordType != _recordType) + return false; + + if (record->_CPU != _CPU && ![record->_CPU isEqual: _CPU]) + return false; + + if (record->_OS != _OS && ![record->_OS isEqual: _OS]) return false; return true; } @@ -574,33 +585,36 @@ [_mailExchange release]; [super dealloc]; } -- (bool)isEqual: (id)otherObject -{ - OFMXDNSResourceRecord *otherRecord; - - if (![otherObject isKindOfClass: [OFMXDNSResourceRecord class]]) - return false; - - otherRecord = otherObject; - - if (otherRecord->_name != _name && ![otherRecord->_name isEqual: _name]) - return false; - - if (otherRecord->_DNSClass != _DNSClass) - return false; - - if (otherRecord->_recordType != _recordType) - return false; - - if (otherRecord->_preference != _preference) - return false; - - if (otherRecord->_mailExchange != _mailExchange && - ![otherRecord->_mailExchange isEqual: _mailExchange]) +- (bool)isEqual: (id)object +{ + OFMXDNSResourceRecord *record; + + if (object == self) + return true; + + if (![object isKindOfClass: [OFMXDNSResourceRecord class]]) + return false; + + record = object; + + if (record->_name != _name && ![record->_name isEqual: _name]) + return false; + + if (record->_DNSClass != _DNSClass) + return false; + + if (record->_recordType != _recordType) + return false; + + if (record->_preference != _preference) + return false; + + if (record->_mailExchange != _mailExchange && + ![record->_mailExchange isEqual: _mailExchange]) return false; return true; } @@ -675,30 +689,33 @@ [_authoritativeHost release]; [super dealloc]; } -- (bool)isEqual: (id)otherObject -{ - OFNSDNSResourceRecord *otherRecord; - - if (![otherObject isKindOfClass: [OFNSDNSResourceRecord class]]) - return false; - - otherRecord = otherObject; - - if (otherRecord->_name != _name && ![otherRecord->_name isEqual: _name]) - return false; - - if (otherRecord->_DNSClass != _DNSClass) - return false; - - if (otherRecord->_recordType != _recordType) - return false; - - if (otherRecord->_authoritativeHost != _authoritativeHost && - ![otherRecord->_authoritativeHost isEqual: _authoritativeHost]) +- (bool)isEqual: (id)object +{ + OFNSDNSResourceRecord *record; + + if (object == self) + return true; + + if (![object isKindOfClass: [OFNSDNSResourceRecord class]]) + return false; + + record = object; + + if (record->_name != _name && ![record->_name isEqual: _name]) + return false; + + if (record->_DNSClass != _DNSClass) + return false; + + if (record->_recordType != _recordType) + return false; + + if (record->_authoritativeHost != _authoritativeHost && + ![record->_authoritativeHost isEqual: _authoritativeHost]) return false; return true; } @@ -770,30 +787,33 @@ [_domainName release]; [super dealloc]; } -- (bool)isEqual: (id)otherObject -{ - OFPTRDNSResourceRecord *otherRecord; - - if (![otherObject isKindOfClass: [OFPTRDNSResourceRecord class]]) - return false; - - otherRecord = otherObject; - - if (otherRecord->_name != _name && ![otherRecord->_name isEqual: _name]) - return false; - - if (otherRecord->_DNSClass != _DNSClass) - return false; - - if (otherRecord->_recordType != _recordType) - return false; - - if (otherRecord->_domainName != _domainName && - ![otherRecord->_domainName isEqual: _domainName]) +- (bool)isEqual: (id)object +{ + OFPTRDNSResourceRecord *record; + + if (object == self) + return true; + + if (![object isKindOfClass: [OFPTRDNSResourceRecord class]]) + return false; + + record = object; + + if (record->_name != _name && ![record->_name isEqual: _name]) + return false; + + if (record->_DNSClass != _DNSClass) + return false; + + if (record->_recordType != _recordType) + return false; + + if (record->_domainName != _domainName && + ![record->_domainName isEqual: _domainName]) return false; return true; } @@ -868,34 +888,37 @@ [_TXTDomainName release]; [super dealloc]; } -- (bool)isEqual: (id)otherObject -{ - OFRPDNSResourceRecord *otherRecord; - - if (![otherObject isKindOfClass: [OFRPDNSResourceRecord class]]) - return false; - - otherRecord = otherObject; - - if (otherRecord->_name != _name && ![otherRecord->_name isEqual: _name]) - return false; - - if (otherRecord->_DNSClass != _DNSClass) - return false; - - if (otherRecord->_recordType != _recordType) - return false; - - if (otherRecord->_mailbox != _mailbox && - ![otherRecord->_mailbox isEqual: _mailbox]) - return false; - - if (otherRecord->_TXTDomainName != _TXTDomainName && - ![otherRecord->_TXTDomainName isEqual: _TXTDomainName]) +- (bool)isEqual: (id)object +{ + OFRPDNSResourceRecord *record; + + if (object == self) + return true; + + if (![object isKindOfClass: [OFRPDNSResourceRecord class]]) + return false; + + record = object; + + if (record->_name != _name && ![record->_name isEqual: _name]) + return false; + + if (record->_DNSClass != _DNSClass) + return false; + + if (record->_recordType != _recordType) + return false; + + if (record->_mailbox != _mailbox && + ![record->_mailbox isEqual: _mailbox]) + return false; + + if (record->_TXTDomainName != _TXTDomainName && + ![record->_TXTDomainName isEqual: _TXTDomainName]) return false; return true; } @@ -986,49 +1009,52 @@ [_responsiblePerson release]; [super dealloc]; } -- (bool)isEqual: (id)otherObject -{ - OFSOADNSResourceRecord *otherRecord; - - if (![otherObject isKindOfClass: [OFSOADNSResourceRecord class]]) - return false; - - otherRecord = otherObject; - - if (otherRecord->_name != _name && ![otherRecord->_name isEqual: _name]) - return false; - - if (otherRecord->_DNSClass != _DNSClass) - return false; - - if (otherRecord->_recordType != _recordType) - return false; - - if (otherRecord->_primaryNameServer != _primaryNameServer && - ![otherRecord->_primaryNameServer isEqual: _primaryNameServer]) - return false; - - if (otherRecord->_responsiblePerson != _responsiblePerson && - ![otherRecord->_responsiblePerson isEqual: _responsiblePerson]) - return false; - - if (otherRecord->_serialNumber != _serialNumber) - return false; - - if (otherRecord->_refreshInterval != _refreshInterval) - return false; - - if (otherRecord->_retryInterval != _retryInterval) - return false; - - if (otherRecord->_expirationInterval != _expirationInterval) - return false; - - if (otherRecord->_minTTL != _minTTL) +- (bool)isEqual: (id)object +{ + OFSOADNSResourceRecord *record; + + if (object == self) + return true; + + if (![object isKindOfClass: [OFSOADNSResourceRecord class]]) + return false; + + record = object; + + if (record->_name != _name && ![record->_name isEqual: _name]) + return false; + + if (record->_DNSClass != _DNSClass) + return false; + + if (record->_recordType != _recordType) + return false; + + if (record->_primaryNameServer != _primaryNameServer && + ![record->_primaryNameServer isEqual: _primaryNameServer]) + return false; + + if (record->_responsiblePerson != _responsiblePerson && + ![record->_responsiblePerson isEqual: _responsiblePerson]) + return false; + + if (record->_serialNumber != _serialNumber) + return false; + + if (record->_refreshInterval != _refreshInterval) + return false; + + if (record->_retryInterval != _retryInterval) + return false; + + if (record->_expirationInterval != _expirationInterval) + return false; + + if (record->_minTTL != _minTTL) return false; return true; } @@ -1135,39 +1161,41 @@ [_target release]; [super dealloc]; } -- (bool)isEqual: (id)otherObject -{ - OFSRVDNSResourceRecord *otherRecord; - - if (![otherObject isKindOfClass: [OFSRVDNSResourceRecord class]]) - return false; - - otherRecord = otherObject; - - if (otherRecord->_name != _name && ![otherRecord->_name isEqual: _name]) - return false; - - if (otherRecord->_DNSClass != _DNSClass) - return false; - - if (otherRecord->_recordType != _recordType) - return false; - - if (otherRecord->_priority != _priority) - return false; - - if (otherRecord->_weight != _weight) - return false; - - if (otherRecord->_target != _target && - ![otherRecord->_target isEqual: _target]) - return false; - - if (otherRecord->_port != _port) +- (bool)isEqual: (id)object +{ + OFSRVDNSResourceRecord *record; + + if (object == self) + return true; + + if (![object isKindOfClass: [OFSRVDNSResourceRecord class]]) + return false; + + record = object; + + if (record->_name != _name && ![record->_name isEqual: _name]) + return false; + + if (record->_DNSClass != _DNSClass) + return false; + + if (record->_recordType != _recordType) + return false; + + if (record->_priority != _priority) + return false; + + if (record->_weight != _weight) + return false; + + if (record->_target != _target && ![record->_target isEqual: _target]) + return false; + + if (record->_port != _port) return false; return true; } @@ -1246,30 +1274,33 @@ [_textData release]; [super dealloc]; } -- (bool)isEqual: (id)otherObject -{ - OFTXTDNSResourceRecord *otherRecord; - - if (![otherObject isKindOfClass: [OFTXTDNSResourceRecord class]]) - return false; - - otherRecord = otherObject; - - if (otherRecord->_name != _name && ![otherRecord->_name isEqual: _name]) - return false; - - if (otherRecord->_DNSClass != _DNSClass) - return false; - - if (otherRecord->_recordType != _recordType) - return false; - - if (otherRecord->_textData != _textData && - ![otherRecord->_textData isEqual: _textData]) +- (bool)isEqual: (id)object +{ + OFTXTDNSResourceRecord *record; + + if (object == self) + return true; + + if (![object isKindOfClass: [OFTXTDNSResourceRecord class]]) + return false; + + record = object; + + if (record->_name != _name && ![record->_name isEqual: _name]) + return false; + + if (record->_DNSClass != _DNSClass) + return false; + + if (record->_recordType != _recordType) + return false; + + if (record->_textData != _textData && + ![record->_textData isEqual: _textData]) return false; return true; }