||nsMsgKey is a unique ID for a particular message in a folder. If you want
a handle to a message that will remain valid even after resorting the folder
or otherwise changing their indices, you want one of these rather than a
nsMsgViewIndex. nsMsgKeys don't survive local mail folder compression,
||Defines whether to use SSL or STARTTLS or not.
Used by @see nsIMsgIncomingServer.socketType
and @see nsISmtpServer.socketType
||Callback interface for objects interested in receiving new mail notifications
NOTE: THIS INTERFACE IS UNDER ACTIVE DEVELOPMENT AND SUBJECT TO CHANGE,
||New mail notification service. This service watches all the relevant
folder and message change events, preferences etc. and keeps track of
the specific messages the user wants notifications for.
NOTE: THIS INTERFACE IS UNDER ACTIVE DEVELOPMENT AND SUBJECT TO CHANGE,
Registered mozINewMailListeners are called when the message count or
specific list of notified messages changes.
** Should also document the observer service callback that allows
plugins to override notifications by folder
||Include files we are going to want available to all files....these files
include NSPR, memory, and string header files among others
||A listener callback for OAuth2 SASL authentication. This would be represented
as a promise, but this needs to be consumed by C++ code.
||Use this for any object that wants to handle copying/moving messages to it
||nsIFolderListener defines callbacks to handle various notifications
about changes in folders.
These listeners can be attached to individual folders, or they
can be registered globally, with nsIMsgMailSession.
These notifications originate from nsIMsgFolder implementations.
(nsIMsgFolder has corresponding methods for generating these
||This service provides a way to lookup any nsIMsgFolder.
When looking up folders by URL, note that the URL must be encoded to be a
valid folder URL. Of particular note are the following requirements:
- invalid characters in paths must be percent-encoded
- the URL MUST NOT have a trailing slash (excepting root folders)
- the case must match the expected value exactly
An example of a valid URL is thus:
The contractid for this service is "@mozilla.org/mail/folder-lookup;1".
||Notification sent when a server is first loaded into the account manager.
@param server Loaded server.
||nsIAuthModule provides GSSAPI, NTLM authentications, but it is not
scriptable. nsIMailAuthModule wraps nsIAuthModule and makes it easy to use in
The contract id is: "@mozilla.org/mail/auth-module;1".
||This interface provides support for registering Mozilla as the default
Mail Client. This interface can also be used to get/set the user preference
for the default Mail Client.
||Prevent any pending message load from occurring.
||migrate old mailnews prefs to the 5.x world
||Common interfaces to integrate with different platforms, how they are
implemented depends on the specific platform.
||@param aWindowType the type of window you want to create. i.e. "mail:3pane"
@param aFolderURI the folder resource you want pre-selected (if any)
@param aMsgKey a particular message you may want selected in that folder (if any)
||Do not show notifications in some states, e.g. when running a fullscreen app.
||An account consists of an incoming server and one or more
outgoing identities. An account is identified by a key,
which is the <account> string in the account preferences,
such as in mail.account.<account>.identities.
||Return the account with the provided key, or null if none found.
||The nsIMsgAsyncPrompter is intended to provide a way to make asynchronous
message prompts into synchronous ones - so that the user is only prompted
with one at a time.
||This interface provide functions which help extension developers
add their customized schema to the exposed protocls of nsMsgContentPolicy.
By default, a list of existing protocols (such as imap and nntp)
are allowed to process urls locally, while non-matching urls are required
to be processed as external.
This interface allows additional protocols to be added to
the list of protocols that are processed locally.
Typically this would be used in cases where a new messaging protocol
is being added by an extension.
||nsIMsgCopyService is a central point for kicking off message and folder
Each operation is queued up and executed in sequence. The actual work is
handled by folder code in an asynchronous fashion. The folder indicates
completion by calling notifyCompletion().
If the operation was initiated with a non-null nsIMsgCopyServiceListener,
its OnStartCopy() and OnStopCopy() methods will be called when the
operation begins/ends. Any errors are communicated via the result code
parameter passed to OnStopCopy().
||Notify the observer that the message has started to be copied. This
method is called only once, at the beginning of a message
When implementing a js custom column handler (of type nsITreeView) you must implement the following
You can, at your option, implement
With Bug 1192696, Grouped By Sort was implemented for custom columns.
Implementers should consider that the value returned by GetSortStringForRow
will be displayed in the grouped header row, as well as be used as the
If implementing a c++ custom column handler, you must define all
nsITreeView and nsIMsgCustomColumnHandler methods.
||flags for GetViewFlags
For details on the JS side, see:
||The contract ID for this component is @mozilla.org/msgFolder/msgFolderService;1.
||nsIMsgFolderCache is a store of values which might be slow for the folder
to calculate. For example: the number of unread messages.
The account manager holds the cache, and each folder manipulates its cached
properties via nsIMsgFolderCacheElement.
||Interface for a folder to get/set its values in the foldercache.
||Use this for any object that wants to handle compacting folders.
Currently, the folders themselves create this object.
||nsIMsgFolderListener defines the callbacks which are invoked by
This is similar to nsIFolderListener, but with slightly different semantics,
especially w.r.t. moving messages and folders. Some listeners want to know
about moves, instead of getting an itemAdded and itemRemoved notification.
Folder listeners also only tend to get called if a view is open on the folder,
which is not always the case. I don't want to change nsIFolderListener at this
point since there are lots of extensions that rely on it. Eventually,
these two interfaces should be combined somehow.
||nsIMsgFolderNotificationService provides a central point for sending out
notifications related to folders.
nsIMsgFolderListeners are registered with the service along with flags to
indicate which kinds of notifications are of interest.
||general property routines - I think this can retrieve any
header in the db
||This interface contains all the personal outgoing mail information
for a given person.
Each identity is identified by a key, which is the <id> string in
the identity preferences, such as in mail.identity.<id>.replyTo.
||Interface for incoming mail/news host
this is the base interface for all mail server types (imap, pop, nntp, etc)
often you will want to add extra interfaces that give you server-specific
attributes and methods.
||This interface wraps an nsTArray<nsMsgKey> so that we can pass arrays
back and forth between c++ and js (or via xpconnect generally).
||Transport-level security information (if any), in the case of a security
error having occurred.
This value should be considered undefined if an NSS error has not
occurred. Read it as: "the secInfo that was being used when a failure
occurred", not: "the secInfo that failed".
Seems a bit ugly adding more state here, but the idea is that a
nsIUrlListener.OnStopRunningUrl() needs to be able to access a bad
certificate, so as to have the option of adding an exemption (See
||The mail session is a replacement for the old 4.x MSG_Master object. It
contains mail session generic information such as the account manager, etc
I'm starting this off as an empty interface and as people feel they need to
add more information to it, they can. I think this is a better approach
than trying to port over the old MSG_Master in its entirety as that had a
lot of cruft in it....
||Prepare the sending of a mdn reply, and checks the prefs whether a
reply should be send. Might send the message automatically if the
prefs say it should.
@param eType One of EDisposeType above, indicating the action that led
to sending the mdn reply
@param aWindow The window the message was displayed in, acting as parent
for any (error) dialogs
@param folder The folder the message is in
@param key the message key
@param headers the message headers
@param autoAction true if the request action led to sending the mdn
reply was an automatic action, false if it was user initiated
@returns true if the user needs to be asked for permission
false in other cases (whether the message was sent or denied)
||nsIMsgMessageService provides higher-level, UI-oriented calls for
dealing with messages in a protocol-agnostic way.
Things the user would recognise as actions they initiated.
This covers things like displaying messages, copying them, saving them
to disk, saving attachments...
||Pluggable message store interface. Each incoming server can have a different
All methods are synchronous unless otherwise specified.
||Open the progress dialog, you can specify parameters through an xpcom object
||the default path to store local data for this type of
server. Each server is usually in a subdirectory below this
||Inform the caller whether or not the task needs to be run. This method
gives the task the flexibility to cancel running a task on shutdown
if nothing needs to be run.
||aStatusFeedback: a wrapped JS status feedback object
||Keys are the internal representation of tags, and use a limited range of
characters, basically the characters allowed in imap keywords, which are
alphanumeric characters, but don't include spaces. Keys are stored on
the imap server, in local mail messages, and in summary files.
Tags are the user visible representation of keys, and are full unicode
strings. Tags should allow any unicode character.
This service will do the mapping between keys and tags. When a tag
is added, we'll need to "compute" the corresponding key to use. This
will probably entail replacing illegal ascii characters (' ', '/', etc)
with '_' and then converting to imap mod utf7. We'll then need to make
sure that no other keyword has the same value since that algorithm
doesn't guarantee a unique mapping.
Tags are sorted internally by 'importance' by their ordinal strings (which by
default are equal to a tag's key and thus only stored if different).
The alphanumerically 'smallest' string is called the 'most important' one and
comes first in any sorted array. The remainder follows in ascending order.
||Implement this interface to subscribe to errors and warnings passed out via
||@note Setting this attribute has various side effects, including
wiring up this object as the parent nsIURIContentListener for the
passed-in docshell as well as setting the message content policy service
to listen for OnLocationChange notifications.
||This interface can be used to set data specific to a window.
||0 for nothing, 100 for highest
||Simple stopwatch mechanism for determining the amount of wall-clock time and
CPU time (user + system) that has elapsed. It is not fancy. It is either
running or it is not. If you want coherent cpu and real time values, then
you had better stop it first. It does not keep counting when stopped,
although one could add a resumeRetroactive or something to accomplish that.
||A listener to receive notification of the subscribable folders of a server.
||Called to signify the beginning of an URL processing.
@param url URL being processed.
||These are things the system may know about the current user.
||@name Folder Type Flags
These flags define the type of folder. Exactly one will be set.
||Flags in the subscribe pane (used inside of MSG_GroupNameLine). Where
the flags overlap with the nsMsgFolderFlags flags, it has the same value,
to reduce the chance of someone using the wrong constant.
||This set enumerates the header fields which may be displayed in the
message composition window.
||The Netscape-specific header fields that we use for storing our
various bits of state in mail folders.
||This message has already gone, but the folder hasn't been compacted yet.
Since actually removing a message from a folder is a semi-expensive
operation, we tend to delay it; messages with this bit set will be removed
the next time folder compaction is done. Once this bit is set, it never