+
    üÐj%  ã                   óÌ   € R t ^ RIHt ^ RIHt ^ RIHtHt ^ RIH	t	 ^ RI
Ht ^ RIHt ^ RIHtHt  ! R R	4      t ! R
 R4      t ! R R4      t ! R R]	P(                  4      tR# )zyInstance Messenger base classes for protocol support.

You will find these useful if you're adding a new protocol to IM.
)ÚType)Úerror)ÚProtocolÚconnectionDone)Ústyles©ÚFailure©ÚprefixedMethods)ÚOFFLINEÚOfflineErrorc                   ób   a € ] tR t^t o R tR tR tR tR tV 3R lR lt	V 3R lR	 lt
R
tV tR# )ÚAbstractGroupc                ó   € Wn         W n        R # ©N)ÚnameÚaccount)Úselfr   r   s   &&&Ú>/usr/lib/python3/dist-packages/twisted/words/im/basesupport.pyÚ__init__ÚAbstractGroup.__init__   s   € ØŒ	ØŽó    c                ó   € \        V R4      # )zsfinds group commands

these commands are methods on me that start with imgroup_; they are
called with no arguments
Úimgroup_r	   ©r   s   &r   ÚgetGroupCommandsÚAbstractGroup.getGroupCommands   s   € ô ˜t ZÓ0Ð0r   c                ó   € \        V R4      # )a   finds group commands

these commands are methods on me that start with imgroup_; they are
called with a user present within this room as an argument

you may want to override this in your group in order to filter for
appropriate commands on the given user
Ú	imtarget_r	   )r   Útargets   &&r   ÚgetTargetCommandsÚAbstractGroup.getTargetCommands#   s   € ô ˜t [Ó1Ð1r   c                ó¨   € V P                   P                  '       g   \        hV P                   P                  P                  V P                  4       R # r   )r   Úclientr   Ú	joinGroupr   r   s   &r   ÚjoinÚAbstractGroup.join.   s4   € Ø�|‰|×"×"Ð"ÜÐØ�‰×Ñ×%Ñ% d§i¡iÖ0r   c                ó¨   € V P                   P                  '       g   \        hV P                   P                  P                  V P                  4       R # r   )r   r#   r   Ú
leaveGroupr   r   s   &r   ÚleaveÚAbstractGroup.leave3   s4   € Ø�|‰|×"×"Ð"ÜÐØ�‰×Ñ×&Ñ& t§y¡yÖ1r   c                ó    <€ V ^8„  d   QhRS[ /# ©é   Úreturn©Ústr)ÚformatÚ__classdict__s   "€r   Ú__annotate__ÚAbstractGroup.__annotate__8   s   ø€ ÷ 3ñ 3™#ñ 3r   c                ó>   € R V P                    RV P                  : R2# )Ú<Ú Ú>)Ú	__class__r   r   s   &r   Ú__repr__ÚAbstractGroup.__repr__8   s    € Ø�4—>‘>Ð" ! D§I¡I¡=°Ð2Ð2r   c                ó    <€ V ^8„  d   QhRS[ /# r,   r/   )r1   r2   s   "€r   r3   r4   ;   ó   ø€ ÷ 9ñ 9™ñ 9r   c                óL   € V P                    R V P                  P                   2# ©Ú@©r   r   ÚaccountNamer   s   &r   Ú__str__ÚAbstractGroup.__str__;   ó"   € Ø—)‘)�˜A˜dŸl™l×6Ñ6Ð7Ð8Ð8r   )r   r   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r   r   r    r%   r)   r:   rC   Ú__static_attributes__Ú__classdictcell__©r2   s   @r   r   r      s2   ø‡ € òò1ò	2ò1ò
2÷
3ð 3÷9ö 9r   r   c                   óV   a € ] tR t^?t o R tR tR tV 3R lR ltV 3R lR ltRt	V t
R	# )
ÚAbstractPersonc                ó4   € Wn         W n        \        V n        R # r   )r   r   r   Ústatus)r   r   ÚbaseAccounts   &&&r   r   ÚAbstractPerson.__init__@   s   € ØŒ	Ø"ŒÜˆŽr   c                ó   € \        V R4      # )zufinds person commands

these commands are methods on me that start with imperson_; they are
called with no arguments
Ú	imperson_r	   r   s   &r   ÚgetPersonCommandsÚ AbstractPerson.getPersonCommandsE   s   € ô ˜t [Ó1Ð1r   c                ó   € R# )z
Returns a string.
z--© r   s   &r   ÚgetIdleTimeÚAbstractPerson.getIdleTimeM   s   € ñ r   c                ó    <€ V ^8„  d   QhRS[ /# r,   r/   )r1   r2   s   "€r   r3   ÚAbstractPerson.__annotate__S   s   ø€ ÷ Añ A™#ñ Ar   c                óX   € R V P                    RV P                  : RV P                   R2# )r6   r7   Ú/r8   )r9   r   rP   r   s   &r   r:   ÚAbstractPerson.__repr__S   s*   € Ø�4—>‘>Ð" ! D§I¡I¡=°°$·+±+°¸aÐ@Ð@r   c                ó    <€ V ^8„  d   QhRS[ /# r,   r/   )r1   r2   s   "€r   r3   r\   V   r=   r   c                óL   € V P                    R V P                  P                   2# r?   rA   r   s   &r   rC   ÚAbstractPerson.__str__V   rE   r   )r   r   rP   N)rF   rG   rH   rI   r   rU   rY   r:   rC   rJ   rK   rL   s   @r   rN   rN   ?   s*   ø‡ € òò
2ò÷Að A÷9ö 9r   rN   c                   ó^   a € ] tR t^Zt o RtRtR tR t]3V 3R lR llt	R t
V 3R ltR	tV tR# )
ÚAbstractClientMixinzŠDesigned to be mixed in to a Protocol implementing class.

Inherit from me first.

@ivar _logonDeferred: Fired when I am done logging in.
Nc                ó¶   € V P                   P                   F+  p\        V\        4      '       g   K  W@P                   n         M	   Wn        W n        W0n        R # r   )r9   Ú	__bases__Ú
issubclassr   Ú
_protoBaser   ÚchatÚ_logonDeferred)r   r   ÚchatuiÚlogonDeferredÚbases   &&&& r   r   ÚAbstractClientMixin.__init__d   sE   € Ø—N‘N×,Ô,ˆDÜ˜$¤×)Ô)Ø,0—‘Ô)Ùñ -ð
 ØŒØŒ	Ø+Ör   c                ó<   € V P                   P                  V 4       R # r   )rh   ÚconnectionMader   s   &r   rp   Ú"AbstractClientMixin.connectionMadeo   s   € Ø�‰×&Ñ& tÖ,r   c                ó$   <€ V ^8„  d   QhRS[ RR/# )r-   Úreasonr.   Nr   )r1   r2   s   "€r   r3   Ú AbstractClientMixin.__annotate__r   s   ø€ ÷ <ñ <¡Wð <À$ñ <r   c                óŽ   € V P                   P                  W4       V P                  4        V P                  P	                  W4      # r   )r   Ú_clientLostÚunregisterAsAccountClientrh   ÚconnectionLost©r   rs   s   &&r   rx   Ú"AbstractClientMixin.connectionLostr   s5   € Ø�‰× Ñ  Ô.Ø×&Ñ&Ô(Ø�‰×-Ñ-¨dÓ;Ð;r   c                ó<   € V P                   P                  V 4       R# )z*Tell the chat UI that I have `signed off'.N)ri   ÚunregisterAccountClientr   s   &r   rw   Ú-AbstractClientMixin.unregisterAsAccountClientw   s   € à�	‰	×)Ñ)¨$Ö/r   c                ó6   <€ V ^8„  d   Qh/ S[ S[,          ;R&   # )r-   rh   )r   r   )r1   r2   s   "€r   r3   rt   Z   s   ø‡ ‚ ñ ‘X•Ñ%ò r   )rj   r   ri   )rF   rG   rH   rI   Ú__doc__rh   r   rp   r   rx   rw   Ú__annotate_func__rJ   rK   rL   s   @r   rd   rd   Z   s6   ø‡ € ñð "&€Jò	,ò-ð 0>÷ <ò <ò
0÷; ƒ r   rd   c                   ó�   a € ] tR t^|t o Rt^ t^ tRt]t	]
t^tR tR tR tR tR tR tR	 tR
 tR tR tR tV 3R lR ltRtV tR# )ÚAbstractAccountaÌ  Base class for Accounts.

I am the start of an implementation of L{IAccount<interfaces.IAccount>}, I
implement L{isOnline} and most of L{logOn}, though you'll need to implement
L{_startLogOn} in a subclass.

@cvar _groupFactory: A Callable that will return a L{IGroup} appropriate
    for this account type.
@cvar _personFactory: A Callable that will return a L{IPerson} appropriate
    for this account type.

@type _isConnecting: boolean
@ivar _isConnecting: Whether I am in the process of establishing a
connection to the server.
@type _isOnline: boolean
@ivar _isOnline: Whether I am currently on-line with the server.

@ivar accountName:
@ivar autoLogin:
@ivar username:
@ivar password:
@ivar host:
@ivar port:
Nc                ój   € Wn         W n        W0n        W@n        WPn        W`n        / V n        / V n        R # r   )rB   Ú	autoLoginÚusernameÚpasswordÚhostÚportÚ_groupsÚ_persons)r   rB   r„   r…   r†   r‡   rˆ   s   &&&&&&&r   r   ÚAbstractAccount.__init__Ÿ   s/   € Ø&ÔØ"ŒØ ŒØ ŒØŒ	ØŒ	àˆŒØˆŽr   c                óV   € R F"  p\        W4      '       d   K  \        W/ 4       K$  	  R# )r‰   N)r‰   rŠ   )ÚhasattrÚsetattr)r   Úks   & r   ÚupgrateToVersion2Ú!AbstractAccount.upgrateToVersion2ª   s!   € ã(ˆAÜ˜4×#Ô#Ü˜ Ö$ó )r   c                ó€   € \         P                  P                  V 4      pR F  p W K  	  V#   \         d     K  i ; i)r#   )r#   Ú	_isOnlineÚ_isConnecting)r   Ú	VersionedÚ__getstate__ÚKeyError)r   Ústater�   s   &  r   r–   ÚAbstractAccount.__getstate__°   sG   € Ü× Ñ ×-Ñ-¨dÓ3ˆÛ9ˆAðØ’Hñ :ð
 ˆøô ô Úðús   ¦.®=¼=c                ó   € V P                   # r   )r“   r   s   &r   ÚisOnlineÚAbstractAccount.isOnline¹   s   € Ø�~‰~Ðr   c                óL  € V P                   '       g~   V P                  '       gl   ^V n         V P                  V4      pVP                  V P                  4       VP                  VP
                  4       VP                  V P                  4       V# \        P                  ! R4      h)a  Log on to this account.

Takes care to not start a connection if a connection is
already in progress.  You will need to implement
L{_startLogOn} for this to work, and it would be a good idea
to override L{_loginFailed} too.

@returntype: Deferred L{interfaces.IClient}
zConnection in progress)
r”   r“   Ú_startLogOnÚaddCallbackÚ	_cb_logOnÚregisterAccountClientÚ
addErrbackÚ_loginFailedr   ÚConnectError)r   rk   Úds   && r   ÚlogOnÚAbstractAccount.logOn¼   s}   € ð ×"×"Ð"¨T¯^¯^¨^Ø!"ˆDÔØ× Ñ  Ó(ˆAØ�M‰M˜$Ÿ.™.Ô)ð �M‰M˜&×6Ñ6Ô7Ø�L‰L˜×*Ñ*Ô+ØˆHä×$Ò$Ð%=Ó>Ð>r   c                ó‚   € V P                   P                  V4      pVf    V P                  W4      pW P                   V&   V# )zSGroup factory.

@param name: Name of the group on this account.
@type name: string
)r‰   ÚgetÚ_groupFactory)r   r   Úgroups   && r   ÚgetGroupÚAbstractAccount.getGroupÓ   s>   € ð —‘× Ñ  Ó&ˆØŠ=Ø×&Ñ& tÓ2ˆEØ!&�L‰L˜ÑØˆr   c                ó‚   € V P                   P                  V4      pVf    V P                  W4      pW P                   V&   V# )zUPerson factory.

@param name: Name of the person on this account.
@type name: string
)rŠ   r©   Ú_personFactory)r   r   Úpersons   && r   Ú	getPersonÚAbstractAccount.getPersonß   s>   € ð —‘×"Ñ" 4Ó(ˆØŠ>Ø×(Ñ(¨Ó4ˆFØ"(�M‰M˜$ÑØˆr   c                ó   € \        4       h)zcStart the sign on process.

Factored out of L{logOn}.

@returntype: Deferred L{interfaces.IClient}
)ÚNotImplementedError)r   rk   s   &&r   rž   ÚAbstractAccount._startLogOnë   s   € ô "Ó#Ð#r   c                ó.   € ^ V n         ^V n        Wn        V# )é    )r”   r“   r#   )r   r#   s   &&r   r    ÚAbstractAccount._cb_logOnô   s   € ØˆÔØˆŒØŒØˆr   c                ó"   € ^ V n         ^ V n        V# )zˆErrorback for L{logOn}.

@type reason: Failure

@returns: I{reason}, for further processing in the callback chain.
@returntype: Failure
)r”   r“   ry   s   &&r   r£   ÚAbstractAccount._loginFailedú   s   € ð ˆÔØˆŒØˆr   c                ó0   € R V n         ^ V n        ^ V n        V# r   )r#   r”   r“   )r   r#   rs   s   &&&r   rv   ÚAbstractAccount._clientLost  s   € ØˆŒØˆÔØˆŒØˆr   c                ó    <€ V ^8„  d   QhRS[ /# r,   r/   )r1   r2   s   "€r   r3   ÚAbstractAccount.__annotate__  s   ø€ ÷ 
ñ 
™#ñ 
r   c                ó�   € R P                  V P                  V P                  V P                  V P                  V P
                  4      # )z<{}: {} ({}@{}:{})>)r1   r9   rB   r…   r‡   rˆ   r   s   &r   r:   ÚAbstractAccount.__repr__  s:   € Ø$×+Ñ+Ø�N‰NØ×ÑØ�M‰MØ�I‰IØ�I‰Ió
ð 	
r   )r‰   r”   r“   rŠ   rB   r„   r#   r‡   r†   rˆ   r…   )rF   rG   rH   rI   r   r“   r”   r#   r   rª   rN   r¯   ÚpersistanceVersionr   r�   r–   r›   r¦   r¬   r±   rž   r    r£   rv   r:   rJ   rK   rL   s   @r   r‚   r‚   |   sl   ø‡ € ñð2 €IØ€MØ€Fà!€MØ#€NàÐò	ò%òòò?ò.
ò
ò$òò
ò÷
ö 
r   r‚   N)r   Útypingr   Útwisted.internetr   Útwisted.internet.protocolr   r   Útwisted.persistedr   Útwisted.python.failurer   Útwisted.python.reflectr
   Útwisted.words.im.localsr   r   r   rN   rd   r•   r‚   rX   r   r   Ú<module>rÉ      sU   ðñõ å "ß >Ý $Ý *Ý 2ß 9÷
&9ñ &9÷R9ñ 9÷60ñ 0ôDW
�f×&Ñ&ö W
r   