'Callback invoked by Zeroconf when new information arrives.
Updates information required by browser in the Zeroconf cache.'

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

    if ((record.type == _TYPE_PTR) and (record.name == self.type)):
        expired = record.isExpired(now)
        try:
            oldrecord = self.services[record.alias.lower()]
            if (not expired):
                oldrecord.resetTTL(record)
            else:
                del self.services[record.alias.lower()]
                callback = (lambda x: self.listener.removeService(x, self.type, record.alias))
                self.list.append(callback)
                return
        except:
            if (not expired):
                self.services[record.alias.lower()] = record
                callback = (lambda x: self.listener.addService(x, self.type, record.alias))
                self.list.append(callback)
        expires = record.getExpirationTime(75)
        if (expires < self.nextTime):
            self.nextTime = expires
