%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/share/system-config-printer/__pycache__/
Upload File :
Create Path :
Current File : //usr/share/system-config-printer/__pycache__/monitor.cpython-312.pyc

�

Hfq���(�ddlZddlZejd�ddlZddlZddlmZddlmZddlZddl	�ddl
Z
ddlZejejej��ddlZddlZddlmZdZd	Zd
�Zd�ZGd�d
ej�Zedk(rdGd�d�Zed�e�Zee�ej7�ej8�Z	ej=�ej?�yy#ej?�wxYw)�Nz1.9.50)�GObject)�GLib)�*)�domain�	localedir)�StateReason�<�c��|jd�sD|jd�s3|jd�s"|jd�s|jd�ryy)Nzmoving-to-paused�paused�shutdown�stoppingzstopped-partlyTF)�
startswith)�reasons �+/usr/share/system-config-printer/monitor.py�state_reason_is_harmlessr'sP�����-�.����8�$����:�&����:�&����+�,���c	� �i}	|j�}|j�D]L\}}|d}|D]=}|dk(r�t	|�r�||vrg||<||jt
|||���?�N|S#tj$r|cYSwxYw)N�printer-state-reasons�none)�getPrinters�cups�IPPError�itemsr�appendr)�
connection�ppdcache�result�printers�name�printer�reasonsrs        r�collect_printer_state_reasonsr#0s���
�F���)�)�,��"���*�	G�
��g��1�2���	G�F�����'��0���6�!�!��t���4�L����d�F�H�!E�F�	G�	G��M���=�=���
��s�A5�5B
�B
c�J�eZdZejj
ddfejj
ddfejj
dejffejj
dejffejj
dejffejj
deffejj
deeejejffejj
deeejejffejj
deeejffejj
deffejj
deeejffejj
deffejj
ddfejj
ddfejj
deeffd�Z	dZ
dZ			dd�Zd�Z
d�Zd	�Zd
�Zd�Zd�Zifd
�Ze�ifd�Zd�Zdd�Zd�Zdd�Zd�Zd�Zd�Zy)�MonitorN�)�refresh�monitor-exited�state-reason-added�state-reason-removed�still-connecting�
now-connected�	job-added�	job-event�job-removed�
printer-added�
printer-event�printer-removed�cups-connection-error�cups-connection-recovered�cups-ipp-errorz/com/redhat/PrinterSpoolerzcom.redhat.PrinterSpoolerc��tjj|�||_||_||_i|_i|_t�|_d|_	d|_
d|_|rtj|�|rtj|�|rtj|�tj �|_tj$�|_tj(�|_tj,�|_t1j2|j&|j*|j.��|_d|_i|_i|_t�|_i|_d|_d|_ |�	tCjD�}||_%|�2|jM|jN|jP|jR��d|_*y#tBjFjH$rY�bwxYw)NTF��host�port�
encryptionz
not-completed��path�dbus_interface���)+r�__init__�my_jobs�specific_dests�monitor_jobs�jobs�printer_state_reasons�setr�process_pending_events�fetch_jobs_timer�cups_connection_in_errorr�	setServer�setPort�
setEncryption�getUser�user�	getServerr8�getPortr9�
getEncryptionr:r�PPDCache�
which_jobs�reasons_seen�connecting_timers�still_connecting�connecting_to_device�received_any_dbus_signals�update_timer�dbus�	SystemBus�
exceptions�
DBusException�bus�add_signal_receiver�handle_dbus_signal�	DBUS_PATH�
DBUS_IFACE�sub_id)�selfr]r@rArBr8r9r:s        rr?zMonitor.__init__ks���	��� � �$�'����,���(�����	�%'��"����
�&*��#� $���(-��%���N�N�D�!���L�L�$������
�+��L�L�O��	��N�N�%��	��L�L�O��	��,�,�/��� �)�)��	�	�04�	�	�6:�o�o�G��
�*������!#��� #����$&��!�).��&� ����;�
��n�n�'��
����?��#�#�T�%<�%<�*.�.�.�48�O�O�
$�
E������?�?�0�0�
��
�s�G�G>�=G>c�6�|jj�S�N)r�copy�rcs r�get_printerszMonitor.get_printers�s���}�}�!�!�$�$rc�6�|jj�Sre)rCrfrgs r�get_jobszMonitor.get_jobs�s���y�y�~�~� � rc��|jSre)rrgs r�get_ppdcachezMonitor.get_ppdcache�s���}�}�rc�&�|jdk7r�tj�}	tj|j�tj
|j|j|j��}|j|j�td|jz�tj|�|j�<|jj|j|j|j��t!|j"j%��}|j&|j(fD]}|s�|j+|��|D]}t-j.|��|j1d�y#Y��xYw)Nr>r7�Canceled subscription %dr;r()rbrrL�setUserrM�
Connectionr8r9r:�cancelSubscription�
debugprintr]�remove_signal_receiverr_r`ra�listrT�valuesrXrGrr�
source_remove�emit)rcrM�c�timers�timers     r�cleanupzMonitor.cleanup�s?���;�;�"���<�<�?�D�
����d�i�i�(��O�O�$�)�)�*.�)�)�04���A���$�$�d�k�k�2��6����D�E�
�L�L�$���8�8���H�H�+�+�T�-D�-D�26�.�.�<@�O�O�
,�
M��d�,�,�3�3�6�7���'�'��)>�)>�?�	&�E���
�
�u�%�	&��	'�E�����&�	'�	
�	�	�#�$��!
��s�BF�Fc��||_yre)rF)rc�whethers  r�set_process_pendingzMonitor.set_process_pending�s
��&-��#rc��|js1tjd|j|�}||j|<y||jvr
|j|=td|z�|j
�\}}|j|�y)z8Timer callback to check on connecting-to-device reasons.��Fz%Still-connecting timer fired for `%s')rFr�timeout_add�check_still_connectingrTrr�sort_jobs_by_printer�update_connecting_devices)rcr!rz�printer_jobs�my_printerss     rr�zMonitor.check_still_connecting�s����*�*��$�$�c�4�+F�+F�&-�/�E�.3�D�"�"�7�+���d�,�,�,��&�&�w�/��;�g�E�F�&*�&?�&?�&B�#��{��&�&��5�rc�V�tj�}i}d}|jj�D�]�\}}d}|D�]^}|j�dk(s�d}	|j	|i�j�D]<\}
}|j	dt
j�}|t
jk(s�:d}	n|	std���|j�}|jj	||�}
|
||<td||
z
z�||
z
tk\r�|	r�||jvr-|jj|�|jd|�||jvr=t!j"|j|�|j|=td|z�d}n|s��q||jvs���t!j"|j|�|j|=td|z����t%�}|jD]v}||vs�|j|�|jd	|�||jvs�:t!j"|j|�|j|=td|z��x|jj'|�|_||_
y
)z;Updates connecting_to_device dict and still_connecting set.FT�connecting-to-device�	job-statez%Ignoring stale connecting-to-device xzConnecting time: %dr+z!Stopped connecting timer for `%s'r,N)�timerDr�
get_reason�getr�IPP_JOB_CANCELED�IPP_JOB_PROCESSINGrr�get_printerrV�CONNECTING_TIMEOUTrU�addrwrTrrvrE�
difference)rcr��time_nowrV�troubler!r"�	connectedr�have_processing_job�job�data�state�t�removes               rr�z!Monitor.update_connecting_devices�s����9�9�<��!���� $� :� :� @� @� C�(	K��G�W��I�!�!
���$�$�'�+A�A�*/�'�%1�%5�%5�w��%C�%I�%I�%L�"�	��T� $���+�*.�*?�*?�!A�� �D�$;�$;�;�26�/�!�"�/�"�$K�L� �%�0�0�3�G��1�1�5�5�w��I�A�45�(��1�� 5��A�� F�G��!�|�'9�9�.�&�d�.C�.C�C� $� 5� 5� 9� 9�7� C� $�	�	�+=�v� F�&�$�*@�*@�@� $� 2� 2�D�4J�4J�5<�5>�!?�$(�$:�$:�7�$C� *�-7�9@�-A�!B�!&�I��C!
�F�W��(>�(>�>��"�"�D�$:�$:�7�$C�D��*�*�7�3��?�'�I�J�Q(	K�V����,�,�	O�G��2�2��
�
�G�$��	�	�?�G�4��d�4�4�4��&�&��(>�(>�w�(G�H��.�.�w�7�� C�g� M�N�	O�!%� 5� 5� @� @�&� I���$8��!rc�v��t�jj��}t�}�jj�D�]x\}}|D�]l}|j
�}|j�}|j|�|�jvr(tj�fd�|�|�j|<|j�dk(s�|�jvs��d}	|j|i�j�D]<\}
}|jdtj�}|tj k(s�:d}	n|	rGtj"dt$z�j&|�}
|
�j(|<t+d|z���8t+d�t-�s��Ot+t/j0|����o��{�j3|�t�jj��}|D]<}||vs��j|}�j|=tj�fd	�|��>y)
Nc�(���jd|�S)Nr)�rw��xrcs �r�<lambda>z-Monitor.check_state_reasons.<locals>.<lambda> s���'+�y�y�2F��'J�rr�Fr�Tr
zStart connecting timer for `%s'z#Ignoring stale connecting-to-devicec�(���jd|�S)Nr*r�r�s �rr�z-Monitor.check_state_reasons.<locals>.<lambda>Fs������4J�A�)N�r)rtrS�keysrErDr�	get_tupler�r�r�idle_addr�rVr�rr�r��timeout_add_secondsr�r�rTrr�
get_debugging�pprint�pformatr�)rcr�r��old_reasons_seen_keys�reasons_nowr!r"r�tupler�r�r�r�r�rs`              r�check_state_reasonszMonitor.check_state_reasonss��� $�T�%6�%6�%;�%;�%>� ?���e�� $� :� :� @� @� C�$	G��G�W�!�#
G���(�(�+�� �,�,�/������'��� 1� 1�1��M�M�$K�#)�+�06�D�%�%�e�,��%�%�(�,B�B��4�#<�#<�<�+0�'�%1�%5�%5�w��%C�%I�%I�%L�"�	��T� $���+�*.�*?�*?�!A�� �D�$;�$;�;�26�/�!�"�+� �4�4��!3�3� �7�7�#�%��;<��.�.�w�7�"�$E�$+�%,�-�#�$I�J�(�+�&�����(E�F�G#
G�$	G�L	
�&�&��5��T�&�&�+�+�.�/���	'�E��K�'��*�*�5�1���%�%�e�,��
�
�N�%�'�	'rc	�8�|jrtj|j�d|_|js1tjd|j
�|_t
d�yt
d�tj�}	tj|j�tj|j|j|j��}		|j|j g|j"dzg�}|j4r#d|_t
d�|j/d�tj|�|j6j9�}|dD�]z}|d}||_|d}	t
d||	|dfz�t;�rt
t=j>|��|	jAd��r~|d}
|	dk(r=|
|jBvr/|jBjE|
�|j/d|
��n5|	dk(r�|
|jBvr�|jBjG|
�tI|jJjM��}|D]9}|d|
k(s�|jJ|}
|jJ|=|j/d|
��;|
|jNvr
|jN|
=|j/d|
�nx|
|jBvrj|d}g}|D];}
|
dk(rn4tQ|
�r�|jStU|
|
|jV���=||jN|
<|j/d|
|	|����|	jAd�st
dtY|	�z���|d}|	d k(s|	d!k(r�||vr�|d"tjZk(r�|j\�|d|j\vr��S	|j_|�}|j`r|d#tj�k7r���|||<|j/d&||	|||j9��nH|	d'k(s|	d!k(r>|d"tjdk(r(|jfd(vr	||=|j/d)||	|���	||}|j\�*|d|j\vr||=|j/d)||	|���=d*D]
}||||<�d+|vr|d+|d,<|j/d-||	||j9����}|jid�|jk|�||_|jid�|jls:|d.}tjn||j
�}t
d/|z�||_y#t$$r |j|j g�}Y���wxYw#tj&$r�}|j(\}}tj|�|tj*k(r'd|_t
d�|j-�Yd}~y|j/d	||�|tj0k(rYd}~yt
d
||fz�Yd}~yd}~wwxYw#t2$r;tj|�t
d�d|_|j/d
�YywxYw#tb$rd$d%i||<Y���tj&$r4}|j(\}}|j/d	||�d$d%i||<Yd}~���d}~wwxYw#tb$rY���wxYw#tb$rY���wxYw)0Nr�z#Deferred get_notifications by 200msF�get_notificationsr7r
r>z$Subscription not found, will refreshr5z$getNotifications failed with %d (%s)Tz!cups-connection-error, will retryr3r4�eventsznotify-sequence-numberznotify-subscribed-eventz%d %s %sznotify-textzprinter-zprinter-namer0�printer-deletedr*r2rrr1zjob-zUnhandled nse %sz
notify-job-id�job-created�job-state-changedr��job-originating-user-name�job-k-octetsrr-�
job-completed)�	completed�allr/)r��job-nameznotify-printer-uri�job-printer-urir.znotify-get-interval�Next notifications fetch in %ds)8rXrrvrFr�r�rrrrLrorMrpr8r9r:�getNotificationsrb�sub_seq�AttributeErrorr�args�
IPP_NOT_FOUNDr'rw�
IPP_FORBIDDEN�RuntimeErrorrHrCrfr�r�r�rrr�r�rtrSr�rDrrrr�reprr�rA�getJobAttributesr@�KeyError�IPP_JOB_COMPLETEDrRr~�update_jobsrWr�)rcrMrx�
notifications�e�mrC�event�seq�nser rr�rrDr"�jobid�attrsr��	attribute�intervalr�s                      rr�zMonitor.get_notificationsIs���������� 1� 1�2� ����*�*� $� 0� 0�#�59�5K�5K�!M�D���=�>���'�(��|�|���!	��L�L�$�)�)�$����d�i�i�&*�i�i�,0�O�O�=�A�
�G�$%�$6�$6����
�9=����9I�8J�%L�M�6�(�(�,1�D�)��3�4��I�I�2�3����d���y�y�~�~� ��"�8�,�e	D�E��0�1�C��D�L��1�2�C��
�c�3��m�0D�%E�E�F����F�N�N�E�2�3��~�~�z�*��^�,���/�)�d�$�-�-�.G��M�M�%�%�t�,��I�I���5��-�-�$�$�-�-�2G��M�M�(�(�$�/� ��!2�!2�!7�!7�!:�;�E�!&�G�� ��8�t�+�%)�%6�%6�u�%=�F� $� 1� 1�%� 8� �I�I�'=�v�F�	G��t�9�9�9� �6�6�t�<��I�I�0�$�7��T�]�]�*�,1�2I�,J�)� �G�"7�E��!�V�+�!�3�V�<�$�����T�6�59�]�]�)D�E�E�8?�D�.�.�t�4��I�I���c�5�A���>�>�6�*��.��s��;�<���/�*�E��}�$��+�+��d�"��{�#�t�'>�'>�>��'�'�3��.�)��1D�1D�D��6��.�.��6�E�����9�:�d�l�l�o�M� �"'�D��K��	�	�;��s�E�4��;�;K�;K�;N�O���(��-�-���%��)?�)?�?����+?�?�� ��K��	�	�=�%��e�D��
��5�k���#�#�/��n�%�T�-@�-@�@���K��	�	�=�%��e�<��*�
2�	�!&�y�!1��I��
2�$�u�,�).�/C�)D��%�&��I�I�{�E�3��s�x�x�{�C�Ke	D�N	
� � �%�(����$����	�� � �$�'��-�-�$�%:�;�H��(�(�(�*.�*@�*@�B�A��9�H�D�E� !�D����k&�G�$%�$6�$6����
�$F�M�G���=�=�
������A����d�#���*�*�*�"$�D�K�� F�G��L�L�O� ��	�	�+�Q��2���*�*�*� ��B�a��V�K�L���
�� �	��L�L�$���;�<�,0�D�)��I�I�.�/��	��^ �6�#1�1�"5�D��K��}�}�6��V�V�F�Q���I�I�/��A�6�#1�1�"5�D��K��6��$������
��
�s��AY�'+U4�	7Z �Z �[<�7\�4%V�V �V�V � Y�3AY�Y�&Y�7Y�<Y�Y�Y�Y�AZ�Z� [9�3[9�)[4�4[9�<	\	�\	�	\�\c��
��td��jd�|�|�_tj�}	tj
�j�tj�j�j�j��}�jdk7rf	|j�j��j$rtj&�j$�d�_td�jz�	�`gd�}�j,r|j/gd��	|j1d	|�
��_td�jt3|�fz�tj
|��jdk7rf�j$rtj&�j$�tj4t6�j8��_td
t6z��j,rԉj:j=�}�jdvrSi}	|j?�D]<\}
}|jAdtjB�tjBks�8||	|
<�>|	}d�_"�jFrtj&�jF�tjHd�jJ|��_#ni}	tM|�jN�}|�_(|jS�}
tU|
jW���_,�jZ�U|jW�D]B}
||
jAdd	�}|j]d	�}||dzd}|�jZvs�@||
=�D�j_d��jXD]}tj�fd�|��|j?�D]\}
}tj�fd�|
|��!�ja|�|�_�j_d�y#t$r8tj�jd�tj
|�YywxYw#tj $r4}|j"\}}tj�fd�||�Yd}~���d}~wwxYw#t*$rY���wxYw#tj $r4}|j"\}}tj�fd�||�Yd}~���d}~wwxYw#tj $r3}|j"\}}tj�fd�||�Yd}~yd}~wt$r#tj�jd�YywxYw)Nr'r7r3r>c�*���jd||�S�Nr5r��r�r�rcs  �rr�z!Monitor.refresh.<locals>.<lambda>s���D�I�I�7G��A�,N�rrn)r0zprinter-modifiedr�zprinter-state-changed)r�r�zjob-stoppedr�zjob-progress�/)r�z"Created subscription %d, events=%sc�*���jd||�Sr�r�r�s  �rr�z!Monitor.refresh.<locals>.<lambda>.�����	�	�3C�Q��(J�rr�)r�r�r�r
�c�*���jd||�Sr�r�r�s  �rr�z!Monitor.refresh.<locals>.<lambda>Wr�rr�Fc�(���jd|�S)Nr0r�r�s �rr�z!Monitor.refresh.<locals>.<lambda>hs���T�Y�Y���%C�rc�.���jd|di|�S)Nr-�r�)r�r�rcs  �rr�z!Monitor.refresh.<locals>.<lambda>js���"&�)�)�[�%��R��"M�rT)1rrrwrRrrLrorMrpr8r9r:r�rr�rbrqrr�rXrvr�r�rB�extend�createSubscriptionr�r��MIN_REFRESH_INTERVALr�rCrfrr�r��fetch_first_job_idrGr��
fetch_jobsr#rrDrrEr�rrA�rfindr~r�)rcrR�refresh_allrMrxr�r�r�rC�filteredr�r��r�dests�uri�ir!s`                rr'zMonitor.refresh�s�����I���	�	�9���!�(�D�O��|�|���	��L�L�$�)�)�$����d�i�i�&*�i�i�,0�O�O�=�A��;�;�"��
%��$�$�d�k�k�2�� � ��"�"�D�$5�$5�6� $�D���2�T�[�[�@�A�	���+������M�M�,�
-�	!��.�.��F�.�C�D�K��<����@D�f�
�@O�O�
P�	
���d���;�;�"��� � ��"�"�D�$5�$5�6� $� 8� 8�$��&�&�!(�D��
�9�,�-�
.�����9�9�>�>�$�D����&:�:���"&�*�*�-�.�J�E�3��w�w�� $� 5� 5�7�9=�9N�9N�O�*-����.� ��&'�D�#��$�$��"�"�D�$9�$9�:�$(�$4�$4�a����6A�%C�D�!��D�	�-�q�$�-�-�@�A�)*�D�&��M�M�$�E���
�
�
�.�D�M����*�����
$���5�k�o�o�&7��=���I�I�s�O���a�!�e�f�+���$�"5�"5�5��U��
$�	
� � �%�(��}�}�	N�G��M�M�C�W�M�	N��*�*�-�	'�J�E�3��M�M�N� �#�
'�	'�	
���$����	�� � �$�'���W�	��M�M�4�9�9�&=�>��L�L�$���	���=�=�
%������A��
�
�N� �!�%�%��
%���	��	��$�}�}�	!��V�V�F�Q���M�M�J��a�
!�
!��	!��R�}�}�	��V�V�F�Q���M�M�J��a�
!����	��M�M�4�9�9�&=�>��	�ss�AP�!Q�R&�-;R6�AT�>Q�Q�R#�/)R�R#�&	R3�2R3�6S=�	)S8�8S=�U0�)U�,U0�/U0c	�p�|jsytj�}	tj|j�tj
|j|j|j��}d}gd�}	|j|j|j|j||��}tj|�t%|�}	t'd	|	�d
|���|j(j+�}
t-|j/��}|j1�|	dkDrL||	dz
}||jkrG|j|zdz
}t'dt3|�z�t'd
�n|j|zdz
}t5|j|dz�D]�}
	||
}|j6�?|j9dd�}|j;d�}||dzd}||j6vrt<�|
|
vrd}nd}||
|
<|j||
di|j+����t-|
j/��}|j1�|	|krCd}t5t%|��D]*}||}
|s|
|kDrd}|s�|
|
=|jd|
di��,|j?|
�|
|_|	|krd|_y
dz}|s$||j(vr|dz
}|s||j(vr�||_y#t$r0|jd�d|_tj|�YywxYw#tj $rH}|j"\}}|jd||�d|_tj|�Yd}~yd}~wwxYw#t<$r|
|
vr|
|
=|jd|
di�Y��wxYw)NTr7r3Fr
)zjob-idr�r�r�r�r�ztime-at-creation)rRr@�first_job_id�limit�requested_attributesr5zGot z jobs, asked for rzUnexpected job IDs returned: %szThat's not what we asked for!r�r�r.r-r�r/) rFrrLrorMrpr8r9r:r�rwrG�getJobsrRr@r�rr��lenrrrCrfrtr��sortr��rangerAr�r�r�r�)rcr�rMrxr�r��fetchedr�r��gotrC�jobids�
last_jobidr�r�r�r�r!�n�trim�nexts                     rr�zMonitor.fetch_jobsrs����*�*���|�|���		��L�L�$�)�)�$����d�i�i�&*�i�i�,0�O�O�=�A���
!��	��i�i�D�O�O�)-���.2�.E�.E�',�67�	 �9�G�	
���d���7�m���3��>�?��y�y�~�~� ���g�l�l�o�&��������7���a���J��D�3�3�3�!�4�4�u�<�q�@�
��=��f�
�M�N��;�<��0�0�5�8�1�<�J��D�3�3�Z�!�^�D�	=�E�
=��e�n���&�&�2��'�'�"3�S�9�C��	�	�3��A�!�!�a�%�&�k�G��d�&9�&9�9�&���D�=�#�A�#�A�!��U���	�	�1�e�R��S�X�X�[�9�!	=�.�d�i�i�l�#��������;��D��C��L�)�
=���q�	����
� 2��D���U���I�I�}�e�R��<�
=�	
���$����	���;�$(�D�!���q�y���$�$�)�)�"3��A�I�D��$�$�)�)�"3�#'�����{�	��I�I�.�/�$(�D�!��L�L�$���		��(�}�}�	��V�V�F�Q���I�I�'��A�.�$(�D�!��L�L�$����	��N�
=��D�=��U���I�I�}�e�R��<��	
=�s=�AK3�?4L/�'BN
�36L,�+L,�/N
�>N�N
�
$N5�4N5c�|�|�|j}t�}i}|j�D]�\}}|jdtj
�}|tj
k\r�:|jdd�}|j
d�}|dk(r�c||dzd}	|j|	�|	|vri||	<|||	|<��||fS)Nr�r�r�r�r>r
)rCrErr�rr�r�r�)
rcrCr�r�r�r�r�r�r�r!s
          rr�zMonitor.sort_jobs_by_printer�s����<��9�9�D��e��������	.�I�C���H�H�k�4�+@�+@�A�E���-�-�-���(�(�-�r�2�C��	�	�3��A��B�w���!�a�%�&�k�G��O�O�W�%��l�*�(*��W�%�)-�L��!�#�&�	.��k�*�*rc�f�td�|j|�\}}|j||�y)Nr�)rrr�r�)rcrCr�r�s    rr�zMonitor.update_jobs�s/���M�"�&*�&?�&?��&F�#��{�� � �+�|�<rc��|jrtj|j�tjd|j�|_td�y)Nr�z1Next notifications fetch in 200ms (update called))rXrrvr�r�rrrgs r�updatezMonitor.update�sC��������� 1� 1�2� �,�,�c�4�3I�3I�J����G�Hrc�b�td�|j�|jsd|_yy)Nz(D-Bus signal from CUPS... calling updateT)rrr�rW)rcr�s  rr_zMonitor.handle_dbus_signal�s*���>�?������-�-�-1�D�*�.r)NTNTNNN)NTre)�__name__�
__module__�__qualname__r�SignalFlags�RUN_LAST�
TYPE_PYOBJECT�str�int�__gsignals__r`rar?rhrjrlr{r~r�r�rEr�r�r'r�r�r�r�r_r&rrr%r%Csq��")�"5�"5�">�">��b�!I�")�"5�"5�">�">��b�!I�")�"5�"5�">�">��#*�#8�#8�":�"<�")�"5�"5�">�">��#*�#8�#8�":�"<�")�"5�"5�">�">��#*�#8�#8�":�"<�")�"5�"5�">�">��#&�&�"*�")�"5�"5�">�">��#&��#*�#8�#8�#*�#8�#8�#;�"<�#*�"5�"5�">�">��#&��#*�#8�#8�#*�#8�#8�#;�"<�#*�"5�"5�">�">��#&��#*�#8�#8�#;�"<�#*�"5�"5�">�">��#&�&�"*�")�"5�"5�">�">��#&��#*�#8�#8�#;�"<�#*�"5�"5�">�">��#&�&�"*�")�"5�"5�">�">��b�!I�&-�&9�&9�&B�&B�D�"�%M�")�"5�"5�">�">��#&��+�"/�?!
�L�H+�I�*�J�)-�>B�'+�0�d%�!��%�8.��&68�;9�z/2�e�"�2'�hm�^x�th�T+�,=�
I�2rr%�__main__c�`�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zy)�
SignalWatcherc���|jd|j�|jd|j�|jd|j�|jd|j�|jd|j
�|jd|j�|jd|j�|jd|j�|jd	|j�|jd
|j�|jd|j�|jd|j�|jd
|j�y)Nr(r)r*r+r,r-r.r/r0r1r2r3r5)�connect�on_monitor_exited�on_state_reason_added�on_state_reason_removed�on_still_connecting�on_now_connected�on_job_added�on_job_event�on_job_removed�on_printer_added�on_printer_event�on_printer_removed�on_cups_connection_error�on_cups_ipp_error)rc�monitors  rr?zSignalWatcher.__init__s���O�O�-�t�/E�/E�F��O�O�1�4�3M�3M�N��O�O�3�!�9�9�
;��O�O�/��1I�1I�J��O�O�_�d�.C�.C�D��O�O�[�$�*;�*;�<��O�O�[�$�*;�*;�<��O�O�]�D�,?�,?�@��O�O�_�d�.C�.C�D��O�O�_�d�.C�.C�D��O�O�.��0G�0G�H��O�O�4�!�:�:�
<��O�O�-�t�/E�/E�Frc� �td|z�y)Nz*%s: monitor exited��print�rc�objs  rrzSignalWatcher.on_monitor_exiteds���'�#�-�.rc�&�td|�d|���y)Nrz: +r�rcrrs   rr
z#SignalWatcher.on_state_reason_added�����V�,�-rc�&�td|�d|���y)Nrz: -rr s   rrz%SignalWatcher.on_state_reason_removedr!rc�&�td|�d|���y)Nrz: still connecting: rr s   rrz!SignalWatcher.on_still_connecting s����f�=�>rc�&�td|�d|���y)Nrz: now connected: r)rcrr!s   rrzSignalWatcher.on_now_connected#s���c�7�;�<rc�$�td||fz�y)Nz*%s: job %d addedr�rcrr��	eventnamer��jobdatas      rrzSignalWatcher.on_job_added&s���%��e��4�5rc�&�td|||fz�y)Nz*%s: job %d event: %srr&s      rrzSignalWatcher.on_job_event)s���)�S�%��,?�?�@rc�&�td|||fz�y)Nz*%s: job %d removed (%s)r)rcrr�r'r�s     rrzSignalWatcher.on_job_removed,s���,�s�E�9�.E�E�Frc�&�td|�d|���y)Nrz: printer added: r�rcrr s   rrzSignalWatcher.on_printer_added/s���c�4�8�9rc�,�td|�d|�d|���y)Nrz: printer event: z: r)rcrr r'r�s     rrzSignalWatcher.on_printer_event2s���#�t�Y�G�Hrc�(�td|�d|�d��y)Nrz
: printer z removedrr,s   rrz SignalWatcher.on_printer_removed5s���s�D�9�:rc� �td|z�y)Nz*%s: cups connection errorrrs  rrz&SignalWatcher.on_cups_connection_error8s���.��4�5rc�&�td|||fz�y)Nz*%s: IPP error (%d): %sr)rcr�err�	errstrings    rrzSignalWatcher.on_cups_ipp_error;s���+�s�C��.C�C�DrN)r�r�rr?rr
rrrrrrrrrrrr&rrr	r	sM��	G�"	/�	.�	.�	?�	=�	6�	A�	G�	:�	I�	;�	6�	Err	T) �configr�requirerY�	dbus.glib�
gi.repositoryrrr��debugr��gettext�install�PACKAGErr�statereasonrr�r�rr#r%r�r	�
set_debuggingr�r'�MainLoop�loop�runr{r&rr�<module>r@s���(������X����!����
������v�~�~��1A�1A�B���#�������&
2�g�o�o�
2�B�z��7E�7E�r�4���
�A��1���I�I�L��7����D������	�	�	��E��D	
�	�	��s�C?�?D

Zerion Mini Shell 1.0