AlkantarClanX12

Your IP : 3.16.76.102


Current Path : /opt/alt/python312/lib64/python3.12/email/mime/__pycache__/
Upload File :
Current File : //opt/alt/python312/lib64/python3.12/email/mime/__pycache__/audio.cpython-312.opt-1.pyc

�

�Q�f���dZdgZddlmZddlmZddlmZGd�de�ZgZ	d�Z
d�Zed	��Zed
��Z
ed��Zy)
z/Class representing audio/* type MIME documents.�	MIMEAudio�)�BytesIO)�encoders)�MIMENonMultipartc�6�eZdZdZdej
fdd�d�Zy)rz,Class for generating audio/* MIME documents.N)�policyc��|�t|�}|�td��tj|d|fd|i|��|j	|�||�y)a�Create an audio/* type MIME document.

        _audiodata contains the bytes for the raw audio data.  If this data
        can be decoded as au, wav, aiff, or aifc, then the
        subtype will be automatically included in the Content-Type header.
        Otherwise, you can specify  the specific audio subtype via the
        _subtype parameter.  If _subtype is not given, and no subtype can be
        guessed, a TypeError is raised.

        _encoder is a function which will perform the actual encoding for
        transport of the image data.  It takes one argument, which is this
        Image instance.  It should use get_payload() and set_payload() to
        change the payload to the encoded form.  It should also add any
        Content-Transfer-Encoding or other headers to the message as
        necessary.  The default encoding is Base64.

        Any additional keyword arguments are passed to the base class
        constructor, which turns them into parameters on the Content-Type
        header.
        Nz!Could not find audio MIME subtype�audior)�_what�	TypeErrorr�__init__�set_payload)�self�
_audiodata�_subtype�_encoderr�_paramss      �7/opt/alt/python312/lib64/python3.12/email/mime/audio.pyr
zMIMEAudio.__init__s^��,���Z�(�H����?�@�@��!�!�$���	-�&�	-�$+�	-�����$����)�__name__�
__module__�__qualname__�__doc__r�
encode_base64r
�rrrrs��6�,0�"�0�0��<@�rc�X�|dd}t|�}tD]}|||�x}s�|cSy)Ni)r�_rules)�data�hdr�fakefile�testfn�ress     rrr8s>���t��*�C��s�|�H�����h�'�'�3�'��J��rc�0�tj|�|S)N)r�append)�rulefuncs r�ruler&Gs��
�M�M�(���Orc�8�|jd�sy|dddvryy)NsFORM��>�AIFC�AIFFzx-aiff��
startswith��h�fs  r�_aiffr1Ls&���<�<�� ����2�w�$�$��rc�(�|jd�ryy)Ns.snd�basicr,r.s  r�_aur4Vs���|�|�G���rc�H�|jd�r|dddk7s|dddk7ryy)NsRIFFr(r)sWAVE�sfmt zx-wavr,r.s  r�_wavr7^s0��
�<�<�� �A�a��G�w�$6�!�B�r�(�g�:M��rN)r�__all__�ior�emailr�email.mime.nonmultipartrrrrr&r1r4r7rrr�<module>r<su��
6��-����4� � � �F
����
�����������r