§
    ÉtºfË!  ã                   óÞ   — d Z ddlmZmZ  G d„ de¦  «        Z G d„ de¦  «        Z G d„ de¦  «        Z G d	„ d
e¦  «        Z G d„ de¦  «        Z G d„ de¦  «        Z	 G d„ de¦  «        Z
dS )z
Pan-protocol chat client.
é    )Ú	AttributeÚ	Interfacec                   ób   — e Zd ZdZ ed¦  «        Z ed¦  «        Zd„ Zd„ Zd„ Z	d„ Z
d„ Zd	„ Zd
S )ÚIAccountz;
    I represent a user's account with a chat service.
    z<The L{IClient} currently connecting to this account, if any.z;A C{str} that identifies the protocol used by this account.c                 ó   — dS )a  
        @type accountName: string
        @param accountName: A name to refer to the account by locally.
        @type autoLogin: boolean
        @type username: string
        @type password: string
        @type host: string
        @type port: integer
        N© )ÚaccountNameÚ	autoLoginÚusernameÚpasswordÚhostÚports         úZ/var/www/surfInsights/venv3-11/lib/python3.11/site-packages/twisted/words/im/interfaces.pyÚ__init__zIAccount.__init__   ó   € € € ó    c                  ó   — dS )z7
        Am I online?

        @rtype: boolean
        Nr   r   r   r   ÚisOnlinezIAccount.isOnline*   r   r   c                 ó   — dS )z�
        Go on-line.

        @type chatui: Implementor of C{IChatUI}

        @rtype: L{Deferred} with an eventual L{IClient} result.
        Nr   )Úchatuis    r   ÚlogOnzIAccount.logOn1   r   r   c                  ó   — dS )z
        Sign off.
        Nr   r   r   r   ÚlogOffzIAccount.logOff:   r   r   c                 ó   — dS )z*
        @rtype: L{Group<IGroup>}
        Nr   ©Ú	groupNames    r   ÚgetGroupzIAccount.getGroup?   r   r   c                 ó   — dS )z,
        @rtype: L{Person<IPerson>}
        Nr   )Ú
personNames    r   Ú	getPersonzIAccount.getPersonD   r   r   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   ÚclientÚgatewayTyper   r   r   r   r   r    r   r   r   r   r      sž   € € € € € ðð ð ˆYÐUÑVÔV€FØ�)ØEñô €Kð	ð 	ð 	ðð ð ðð ð ðð ð ð
ð ð ð
ð ð ð ð r   r   c                   óD   — e Zd Z ed¦  «        Zd„ Zd„ Zd„ Zd	d„Zd„ Z	dS )
ÚIClientz!The L{IAccount} I am a Client forc                 ó   — dS )zÞ
        @type account: L{IAccount}
        @type chatui: L{IChatUI}
        @param logonDeferred: Will be called back once I am logged on.
        @type logonDeferred: L{Deferred<twisted.internet.defer.Deferred>}
        Nr   )Úaccountr   ÚlogonDeferreds      r   r   zIClient.__init__M   r   r   c                 ó   — dS )zb
        @param groupName: The name of the group to join.
        @type groupName: string
        Nr   r   s    r   Ú	joinGroupzIClient.joinGroupU   r   r   c                 ó   — dS )zc
        @param groupName: The name of the group to leave.
        @type groupName: string
        Nr   r   s    r   Ú
leaveGroupzIClient.leaveGroup[   r   r   r   c                 ó   — d S ©Nr   )ÚnameÚhides     r   ÚgetGroupConversationzIClient.getGroupConversationa   ó   € Øˆr   c                 ó   — d S r1   r   )r2   s    r   r    zIClient.getPersond   r5   r   N©r   )
r!   r"   r#   r   r*   r   r-   r/   r4   r    r   r   r   r(   r(   J   st   € € € € € ØˆiÐ;Ñ<Ô<€Gðð ð ðð ð ðð ð ðð ð ð ðð ð ð ð r   r(   c                   ó.   — e Zd Zd„ Zd„ Zd„ Zd„ Zdd„ZdS )ÚIPersonc                 ó   — dS )zÏ
        Initialize me.

        @param name: My name, as the server knows me.
        @type name: string
        @param account: The account I am accessed through.
        @type account: I{Account}
        Nr   ©r2   r*   s     r   r   zIPerson.__init__i   r   r   c                  ó   — dS )zA
        Am I online right now?

        @rtype: boolean
        Nr   r   r   r   r   zIPerson.isOnlines   r   r   c                  ó   — dS )zS
        What is my on-line status?

        @return: L{locals.StatusEnum}
        Nr   r   r   r   Ú	getStatuszIPerson.getStatusz   r   r   c                  ó   — dS )z;
        @rtype: string (XXX: How about a scalar?)
        Nr   r   r   r   ÚgetIdleTimezIPerson.getIdleTime�   r   r   Nc                 ó   — dS )zi
        Send a message to this person.

        @type text: string
        @type metadata: dict
        Nr   ©ÚtextÚmetadatas     r   ÚsendMessagezIPerson.sendMessage†   r   r   r1   )r!   r"   r#   r   r   r>   r@   rE   r   r   r   r9   r9   h   sd   € € € € € ðð ð ðð ð ðð ð ðð ð ð
ð ð ð ð ð r   r9   c                   ó^   — e Zd ZdZ ed¦  «        Z ed¦  «        Zd„ Zd„ Zd
d„Z	d„ Z
d	„ ZdS )ÚIGroupzž
    A group which you may have a conversation with.

    Groups generally have a loosely-defined set of members, who may
    leave and join at any time.
    z'My C{str} name, as the server knows me.z/The L{Account<IAccount>} I am accessed through.c                 ó   — dS )zÖ
        Initialize me.

        @param name: My name, as the server knows me.
        @type name: str
        @param account: The account I am accessed through.
        @type account: L{Account<IAccount>}
        Nr   r;   s     r   r   zIGroup.__init__š   r   r   c                 ó   — dS )zR
        Set this Groups topic on the server.

        @type text: string
        Nr   )rC   s    r   ÚsetTopiczIGroup.setTopic¤   r   r   Nc                 ó   — dS )a  
        Send a message to this group.

        @type text: str

        @type metadata: dict
        @param metadata: Valid keys for this dictionary include:

            - C{'style'}: associated with one of:
                - C{'emote'}: indicates this is an action
        Nr   rB   s     r   ÚsendGroupMessagezIGroup.sendGroupMessage«   r   r   c                  ó   — dS )z"
        Join this group.
        Nr   r   r   r   ÚjoinzIGroup.join¸   r   r   c                  ó   — dS )z$
        Depart this group.
        Nr   r   r   r   ÚleavezIGroup.leave½   r   r   r1   )r!   r"   r#   r$   r   r2   r*   r   rJ   rL   rN   rP   r   r   r   rG   rG   �   s�   € € € € € ðð ð ˆ9Ð>Ñ?Ô?€DØˆiÐIÑJÔJ€Gðð ð ðð ð ðð ð ð ðð ð ð
ð ð ð ð r   rG   c                   ó6   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	dS )	ÚIConversationz0
    A conversation with a specific person.
    c                 ó   — dS )z*
        @type person: L{IPerson}
        Nr   )Úpersonr   s     r   r   zIConversation.__init__È   r   r   c                  ó   — dS ©zA
        doesn't seem like it belongs in this interface.
        Nr   r   r   r   ÚshowzIConversation.showÍ   r   r   c                  ó   — dS ©z#
        nor this neither.
        Nr   r   r   r   r3   zIConversation.hideÒ   r   r   c                 ó   — d S r1   r   rB   s     r   ÚsendTextzIConversation.sendText×   r5   r   c                 ó   — d S r1   r   rB   s     r   ÚshowMessagezIConversation.showMessageÚ   r5   r   c                 ó   — dS )zR
        @param person: XXX Shouldn't this always be Conversation.person?
        Nr   )rT   Únewnicks     r   ÚchangedNickzIConversation.changedNickÝ   r   r   N)
r!   r"   r#   r$   r   rW   r3   r[   r]   r`   r   r   r   rR   rR   Ã   sx   € € € € € ðð ðð ð ð
ð ð ð
ð ð ð
ð ð ðð ð ðð ð ð ð r   rR   c                   óD   — e Zd Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	d„ Z
d	„ Zd
S )ÚIGroupConversationc                  ó   — dS rV   r   r   r   r   rW   zIGroupConversation.showä   r   r   c                  ó   — dS rY   r   r   r   r   r3   zIGroupConversation.hideé   r   r   c                 ó   — d S r1   r   rB   s     r   r[   zIGroupConversation.sendTextî   r5   r   c                 ó   — d S r1   r   )ÚsenderrC   rD   s      r   ÚshowGroupMessagez#IGroupConversation.showGroupMessageñ   r5   r   c                 ó   — dS )zT
        Sets the list of members in the group and displays it to the user.
        Nr   )Úmemberss    r   ÚsetGroupMembersz"IGroupConversation.setGroupMembersô   r   r   c                 ó   — dS )z¦
        Displays the topic (from the server) for the group conversation window.

        @type topic: string
        @type author: string (XXX: Not Person?)
        Nr   )ÚtopicÚauthors     r   rJ   zIGroupConversation.setTopicù   r   r   c                 ó   — dS )z°
        Adds the given member to the list of members in the group conversation
        and displays this to the user,

        @type member: string (XXX: Not Person?)
        Nr   ©Úmembers    r   ÚmemberJoinedzIGroupConversation.memberJoined  r   r   c                 ó   — dS )zÈ
        Changes the oldnick in the list of members to C{newnick} and displays this
        change to the user,

        @type oldnick: string (XXX: Not Person?)
        @type newnick: string
        Nr   ©Úoldnickr_   s     r   ÚmemberChangedNickz$IGroupConversation.memberChangedNick	  r   r   c                 ó   — dS )z»
        Deletes the given member from the list of members in the group
        conversation and displays the change to the user.

        @type member: string (XXX: Not Person?)
        Nr   rp   s    r   Ú
memberLeftzIGroupConversation.memberLeft  r   r   N)r!   r"   r#   rW   r3   r[   rh   rk   rJ   rr   rv   rx   r   r   r   rb   rb   ã   s›   € € € € € ðð ð ð
ð ð ð
ð ð ðð ð ðð ð ð
ð ð ðð ð ðð ð ðð ð ð ð r   rb   c                   óB   — e Zd Zd„ Zd„ Zd„ Zdd„Zdd„Zd„ Zd„ Z	d	„ Z
d
S )ÚIChatUIc                 ó   — dS )zp
        Notifies user that an account has been signed on to.

        @type client: L{Client<IClient>}
        Nr   ©r%   s    r   ÚregisterAccountClientzIChatUI.registerAccountClient  r   r   c                 ó   — dS )z~
        Notifies user that an account has been signed off or disconnected.

        @type client: L{Client<IClient>}
        Nr   r|   s    r   ÚunregisterAccountClientzIChatUI.unregisterAccountClient#  r   r   c                  ó   — dS )z)
        @rtype: L{ContactsList}
        Nr   r   r   r   ÚgetContactsListzIChatUI.getContactsList*  r   r   r   c                 ó   — dS )aT  
        For the given person object, returns the conversation window
        or creates and returns a new conversation window if one does not exist.

        @type person: L{Person<IPerson>}
        @type Class: L{Conversation<IConversation>} class
        @type stayHidden: boolean

        @rtype: L{Conversation<IConversation>}
        Nr   )rT   ÚClassÚ
stayHiddens      r   ÚgetConversationzIChatUI.getConversation2  r   r   c                 ó   — dS )a…  
        For the given group object, returns the group conversation window or
        creates and returns a new group conversation window if it doesn't exist.

        @type group: L{Group<interfaces.IGroup>}
        @type Class: L{Conversation<interfaces.IConversation>} class
        @type stayHidden: boolean

        @rtype: L{GroupConversation<interfaces.IGroupConversation>}
        Nr   )Úgrouprƒ   r„   s      r   r4   zIChatUI.getGroupConversation>  r   r   c                 ó   — dS )zÀ
        Get a Person for a client.

        Duplicates L{IAccount.getPerson}.

        @type name: string
        @type client: L{Client<IClient>}

        @rtype: L{Person<IPerson>}
        Nr   ©r2   r%   s     r   r    zIChatUI.getPersonJ  r   r   c                 ó   — dS )z¼
        Get a Group for a client.

        Duplicates L{IAccount.getGroup}.

        @type name: string
        @type client: L{Client<IClient>}

        @rtype: L{Group<IGroup>}
        Nr   r‰   s     r   r   zIChatUI.getGroupV  r   r   c                 ó   — dS )zö
        For the given person, changes the person's name to newnick, and
        tells the contact list and any conversation windows with that person
        to change as well.

        @type oldnick: string
        @type newnick: string
        Nr   rt   s     r   ÚcontactChangedNickzIChatUI.contactChangedNickb  r   r   Nr7   )r!   r"   r#   r}   r   r�   r…   r4   r    r   rŒ   r   r   r   rz   rz     s–   € € € € € ðð ð ðð ð ðð ð ð
ð 
ð 
ð 
ð
ð 
ð 
ð 
ð
ð 
ð 
ð
ð 
ð 
ðð ð ð ð r   rz   N)r$   Úzope.interfacer   r   r   r(   r9   rG   rR   rb   rz   r   r   r   ú<module>rŽ      sh  ðð
ð ð 0Ð /Ð /Ð /Ð /Ð /Ð /Ð /ð2ð 2ð 2ð 2ð 2ˆyñ 2ô 2ð 2ðjð ð ð ð ˆiñ ô ð ð<$ð $ð $ð $ð $ˆiñ $ô $ð $ðN1ð 1ð 1ð 1ð 1ˆYñ 1ô 1ð 1ðhð ð ð ð �Iñ ô ð ð@5ð 5ð 5ð 5ð 5˜ñ 5ô 5ð 5ðpOð Oð Oð Oð Oˆiñ Oô Oð Oð Oð Or   