Search completed in 1.24 seconds.
nsIMsgFolder
The
nsIMsgFolder interface is used to interact with folders in Thunderbird. This page is out of date. Check //github.com/RealityRipple/UXP/blob/master/mailnews/base/public/
nsIMsgFolder.idl for the newer methods (esp. isSpecialFolder and such). ...
...ding(); void endFolderLoading(); void updateFolder(in nsIMsgWindow aWindow); nsIMsgFilterList getFilterList(in nsIMsgWindow msgWindow); void setFilterList(in nsIMsgFilterList filterList); void ForceDBClosed(); void Delete(); void deleteSubFolders(in nsISupportsArray folders, in nsIMsgWindow msgWindow); void propagateDelete(in
nsIMsgFolder folder, in boolean deleteStorage,in nsIMsgWindow msgWindow); void recursiveDelete(in boolean deleteStorage, in nsIMsgWindow msgWindow); void createSubfolder(in AString folderName, in nsIMsgWindow msgWindow);
nsIMsgFolder addSubfolder(in AString folderName); void createStorageIfMissing(in nsIUrlListener urlListener); void compact(in nsIUrlListener aList...
...erArray, in boolean aCompactOfflineAlso,in nsISupportsArray aOfflineFolderArray); void compactAllOfflineStores(in nsIMsgWindow aMsgWindow,in nsISupportsArray aOfflineFolderArray); void emptyTrash(in nsIMsgWindow aMsgWindow, in nsIUrlListener aListener); void rename(in AString name, in nsIMsgWindow msgWindow); void renameSubFolders( in nsIMsgWindow msgWindow, in
nsIMsgFolder oldFolder); AString generateUniqueSubfolderName(in AString prefix,in
nsIMsgFolder otherFolder); void updateSummaryTotals(in boolean force); void summaryChanged(); long getNumUnread(in boolean deep); long getTotalMessages(in boolean deep); void clearNewMessages(); void clearRequiresCleanup(); void setFlag(in unsigned long flag...
...And 21 more matches
nsIMsgDBView
s.interfaces.nsIMsgDBView); where type designates different types of view's available. Available in the mozilla codebase are types "quicksearch", "threadswithunread", "watchedthreadswithunread", "xfvf" (virtual folders), "search", "group", and "threaded" each with their own implementation of nsIMsgDBView that provides a different sorting/view of the data. ...
...long aCount); void close(); void init(in nsIMessenger aMessengerInstance, in nsIMsgWindow aMsgWindow, in nsIMsgDBViewCommandUpdater aCommandUpdater); void sort(in nsMsgViewSortTypeValue sortType, in nsMsgViewSortOrderValue sortOrder); void doCommand(in nsMsgViewCommandTypeValue command); void doCommandWithFolder(in nsMsgViewCommandTypeValue command, in
nsIMsgFolder destFolder); void getCommandStatus(in nsMsgViewCommandTypeValue command, out boolean selectable_p, out nsMsgViewCommandCheckStateValue selected_p); void viewNavigate(in nsMsgNavigationTypeValue motion, out nsMsgKey resultId, out nsMsgViewIndex resultIndex, out nsMsgViewIndex threadIndex, in boolean wrap); boolean navigateStatus(in nsMsgNavigationTypeValue motion); ...
...sgViewCommandCheckStateValue selected_p); void viewNavigate(in nsMsgNavigationTypeValue motion, out nsMsgKey resultId, out nsMsgViewIndex resultIndex, out nsMsgViewIndex threadIndex, in boolean wrap); boolean navigateStatus(in nsMsgNavigationTypeValue motion); nsMsgKey getKeyAt(in nsMsgViewIndex index); nsIMsgDBHdr getMsgHdrAt(in nsMsgViewIndex index);
nsIMsgFolder getFolderForViewIndex(in nsMsgViewIndex index); ACString getURIForViewIndex(in nsMsgViewIndex index); nsIMsgDBView cloneDBView(in nsIMessenger aMessengerInstance, in nsIMsgWindow aMsgWindow, in nsIMsgDBViewCommandUpdater aCommandUpdater); void getURIsForSelection([array, size_is(count)] out string uris, out unsigned long count); void getIndicesForSelection([arr...
...And 6 more matches
nsIMsgMessageService
playing, attachment's manipulation, printing, streaming the message content to eml format string, etc. ...
...neEnding, in nsIMsgWindow aMsgWindow); void GetUrlForUri(in string aMessageURI, out nsIURI aURL, in nsIMsgWindow aMsgWindow); void DisplayMessageForPrinting(in string aMessageURI, in nsISupports aDisplayConsumer, in nsIMsgWindow aMsgWindow, in nsIUrlListener aUrlListener, out nsIURI aURL); void Search(in nsIMsgSearchSession aSearchSession, in nsIMsgWindow aMsgWindow, in
nsIMsgFolder aMsgFolder, in string aSearchUri); nsIURI streamMessage(in string aMessageURI, in nsISupports aConsumer, in nsIMsgWindow aMsgWindow, in nsIUrlListener aUrlListener, in boolean aConvertData, in string aAdditionalHeader); nsIURI streamHeaders(in string aMessageURI, in nsIStreamListener aConsumer, in nsIUrlListener aUrlListener [optional] in boolean aLocalOnly); boolean is...
...aCopyListener already knows about the destination folder. void CopyMessage(in string aSrcURI, in nsIStreamListener aCopyListener, in boolean aMoveMessage, ...
...And 3 more matches
nsIMsgIncomingServer
ttyNameForMigration(); boolean getBoolAttribute(in string name); boolean getBoolValue(in string attr); ACString getCharAttribute(in string name); ACString getCharValue(in string attr); nsILocalFile getFileValue(in string relpref, in string abspref); nsIMsgFilterList getFilterList(in nsIMsgWindow aMsgWindow); long getIntAttribute(in string name); long getIntValue(in string attr);
nsIMsgFolder getMsgFolderFromURI(in
nsIMsgFolder aFolderResource, in ACString aURI); void getNewMessages(in
nsIMsgFolder aFolder, in nsIMsgWindow aMsgWindow, in nsIUrlListener aUrlListener); ACString getPasswordWithUI(in AString aPromptString, in AString aPromptTitle, in nsIMsgWindow aMsgWindow, out boolean okayValue); AString getUnicharAttribute(in string name); AString getUnicharValue(in string att...
... biffMinutes long biffState unsigned long canBeDefaultServer boolean Read only. canCompactFoldersOnServer boolean Read only. canCreateFoldersOnServer boolean canDelete boolean can this server be removed from the account manager? for instance, local mail is not removable, but ...
... pretty name - should be "userid on hostname" if the pref is not set. realHostName ACString real hostname of the server (if server name is changed it is stored here) realUsername ACString real username of the server (if username is changed it is stored here) redirectorType string Obsolete since Gecko 1.9 rememberPassword boolean retentionSettings nsIMsgRetentionSettings rootFolder
nsIMsgFolder rootMsgFolder
nsIMsgFolder Read only. searchScope nsMsgSearchScopeValue Read only. serverBusy boolean serverRequiresPasswordForBiff boolean Read only. serverURI ACString Read only. socketType long spamFilterPlugin nsIMsgFilterPlugin Read only. spamSettings nsISpamSettings spam settings. Read only. supportsDiskSpace boolean Read only. type ACString protocol type, that is "...
...And 2 more matches
nsIMsgSearchSession
erm term); void registerListener(in nsIMsgSearchNotify listener); void unregisterListener(in nsIMsgSearchNotify listener); void getNthSearchTerm(in long whichTerm, in nsMsgSearchAttribValue attrib, in nsMsgSearchOpValue op, in nsIMsgSearchValue value); long countSearchScopes(); void getNthSearchScope(in long which,out nsMsgSearchScopeValue scopeId, out
nsIMsgFolder folder); void addScopeTerm(in nsMsgSearchScopeValue scope, in
nsIMsgFolder folder); void addDirectoryScopeTerm(in nsMsgSearchScopeValue scope); void clearScopes(); [noscript] boolean ScopeUsesCustomHeaders(in nsMsgSearchScopeValue scope, in voidPtr selection, in boolean forFilters); boolean IsStringAttribute(in nsMsgSearchAttribValue attrib); ...
...dow); void interruptSearch(); void pauseSearch(); void resumeSearch(); [noscript] nsMsgSearchType SetSearchParam(in nsMsgSearchType type, in voidPtr param); [noscript] void AddResultElement(in nsMsgResultElement element); boolean MatchHdr(in nsIMsgDBHdr aMsgHdr, in nsIMsgDatabase aDatabase); void addSearchHit(in nsIMsgDBHdr header, in
nsIMsgFolder folder); Attributes Attribute Type Description searchTerms nsISupportsArray Readonly: numSearchTerms unsigned long Readonly: runningAdapter nsIMsgSearchAdapter Readonly: searchParam voidPtr Not scriptable and readonly: searchType nsMsgSearchType Readonly: numResults long Readonly:...
...sgSearchAttribValue attrib, in nsMsgSearchOpValue op, in nsIMsgSearchValue value); Parameters whichTerm attrib op value Note: This parameter should be an out. ...
...And 2 more matches
Index
nsresult Errors, Mozilla, Reference, Reference(2), XPCOM, XPCOM API Reference The nsresult data type is a strongly-typed enum used to represent a value returned by an XPCOM function; these are typically error or status codes. For a list of defined result values, see Error codes returned by Mozilla APIs. 140 Folders thunderbird The folder classes all implement the
nsIMsgFolder interface. There are currently three folder classes - nsLocalMailFolder, nsImapMailFolder, and nsNewsFolder. They all inherit from nsMsgDBFolder, which implements a lot of the core functionality. RSS feeds are implemented by nsLocalMailFolder. 141 NS ENSURE SUCCESS XPCOM, XPCOM_Macros Macro 142 NS ENSURE TRUE XPCOM, XPCOM_Macros Macro 143 NS_AB...
...This page is out of date. Check http://mxr.mozilla.org/comm-central/...Folder.idl#706 for the newer methods (esp. isSpecialFolder and such). 771 nsIMsgHeaderParser ...
...This page is out of date. ...
... 783 nsIMsgSendLater Interfaces, Interfaces:Scriptable, XPCOM, XPCOM Interface Reference, thunderbird The nsIMsgSendLater interface provides functions for managing the unsent folder of a messaging account. 784 nsIMsgThread Interfaces, Interfaces:Scriptable, Message Database, Messages, NeedsContent, XPCOM API Reference, XPCOM Interface Reference, thunderbird The
nsIMsgFolder interface is used to interact with threads in Thunderbird. 785 nsIMsgWindow Interfaces, Message Windows, NeedsContent, NeedsHelp, XPCOM API Reference, thunderbird Implemented by: @mozilla.org/messenger/msgwindow;1. To create an instance, use: 786 nsIMsgWindowCommands Interfaces, Message Windows, XPCOM API Reference, XPCOM Interface Reference, thunderbird ...
nsIMsgDatabase
sgDatabase interface is an abstract interface used to access the mail database backend. mailnews/db/msgdb/public/nsIMsgDatabase.idlScriptable Please add a summary to this article. ...
... is invalid. Exceptions Thrown NS_ERROR_FILE_TARGET_DOES_NOT_EXIST aFolderName doesn't exist and aCreate was false. NS_MSG_ERROR_FOLDER_SUMMARY_OUT_OF_DATE The database is present (and was opened), but the summary file is out of date. NS_MSG_ERROR_FOLDER_SUMMARY_MISSING The database is present (and was opened), but the summary file is missing. forceFolderDBClosed() void forceFolderDBClosed(in
nsIMsgFolder aFolder); Parameters aFolder Close() void Close(in boolean aForceCommit); Parameters aForceCommit Commit() void Commit(in nsMsgDBCommit commitType); Parameters commitType ForceClosed() Force closed is evil, and we should see if we can do without it. In 4.x, it was mainly used to remove corrupted databases. void ForceClosed(); clearCachedHdrs() void clearCachedHdrs(); resetHdrCacheS...
... void setStringProperty(in nsMsgKey aKey, in string aProperty, in string aValue); MarkImapDeleted() void MarkImapDeleted(in nsMsgKey key, in boolean deleted, in nsIDBChangeListener instigator); applyRetentionSettings() Purge unwanted message headers and/or bodies. If deleteViaFolder is true, we'll call
nsIMsgFolder.DeleteMessages() to delete the messages. Otherwise, we'll just delete them from the db. void applyRetentionSettings(in nsIMsgRetentionSettings aMsgRetentionSettings, in boolean aDeleteViaFolder); HasNew() boolean HasNew(); ClearNewList() void ClearNewList(in boolean notify); AddToNewList() void AddToNewList(in nsMsgKey key); StartBatch() Batching - can be used...
AsyncTestUtils extended framework
rieve the URI of the message header at the given index. msgHdrList [getter] Return a JS list with all the nsIMsgDbHdrs for the messages that have been injected into folders. xpcomHdrArray [getter] Return an nsIMutableArray of the message headers that have been injected into folders. foldersWithMsgHdrs [getter] Return a list where each element is a list with two sub-elements. The first is an
nsIMsgFolder and the second is a JS list of all the nsIMsgDBHdrs for the messages that were inserted into the folder. This is used by routines that need to process the messages grouped by the folder they belong to, such as initiating message moves. foldersWithXpcomHdrArrays [getter] Same as foldersWithMsgHdrs but the second element in each sub-list is an nsIMutableArray instead of a JS list. Manipulating ...
... show to the user. removeTag(aTagKey) Removes the given tag from all the messages in the set. See the addTag notes. setJunk(aBeJunk) Sets the junk score for the messages in the set as junk (true) / not junk (false). This does not involves the bayesian classifier and does not do anything like moving the message to the junk folder. It does, however, send a JunkStatusChanged notification via the
nsIMsgFolderNotificationService's itemEvent mechanism. Set manipulation union(aOtherSet) Take the union of this set and the provided other set and return the (new, not modified) result. You should stop using both the message set that you called this on and the other set that you passed in unless you are very careful. Namely, if you use async_move_messages / async_trash_messages on the resulting set, the...
nsIMsgDBHdr
rrentMessage() will return the currently selected message's header. Headers are backed by the database: a call to these functions directly modifies the state of the database, although it is not saved until the database is committed. In clear, if you want to do a persistent change to a message header, such as marking it as read, or replied to, or whatever, you MUST do it through its corresponding
nsIMsgFolder (msgHdr.folder) or nsIMsgDatabase (msgHdr.folder.msgDatabase). It is also mandatory to set msgHdr.folder.msgDatabase = null after performing this kind of operations to prevent leaking. Don't even think about using OrFlags and/or AndFlags. Method overview AString getProperty(in string propertyName); void setProperty(in string propertyName, in AString propertyStr); void...
...haracter set of this message. This value is extracted from the Content-Type header. label nsMsgLabelValue Indicates one of the old 5 label values used by old versions. New code should use keywords instead. accountKey string Indicates the account that was originally used to fetch the message. May be blank if the message has not been moved or copied. folder
nsIMsgFolder Readonly: Indicates the folder in which this message is stored. propertyEnumerator nsIUTF8StringEnumerator Readonly: Enumerator for names of all database properties in the header. (new in 3.1?) Methods getProperty() AString getProperty(in string propertyName); Parameters propertyName The name of the property to retrieve. Return Value The value of the property.
nsIMsgFilterList
Defined in comm-central/ mailnews/ base/ search/ public/ nsIMsgFilterList.idl Attributes folder attribute
nsIMsgFolder nsIMsgFilterList::folder version readonly attribute short nsIMsgFilterList::version arbitraryHeaders readonly attribute ACString nsIMsgFilterList::arbitraryHeaders shouldDownloadAllHeaders readonly attribute boolean nsIMsgFilterList::shouldDownloadAllHeaders filterCount readonly attribute unsigned long nsIMsgFilterList::filterCount loggingEnabled attribute boolean nsIMsgFilterList::loggingEnabled defaultFile attribute nsILocalFile nsIMsgFilterList::defaultFile logStream attribute nsIOutputStream nsIMsgFilterList::logStream logURL readonly attribute ACString nsIMsgFilterList::logURL Methods getFilterAt() nsIMsgFilter nsIMsgFilterList::getFilterAt (in unsigned long fi...
... nsIMsgFilterList::saveToFile ( in nsIOutputStream stream ) parseCondition() void nsIMsgFilterList::parseCondition ( in nsIMsgFilter aFilter, in string condition ) saveToDefaultFile() void nsIMsgFilterList::saveToDefaultFile ( ) applyFiltersToHdr() void nsIMsgFilterList::applyFiltersToHdr ( in nsMsgFilterTypeType filterType, in nsIMsgDBHdr msgHdr, in
nsIMsgFolder folder, in nsIMsgDatabase db, in string headers, in unsigned long headerSize, in nsIMsgFilterHitNotify listener, in nsIMsgWindow msgWindow, in nsILocalFile aMessageFile ) writeInAttr() void nsIMsgFilterList::writeIntAttr ( in nsMsgFilterFileAttribValue attrib, in long ...
nsIMsgSearchValue
Defined in comm-central/ mailnews/ base/ search/ public/ nsIMsgSearchValue.idl #include "nsMsgSearchCore.idl" interface
nsIMsgFolder; [scriptable, uuid(783758a0-cdb5-11dc-95ff-0800200c9a66)] interface nsIMsgSearchValue : nsISupports { // type of object attribute nsMsgSearchAttribValue attrib; // accessing these will throw an exception if the above // attribute does not match the type! ...
... * (range 0-100, 100 is junk) */ attribute unsigned long junkPercent; AString toString(); }; ...
nsIMsgSendLater
void SendUnsentMessages(in nsIMsgIdentity identity) Parameters identity The nsIMsgIdentity to send unsent messages for RemoveListener() Remove an even...
... void RemoveListener(in nsIMsgSendLaterListener listener); Parameters listener The nsIMsgSendLaterListener to remove. AddListener() Add an event listener to this nsISendMsgLater instance. void AddListener(in nsIMsgSendlaterListener listener); Parameters listener The nsIMsgSendLaterListener to add. getUnsentMessagesFolder() Get the unsent messages folder for an identity.
nsIMsgFolder getUnsentMessagesFolder(in nsIMsgIdentity identity); Parameters identity The nsIMsgIdentity to get the folder for. Return Value The
nsIMsgFolder containing unsent messages. ...
nsIMsgSearchValue
Defined in comm-central/ mailnews/ base/ search/ public/ nsIMsgSearchValue.idl #include "nsMsgSearchCore.idl" interface
nsIMsgFolder; [scriptable, uuid(783758a0-cdb5-11dc-95ff-0800200c9a66)] interface nsIMsgSearchValue : nsISupports { // type of object attribute nsMsgSearchAttribValue attrib; // accessing these will throw an exception if the above // attribute does not match the type! ...
... * (range 0-100, 100 is junk) */ attribute unsigned long junkPercent; AString toString(); }; ...
Mail and RDF
home.netscape.com/NC-rdf#TotalMessages. This is basically what happens, behind the scenes: var target = RDF.GetResource("mailbox://alecf@pop.myisp.com/INBOX"); var property = RDF.GetResource("http://home.netscape.com/NC-rdf#TotalMessages"); var resultNode = dataSource.GetTarget(target, property, true); In the folder datasource's GetTarget(), target would be QueryInterfaced to a
nsIMsgFolder. To get the total messages, the datasource would then call
nsIMsgFolder.GetTotalMessages(). Finally, it would convert the result of this call to an RDF Literal, and pass it back through the return parameter of GetTarget(). An example of how this might work inside the datasource: var msgCountArc = RDF.GetResource("http://home.netscape.com/NC-rdf#TotalMessages"); function GetTarget(targe...
...es(). Finally, it would convert the result of this call to an RDF Literal, and pass it back through the return parameter of GetTarget(). An example of how this might work inside the datasource: var msgCountArc = RDF.GetResource("http://home.netscape.com/NC-rdf#TotalMessages"); function GetTarget(target, property, unused) { var folder = target.QueryInterface(Components.interfaces.
nsIMsgFolder); if (property == msgCountArc) { var msgCount = folder.GetTotalMessages(false); var result = RDF.GetLiteral(msgCount.toString()); return result; } } Asynchronously notifying RDF When a mail object's data changes and the data is reflected in RDF by notifying all of the observers that RDF has registered with the datasource. In the example o...
Activity Manager examples
manager const nsIAP = Components.interfaces.nsIActivityProcess; const nsIAE = Components.interfaces.nsIActivityEvent; const nsIAM = Components.interfaces.nsIActivityManager; let gActivityManager = Components.classes["@mozilla.org/activity-manager;1"].getService(nsIAM); let process = Components.classes["@mozilla.org/activity-process;1"].createInstance(nsIAP); // Assuming folder is an instance of
nsIMsgFolder interface // Localization is omitted, initiator is not provided process.init("Processing folder: " + folder.prettiestName, null); // Note that we don't define a custom icon, default process icon // will be used process.contextType = "account"; // group this activity by account process.contextObj = folder.server; // account in question gActivityManager.addActivity(process); //...
...myCopyEventUndo, nsIActivityUndoHandler) NS_IMETHODIMP myCopyEventUndo::Undo(nsIActivityEvent *event, nsresult *result) { nsresult rv; // get the subjects of this copy event PRUint32 length; nsIVariant **subjectList; rv = event->GetSubjects(&length, &subjectList); if(NS_FAILED(rv)) return rv; // first subject in the list is the source folder in this particular case nsCOMPtr<
nsIMsgFolder> folder = do_QueryInterface(subjectList[0]); // get the initiator nsIVariant *initiator; event->GetInitiator(&initiator); if (initiator) { nsISupports* ptr; rv = object->GetAsISupports(&ptr); if(NS_FAILED(rv)) return rv; nsCOMPtr<nsIMsgCopyService> copyService = do_QueryInterface(ptr); if (copyService) copyService->Undo(folder); } return (*result ...
Folders
There are currently three folder classes - nsLocalMailFolder, nsImapMailFolder, and nsNewsFolder. They all inherit from nsMsgDBFolder, which implements a lot of the core functionality. RSS feeds are implemented by nsLocalMailFolder. Each line in the folder pane corresponds to a folder object. ...
nsIDBChangeListener
{ if (!aIID.equals(Components.interfaces.nsIDBChangeListener) && !aIID.equals(Components.interfaces.nsISupports)) throw Components.results.NS_ERROR_NO_INTERFACE; return this; } }; and to attach it in Thunderbird, we must call AddListener on a nsIDBChangeAnnouncer, typically through a nsIMsgDatabase. ...
nsIMsgDBViewCommandUpdater
changed in Gecko 1.9 (Firefox 3) Inherits from: nsISupports In Thunderbird this is implemented for different windows in several different places: nsMsgDBViewCommandUpdater (for the standalone message window) nsMsgDBViewCommandUpdater (for the threadpane message window) nsMsgSearchCommandUpdater (for search dialogs) Method overview void updateCommandStatus(); void displayMessageChanged(in
nsIMsgFolder aFolder, in AString aSubject, in ACString aKeywords); void updateNextMessageAfterDelete(); Methods updateCommandStatus() Called when the number of selected items changes. void updateCommandStatus(); Parameters None. displayMessageChanged() Called when the displayed message has changed. void displayMessageChanged(in
nsIMsgFolder aFolder, in AString aSubject, in ACString aKeywords ...
nsIMsgFilter
alue attrib, in nsMsgSearchOpValue op, in nsIMsgSearchValue value, out boolean BooleanAND, out ACString arbitraryHeader ) appendTerm() void nsIMsgFilter::appendTerm (in nsIMsgSearchTerm term) createTerm() nsIMsgSearchTerm nsIMsgFilter::createTerm ( ) MatchHdr() void nsIMsgFilter::MatchHdr ( in nsIMsgDBHdr msgHdr, in
nsIMsgFolder folder, in nsIMsgDatabase db, in string headers, in unsigned long headerSize, out boolean result ) logRuleHit() void nsIMsgFilter::logRuleHit ( in nsIMsgRuleAction aFilterAction, in nsIMsgDBHdr aHeader ) createAction() nsIMsgRuleAction nsIMsgFilter::createAction ( ) getActionAt() nsIMsgRuleAction nsIMsgFilter::getActionAt (in long aInde...
nsIMsgFilterCustomAction
entered. * @param actionFolder Folder in the filter list * @param filterType Filter Type (Manual, OfflineMail, etc.) * * @return errorMessage A localized message to display if invalid * Set to null if the actionValue is valid */ AUTF8String validateActionValue(in AUTF8String actionValue, in
nsIMsgFolder actionFolder, in nsMsgFilterTypeType filterType); /* allow duplicate actions in the same filter list? Default No. */ attribute boolean allowDuplicates; /* * The custom action itself * * Generally for the apply method, folder-based methods give correct * results and are preferred if available. Otherwise, be careful * that the action does cor...
nsIMsgSearchNotify
Defined in comm-central/ mailnews/ base/ search/ public/ nsIMsgSearchNotify.idl [scriptable, uuid(ca37784d-352b-4c39-8ccb-0abc1a93f681)] interface nsIMsgSearchNotify : nsISupports { void onSearchHit(in nsIMsgDBHdr header, in
nsIMsgFolder folder); // notification that a search has finished. void onSearchDone(in nsresult status); /* * until we can encode searches with a URI, this will be an * out-of-bound way to connect a set of search terms to a datasource */ /* * called when a new search begins */ void onNewSearch(); }; ...
nsIMsgSearchScopeTerm
Defined in comm-central/ mailnews/ base/ search/ public/ nsIMsgSearchScopeTerm.idl [scriptable, uuid(934672c3-9b8f-488a-935d-87b4023fa0be)] interface nsIMsgSearchScopeTerm : nsISupports { nsIInputStream getInputStream(in nsIMsgDBHdr aHdr); void closeInputStream(); readonly attribute
nsIMsgFolder folder; readonly attribute nsIMsgSearchSession searchSession; }; ...
nsIMsgThread
The
nsIMsgFolder interface is used to interact with threads in Thunderbird. Inherits from: nsISupports Method overview void addChild(in nsIMsgDBHdr child, in nsIMsgDBHdr inReplyTo, in boolean threadInThread, in nsIDBChangeAnnouncer announcer); nsIMsgDBHdr getChildAt(in long index); nsMsgKey getChildKeyAt(in long index); nsIMsgDBHdr getChild(in nsMsgKey msgKey); nsIMsgDBHdr getChildHdrAt(in long index); nsIMsgDBHdr getRootHdr(out long index); void removeChildAt(in long index); void removeChildHdr(in nsIMsgDBHdr child, in nsIDBChangeAnnouncer announcer); void markChildRead(in boolean bRead); nsIMsgDBHdr getFirstUnreadChild(); nsISimpleEnumerator enumerateMessages(in nsMsgKey parent); Attr...
nsIMsgWindow
statusFeedback nsIMsgStatusFeedback This allows the backend code to send status feedback to the UI. msgHeaderSink nsIMsgHeaderSink This allows the backend code to send message header information to the UI. transactionManager nsITransactionManager This is used to track undo/redo transactions. openFolder
nsIMsgFolder This is used to track the folder currently open in the UI. rootDocShell nsIDocShell This is used to track the chrome window's nsIDocShell object. You don't normally need to set this, instead set the domWindow property instead. messageWindowDocShell nsIDocShell Readonly: This retrieves the nsIDocShell object for the message pane. You sh...
nsMsgSearchValue
sgSearchCore.idl Use this to specify the value of a search term [ptr] native nsMsgSearchValue(nsMsgSearchValue); %{C++ typedef struct nsMsgSearchValue { nsMsgSearchAttribValue attribute; union { nsMsgPriorityValue priority; PRTime date; PRUint32 msgStatus; /* see MSG_FLAG in msgcom.h */ PRUint32 size; nsMsgKey key; PRInt32 age; /* in days */
nsIMsgFolder *folder; nsMsgLabelValue label; PRUint32 junkStatus; PRUint32 junkPercent; } u; char *string; } nsMsgSearchValue; ...
XPCOM Interface Reference
nerManagernsIMessageSendernsIMessageWakeupServicensIMessengernsIMicrosummarynsIMicrosummaryGeneratornsIMicrosummaryObservernsIMicrosummaryServicensIMicrosummarySetnsIMimeConverternsIMimeHeadersnsIModulensIMsgAccountnsIMsgAccountManagerExtensionnsIMsgCompFieldsnsIMsgCustomColumnHandlernsIMsgDBHdrnsIMsgDBViewnsIMsgDBViewCommandUpdaternsIMsgDatabasensIMsgFilternsIMsgFilterCustomActionnsIMsgFilterList
nsIMsgFoldernsIMsgHeaderParsernsIMsgIdentitynsIMsgIncomingServernsIMsgMessageServicensIMsgProtocolInfonsIMsgRuleActionnsIMsgSearchCustomTermnsIMsgSearchNotifynsIMsgSearchScopeTermnsIMsgSearchSessionnsIMsgSearchTermnsIMsgSearchValuensIMsgSendLaternsIMsgThreadnsIMsgWindownsIMsgWindowCommandsnsIMutableArraynsINavBookmarkObservernsINavBookmarksServicensINavHistoryBatchCallbacknsINavHistoryContainerResultNodensINa...
XPCOM Interface Reference by grouping
Thunderbird Credentials nsIMsgAccountManagerExtension Element nsIEditorMailSupport Message nsIDBChangeAnnouncer nsIDBChangeListener nsIMessenger nsIMsgCompFields nsIMsgCustomColumnHandler nsIMsgDatabase nsIMsgDBHdr nsIMsgDBView nsIMsgDBViewCommandUpdater
nsIMsgFolder nsIMsgIdentity nsIMsgMessageService nsIMsgSendLater nsIMsgThread nsIMsgWindow nsIMsgWindowCommands User History nsIBrowserHistory nsIBrowserSearchService nsIMicrosummary nsIMicrosummaryGenerator nsIMicrosummaryObserver nsIMicrosummaryService nsIMicrosummarySet ...
XPCOM reference
s you should be using. See the XPCOM internal string guide for documentation of the internal string API used within the Mozilla codebase. Core XPCOM functionsXPCOM provides a number of global functions which are used to initialize and shut down the XPCOM library, as well as to allocate memory, get access to services, and to instantiate interfaces.FoldersThe folder classes all implement the
nsIMsgFolder interface. There are currently three folder classes - nsLocalMailFolder, nsImapMailFolder, and nsNewsFolder. They all inherit from nsMsgDBFolder, which implements a lot of the core functionality. RSS feeds are implemented by nsLocalMailFolder.NS ENSURE SUCCESSMacroNS ENSURE TRUEMacroNS_ABORT_IF_FALSEThis was removed in bug 1127201NS_ADDREFMacroNS_ASSERTIONMacroNS_ENSURE_ARG_POINTERMacroNS_ERRORTh...
Creating a gloda message query
): Add the constraint that the message date (per the message's Date header) must fall within one of the specified inclusive ranges. The date instances are JavaScript Date instances. query.folder(folder1, folder2, ...): Add the constraint that the message must be found in one of the specified folders. The folder may be a GlodaFolder instance (retrieved via Gloda.getFolderForFolder, which takes an
nsIMsgFolder) or an
nsIMsgFolder instance. query.conversation(conversation1, conversation2, ...): Add the constraint that the message must belong to one of the specified conversations. The conversation must be a GlodaConversation instance. You find these by first finding a message and then accessing its "conversation" attribute. query.tags(tag1, tag2, tag3, ...): Add the constraint that the message must ha...
MailNews Protocols
er. Those protocols all have the following, defined in the corresponding protocol subdirectory of mailnews (i.e., mailnews/imap, mailnews/local (for pop3), mailnews/news): An incoming server class, which implements nsIMsgIncomingServer and inherits from mailnews/base/util/nsMsgIncomingServer, i.e.., nsPop3IncomingServer, nsImapIncomingServer, nsNNTPIncomingServer. A folder class, which implements
nsIMsgFolder, and inherits from nsMsgDBFolder. Most commands/operations go through the folder object. nsImapMailFolder, nsNewsFolder, nsLocalMailFolder (for POP3) A service class, which generally sits between the folder object or the server object, and the protocol object. The service class creates and initializes the url object for the operation, and hands that off to a protocol object to run. The service cl...
Mail event system
tion myOnIntPropertyChanged(item, property, oldValue, newValue) { listenerHasFired=true; var propertyString = property.GetUnicode(); dump("OnIntPropertyChanged has fired with property + " + propertyString + "!\n"); if (propertyString == "TotalMessages") { totalMessagesListenerHasFired=true; //now show us visually var folder = item.QueryInterface(Components.interfaces.
nsIMsgFolder); dump("The folder " + folder.prettyName + " now has " + newValue + " messages."); } else if (propertyString == "TestProperty") { dump("Recieved integer test property fired on folder " + folder.prettyName + " with values " + oldValue + " and " + newValue + "\n"); } // set up the folder listener to point to the above function var folderListener = { OnItemAdded: ...
Demo Addon
t server = accounts[0].incomingServer; let folder = server.rootFolder; // ... let inbox; let print = function (indent, folder) { let isInbox = folder.getFlag(Ci.nsMsgFolderFlags.Inbox); if (isInbox) inbox = folder; str += indent + folder.prettiestName + (isInbox ? " *" : "") + "\n"; if (folder.hasSubFolders) for each (let folder in fixIterator(folder.subFolders, Ci.
nsIMsgFolder)) print(indent + " ", folder); }; print(" ", folder); As in the previous example, we get the incomingServer of the account in question. Beginning with the rootFolder, with folder.getFlag(Ci.nsMsgFolderFlags.Inbox) we check whether the folder is the inbox. Then we store the folder name in a string to display it later on the screen and mark it with an * if it is the inbox. Afterwar...
Finding the code for a feature
TagMenu. Looking that up in mxr, its underlying function uses a very strange call prevHdrFolder[toggler](messages, key) to change the key. Trying to figure that out from the code, I see that is just a clever way to do the addKeywordsToMessages or removeKeywordsFromMessages method call. (Please don't do that guys, it really makes code search difficult!) So the answer the your question is, use the
nsIMsgFolder method "addKeywordsToMessages" (and now I remember that I knew that!). If you want examples, scan mxr for addKeywordsToMessages. You'll find that the only decent examples are in unit tests, my test_bug428427.js or asuth's messageModifier.js ...
Folders and message lists
Interacting With the Current Folder The FolderDisplayWidget for the current folder can be accessed via the global variable gFolderDisplay. This object provides many of the functions required for working with folder views. We'll look at some of them below. Getting the Current
nsIMsgFolder The
nsIMsgFolder interface contains many methods and attributes for working with folders. To get the
nsIMsgFolder instance for the currently-displayed folder, just use gFolderDisplay.displayedFolder. Getting the Currently-Selected Message The FolderDisplayWidget has several ways of getting the currently-selected message(s), depending on what exactly you're trying to do: gFolderDisplay.selectedCount: Returns the number of messages currently selected. gFolderDisplay.selectedMessage: Returns the first currently...
Styling the Folder Pane
serverType-server aFolder.server.type Returns the type of the server. For example, IMAP servers are "imap". specialFolder-folderType aFolder.flags & nsMsgFolderFlags.<name> Returns the folder type if it is a special folder (or "none" if it is a regular folder). For example, if the Inbox flag is set, this will be "Inbox". biffState-biffState aFolder.biffState ==
nsIMsgFolder.nsMsgBiffState_<name> Indicates whether or not the folder has new messages. isSecure-{true, false} aFolder.server.isSecure Indicates whether or not the connection to the server will be secure. newMessages-true aFolder.hasNewMessages subfoldersHaveUnreadMessages-true aFolder.getNumUnread(true) > aFolder.getNumUnread(false) Indicates whether or not ...