
    |;i                    `    d Z ddlmZ ddlmZ ddlmZ ddlmZ erddl	m
Z
 eZ G d d	      Zy
)a  Multicast DNS Service Discovery for Python, v0.14-wmcbrine
Copyright 2003 Paul Scott-Murphy, 2014 William McBrine

This module provides a framework for the use of DNS Service Discovery
using IP multicast.

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
USA
    )annotations)TYPE_CHECKING   )	DNSRecord)RecordUpdate)Zeroconfc                  8    e Zd ZdZ	 	 	 	 	 	 	 	 ddZddZddZy)	RecordUpdateListenerzBase call for all record listeners.

    All listeners passed to async_add_listener should use RecordUpdateListener
    as a base class. In the future it will be required.
    c                    t        d      )zUpdate a single record.

        This method is deprecated and will be removed in a future version.
        update_records should be implemented instead.
        zDupdate_record is deprecated and will be removed in a future version.)RuntimeError)selfzcnowrecords       D/home/ubuntu/myenv/lib/python3.12/site-packages/zeroconf/_updates.pyupdate_recordz"RecordUpdateListener.update_record,   s     abb    c                L    |D ]  }| j                  |||j                         ! y)a  Update multiple records in one shot.

        All records that are received in a single packet are passed
        to update_records.

        This implementation is a compatibility shim to ensure older code
        that uses RecordUpdateListener as a base class will continue to
        get calls to update_record. This method will raise
        NotImplementedError in a future version.

        At this point the cache will not have the new records

        Records are passed as a list of RecordUpdate.  This
        allows consumers of async_update_records to avoid cache lookups.

        This method will be run in the event loop.
        N)r   new)r   r   r   recordsr   s        r   async_update_recordsz)RecordUpdateListener.async_update_records6   s)    $  	4Fr3

3	4r   c                     y)zCalled when a record update has completed for all handlers.

        At this point the cache will have the new records.

        This method will be run in the event loop.
        N )r   s    r   async_update_records_completez2RecordUpdateListener.async_update_records_completeK   s    r   N)r   r   r   floatr   r   returnNone)r   r   r   float_r   zlist[RecordUpdate]r   r   )r   r   )__name__
__module____qualname____doc__r   r   r   r   r   r   r
   r
   %   s;    cc!&c09c	c4*r   r
   N)r"   
__future__r   typingr   _dnsr   _record_updater   _corer   r   r   r
   r   r   r   <module>r(      s/   , #    ( 
, ,r   