class documentation

class ChatUI: (source)

View In Hierarchy

A GUI chat client.
Method __init__ Undocumented
Method contact​Changed​Nick For the given person, change the person's name to newnick and tell the contact list and any conversation windows with that person to change as well.
Method get​Contacts​List Get the contacts list associated with this chat window.
Method get​Conversation For the given person object, return the conversation window or create and return a new conversation window if one does not exist.
Method get​Group For the given name and account client, return an instance of a IGroup provider or create and return a new instance of a IGroup provider.
Method get​Group​Conversation For the given group object, return the group conversation window or create and return a new group conversation window if it doesn't exist.
Method get​Person For the given name and account client, return an instance of a IGroup provider or create and return a new instance of a IGroup provider.
Method register​Account​Client Notify the user that an account has been signed on to.
Method unregister​Account​Client Notify the user that an account has been signed off or disconnected.
Instance Variable contacts​List A contacts list.
Instance Variable conversations A cache of all the direct windows.
Instance Variable group​Conversations A cache of all the group windows.
Instance Variable groups A cache of all the groups associated with this client.
Instance Variable online​Clients A list of message sources currently online.
Instance Variable persons A cache of all the users associated with this client.
def __init__(self): (source)

Undocumented

def contactChangedNick(self, person, newnick): (source)
For the given person, change the person's name to newnick and tell the contact list and any conversation windows with that person to change as well.
Parameters
person:IPerson providerThe person whose nickname will get changed.
newnick:strThe new name person will take.
def getContactsList(self): (source)
Get the contacts list associated with this chat window.
Returns
ContactsListThe contacts list associated with this chat window.
def getConversation(self, person, Class=Conversation, stayHidden=False): (source)
For the given person object, return the conversation window or create and return a new conversation window if one does not exist.
Parameters
person:IPerson providerThe person whose conversation window we want to get.
​Class:IConversation implementorThe kind of conversation window we want. If the conversation window for this person didn't already exist, create one of this type.
stay​Hidden:boolWhether or not the conversation window should stay hidden.
Returns
IConversation providerThe conversation window.
def getGroup(self, name, client): (source)
For the given name and account client, return an instance of a IGroup provider or create and return a new instance of a IGroup provider.
Parameters
name:strThe name of the group of interest.
client:IClient providerThe client account of interest.
Returns
IGroup providerThe group with that name.
def getGroupConversation(self, group, Class=GroupConversation, stayHidden=False): (source)
For the given group object, return the group conversation window or create and return a new group conversation window if it doesn't exist.
Parameters
group:IGroup providerThe group whose conversation window we want to get.
​Class:IConversation implementorThe kind of conversation window we want. If the conversation window for this person didn't already exist, create one of this type.
stay​Hidden:boolWhether or not the conversation window should stay hidden.
Returns
IGroupConversation providerThe group conversation window.
def getPerson(self, name, client): (source)
For the given name and account client, return an instance of a IGroup provider or create and return a new instance of a IGroup provider.
Parameters
name:strThe name of the person of interest.
client:IClient providerThe client account of interest.
Returns
IPerson providerThe person with that name.
def registerAccountClient(self, client): (source)
Notify the user that an account has been signed on to.
Parameters
client:IClient providerThe client account for the person who has just signed on.
Returns
IClient providerThe client, so that it may be used in a callback chain.
def unregisterAccountClient(self, client): (source)
Notify the user that an account has been signed off or disconnected.
Parameters
client:IClient providerThe client account for the person who has just signed off.
contactsList: ContactsList = (source)
A contacts list.
conversations: dict of Conversation = (source)
A cache of all the direct windows.
groupConversations: dict of GroupConversation = (source)
A cache of all the group windows.
groups: dict with keys that are a tuple of (str, IAccount provider) and values that are IGroup provider = (source)
A cache of all the groups associated with this client.
onlineClients: list of IClient providers = (source)
A list of message sources currently online.
persons: dict with keys that are a tuple of (str, IAccount provider) and values that are IPerson provider = (source)
A cache of all the users associated with this client.