'Update service information from a DNS record.'

def updateRecord(self, zc, now, record):

    if ((record is not None) and (not record.isExpired(now))):
        if (record.type == _TYPE_A):
            if (record.name == self.server):
                self.address = record.address
        elif (record.type == _TYPE_SRV):
            if (record.name == self.name):
                self.server = record.server
                self.port = record.port
                self.weight = record.weight
                self.priority = record.priority
                self.updateRecord(zc, now, zc.cache.getByDetails(self.server, _TYPE_A, _CLASS_IN))
        elif (record.type == _TYPE_TXT):
            if (record.name == self.name):
                self.setText(record.text)
