t.m.i.MemoryAccount(object) : class documentation

Part of twisted.mail.imap4 View Source View In Hierarchy

Implements interfaces: twisted.mail.imap4.IAccount, twisted.mail.imap4.INamespacePresenter

Undocumented
Method __init__ Undocumented
Method allocateID Undocumented
Method addMailbox Add a new mailbox to this account
Method create Create a new mailbox from the given hierarchical name.
Method select Acquire a mailbox, given its name.
Method delete Delete the mailbox with the specified name.
Method rename Rename a mailbox
Method isSubscribed Check the subscription status of a mailbox
Method subscribe Subscribe to a mailbox
Method unsubscribe Unsubscribe from a mailbox
Method listMailboxes List all the mailboxes that meet a certain criteria
Method getPersonalNamespaces Report the available personal namespaces.
Method getSharedNamespaces Report the available shared namespaces.
Method getOtherNamespaces Undocumented
Method _emptyMailbox Undocumented
Method _inferiorNames Undocumented
def __init__(self, name): (source)
Undocumented
def allocateID(self): (source)
Undocumented
def addMailbox(self, name, mbox=None): (source)
Add a new mailbox to this account
ParametersnameThe name associated with this mailbox. It may not contain multiple hierarchical parts. (type: str)
mboxThe mailbox to associate with this name. If None, a suitable default is created and used. (type: An object implementing IMailbox)
ReturnsA true value if the creation succeeds, or a deferred whose callback will be invoked when the creation succeeds. (type: Deferred or bool)
RaisesMailboxExceptionRaised if this mailbox cannot be added for some reason. This may also be raised asynchronously, if a Deferred is returned.
def create(self, pathspec): (source)
Create a new mailbox from the given hierarchical name.
ParameterspathspecThe full hierarchical name of a new mailbox to create. If any of the inferior hierarchical names to this one do not exist, they are created as well. (type: str)
ReturnsA true value if the creation succeeds, or a deferred whose callback will be invoked when the creation succeeds. (type: Deferred or bool)
RaisesMailboxExceptionRaised if this mailbox cannot be added. This may also be raised asynchronously, if a Deferred is returned.
def _emptyMailbox(self, name, id): (source)
Undocumented
def select(self, name, readwrite=1): (source)
Acquire a mailbox, given its name.
ParametersnameThe mailbox to acquire (type: str)
rwIf a true value, request a read-write version of this mailbox. If a false value, request a read-only version. (type: bool)
ReturnsThe mailbox object, or a Deferred whose callback will be invoked with the mailbox object. None may be returned if the specified mailbox may not be selected for any reason. (type: Any object implementing IMailbox or Deferred)
def delete(self, name): (source)
Delete the mailbox with the specified name.
ParametersnameThe mailbox to delete. (type: str)
ReturnsA true value if the mailbox is successfully deleted, or a Deferred whose callback will be invoked when the deletion completes. (type: Deferred or bool)
RaisesMailboxExceptionRaised if this mailbox cannot be deleted. This may also be raised asynchronously, if a Deferred is returned.
def rename(self, oldname, newname): (source)
Rename a mailbox
ParametersoldnameThe current name of the mailbox to rename. (type: str)
newnameThe new name to associate with the mailbox. (type: str)
ReturnsA true value if the mailbox is successfully renamed, or a Deferred whose callback will be invoked when the rename operation is completed. (type: Deferred or bool)
RaisesMailboxExceptionRaised if this mailbox cannot be renamed. This may also be raised asynchronously, if a Deferred is returned.
def _inferiorNames(self, name): (source)
Undocumented
def isSubscribed(self, name): (source)
Check the subscription status of a mailbox
ParametersnameThe name of the mailbox to check (type: str)
ReturnsA true value if the given mailbox is currently subscribed to, a false value otherwise. A Deferred may also be returned whose callback will be invoked with one of these values. (type: Deferred or bool)
def subscribe(self, name): (source)
Subscribe to a mailbox
ParametersnameThe name of the mailbox to subscribe to (type: str)
ReturnsA true value if the mailbox is subscribed to successfully, or a Deferred whose callback will be invoked with this value when the subscription is successful. (type: Deferred or bool)
RaisesMailboxExceptionRaised if this mailbox cannot be subscribed to. This may also be raised asynchronously, if a Deferred is returned.
def unsubscribe(self, name): (source)
Unsubscribe from a mailbox
ParametersnameThe name of the mailbox to unsubscribe from (type: str)
ReturnsA true value if the mailbox is unsubscribed from successfully, or a Deferred whose callback will be invoked with this value when the unsubscription is successful. (type: Deferred or bool)
RaisesMailboxExceptionRaised if this mailbox cannot be unsubscribed from. This may also be raised asynchronously, if a Deferred is returned.
def listMailboxes(self, ref, wildcard): (source)
List all the mailboxes that meet a certain criteria
ParametersrefThe context in which to apply the wildcard (type: str)
wildcardAn expression against which to match mailbox names. '*' matches any number of characters in a mailbox name, and '%' matches similarly, but will not match across hierarchical boundaries. (type: str)
ReturnsA list of (mailboxName, mailboxObject) which meet the given criteria. mailboxObject should implement either IMailboxInfo or IMailbox. A Deferred may also be returned. (type: list of tuple)
def getPersonalNamespaces(self): (source)
Report the available personal namespaces.

Typically there should be only one personal namespace. A common name for it is "", and its hierarchical delimiter is usually "/".

ReturnsThe personal namespaces and their hierarchical delimiters. If no namespaces of this type exist, None should be returned. (type: iterable of two-tuples of strings)
def getSharedNamespaces(self): (source)
Report the available shared namespaces.

Shared namespaces do not belong to any individual user but are usually to one or more of them. Examples of shared namespaces might be "#news" for a usenet gateway.

ReturnsThe shared namespaces and their hierarchical delimiters. If no namespaces of this type exist, None should be returned. (type: iterable of two-tuples of strings)
def getOtherNamespaces(self): (source)
Undocumented
API Documentation for Twisted, generated by pydoctor at 2013-11-08 22:07:30.