Ë
    |;iÛ  ã                  óâ   — d Z ddlmZ ddlmZ ddlmZmZ ddlm	Z	 ddl
mZmZ eeee   f   ZeZdZ ed	«      Zeez  ZeZ G d
„ d«      Z G d„ d«      Z	 	 	 	 dd„Z	 	 	 	 	 	 	 	 	 	 dd„Z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)Ú
attrgetteré   )ÚDNSQuestionÚ	DNSRecord)ÚDNSOutgoing)Ú	_FLAGS_AAÚ_FLAGS_QR_RESPONSE)é   éx   Únamec                  ó8   — e Zd ZdZdZ	 	 	 	 	 	 	 	 	 	 dd„Zdd„Zy)ÚQuestionAnswersz!A group of answers to a question.)Úmcast_aggregateÚmcast_aggregate_last_secondÚ	mcast_nowÚucastc                ó<   — || _         || _        || _        || _        y)zInitialize a QuestionAnswers.N©r   r   r   r   )Úselfr   r   r   r   s        úM/home/ubuntu/myenv/lib/python3.12/site-packages/zeroconf/_handlers/answers.pyÚ__init__zQuestionAnswers.__init__2   s"   € ð ˆŒ
Ø"ˆŒØ.ˆÔØ+FˆÕ(ó    c           	     óp   — d| j                   › d| j                  › d| j                  › d| j                  › d	S )z7Return a string representation of this QuestionAnswers.zQuestionAnswers(ucast=z, mcast_now=z, mcast_aggregate=z, mcast_aggregate_last_second=ú)r   )r   s    r   Ú__repr__zQuestionAnswers.__repr__?   sJ   € ð % T§Z¡Z L°¸T¿^¹^Ð<Lð MØ#×3Ñ3Ð4ð 5+Ø+/×+KÑ+KÐ*LÈAðOð	
r   N)
r   Ú_AnswerWithAdditionalsTyper   r   r   r   r   r   ÚreturnÚNone)r   Ústr)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	__slots__r   r   © r   r   r   r   -   sK   „ Ù+àX€IðGà)ðGð .ðGð 4ð	Gð
 &@ðGð 
óGô
r   r   c                  ó,   — e Zd ZdZdZ	 	 	 	 	 	 	 	 dd„Zy)ÚAnswerGroupz9A group of answers scheduled to be sent at the same time.)ÚanswersÚ
send_afterÚsend_beforec                ó.   — || _         || _        || _        y )N)r*   r+   r)   )r   r*   r+   r)   s       r   r   zAnswerGroup.__init__M   s   € ð %ˆŒØ&ˆÔØˆr   N)r*   Úfloat_r+   r-   r)   r   r   r   )r!   r"   r#   r$   r%   r   r&   r   r   r(   r(   H   s5   „ ÙCà8€Iðàðð ðð ,ð	ð
 
ôr   r(   c                ó>   — t        t        d«      }t        || «       |S )ú-Add answers and additionals to a DNSOutgoing.T)r   Ú_FLAGS_QR_RESPONSE_AAÚ_add_answers_additionals)r)   Úouts     r   Ú$construct_outgoing_multicast_answersr3   X   s    € ô Ô+¨TÓ
2€CÜ˜S 'Ô*Ø€Jr   c                ót   — t        t        d|«      }|r|D ]  }|j                  |«       Œ t        || «       |S )r/   F)r   r0   Úadd_questionr1   )r)   Úucast_sourceÚ	questionsÚid_r2   Úquestions         r   Ú"construct_outgoing_unicast_answersr:   a   sB   € ô Ô+¨U°CÓ
8€CáØ!ò 	'ˆHØ×Ñ˜XÕ&ð	'ä˜S 'Ô*Ø€Jr   c                óÐ   — t        |«      }t        |t        ¬«      D ]G  }| j                  |d«       ||   }|D ])  }||vsŒ| j	                  |«       |j                  |«       Œ+ ŒI y )N)Úkeyr   )ÚsetÚsortedÚNAME_GETTERÚadd_answer_at_timeÚadd_additional_answerÚadd)r2   r)   ÚsendingÚanswerÚadditionalsÚ
additionals         r   r1   r1   q   sm   € ä! '›l€Gô ˜¤kÔ2ò (ˆØ×Ñ˜v qÔ)Ø˜f‘oˆØ%ò 	(ˆJØ Ò(Ø×)Ñ)¨*Ô5Ø—‘˜JÕ'ñ	(ñ(r   N)r)   r   r   r   )
r)   r   r6   Úboolr7   zlist[DNSQuestion]r8   Úint_r   r   )r2   r   r)   r   r   r   )r$   Ú
__future__r   Úoperatorr   Ú_dnsr   r   Ú_protocol.outgoingr   Úconstr	   r
   Údictr=   r   ÚintrH   ÚMULTICAST_DELAY_RANDOM_INTERVALr?   r0   Úfloatr-   r   r(   r3   r:   r1   r&   r   r   ú<module>rR      s·   ðñõ, #å ç )Ý ,ß 1à! )¨S°©^Ð";Ñ<Ð à
€ð #,Ð á˜Ó €à*¨YÑ6Ð à	€÷
ñ 
÷6ñ ð Ø'ðàóðØ'ðàðð !ðð 
ð	ð
 óô (r   