mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 21:00:50 +00:00
document, document, document these interfaces, just a bit
This commit is contained in:
parent
cb2e1c8534
commit
4a8f501b27
@ -21,9 +21,13 @@
|
||||
#include "nsIMsgIdentity.idl"
|
||||
#include "nsISupportsArray.idl"
|
||||
|
||||
/* an account consists of an incoming server and one or more
|
||||
outgoing identities
|
||||
*/
|
||||
/*
|
||||
* an account consists of an incoming server and one or more
|
||||
* outgoing identities
|
||||
* an account is identitfied by a key, which is the <account> string in
|
||||
* the account preferences, such as in
|
||||
* mail.account.<account>.identities
|
||||
*/
|
||||
|
||||
[scriptable, uuid(da368bd0-e624-11d2-b7fc-00805f05ffa5)]
|
||||
interface nsIMsgAccount : nsISupports {
|
||||
@ -37,9 +41,13 @@ interface nsIMsgAccount : nsISupports {
|
||||
/* outgoing identity list */
|
||||
readonly attribute nsISupportsArray identities;
|
||||
|
||||
/* the default identity for this account. */
|
||||
attribute nsIMsgIdentity defaultIdentity;
|
||||
|
||||
|
||||
/* add a new identity to this account (probably does not work) */
|
||||
void addIdentity(in nsIMsgIdentity identity);
|
||||
|
||||
/* remove an identity from this account (probably does not work) */
|
||||
void removeIdentity(in nsIMsgIdentity identity);
|
||||
|
||||
};
|
||||
|
@ -42,25 +42,46 @@ interface nsIMsgAccountManager : nsISupports {
|
||||
* in the account manager. You can only set the defaultAccount to an
|
||||
* account already in the account manager */
|
||||
attribute nsIMsgAccount defaultAccount;
|
||||
|
||||
/* ordered list of all accounts */
|
||||
readonly attribute nsISupportsArray accounts;
|
||||
|
||||
/* Each account will have a unique key, which should not change
|
||||
* for the life of the account. */
|
||||
string getAccountKey(in nsIMsgAccount account);
|
||||
|
||||
/* utility routines to enumerate elements in all accounts */
|
||||
/* list of all identities in all accounts */
|
||||
readonly attribute nsISupportsArray allIdentities;
|
||||
|
||||
/* list of all servers in all accounts */
|
||||
readonly attribute nsISupportsArray allServers;
|
||||
|
||||
/* lots of utility routines for finding specific identities and servers */
|
||||
/* given the preferences key for an identity, find the identity in the
|
||||
* account manager */
|
||||
nsIMsgIdentity GetIdentityByKey(in string key);
|
||||
|
||||
|
||||
/*
|
||||
* search for the server with the given username, hostname, and type
|
||||
* the type is the same as is specified in the preferences,
|
||||
* i.e. "imap", "pop3", or "nntp"
|
||||
*/
|
||||
nsIMsgIncomingServer
|
||||
FindServer(in string userName, in string hostname, in string type);
|
||||
|
||||
/* given a server, return all identities in accounts that have this server */
|
||||
nsISupportsArray GetIdentitiesForServer(in nsIMsgIncomingServer server);
|
||||
|
||||
/* given an identity, return all servers in accounts that have
|
||||
* this identity */
|
||||
nsISupportsArray GetServersForIdentity(in nsIMsgIdentity identity);
|
||||
|
||||
|
||||
/* load accounts kicks off the creation of all accounts. You do not need
|
||||
* to call this and all accounts should be loaded lazily if you use any
|
||||
* of the above.
|
||||
*/
|
||||
void LoadAccounts();
|
||||
|
||||
/* unload accounts frees all the account manager data structures */
|
||||
void UnloadAccounts();
|
||||
};
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
@ -20,21 +20,56 @@
|
||||
#include "nsIMsgSignature.idl"
|
||||
#include "nsIMsgVCard.idl"
|
||||
|
||||
/*
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
[scriptable, uuid(D3B4A420-D5AC-11d2-806A-006008128C4E)]
|
||||
interface nsIMsgIdentity : nsISupports {
|
||||
/* internal ID */
|
||||
/* internal preferences ID */
|
||||
attribute string key;
|
||||
|
||||
|
||||
/*
|
||||
*overriding display name for this identity. if this pref is not set
|
||||
* then this will return some composed string from the fullname and email
|
||||
*/
|
||||
attribute string identityName;
|
||||
|
||||
/* user's full name, i.e. John Doe */
|
||||
attribute string fullName;
|
||||
|
||||
/* user's e-mail address, i.e. john@doe.com */
|
||||
attribute string email;
|
||||
|
||||
/* optional replyTo address, i.e. johnNOSPAM@doe.com */
|
||||
attribute string replyTo;
|
||||
|
||||
/* optional organization */
|
||||
attribute string organization;
|
||||
|
||||
/* should we compose with HTML by default? */
|
||||
attribute boolean composeHtml;
|
||||
|
||||
/* should we attach a signature by default? */
|
||||
attribute boolean attachSignature;
|
||||
|
||||
/* should we attach a vcard by default? */
|
||||
attribute boolean attachVCard;
|
||||
|
||||
/* the current signature */
|
||||
attribute nsIMsgSignature signature;
|
||||
|
||||
/* the current vcard */
|
||||
attribute nsIMsgVCard vCard;
|
||||
|
||||
/* the current SMTP server and hostname */
|
||||
/* eventually these will be removed from the identity */
|
||||
attribute string smtpHostname;
|
||||
attribute string smtpUsername;
|
||||
};
|
||||
|
@ -20,30 +20,55 @@
|
||||
|
||||
interface nsIFolder;
|
||||
|
||||
/* Interface for incoming mail/news host */
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
[scriptable, uuid(60dcb100-e3f2-11d2-b7fc-00805f05ffa5)]
|
||||
interface nsIMsgIncomingServer : nsISupports {
|
||||
|
||||
/* internal pref key */
|
||||
attribute string key;
|
||||
|
||||
|
||||
/* pretty name - should be "userid on hostname" if this pref is not set */
|
||||
attribute string prettyName;
|
||||
|
||||
|
||||
/* hostname of the server */
|
||||
attribute string hostName;
|
||||
|
||||
/* userid to log into the server */
|
||||
attribute string username;
|
||||
|
||||
/* server type, i.e. "pop3", "imap", "nntp", etc */
|
||||
readonly attribute string type;
|
||||
|
||||
|
||||
/* should we remember the password? */
|
||||
attribute boolean rememberPassword;
|
||||
|
||||
/* the password to login with (in cleartext for now) */
|
||||
attribute string password;
|
||||
|
||||
/* should we download whole messages when biff goes off? */
|
||||
attribute boolean downloadOnBiff;
|
||||
|
||||
/* should we biff the server? */
|
||||
attribute boolean doBiff;
|
||||
|
||||
/* how often to biff */
|
||||
attribute long biffMinutes;
|
||||
|
||||
/* the on-disk path to message storage for this server */
|
||||
attribute string localPath;
|
||||
|
||||
/* the RDF URI for the root mail folder */
|
||||
readonly attribute string serverURI;
|
||||
|
||||
/* the root folder for this server */
|
||||
attribute nsIFolder RootFolder;
|
||||
|
||||
/* do a biff */
|
||||
void PerformBiff();
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user