+
    QDbd&  c                   sl   ^ RI t ^ RIt^ RI5 ^ RIt ! R R]4      t ! R R4      t ! R R]4      t]R	8X  d|   ^ R
IH	t	 ]
! R4        ! R R4      t]! R4      t]	P                  ! 4       t]P                  4        ]P!                  4        ]! R4      t]P                  4        ]P#                  4        R# R# )    N)Z*c                   s8   a  ] tR t^t o R tR tR tR tRtV t	R# )SemanticOperationsc                s    . V n         R # N_operation_stackself   &-/usr/share/system-config-printer/asyncconn.py__init__ZSemanticOperations.__init__   s
     "    c                s<    V P                   P                  V4       R # r   )r   append)r   Z	operation   &&r   _begin_operationZ#SemanticOperations._begin_operation"   s    $$i0r
   c                s:    V P                   P                  4        R # r   )r   Zpopr   r   r   _end_operationZ!SemanticOperations._end_operation%   s    !!$r
   c                sN     V P                   ^ ,          #   \         d     R# i ; i)r    N)r   Z
IndexErrorr   r   r   current_operationZ$SemanticOperations.current_operation(   s*    	((++ 		s    $$r   N)
__name__
__module____qualname____firstlineno__r	   r   r   r   __static_attributes____classdictcell____classdict__   @r   r   r      s     #1% r
   r   c                   sJ   a  ] tR t^2t o R tR tR tR tR tR t	R t
RtV tR	# )
_AsyncMethodCallc                sh    Wn         W n        W0n        W@n        R V n        \        RV ,          4       R# )F+%sN)_fn_reply_handler_error_handler_auth_handler
_destroyed
debugprint)r   fnreply_handlererror_handlerauth_handlers   &&&&&r   r	   Z_AsyncMethodCall.__init__3   s,    ++)EDL!r
   c                s*    \        R V ,          4       R# z-%sN)r    r   r   r   __del__Z_AsyncMethodCall.__del__;   s    EDL!r
   c                s    V P                   '       d   R # \        RV ,          4       RV n         R V n        R V n        R V n        R V n        R V n        R V n        R # )NDESTROY: %sT)r   r    r   r   r   _reply_data_error_data
_auth_datar   r   r   destroyZ_AsyncMethodCall.destroy>   sQ    ???MD()""!r
   c                s@   VP                  R 4      V n        VP                  R4      V n        VP                  R4      V n        V P                  VR &   V P
                  VR&   V P                  VR&   \        V : RV P                  : 24       V P                  ! V/ VB  R# )r"   r#   r$   z
: calling N)	Zgetr(   r)   r*   r"   r#   r$   r    r   )r   argskwdss   &*,r   runZ_AsyncMethodCall.runK   s    88_588_5((N3 $ 2 2_ $ 2 2_#00^dhh784 4 r
   c                    V P                   '       g=   \        V : R V P                  : 24       V P                  ! W P                  .VO5!   R# R# )z: to reply_handler at N)r   r    r   r(   r   r,      &*r   r"   Z_AsyncMethodCall.reply_handlerU   C    8<8K8KM N'7'7?$? r
   c                r/   )z: to error_handler at N)r   r    r   r)   r0   r1   r   r#   Z_AsyncMethodCall.error_handler[   r2   r
   c                r/   )z: to auth_handler at N)r   r    r   Z	auth_datar0   r1   r   r$   Z_AsyncMethodCall.auth_handlera   sA    t7;7I7IK Lnn<t< r
   )r*   r   r   r)   r   r   r(   r   N)r   r   r   r   r	   r&   r+   r.   r"   r#   r$   r   r   r   r   r   r   r   2   s/     ""!@@= =r
   r   c                   sf   a a ] tR t^lt oRV 3R lltR tR tR tR tR t	R t
R tR	 tR
tVtV ;t# )
Connectionc
                s  <a aaa \         \        S `  4        R S n        Vf   \        P
                  ! 4       pVP                  R4      ;'       g    VR8H  ;'       d    \        P                  ! 4       ^ 8g  p
VV 3R lpVV 3R lpVV 3R lpV
'       d6   V'       d.   \        R4       ^ RI
pVP                  VVWEVVR7      pVS n        M0\        R	4       ^ RIpVP                  VVVWEVVVV	S R
7
      pVS n        \        S P                  P                   4      p\        S P                  P"                  4      p. p\%        S P                  4       F  pVP                  R4      '       d   K  \'        S P                  V4      p\        V4      V8w  d   \        V4      V8w  d   KT  \)        S V4      '       d   Kh  \+        S VS P-                  V4      4       VP/                  V4       K  	  VS n        . S n        \        RS ,          4       R# )FNZ/Z	localhostc                 .   < SP                  R SV4       R # r   )_subst_reply_handler)connZreplyr"   r      &&r   subst_reply_handlerZ0Connection.__init__.<locals>.subst_reply_handlerz   s    %%t]EBr
   c                 r4   r   )_subst_error_handler)r6   excr#   r   r7   r   subst_error_handlerZ0Connection.__init__.<locals>.subst_error_handler}   s    %%t]C@r
   c                 s0   < SP                  R SWV4       R # r   )_subst_auth_handler)promptr6   methodresourcer$   r   s   &&&&r   subst_auth_handlerZ/Connection.__init__.<locals>.subst_auth_handler   s    $$dL&(Sr
   zUsing polkit-1 connection class)r"   r#   hostport
encryptionparentzUsing IPP connection class)
r"   r#   r$   rA   rB   rC   rD   try_as_rootprompt_allowedZsemanticZ_r   )Zsuperr3   r	   r   cupsZ	getServerZ
startswithosZgetuidr    asyncpk1ZPK1Connection_connasyncippZIPPAuthConnectionZtypeZgetPrinters
getDevicesZdirZgetattrZhasattrZsetattr_make_bindingr   	_bindings_methodcalls)r   r"   r#   r$   rA   rB   rC   rD   rE   rF   Zuse_pkr8   r;   r@   rI   ZcrK   Z
methodtypeZinstancemethodtypeZbindingsZfnamer!   	__class__s   ffff&&&&&&            r   r	   ZConnection.__init__m   s    	z4), <>>#D??C(??DK,? $ $)),!# 		C	A	T k9:&&6I6I-13=/5	 ' 7A
 DJ45**:M:M9K157A398C;I59 + ;A DJ4::112
!4::#8#89$**%E%%$**e,BRyJ&498J+JD%((ud&8&8"&=>' & "EDL!r
   c                @    \         P                  ! R V ,          4       R# r%   debugr    r   r   r   r&   ZConnection.__del__   s    %$,'r
   c                s   \        R V ,          4       RV n         V P                  P                  4        V P
                   F  pVP                  4        K  	  V P                   F  p\        W4       K  	  R#   \         d     LPi ; i)r'   TN)r    r   rJ   r+   ZAttributeErrorrO   rN   Zdelattr)r   
methodcallZbindings   &  r   r+   ZConnection.destroy   su    MD()	JJ! ++J! , ~~GT# &  		s   A8 8BB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*Connection._make_binding.<locals>.<lambda>   s    T%8%8"%Lt%Lt%Lr
    )r   r!   s   ffr   rM   ZConnection._make_binding   s	    LLr
   c                s    \        VV P                  V P                  V P                  4      pV P                  P                  V4       VP                  ! V/ VB  R # r   )r   r5   r9   r<   rO   r   r.   )r   r!   r,   r-   rT   s   &&*, r   rU   ZConnection._call_function   sQ    %r'+'@'@'+'@'@'+'?'?A
 	  *-&&r
   c                   V'       dB   VP                  4        V P                  P                  V4      pV P                  V VR ,          pV'       d3   V P                  '       g   \	        V : RV: 24       V! V .VO5!   R# R# R# :i   NN: chaining up to Nr+   rO   Zindexr   r    )r   rT   r"   r,   i   &&&* r   r5   ZConnection._subst_reply_handler   j    !!!''4A!!!$8D4GH4'$' "1=r
   c                rW   rX   rZ   )r   rT   r#   r,   r[   r\   r   r9   ZConnection._subst_error_handler   r]   r
   c                s    V'       d9   VP                  4        V P                  P                  V4      pV P                  V V'       d2   V P                  '       g   \	        V : R V: 24       V! W0WE4       R# R# R# )rY   NrZ   )r   rT   r$   r=   r>   r?   r[   s   &&&&&& r   r<   ZConnection._subst_auth_handler   s^    !!!''4A!!!$4FG&9 !0<r
   c                s<    V P                   P                  V4       R# )z*Call this from your auth_handler function.N)Zthreadset_auth_info)r   Zpasswordr   r   r^   ZConnection.set_auth_info   s    !!8,r
   )rN   rJ   r   rO   )	NNNNNNNTT)r   r   r   r   r	   r&   r+   rM   rU   r5   r9   r<   r^   r   r   Z__classcell__)rP   r   s   @@r   r3   r3   l   s9     <"|($M'((:- -r
   r3   Z__main__)GObjectTc                   sD   a  ] tR t^t o R tR tR tR tR tR t	Rt
V tR# )	Testc                sT    \        4       V n        Wn        \        R V ,          4       R# )r   N)r3   rJ   _quitr    )r   quitr   r   r	   ZTest.__init__   s    #DJJ%r
   c                rQ   r%   rR   r   r   r   r&   ZTest.__del__   s    edl+r
   c                s    \        R V ,          4       V P                  P                  4        V P                  '       d   \        P                  4        R# R# )r'   N)r    rJ   r+   ra   looprb   r   r   r   r+   ZTest.destroy   s6    ,-JJ!zzz		 r
   c                sh    V P                   P                  V P                  V P                  R 7       R# ))r"   r#   N)rJ   rL   getDevices_replygetDevices_errorr   r   r   rL   ZTest.getDevices   s+    JJ!!1F1F151F1F " Hr
   c                s<    \        W4       V P                  4        R # r   )printr+   )r   r6   Zresult   &&&r   rd   ZTest.getDevices_reply   s    4 LLOr
   c                sN    \        \        V4      4       V P                  4        R # r   )rf   Zreprr+   )r   r6   r:   rg   r   re   ZTest.getDevices_error  s    4:LLOr
   )rJ   ra   N)r   r   r   r   r	   r&   r+   rL   rd   re   r   r   r   r   r   r`   r`      s)     	&
	,		H		 	r
   r`   F)rG   rH   rS   Zobjectr   r   r3   r   Zgi.repositoryr_   Zset_debuggingr`   ZtZMainLooprc   rL   r+   r.   rV   r
   r   <module>rh      s   *  	   (3= 3=tz-# z-x z%4 6 	eADLLOIILdALLOHHKO r
   