class documentation

class AbstractAccount(styles.Versioned): (source)

Known subclasses: twisted.words.im.ircsupport.IRCAccount, twisted.words.im.pbsupport.PBAccount

View In Hierarchy

Base class for Accounts.

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

Method __getstate__ Get state, adding a version number to it on its way out.
Method __init__ Undocumented
Method __repr__ Undocumented
Method get​Group Group factory.
Method get​Person Person factory.
Method is​Online Undocumented
Method log​On Log on to this account.
Method upgrate​To​Version2 Undocumented
Class Variable persistance​Version Undocumented
Instance Variable account​Name
Instance Variable auto​Login
Instance Variable client Undocumented
Instance Variable host
Instance Variable password
Instance Variable port
Instance Variable username
Method _cb_log​On Undocumented
Method _client​Lost Undocumented
Method _login​Failed Errorback for logOn.
Method _start​Log​On Start the sign on process.
Class Variable _group​Factory A Callable that will return a IGroup appropriate for this account type.
Class Variable _person​Factory A Callable that will return a IPerson appropriate for this account type.
Instance Variable _groups Undocumented
Instance Variable _is​Connecting Whether I am in the process of establishing a connection to the server.
Instance Variable _is​Online Whether I am currently on-line with the server.
Instance Variable _persons Undocumented

Inherited from Versioned:

Method __setstate__ Undocumented
Method version​Upgrade (internal) Do a version upgrade.
Class Variable persistence​Forgets Undocumented
Class Variable persistence​Version Undocumented
Instance Variable __dict__ Undocumented
def __getstate__(self): (source)
Get state, adding a version number to it on its way out.
def __init__(self, accountName, autoLogin, username, password, host, port): (source)
def __repr__(self): (source)

Undocumented

Returns
strUndocumented
def getGroup(self, name): (source)
Group factory.
Parameters
name:stringName of the group on this account.
def getPerson(self, name): (source)
Person factory.
Parameters
name:stringName of the person on this account.
def isOnline(self): (source)

Undocumented

def logOn(self, chatui): (source)

Log on to this account.

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

Returns
Deferred interfaces.IClientUndocumented
def upgrateToVersion2(self): (source)

Undocumented

persistanceVersion: int = (source)

Undocumented

accountName = (source)
autoLogin = (source)
client = (source)

Undocumented

password = (source)
username = (source)
def _cb_logOn(self, client): (source)

Undocumented

def _clientLost(self, client, reason): (source)

Undocumented

def _loginFailed(self, reason): (source)
Errorback for logOn.
Parameters
reason:FailureUndocumented
Returns
Failurereason, for further processing in the callback chain.
def _startLogOn(self, chatui): (source)

Start the sign on process.

Factored out of logOn.

Returns
Deferred interfaces.IClientUndocumented
_groupFactory = (source)
A Callable that will return a IGroup appropriate for this account type.
_personFactory = (source)
A Callable that will return a IPerson appropriate for this account type.
_groups: dict = (source)

Undocumented

_isConnecting: boolean = (source)
Whether I am in the process of establishing a connection to the server.
_isOnline: boolean = (source)
Whether I am currently on-line with the server.
_persons: dict = (source)

Undocumented