+
    QDbh  c                   s   ^ RI t ^ RIt^ RIt^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIt]P                  ! R4       ^ RI
t
^ RI5 ^ RIt^ RIt]P                  ! ]P                  ]P                  R7        ! R	 R
] P                   4      t ! R R4      t ! R R4      t ! R R]4      t]R8X  d-   ]! R4        ! R R4      t]! 4        ]P0                  ! 4        R# R# )i    N)GObject)GLib)Gdk)Gtkz1.9.60)Z*)Zdomain	localedirc                   sX   a  ] tR t^/t o RR ltR tR tR tR tRR lt	R t
R	 tR
tV tR# )_IPPConnectionThreadNc
                s:   \         P                  P                  V 4       V P                  R 4       Wn        W n        Wpn        Wn        Wn        W0n	        W@n
        WPn        \        P                  ! ^4      V n        W`n        RV n        \#        RV ,          4       R# )TF+%sN)	threadingThread__init__Z	setDaemon_queue_connhostport_encryption_reply_handler_error_handler_auth_handlerqueueQueue_auth_queueuser
_destroyed
debugprint)
selfZmyqueueconnreply_handlererror_handlerauth_handlerr   r   r   
encryptions
   &&&&&&&&&&,/usr/share/system-config-printer/asyncipp.pyr	   Z_IPPConnectionThread.__init__0   sx     	!!4(
		%++) ;;q>	EDL!    c                @    \         P                  ! R V ,          4       R# z-%sNdebugr   r      &r   __del__Z_IPPConnectionThread.__del__C       %$,'r   c                s<    V P                   P                  V4       R # N)r   putr   password   &&r   set_auth_infoZ"_IPPConnectionThread.set_auth_infoF   s    h'r   c                s 	   V P                   f   \        P                  ! 4       V n         V P                  f   \        P                  ! 4       V n        V P
                  f   \        P                  ! 4       V n        V P                  '       d"   \        P                  ! V P                  4       M\        P                  ! 4       V n        \        P                  ! V P                  4        \        P                  ! V P                   V P                  V P
                  R7      pV P                  R 4        \!        R4       V P"                  P%                  4       V n        V P"                  P)                  4       p\!        R\+        V4      ,          4       Vf   V P"                  P-                  4        EMV P.                  '       d   V P"                  P-                  4        K  RV n        Vw  rErgrVR8w  d   Wpn        VR8w  d   Wn        V	R8w  d   Wn        VR8X  d   V^ ,          V n        \        P                  ! V P                  4       \!        RV P                  ,          4       \        P                  ! V P                  4        \        P                  ! V P                   V P                  V P
                  R7      p\!        R4       V P"                  P-                  4        V P                  R 4       EK   \!        R	V,          4       V! V.VO5/ VB p
V\        P                  P6                  P8                  8X  d-   V
/ 8X  d&   \        P:                  ! \        P<                  R
4      h\!        R4       V P                  V
4       V P"                  P-                  4        EKq  \!        R4       V = V =V =V =V =V =!?\        P                  ! R 4       R #   \         d   pR pT P                  T4        R p?ELR p?ii ; i  \         dB   p\!        R4       T P"                  P-                  4        T P                  T4        R p?ELSR p?ii ; i  \>         d8   p\!        R\+        T4      ,          4       T P                  T4        R p?ELR p?ii ; i)N)r   r   r   TzAwaiting further instructionszNext task: %sFzSet user=%s; reconnecting...z...reconnectedz	...failedzCall %s z
...successz...failure (%s)zThread exiting)"r   cupsZ	getServerr   ZgetPortr   ZgetEncryptionr   ZsetUsergetUserZsetPasswordCB2_auth
Connection_replyRuntimeError_errorr   r
   ZemptyidlegetreprZ	task_doner   r   r   r   ZadminGetServerSettingsZ__call__IPPErrorIPP_NOT_AUTHORIZEDZ	Exceptionr   r   )r   r   eZitemfnargskwdsZrhZehZahresults   &          r   runZ_IPPConnectionThread.runI   sT   99)DI99DI##114D999LL$))$DITZZ(	??)-/3/?/?AD KK
 78)),DI;;??%D$+56|%%(%%(DI+/(RtU{&(#U{&(#U{%'"Tz G	dii(:TYYFG##TZZ0$??157;7G7GID  01KK)),KK&  IN+T1D1D1??HHH|"mmT-D-DbIIL)V$
 KK!!$$%JKT"[  	DKKOO	V $ $,KK)),KKOO$&   -a89Q sK   'AO A-O< 4BQ O9O44O9<Q6QQR,RRc                sJ    R V n         V P                  P                  R4       R# )TN)r   r
   r)   r$   r%   r   stopZ_IPPConnectionThread.stop   s    r   c                s   a aaa VVVV 3R  lpS P                   f   R# \        P                  ! WQ4       S P                  P	                  4       pV# )c                 s   < \         P                  ! 4        Sf   SP                  V SP                  4       MSP                  V SP                  SS4       \         P                  ! 4        R# )NF)r   threads_enterr   r   threads_leave)promptr   methodresourcer   s   &r   prompt_authZ/_IPPConnectionThread._auth.<locals>.prompt_auth   sO     |""FDJJ7""FDJJI r   r.   )r   r   idle_addr   r7   )r   rD   r   rE   rF   rG   r+   s   f&fff  r   r1   Z_IPPConnectionThread._auth   sC    	 	 %{+##''*r   c                s   a  V 3R  lpS P                   '       g9   S P                  '       d%   \        P                  ! VS P                  V4       R# R# R# )c                    < SP                   '       g>   \        P                  ! 4        V ! SP                  V4       \        P                  ! 4        R # Fr   r   rB   r   rC   )handlerr?   r      &&r   
send_replyZ/_IPPConnectionThread._reply.<locals>.send_reply   s5    ???!!$V,!!$r   N)r   r   r   rH   )r   r?   rN      f& r   r3   Z_IPPConnectionThread._reply   s;    	 4#6#6#6MM:t':':FC $7r   c                s   a  V 3R  lpS P                   '       gU   S P                  '       dA   \        RS P                  ,          4       \        P                  ! VS P                  V4       R# R# R# )c                 rI   rJ   rK   )rL   excr   rM   r   
send_errorZ/_IPPConnectionThread._error.<locals>.send_error   s5    ???!!$S)!!$r   zAdd %s to idleN)r   r   r   r   rH   )r   rP   rQ   rO   r   r5   Z_IPPConnectionThread._error   sO    	 4#6#6#6(4+>+>>?MM:t':':C@ $7r   )r   r   r   r   r   r   r
   r   r   r6   r   r   )NNNNNNN)NNN)__name__
__module____qualname____firstlineno__r	   r&   r-   r@   rA   r1   r3   r5   __static_attributes____classdictcell__Z__classdict__   @r   r   r   /   s7     "&((a#F$	D
A 
Ar   r   c                   s\   a  ] tR t^t o RtRR ltR tR tR tR t	RR lt
R	 tR
 tRtV tR# )IPPConnectiona  
This class starts a new thread to handle IPP operations.

Each IPP operation method takes optional reply_handler,
error_handler and auth_handler parameters.

If an operation requires a password to proceed, the auth_handler
function will be called.  The operation will continue once
set_auth_info (in this class) is called.

Once the operation has finished either reply_handler or
error_handler will be called.
Nc	                s^   \        R 4       Wn        \        P                  ! 4       V n        \	        V P                  V VVVWEVVR7	      V n        V P
                  P                  4        \        \        P                  P                  4      p	. p
\        \        P                  4       Fk  pV^ ,          R8X  d   K  \        \        P                  V4      p\        V4      V	8w  d   K?  \        WV P                  V4      4       V
P                  V4       Km  	  Wn        \        RV ,          4       R# )zNew IPPConnectionr   r   r   r   r   r   r   Z r   N)r   _parentr   r   r   threadZstarttyper/   r2   ZgetPrintersZdirZgetattrZsetattr_make_bindingZappendbindings)r   r   r   r   r   r   r   r   parentZ
methodtyper`   Zfnamer<   s   &&&&&&&&&    r   r	   ZIPPConnection.__init__   s     	'([[^
*DJJ:G:G9E15t7AC 	4??667
$//*EQx3$//51BRyJ&T$"4"4b"9:OOU# + !EDL!r   c                r    r!   r"   r$   r%   r   r&   ZIPPConnection.__del__  r'   r   c                s6   \        R V ,          4       V P                   F  p\        W4       K  	  V P                  P	                  4       '       dI   \        R4       V P                  P                  4        \        P                  ! ^V P                  4       R# R# )zDESTROY: %szStopping worker threadN)	r   r`   Zdelattrr]   Zis_aliverA   r   Ztimeout_add_seconds_reap_thread)r   Zbindings   & r   destroyZIPPConnection.destroy  sn    MD()}}GT# % ;;""01KK$$a):):; #r   c                s    V P                   P                  '       d   V P                  P                  4        R # \	        RV P                   ,          4       R# )Fz Thread %s still processing tasksT)r]   r6   r   Zjoinr   r$   r%   r   rb   ZIPPConnection._reap_thread  s8    ;;JJOO6DEr   c                s<    V P                   P                  V4       R# )z*Call this from your auth_handler function.N)r]   r-   r*   r,   r   r-   ZIPPConnection.set_auth_info  s    !!8,r   c                s^    \        R 4       V P                  P                  RV3/ W#R34       R# )zReconnect...TFN)r   r   r)   )r   r   r   r   s   &&&&r   	reconnectZIPPConnection.reconnect!  s,    N#

w&u> 	?r   c                s   a a VV 3R  l# )c                  s0   < SP                   ! S.V O5/ VB # r(   )_call_function)r=   r>   r<   r   s   *,r   Z<lambda>Z-IPPConnection._make_binding.<locals>.<lambda>'  s    T%8%8"%Lt%Lt%Lr    )r   r<   s   ffr   r_   ZIPPConnection._make_binding&  s	    LLr   c                s    R ;p;rVRV9   d   VR,          pVR RV9   d   VR,          pVR RV9   d   VR,          pVR V P                   P                  WVWEV34       R# Fr   r   r   N)r   r)   )r   r<   r=   r>   r   r   r   s   &&*,   r   re   ZIPPConnection._call_function)  s}    7<<<d" 1M_%d" 1M_%T!/L^$

4&|E 	Fr   )r\   r`   r   r]   )NNNNNNNNNN)rR   rS   rT   rU   Z__doc__r	   r&   rc   rb   r-   rd   r_   re   rV   rW   rX   rY   r   rZ   rZ      s:     "8(<-?
MF Fr   rZ   c                   sj   a  ] tR tRt o RR ltR tR tR tRR ltR t	R	 t
R
 tR tR tR tRtV tR# )_IPPAuthOperationi@  Nc                s   R V n         R V n        RV n        R V n        R V n        R V n        W@n        W0n        V P                  P                  V n	        WPn
        W`n        Wpn        Wn        W n        \        RV ,          4       R# )Fr.   r   N)_auth_called_dialog_shown_use_password_cancel
_reconnect_reconnected_userr   try_as_root_try_as_root
_client_fn_client_args_client_kwds_client_reply_handler_client_error_handlerr   )r   r   r   r   r   r<   r=   r>   s   &&&&&&&&r   r	   Z_IPPAuthOperation.__init__A  su    !"!

 JJ22  %2"%2"EDL!r   c                r    r!   r"   r$   r%   r   r&   Z_IPPAuthOperation.__del__T  r'   r   c                s    V = V =V =V =V =V =R # r(   )r   rs   rt   ru   rv   rw   r$   r%   r   _destroyZ_IPPAuthOperation._destroyW  s$    JO&&r   c                sN   V P                   f   \        R4       V P                  W4      # V P                  '       d$   \        RV ,          4       V P	                  V4      # V P
                  '       d`   RV n        RV n        \        V : RV P                  : R24       VP                  V P                  V P                  V P                  R7       R # Rp\        V4      \        P                  8X  d   VP                  w  rEV\        P                  8X  g+   V\        P                  8X  g   V\        P                   8X  d   V\        P                  8H  pMV\        P"                  8X  d   V P                  W4      # V P	                  V4      # \        V4      \        P$                  8X  d^   VP                  w  pV\        P&                  8X  g   V\        P(                  8X  d   V\        P(                  8H  pM"V P	                  V4      # V P	                  V4      # V'       d   \        RV ,          4       M\        R	V ,          4       V P*                  '       d   V P                  R
8w  d{   V P,                  P.                  P0                  ^ ,          R8X  g	   V'       dG   \        R4       R
V n        VP                  V P                  V P                  V P                  R7       R # V P2                  '       g   V P	                  V4      # VP.                  P0                  pVP.                  P4                  p\6        P8                  P;                  VVR7       RV n        \        V : RV P                  : R24       VP                  V P                  V P                  V P                  R7       R # )NzConnection/reconnection failedz,%s (_error_handler): canceled so chaining upFTz$ (_error_handler): reconnecting (as )...r   r   z%s (_error_handler): forbiddenz#%s (_error_handler): not authorizedrootZ/zAuthentication: Try as rootr   r   r.   )rs   r   _reconnect_errorrm   r5   rn   ro   rp   rd   _reconnect_replyr^   r/   r9   r=   r:   ZIPP_FORBIDDENZIPP_AUTHENTICATION_CANCELEDZIPP_SERVICE_UNAVAILABLEZ	HTTPErrorZHTTP_UNAUTHORIZEDZHTTP_FORBIDDENrr   r   r]   r   rj   r   authconnglobal_authinfocacheremove_auth_inforl   )	r   r   rP   Z	forbiddenr;   ZmZsr   r   s	   &&&      r   r   Z_IPPAuthOperation.error_handler_  s   ??" 89(($44<<<FMN;;$$???#DO $Dtzz+ ,NNDJJ*.*?*?*.*?*?  A 	:&XXFQT,,,T'''T555$"4"44	d222,,d88{{C((3Z4>>)88DQT+++T((($"5"55	{{C((;;$$ 84?@=DEJJ& ZZ##A&#- 56DJNNDJJ*.*?*?*.*?*?  A    ;;$$ {{{{%%66T=A 	7 	C4::' 	(

&*&;&;&*&;&; 	 	=r   c           
     s   V P                   R 8X  d   V P                  f   \        P                  ! 4       V n        V P                  '       d   VP                  P
                  pVP                  P                  p\        P                  P                  VVR7      pV'       d/   V^ ,          V P                  8X  d   V^,          V n
        RV n        ?MTVP                  P
                  pVP                  P                  p\        P                  P                  VVR7       RV n
        RV n         V P                  '       d0   \        R4       R V n        VP                  V P                  4       R# R V n        VP                  '       g   VP                  V P                  4       R# V P                   '       d   \"        P$                  ! V P&                  P(                  RR\"        P*                  P,                  \"        P.                  P0                  \3        R4      R7      pVP5                  \3        R4      4       VP7                  4        VP9                  4        Rp	VP:                  '       d   VP:                  P=                  4       p	V	f#   \        P>                  ! VP(                  R	7      pM4\3        R
4      V	,          p
\        P>                  ! V
VP(                  R7      pVPA                  R4       V P                  f   \        P                  ! 4       V n        VP                  RR.4       VPC                  R4       VPE                  R4       VPG                  4        VPI                  RV PJ                  4       RV n        R# )FNr|   Tr.   z%Supplying password after reconnectionzNot authorizedra   ZmodalZdestroy_with_parentZmessage_typeZbuttonsZtextzThe password may be incorrect.)ra   zAuthentication (%s))titlera   Zusernameresponse)&rj   rp   r/   r0   r]   r   r   r   r   lookup_auth_inforl   ro   r   r   r-   prompt_allowedrk   r   MessageDialogr   ra   MessageTypeERRORButtonsTypeZCLOSE_format_secondary_textr@   rc   semanticcurrent_operationZ
AuthDialogZ
set_promptZfield_grab_focusZset_keep_aboveshow_allconnect_on_auth_dialog_response)r   rD   r   rE   rF   r   r   credsdopr   s   &&&&&      r   r   Z_IPPAuthOperation.auth_handler  s   %zz!!\\^
zzz{{''{{'' 55FFTMQ G SQx4::--21X*,0);;##D;;##D))::AE ; G!#D ?@ %D 2 23!""" 2 23 !!$***;*;)-4030E0E+.??+@+@()*:(;	=A
 ##Q'G%HIEEHIIL===003B:##DKK8A+,r1E##5,0KK9A 	
b::DJ	"b"	J'	$	

			:t<<=!r   c                s    R V n         V P                  P                  P                  V P                  V P
                  V P                  V P                  V P                  V P                  34       R# )FN)
rj   r   r   r)   rs   rt   ru   rv   r   r   r$   r%   r   submit_taskZ_IPPAuthOperation.submit_task  s[    !

t0A0A#00#99  $11#002 	3r   c                s   VP                  4       w  r4VR 8X  d   V P                  p\        P                  P	                  VV3V P
                  P                  P                  V P
                  P                  P                  R7       Wn	        VP                  4        V\        P                  P                  8X  g    V\        P                  P                  8X  d   RV n        V P
                  P!                  R 4       \        P                  P#                  V P
                  P                  P                  V P
                  P                  P                  R7       \%        R4       R# W0P                  8X  d/   W@n        V P
                  P!                  V4       \%        R4       R# W0n        W@n        RV n        V P
                  P!                  R 4       \%        RV P                  ,          4       R# )r.   r|   TzAuth canceledNzPassword supplied.zWill try as %s)Zget_auth_inforp   r   r   Zcache_auth_infor   r]   r   r   _dialogZhider   ResponseTypeCANCELZDELETE_EVENTrm   r-   r   r   rl   rn   )r   dialogr   r   r+   s   &&&  r   r   Z*_IPPAuthOperation._on_auth_dialog_response  sm   !//22:::D%%558@8B<@JJ<M<M<R<R<@JJ<M<M<R<R 	6 	T ((///((555DLJJ$$b)))::ARARAWAWAEARARAWAW ; Y(::!)JJ$$h/,-
%

  "%$tzz12r   c                s~    \        R V P                  ,          4       V P                  e   V P                  4        R# R# )zConnected as %sN)r   rp   rs   r   r   r   r?      &&&r   r~   Z"_IPPAuthOperation._reconnect_reply  s1     	%

23??& 'r   c           	     s   \        R V P                  ,          4       V P                  P                  '       g   V P	                  V4       R# RpVP
                  '       d   VP
                  P                  4       pVf   \        R4      pM\        R4      V,          p\        P                  ! V P                  P                  RR\        P                  P                  \        P                  P                  VR7      pV P                  f   \!        V4      \"        8X  d   RpM=\!        V4      \$        P&                  8X  d   VP(                  ^,          pM\+        V4      pVP-                  \        RV,          4      4       VP/                  \        P0                  \        P2                  P4                  \        R4      \        P2                  P6                  4       VP9                  \        P2                  P6                  4       VP;                  R	V P<                  4       \        V : R
V: RV: R24       VP?                  4        R# )zFailed to connect as %sNzCUPS server errorzCUPS server error (%s)Tr   z!service-error-service-unavailablez3There was an error during the CUPS operation: '%s'.ZRetryr   z. (_reconnect_error): presenting error dialog (z; Z)) r   rp   r   r   r5   r   r   r   r   r   ra   r   r   r   ZNONErs   r^   r4   r/   r9   r=   r8   r   Zadd_buttonsZSTOCK_CANCELr   r   OKZset_default_responser   _on_retry_server_error_responseZshow)r   r   rP   r   Zmsgr   Zmessages   &&&    r   r}   Z"_IPPAuthOperation._reconnect_error%  s   -

:;zz(((KK===003B:'(C,-2Cdjj&7&7%)t,/OO,A,A'*';';$'	) ??"tSz\'A9G3Z4==(hhqkGCjG	 $;=D$E "F 	G	s'')9)9)@)@z3#3#3#6#6	8	 0 0 3 34			:tCCD3) 	*		r   c                s   VP                  4        V\        P                  P                  8X  d   \	        V : R V P
                  P                  P                  : R24       V P
                  P                  V P
                  P                  P                  V P                  V P                  R7       R# \	        RV ,          4       V P                  \        P                  ! ^ \        R4      4      4       R# )z': got retry response, reconnecting (as ry   rz   z%s: got cancel responsezOperation canceledN)rc   r   r   r   r   r   r]   r   rd   r~   r}   r5   r/   r9   r   )r   r   r   r   r   r   Z1_IPPAuthOperation._on_retry_server_error_responseL  s    s''***tzz00557 8JJ  $**"3"3"8"8040E0E040E0E ! G 1D89KK1-A+BCDr   c                s   \        V : R \        V4      : 24       V P                  '       dK   \        V : RV P                  : 24       V P                  V P                  V4       V P	                  4        R# \        RV ,          4       R# )z (_error): handling z (_error): calling z(%s (_error): no client error handler setN)r   r8   rw   r   rx   )r   rP   r,   r   r5   Z_IPPAuthOperation._errorX  sc    $c
CD%%%t99; <&&

C8MMBTIJr   )rj   rm   rt   rw   rs   ru   rv   r   r   rk   rn   ro   rr   rl   rp   )NNNNrh   )rR   rS   rT   rU   r	   r&   rx   r   r   r   r   r~   r}   r   r5   rV   rW   rX   rY   r   ri   ri   @  sI     "&('Q=f?"B33@ %N
EK Kr   ri   c                   s6   a  ] tR tRt o RR ltR tR tRtV tR# )IPPAuthConnectionie  Nc                sB   Wpn         Wn        Wn        Wn        R p\        P
                  P                  VVR7      pV'       d!   V^ ,          R8w  g	   V'       d
   V^ ,          p?\        WV 4      p\        P                  WVP                  VP                  VWEVR7       R # )Nr|   r{   r[   )ra   r   rq   r   r   r   r   ri   rZ   r	   r   r   )r   r   r   r   r   r   r   ra   rq   r   r   r   r   r   s   &&&&&&&&&&&   r   r	   ZIPPAuthConnection.__init__f  s     ,& -->>TEI ? KQx6![Qx dC.0.>.>-/__4%) 	 	Mr   c                s>    R V n         \        P                  V 4       R # r(   )r   rZ   rc   r$   r%   r   rc   ZIPPAuthConnection.destroy~  s    t$r   c           	     s    R ;p;rVRV9   d   VR,          pVR RV9   d   VR,          pVR RV9   d   VR,          pVR \        WEV V P                  P                  WV4      pVP                  4        R# rg   )ri   r]   r   r   )r   r<   r=   r>   r   r   r   r   s   &&*,    r   re   Z IPPAuthConnection._call_function  s    7<<<d" 1M_%d" 1M_%T!/L^$ d $ 0 0"DB 	r   )ra   r   r   rq   )
NNNNNNNTTN)	rR   rS   rT   rU   r	   rc   re   rV   rW   rX   rY   r   r   r   e  s     M0% r   r   Z__main__Tc                   sP   a  ] tR tRt o R tR tR tR tR tR t	R t
R	 tR
tV tR# )UIi  c                s   \         P                  ! 4       pVP                  R V P                  4       \         P                  P                  R4      pVP                  RV P                  4       \         P                  ! 4       pVP                  VRR^ 4       VP                  V4       \         P                  P                  R4      V n
        V P                  P                  RV P                  4       V P                  P                  R4       VP                  V P                  RR^ 4       RV n        VP                  4        R# )rc   ZConnectZclickedFzGet DevicesN)r   ZWindowr   rc   ZButtonZnew_with_labelconnect_clickedZVBoxZ
pack_startZaddget_devices_buttonget_devicesset_sensitiver   r   )r   ZwZbZvboxs   &   r   r	   ZUI.__init__  s    

AIIy$,,/

))95AIIy$"6"6788;DOOQua0EE4L&)jj&?&?&OD###++Y8H8HI##1159OOT44eUAFDIJJMr   c                s     V P                   P                  4        \        P                  ! 4        R #   \         d     L$i ; ir(   )r   rc   ZAttributeErrorr   Z	main_quit)r   Zwindowr,   r   rc   Z
UI.destroy  s7    		!!$ MM " s   3 A Ac                s    V P                   '       d   V P                   P                  4        \        V P                  V P                  R 7      V n         R# )rz   N)r   rc   r   	connectedconnect_failedr   Zbuttonr,   r   r   ZUI.connect_clicked  s7    yyy		!!$)9=9L9LNDIr   c                sr    \        R \        V4      ,          4       V P                  P                  R4       R# )zSuccess: %sTN)r   r8   r   r   r   r   r   r   ZUI.connected  s'    f56##1148r   c                s    \        R \        V4      ,          4       V P                  P                  R4       V P                  P                  4        R# )zExc %sFN)r   r8   r   r   r   rc   r   r   rP   r   r   r   ZUI.connect_failed  s7    4:-.##1159II r   c                s    VP                  R 4       \        R4       V P                  P                  V P                  V P
                  R7       R# )FzGetting devicesrz   N)r   r   r   Z
getDevicesget_devices_replyget_devices_errorr   r,   r   r   ZUI.get_devices  sB      %()*II  0F0F040F0F ! Hr   c                    WP                   8w  d   \        R 4       R# \        R\        V4      ,          4       V P                  P	                  R4       R# )zIgnoring stale replyNzGot devices: %sTr   r   r8   r   r   r   r   r   r   ZUI.get_devices_reply  s>    yy 23)D&M9:##1148r   c                r   )zIgnoring stale errorNzError getting devices: %sTr   r   r   r   r   ZUI.get_devices_error  s>    yy 233dCj@A##1148r   )r   r   N)rR   rS   rT   rU   r	   rc   r   r   r   r   r   r   rV   rW   rX   rY   r   r   r     s4     			N	9	!
	H	9	9 	9r   r   )r   Zconfigr/   Zgi.repositoryr    r   r   r   r   Zrequirer   r#   ZgettextZinstallZPACKAGEr   r   r   rZ   ri   r   rR   Zset_debuggingr   Zmainrf   r   r   <module>r      s   *    !     h      v~~1A1A BhA9++ hA\YF YFF`K `KJ	/ /b z4<9 <9| EHHKE r   