# ``twisted`.`mail`.`imap4`.`MemoryAccountWithoutNamespaces``

class documentation

`class MemoryAccountWithoutNamespaces: (source)`

Known subclasses: `twisted.mail.imap4.MemoryAccount`

Implements interfaces: `twisted.mail.interfaces.IAccountIMAP`

View In Hierarchy

Undocumented

Method | `__init__` | Undocumented
Method | `addMailbox` | Add a new mailbox to this account
Method | `allocateID` | Undocumented
Method | `create` | Create a new mailbox from the given hierarchical name.
Method | `delete` | Delete the mailbox with the specified name.
Method | `isSubscribed` | Check the subscription status of a mailbox
Method | `listMailboxes` | List all the mailboxes that meet a certain criteria
Method | `rename` | Rename a mailbox
Method | `select` | Acquire a mailbox, given its name.
Method | `subscribe` | Subscribe to a mailbox
Method | `unsubscribe` | Unsubscribe from a mailbox
Class Variable | `top_id` | Undocumented
Instance Variable | `mailboxes` | Undocumented
Instance Variable | `name` | Undocumented
Instance Variable | `subscriptions` | Undocumented
Method | `_emptyMailbox` | Undocumented
Method | `_inferiorNames` | Undocumented

def __init__(self, name): (source)

Undocumented

def addMailbox(self, name, mbox=None): (source)
from `twisted.mail.interfaces.IAccountIMAP`
Add a new mailbox to this account

Parameters
name:`bytes` | The name associated with this mailbox. It may not contain multiple hierarchical parts.
mbox:An object implementing `IMailboxIMAP` | The mailbox to associate with this name. If `None`, a suitable default is created and used.
Returns
`Deferred` or `bool` | A true value if the creation succeeds, or a deferred whose callback will be invoked when the creation succeeds.
Raises
`MailboxException` | Raised if this mailbox cannot be added for some reason. This may also be raised asynchronously, if a `Deferred` is returned.

def allocateID(self): (source)

Undocumented

def create(self, pathspec): (source)
from `twisted.mail.interfaces.IAccountIMAP`
Create a new mailbox from the given hierarchical name.

Parameters
pathspec:`bytes` | The 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.
Returns
`Deferred` or `bool` | A true value if the creation succeeds, or a deferred whose callback will be invoked when the creation succeeds.
Raises
`MailboxException` | Raised if this mailbox cannot be added. This may also be raised asynchronously, if a `Deferred` is returned.

def delete(self, name): (source)
from `twisted.mail.interfaces.IAccountIMAP`
Delete the mailbox with the specified name.

Parameters
name:`bytes` | The mailbox to delete.
Returns
`Deferred` or `bool` | A true value if the mailbox is successfully deleted, or a `Deferred` whose callback will be invoked when the deletion completes.
Raises
`MailboxException` | Raised if this mailbox cannot be deleted. This may also be raised asynchronously, if a `Deferred` is returned.

def isSubscribed(self, name): (source)
from `twisted.mail.interfaces.IAccountIMAP`
Check the subscription status of a mailbox

Parameters
name:`bytes` | The name of the mailbox to check
Returns
`Deferred` or `bool` | A 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.

def listMailboxes(self, ref, wildcard): (source)
from `twisted.mail.interfaces.IAccountIMAP`
List all the mailboxes that meet a certain criteria

Parameters
ref:`bytes` | The context in which to apply the wildcard
wildcard:`bytes` | An 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.
Returns
`list` of `tuple` | A list of `(mailboxName, mailboxObject)` which meet the given criteria. `mailboxObject` should implement either `IMailboxIMAPInfo` or `IMailboxIMAP`. A Deferred may also be returned.

def rename(self, oldname, newname): (source)
from `twisted.mail.interfaces.IAccountIMAP`
Rename a mailbox

Parameters
oldname:`bytes` | The current name of the mailbox to rename.
newname:`bytes` | The new name to associate with the mailbox.
Returns
`Deferred` or `bool` | A true value if the mailbox is successfully renamed, or a `Deferred` whose callback will be invoked when the rename operation is completed.
Raises
`MailboxException` | Raised if this mailbox cannot be renamed. This may also be raised asynchronously, if a `Deferred` is returned.

def select(self, name, readwrite=1): (source)
from `twisted.mail.interfaces.IAccountIMAP`
Acquire a mailbox, given its name.

Parameters
name:`bytes` | The mailbox to acquire
readwrite | Undocumented
rw:`bool` | If a true value, request a read-write version of this mailbox. If a false value, request a read-only version.
Returns
Any object implementing `IMailboxIMAP` or `Deferred` | The 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.

def subscribe(self, name): (source)
from `twisted.mail.interfaces.IAccountIMAP`
Subscribe to a mailbox

Parameters
name:`bytes` | The name of the mailbox to subscribe to
Returns
`Deferred` or `bool` | A 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.
Raises
`MailboxException` | Raised if this mailbox cannot be subscribed to. This may also be raised asynchronously, if a `Deferred` is returned.

def unsubscribe(self, name): (source)
from `twisted.mail.interfaces.IAccountIMAP`
Unsubscribe from a mailbox

Parameters
name:`bytes` | The name of the mailbox to unsubscribe from
Returns
`Deferred` or `bool` | A 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.
Raises
`MailboxException` | Raised if this mailbox cannot be unsubscribed from. This may also be raised asynchronously, if a `Deferred` is returned.

top_id: `int` = (source)

Undocumented

mailboxes: `dict` = (source)

Undocumented

name = (source)

Undocumented

subscriptions: `list` = (source)

Undocumented

def _emptyMailbox(self, name, id): (source)

Undocumented

def _inferiorNames(self, name): (source)

Undocumented