Ë
    ojË!  ã                   ó²   — 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
y)z
Pan-protocol chat client.
é    )Ú	AttributeÚ	Interfacec                   óT   — e Zd ZdZ ed«      Z ed«      Zd„ Zd„ Zd„ Z	d„ Z
d„ Zd	„ Zy
)Ú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                  ó   — y)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         ú=/usr/lib/python3/dist-packages/twisted/words/im/interfaces.pyÚ__init__zIAccount.__init__   ó   � ó    c                   ó   — y)z7
        Am I online?

        @rtype: boolean
        Nr   r   r   r   ÚisOnlinezIAccount.isOnline*   r   r   c                  ó   — y)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                   ó   — y)z
        Sign off.
        Nr   r   r   r   ÚlogOffzIAccount.logOff:   r   r   c                  ó   — y)z*
        @rtype: L{Group<IGroup>}
        Nr   ©Ú	groupNames    r   ÚgetGroupzIAccount.getGroup?   r   r   c                  ó   — y)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?   „ ññ ÐUÓV€FÙØEó€Kò	òòòò
ó
r   r   c                   ó<   — e Zd Z ed«      Zd„ Zd„ Zd„ Zdd„Zd„ Z	y)	ÚIClientz!The L{IAccount} I am a Client forc                  ó   — y)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                  ó   — y)zb
        @param groupName: The name of the group to join.
        @type groupName: string
        Nr   r   s    r   Ú	joinGroupzIClient.joinGroupU   r   r   c                  ó   — y)zc
        @param groupName: The name of the group to leave.
        @type groupName: string
        Nr   r   s    r   Ú
leaveGroupzIClient.leaveGroup[   r   r   c                  ó   — y ©Nr   )ÚnameÚhides     r   ÚgetGroupConversationzIClient.getGroupConversationa   ó   € Ør   c                  ó   — y 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   s&   „ ÙÐ;Ó<€Gòòòóór   r(   c                   ó,   — e Zd Zd„ Zd„ Zd„ Zd„ Zdd„Zy)ÚIPersonc                  ó   — y)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                   ó   — y)zA
        Am I online right now?

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

        @return: L{locals.StatusEnum}
        Nr   r   r   r   Ú	getStatuszIPerson.getStatusz   r   r   c                   ó   — y)z;
        @rtype: string (XXX: How about a scalar?)
        Nr   r   r   r   ÚgetIdleTimezIPerson.getIdleTime�   r   r   Nc                  ó   — y)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   s   „ òòòòô
r   r9   c                   óP   — e Zd ZdZ ed«      Z ed«      Zd„ Zd„ Zd
d„Z	d„ Z
d	„ Zy)Ú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                  ó   — y)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                  ó   — y)zR
        Set this Groups topic on the server.

        @type text: string
        Nr   )rC   s    r   ÚsetTopiczIGroup.setTopic¤   r   r   Nc                  ó   — y)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                   ó   — y)z"
        Join this group.
        Nr   r   r   r   ÚjoinzIGroup.join¸   r   r   c                   ó   — y)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   �   s8   „ ññ Ð>Ó?€DÙÐIÓJ€Gòòóòó
r   rG   c                   ó4   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	y)	ÚIConversationz0
    A conversation with a specific person.
    c                  ó   — y)z*
        @type person: L{IPerson}
        Nr   )Úpersonr   s     r   r   zIConversation.__init__È   r   r   c                   ó   — y©zA
        doesn't seem like it belongs in this interface.
        Nr   r   r   r   ÚshowzIConversation.showÍ   r   r   c                   ó   — y©z#
        nor this neither.
        Nr   r   r   r   r3   zIConversation.hideÒ   r   r   c                  ó   — y r1   r   rB   s     r   ÚsendTextzIConversation.sendText×   r5   r   c                  ó   — y r1   r   rB   s     r   ÚshowMessagezIConversation.showMessageÚ   r5   r   c                  ó   — y)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   Ã   s%   „ ñòò
ò
ò
òór   rR   c                   óB   — e Zd Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	d„ Z
d	„ Zy
)ÚIGroupConversationc                   ó   — yrV   r   r   r   r   rW   zIGroupConversation.showä   r   r   c                   ó   — yrY   r   r   r   r   r3   zIGroupConversation.hideé   r   r   c                  ó   — y r1   r   rB   s     r   r[   zIGroupConversation.sendTextî   r5   r   c                  ó   — y r1   r   )ÚsenderrC   rD   s      r   ÚshowGroupMessagez#IGroupConversation.showGroupMessageñ   r5   r   c                  ó   — y)zT
        Sets the list of members in the group and displays it to the user.
        Nr   )Úmemberss    r   ÚsetGroupMembersz"IGroupConversation.setGroupMembersô   r   r   c                  ó   — y)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                  ó   — y)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                  ó   — y)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                  ó   — y)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                   ó@   — e Zd Zd„ Zd„ Zd„ Zd
d„Zd
d„Zd„ Zd„ Z	d„ Z
y	)ÚIChatUIc                  ó   — y)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                  ó   — y)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                   ó   — y)z)
        @rtype: L{ContactsList}
        Nr   r   r   r   ÚgetContactsListzIChatUI.getContactsList*  r   r   c                  ó   — y)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                  ó   — y)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                  ó   — y)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                  ó   — y)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                  ó   — y)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Ž      sj   ðñ
÷ 0ô2ˆyô 2ôjˆiô ô<$ˆiô $ôN1ˆYô 1ôh�Iô ô@5˜ô 5ôpOˆiõ Or   