/usr/share/idl/thunderbird-11.0.1/nsIMsgAccountManager.idl is in thunderbird-dev 11.0.1+build1-0ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 | /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Seth Spitzer <sspitzer@netscape.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsISupports.idl"
#include "nsIMsgAccount.idl"
#include "nsIMsgIdentity.idl"
#include "nsIMsgIncomingServer.idl"
#include "nsIIncomingServerListener.idl"
#include "nsIMsgFolder.idl"
interface nsISupportsArray;
interface nsIMsgFolderCache;
interface nsIFolderListener;
[scriptable, uuid(5cd9a7cc-3bd1-4553-95d8-b1b48f19ed1e)]
interface nsIMsgAccountManager : nsISupports {
nsIMsgAccount createAccount();
/*
* Return the account with the provided key, or null if none found.
*/
nsIMsgAccount getAccount(in ACString key);
void removeAccount(in nsIMsgAccount account);
/*
* creates a new identity and assigns it a new, unique "key"
*/
nsIMsgIdentity createIdentity();
/*
* creates a new server and assigns it a new, unique "key"
* the given type will be used to construct a ContractID
*
* @param type "imap", "pop3", "nntp", "movemail", "none", "rss", "generic"
* (suffix of contract ID @mozilla.org/messenger/server;1?type= )
*/
nsIMsgIncomingServer createIncomingServer(in ACString username,
in ACString hostname,
in ACString type);
/**
* Removes the server from the list of servers
*
* @param aServer server to remove
* @param aCleanupFiles remove directory from profile
*
* @throws NS_ERROR_FAILURE if server not found
*/
void removeIncomingServer(in nsIMsgIncomingServer aServer,
in boolean aCleanupFiles);
/*
* get the identity with the given key
* if the identity does not exist, it will be created
*/
nsIMsgIdentity getIdentity(in ACString key);
/*
* Gets the existing incoming server with the given key
* if the server's type does not exist in the preference,
* an error is returned/thrown
*/
nsIMsgIncomingServer getIncomingServer(in ACString key);
/* account list stuff */
/* defaultAccount should always be set if there are any accounts
* 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, by the order they are in the prefs.
* Accounts with hidden servers are not returned.
* array of nsIMsgAccount
*/
readonly attribute nsISupportsArray accounts;
/* list of all identities in all accounts
* array of nsIMsgIdentity
*/
readonly attribute nsISupportsArray allIdentities;
/* list of all servers in all accounts, except for hidden servers
* array of nsIMsgIncomingServer
*/
readonly attribute nsISupportsArray allServers;
/* summary of summary files folder cache */
readonly attribute nsIMsgFolderCache folderCache;
/* are we shutting down */
readonly attribute boolean shutdownInProgress;
/**
* for preventing unauthenticated users from seeing header information
*/
attribute boolean userNeedsToAuthenticate;
/*
* 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", "none", or "nntp"
*/
nsIMsgIncomingServer
FindServer(in ACString userName, in ACString hostname, in ACString type);
/*
* search for the server with the given uri
* an analog to FindServer()
* The boolean flag selects whether we compare input against the
* 'realhostname' and 'realuserName' pref settings.
*/
nsIMsgIncomingServer
findServerByURI(in nsIURI aURI, in boolean aRealFlag);
/*
* Same as FindServer() except it compares the input values against
* 'realhostname' and 'realuserName' pref settings.
*/
nsIMsgIncomingServer
findRealServer(in ACString userName, in ACString hostname, in ACString type, in long port );
/**
* find the index of this server in the (ordered) list of accounts
*/
long FindServerIndex(in nsIMsgIncomingServer server);
/**
* Finds an account for the given incoming server.
*
* @param server An incoming server to find the account for.
* @return If found, the nsIMsgAccount representing the account found.
* Otherwise returns null.
*/
nsIMsgAccount FindAccountForServer(in nsIMsgIncomingServer server);
/* given a server, return all identities in accounts that have this server
* returns an array of nsIMsgIdentity
*/
nsISupportsArray GetIdentitiesForServer(in nsIMsgIncomingServer server);
/**
* given a server, return the first identity in accounts that have this server
*/
nsIMsgIdentity getFirstIdentityForServer(in nsIMsgIncomingServer server);
/* given an identity, return all servers in accounts that have
* this identity
* returns an array of nsIMsgIncomingServer
*/
nsISupportsArray GetServersForIdentity(in nsIMsgIdentity identity);
/* there is a special server "Local Folders" that is guaranteed to exist.
* this will allow you to get */
attribute nsIMsgIncomingServer localFoldersServer;
// Create the account for that special server.
void createLocalMailAccount();
/* 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();
void setSpecialFolders();
void loadVirtualFolders();
/* unload accounts frees all the account manager data structures */
void UnloadAccounts();
void WriteToFolderCache(in nsIMsgFolderCache folderCache);
void saveVirtualFolders();
void closeCachedConnections();
void shutdownServers();
void CleanupOnExit();
void SetFolderDoingEmptyTrash(in nsIMsgFolder folder);
boolean GetEmptyTrashInProgress();
void SetFolderDoingCleanupInbox(in nsIMsgFolder folder);
boolean GetCleanupInboxInProgress();
void addRootFolderListener(in nsIFolderListener listener);
void removeRootFolderListener(in nsIFolderListener listener);
// these are going away in favor of add/removeRootFolderListener
void addIncomingServerListener(in nsIIncomingServerListener serverListener);
void removeIncomingServerListener(in nsIIncomingServerListener serverListener);
// these are going away in favor of nsIMsgFolder::NotifyEvent(in nsIAtom event);
void notifyServerLoaded(in nsIMsgIncomingServer server);
void notifyServerUnloaded(in nsIMsgIncomingServer server);
void notifyServerChanged(in nsIMsgIncomingServer server);
// force account info out to prefs file
void saveAccountInfo();
ACString getChromePackageName(in ACString aExtensionName);
/// Enumerate all incoming servers and their folders and return in an array.
readonly attribute nsIArray allFolders;
/**
* Iterates over all folders looking for one with the passed in path,
* and returns the uri for the matching folder. In the future,
* the folder lookup service will provide this functionality.
*
* @param aLocalPath path of the folder whose uri we want.
* @return the URI of the folder that corresponds to aLocalPath
*/
ACString folderUriForPath(in nsILocalFile aLocalPath);
};
%{C++
#define MAILNEWS_ACCOUNTMANAGER_EXTENSIONS "mailnews-accountmanager-extensions"
%}
[scriptable, uuid(70032DE0-CD59-41ba-839D-FC1B65367EE7)]
interface nsIMsgAccountManagerExtension : nsISupports
{
readonly attribute ACString name; // examples: mdn
boolean showPanel(in nsIMsgIncomingServer server);
readonly attribute ACString chromePackageName; // example: messenger, chrome://messenger/content/am-mdn.xul and chrome://messenger/locale/am-mdn.properties
};
|