
    i                    H    S r SSKJr  SSKJrJr  SSKJr  \r	 " S S5      r
g)	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   )DNSQuestion	DNSRecord)_DUPLICATE_QUESTION_INTERVALc                  J    \ rS rSrSrS
S jrSS jrSS jrSS jrS
S jr	Sr
g	)QuestionHistory"   z%Remember questions and known answers.c                    0 U l         g)zInit a new QuestionHistory.N_historyselfs    H/home/sebas/venvs/catt/lib/python3.13/site-packages/zeroconf/_history.py__init__QuestionHistory.__init__%   s	    IK    c                $    X#4U R                   U'   g)z'Remember a question with known answers.Nr   )r   questionnowknown_answerss       r   add_question_at_time$QuestionHistory.add_question_at_time)   s    #&"6hr   c                |    U R                   R                  U5      nU(       d  gUu  pVX%-
  [        :  a  gXc-
  (       + $ )a  Check to see if a question should be suppressed.

https://datatracker.ietf.org/doc/html/rfc6762#section-7.3
When multiple queriers on the network are querying
for the same resource records, there is no need for them to all be
repeatedly asking the same question.
F)r   getr   )r   r   r   r   previous_questionthanprevious_known_answerss          r   
suppressesQuestionHistory.suppresses-   sC     !MM--h7 '8$:44 *999r   c                    / nU R                   R                  5        H(  u  p4Uu  pVX-
  [        :  d  M  UR                  U5        M*     U H  nU R                   U	 M     g)z$Expire the history of old questions.N)r   itemsr   append)r   r   removesr   now_known_answersr   _s          r   async_expireQuestionHistory.async_expireA   sX    %'+/==+>+>+@'H'GDz88x( ,A  Hh'  r   c                8    U R                   R                  5         g)zClear the history.N)r   clearr   s    r   r*   QuestionHistory.clearK   s    r   r   N)returnNone)r   r   r   _floatr   set[DNSRecord]r,   r-   )r   r   r   r.   r   r/   r,   bool)r   r.   r,   r-   )__name__
__module____qualname____firstlineno____doc__r   r   r   r'   r*   __static_attributes__ r   r   r	   r	   "   s    /L7:((r   r	   N)r5   
__future__r   _dnsr   r   constr   floatr.   r	   r7   r   r   <module>r<      s&   , # ( /
 
+ +r   