Ϫf!dZddlmZmZGddeZGddeZGddeZGd d eZGd d eZGd deZ GddeZ y)z Pan-protocol chat client. ) Attribute InterfacecTeZdZdZedZedZdZdZdZ dZ dZ d Z y ) IAccountz; I represent a user's account with a chat service. z} Nr groupNames rgetGroupzIAccount.getGroup?rrcy)z, @rtype: L{Person} Nr) personNames r getPersonzIAccount.getPersonDrrN) __name__ __module__ __qualname____doc__rclient gatewayTyperrrrrr rrrrrs?U VFEK       rrc<eZdZedZdZdZdZddZdZ y) IClientz!The L{IAccount} I am a Client forcy)z @type account: L{IAccount} @type chatui: L{IChatUI} @param logonDeferred: Will be called back once I am logged on. @type logonDeferred: L{Deferred} Nr)accountr logonDeferreds rrzIClient.__init__Mrrcy)zb @param groupName: The name of the group to join. @type groupName: string Nrrs r joinGroupzIClient.joinGroupUrrcy)zc @param groupName: The name of the group to leave. @type groupName: string Nrrs r leaveGroupzIClient.leaveGroup[rrcyNr)namehides rgetGroupConversationzIClient.getGroupConversationa rcyr1r)r2s rr zIClient.getPersondr5rNr) r!r"r#rr*rr-r/r4r rrrr(r(Js&;r@rErrrr9r9hs     rr9cPeZdZdZedZedZdZdZd dZ dZ 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} I am accessed through.cy)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} Nrr;s rrzIGroup.__init__rrcy)zR Set this Groups topic on the server. @type text: string Nr)rCs rsetTopiczIGroup.setTopicrrNcy)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 NrrBs rsendGroupMessagezIGroup.sendGroupMessagerrcy)z" Join this group. Nrrrrjoinz IGroup.joinrrcy)z$ Depart this group. Nrrrrleavez IGroup.leaverrr1) r!r"r#r$rr2r*rrJrLrNrPrrrrGrGs8 > ?DIJG      rrGc4eZdZdZdZdZdZdZdZdZ y) IConversationz0 A conversation with a specific person. cy)z* @type person: L{IPerson} Nr)personrs rrzIConversation.__init__rrcyzA doesn't seem like it belongs in this interface. NrrrrshowzIConversation.showrrcyz# nor this neither. Nrrrrr3zIConversation.hiderrcyr1rrBs rsendTextzIConversation.sendTextr5rcyr1rrBs r showMessagezIConversation.showMessager5rcy)zR @param person: XXX Shouldn't this always be Conversation.person? Nr)rTnewnicks r changedNickzIConversation.changedNickrrN) r!r"r#r$rrWr3r[r]r`rrrrRrRs%      rrRcBeZdZdZdZdZdZdZdZdZ dZ d Z y ) IGroupConversationcyrVrrrrrWzIGroupConversation.showrrcyrYrrrrr3zIGroupConversation.hiderrcyr1rrBs rr[zIGroupConversation.sendTextr5rcyr1r)senderrCrDs rshowGroupMessagez#IGroupConversation.showGroupMessager5rcy)zT Sets the list of members in the group and displays it to the user. Nr)memberss rsetGroupMembersz"IGroupConversation.setGroupMembersrrcy)z Displays the topic (from the server) for the group conversation window. @type topic: string @type author: string (XXX: Not Person?) Nr)topicauthors rrJzIGroupConversation.setTopicrrcy)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?) Nrmembers r memberJoinedzIGroupConversation.memberJoinedrrcy)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 Nroldnickr_s rmemberChangedNickz$IGroupConversation.memberChangedNick rrcy)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?) Nrrps r memberLeftzIGroupConversation.memberLeftrrN) r!r"r#rWr3r[rhrkrJrrrvrxrrrrbrbs/         rrbc@eZdZdZdZdZd dZd dZdZdZ dZ y ) IChatUIcy)zp Notifies user that an account has been signed on to. @type client: L{Client} Nrr%s rregisterAccountClientzIChatUI.registerAccountClientrrcy)z~ Notifies user that an account has been signed off or disconnected. @type client: L{Client} Nrr|s runregisterAccountClientzIChatUI.unregisterAccountClient#rrcy)z) @rtype: L{ContactsList} NrrrrgetContactsListzIChatUI.getContactsList*rrcy)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} @type Class: L{Conversation} class @type stayHidden: boolean @rtype: L{Conversation} Nr)rTClass stayHiddens rgetConversationzIChatUI.getConversation2rrcy)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} @type Class: L{Conversation} class @type stayHidden: boolean @rtype: L{GroupConversation} Nr)grouprrs rr4zIChatUI.getGroupConversation>rrcy)z Get a Person for a client. Duplicates L{IAccount.getPerson}. @type name: string @type client: L{Client} @rtype: L{Person} Nrr2r%s rr zIChatUI.getPersonJrrcy)z Get a Group for a client. Duplicates L{IAccount.getGroup}. @type name: string @type client: L{Client} @rtype: L{Group} Nrrs rrzIChatUI.getGroupVrrcy)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 Nrrts rcontactChangedNickzIChatUI.contactChangedNickbrrNr7) r!r"r#r}rrrr4r rrrrrrzrzs*            rrzN) r$zope.interfacerrrr(r9rGrRrbrzrrrrsj 02 y2 j i <$ i$ N1 Y1 h I @5 5 pO iO r