%PDF- %PDF-
Mini Shell

Mini Shell

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

�

=	f���4�dZdZdZdZddlZddlZddl�ddlmZm	Z	m
Z
mZddlm
Z
d	Zd
Zd;d�Zd<d
�Zd�Zedddfdezdddfe	j&e	j(e	j*e	j,e	j.ddde	j0ddezdd
fe	j2e	j4ddddezddd
fdgZe
j8eeeeeefddd��	Zej?d d!d"gd
�#�\Z Z!Z"Z#Z$Z%d$e&jNzZ(ejRjUe(�r	ejVe(�e-j]e(�e-j_e-j`�	ddl1Z1dd%l1m2Z2m3Z3dZ	ejldZ7e-jsd'e7z�e:e7�d(kre�ejv�	e7rejxe7�\Z!Z=Z>e!s#e-jd)�ejvd�e-jsd*e!z�ej�e!�ZAeAreAj�d+eC�eCk(r#e-jd,�ejvd(�dZ"e&j�ZDdZEd-e!vr&e�ree!e"eFeDeEd�ne-jd.�eAj�d/eG�ZHeHeGk7�re
j��ZJeJj��ZLeLe
j�k(re-j�d0�n2eLe
j�k(re-j�d1�ne-j�d2�eLe
j�k7r&e�ree!e"ePeDeEd3�ne-jd4�eAj�d5d
�ZQeQrYd6e7zZRe-j�eR�e	j�eR�\ZTZUeTdk(re-jsd7e!z�ne-jkd8e!z�e-jsd:�y#e,$rY���wxYw#e4$re-jkd&�d
ZY���wxYw#e8$rdZ7Y���wxYw#eV$re-jd9�Y�cwxYw)=z1.2zHP device config using USBzhp-config_usb_printerz�Udev invokes this tool. Tool detects the plugin, Smart Install (C/DVD-ROM) issues and notifies to logged-in user. Tool also downloads firmware to the device.�N)�*)�device�utils�module�services)�
pluginhandlerzcom.hplip.StatusServiceF�c�
�tdk(rytjd�|||||||g}tjdt
d�}|j|ddi�t�j|�tjd�y)NFzsend_message() entered�/�Event�	signature�ssisisszsend_message() returning)	�DBUS_AVIALABLE�log�debug�lowlevel�
SignalMessage�DBUS_SERVICE�append�	SystemBus�send_message)	�
device_uri�printer_name�
event_code�username�job_id�title�	pipe_name�args�msgs	         �&/usr/share/hplip/config_usb_printer.pyrr+sr�������I�I�&�'���j�(�F�E�9�U�D�
�
 �
 ��l�G�
<�C��C�J�J�T�*��*�
�K���S�!��I�I�(�)�c��tjt|ttt
�t
jd�y)Nr)r�format_text�USAGE�	__title__�__mod__�__version__�sys�exit)�typs r!�usager,9s#��	���e�S�)�W�k�B��H�H�Q�Kr"c�j�tdk(ryd}tjd�\}}|durntj�dk(rt
j
d�nAt
jd�tj�tjd�\}}|dk(rd}t
jd�|S)NFz
hp-systrayrz@ hp-systray must be running.
 Run 'hp-systray &' in a terminal. zStarting hp-systray serviceTzhp-systray service is running
)rr�Is_Process_Running�os�getuidr�error�infor�run_systrayr)�Systray_Is_Running�status�outputs   r!�
start_systrayr7?s����������,�,�\�:�M�F�6�
���
�9�9�;�!���I�I�[�\��H�H�2�3�� � �"�!�4�4�\�B�M�F�6�
��~����	�	�3�4��r"�nameTz$Usage: %s [OPTIONS] [USB bus:device]�summary)z[USB bus:device]r	�headingF)zUSB bus:device :zx"xxx:yyy" where 'xxx' is the USB bus and 'yyy' is the USB device. (Note: The ':' and all leading zeros must be present.)�optionF)r	z3Use the 'lsusb' command to obtain this information.r;FzUSB, IDs specified:z$%s 001:002�example)z-1. Using 'lsusb' to obtain USB IDs: (example)r	�noteF)z
   $ lsusbr	r=F)z9         Bus 003 Device 011: ID 03f0:c202 Hewlett-Packardr	r=Fz   $ %s 003:011r=)zn   (Note: You may have to run 'lsusb' from /sbin or another location. Use '$ locate lsusb' to determine this.)r	r=T)�run_as_root_ok�quiet�ghz	time-out=ztimeout=)�handle_device_printerz%s/hplip_config_usb_printer.log)rrzFailed to Import DBUS zparam=%s�zThis is not a valid devicez
Setting up device: %s
zsupport-typezUnsupported printer model.�SMART_INSTALL_ENABLEDz�SMART INSTALL (CD/DVD-ROM) is enabled in the system. Refer http://hplipopensource.com/hplip-web/index.html for more information.�pluginz"Device Plugin is already installedzHP Device Plug-in is not foundz>HP Device Plug-in version mismatch or some files are corrupted�
AutoConfigzVHP Device plugin's are not installed. Please install plugin's using hp-plugin command.zfw-downloadzhp-firmware -y3 -s %szFirmware downloaded to %s z(Failed to download firmware to %s devicez	User exitzDone.)r	)�text)Wr(r&r'�__doc__r)r/�base.g�baserrrr�	installerrrrrr,r7�
USAGE_OPTIONS�USAGE_LOGGING1�USAGE_LOGGING2�USAGE_LOGGING3�
USAGE_HELP�USAGE_EXAMPLES�USAGE_SPACE�USAGE_NOTESr%�Module�INTERACTIVE_MODE�mod�parseStdOpts�optsrr�mode�
ui_toolkit�loc�prop�user_dir�LOG_FILE�path�exists�remove�OSErrorr�set_logfile�	set_where�LOG_TO_CONSOLE_AND_FILE�dbusrr�ImportError�warnr�param�
IndexErrorr�lenr*�makeURI�sane_uri�fax_urir1�queryModelByURI�mq�get�SUPPORT_TYPE_NONErr�EVENT_DIAGNOSE_PRINTQUEUE�PLUGIN_NONErD�PluginHandle�	pluginObj�	getStatus�
plugin_sts�PLUGIN_INSTALLEDr2�PLUGIN_NOT_INSTALLED�EVENT_AUTO_CONFIGURE�fw_download_req�fw_cmd�run�fw_sts�fw_out�KeyboardInterrupt�r"r!�<module>r�sg��.��(�	�
!��j���	��0�0�#�'����
*���,�B���
%�1�G�;�R��D�
Q�
�
�
�
�
�
�� 4� 4�e�6J�6J�
�
�
�
4�p�
V�
�
�
� �-��"9�9�e�
L�
�
�
�
�
�
�
N�
+�
Z��g�&��F�E�
:�O�!	
��(�f�m�m�G�Y��W�e�FV�EX�Z^�os�{�A��8;�8H�8H��{�\f�Ng�D�8H�9E�5��j�,��j�#�,�T�]�]�:���7�7�>�>�(��
���	�	�(��������
�
�c�)�)�*���(�
�N���H�H�Q�K�E��	�	�*�u�
���u�:��>�	�G��C�H�H�J�8��(6����u�(=�%�
�H�g���	�	�.�/��������I�I�)�J�6�7�	��	�	�
�	+�B�
�����(9�:�>O�O��	�	�.�/��������L��}�}�H�
�F��*�,��?��*�l�4M�x�Y_�`b�c��I�I�Y�
Z��V�V�H�k�
*�F�
���-�=�-�-�/�y��'�'�)�z�
�
�6�6�
6�

�(�(�7�
8��-�<�<�<�

�(�(�3�
4�

�(�(�S�
T�
�
�6�6�
6��o��Z�,�8L�h�X^�`l�m��y�y�q�r����
�u�5��
�+�E�1�6��8�8�F��%�E�I�I�f�-�>�6�6���k��y�y�5�j�@�A��x�x�B�:�M�N�
�	�	�'���g�
��
�����H�H�
%�&��N������E���~���I�I�k���sI�O�O�'O0�.HO>�O�
O�O-�,O-�0O;�:O;�>P�P

Zerion Mini Shell 1.0