mozilla

Revision 180186 of MailNews Protocols

  • Revision slug: MailNews_Protocols
  • Revision title: MailNews Protocols
  • Revision id: 180186
  • Created:
  • Creator: DavidBienvenu
  • Is current revision? No
  • Comment

Revision Content

IMAP, POP3, NNTP and SMTP are implemented in C++. RSS is implemented in JS and doesn't follow the same pattern as the C++ protocols.

IMAP,POP3, and NNTP are "incoming" protocols, i.e., we retrieve messages from a server, and represent them as folders to the user. Those protocols all have the following, defined in the corresponding protocol subdirectory of mailnews (i.e., mailnews/imap, mailnews/local, 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 classes usually have their own interface, but they also implement nsIMsgMessageService.

A url object. These implement nsIMsgMailNewsUrl, inherit from nsMsgMailNewsUrl, and implement their own protocol-specific interface (nsIImapUrl, nsINNTPUrl, nsIPop3Url).

Revision Source

<ul><li><a href="en/IMAP">IMAP</a>  
</li><li><a href="en/POP3">POP3</a>
</li><li><a href="en/NNTP">NNTP</a>
</li><li><a href="en/SMTP">SMTP</a>
</li><li><a href="en/RSS">RSS</a>
</li></ul>
<p>IMAP, POP3, NNTP and SMTP are implemented in C++. RSS is <a class="external" href="http://mxr.mozilla.org/mailnews/source/mail/extensions/newsblog/js/newsblog.js#1">implemented in JS</a> and doesn't follow the same pattern as the C++ protocols.
</p><p>IMAP,POP3, and NNTP are "incoming" protocols, i.e., we retrieve messages from a server, and represent them as folders to the user. Those protocols all have the following, defined in the corresponding protocol subdirectory of mailnews (i.e., mailnews/imap, mailnews/local, mailnews/news):
</p><p>An incoming server class, which implements nsIMsgIncomingServer and inherits from mailnews/base/util/nsMsgIncomingServer, i.e.., nsPop3IncomingServer, nsImapIncomingServer, nsNNTPIncomingServer.
</p><p>A folder class, which implements nsIMsgFolder, and inherits from nsMsgDBFolder. Most commands/operations go through the folder object. nsImapMailFolder, <a class="external" href="http://mxr.mozilla.org/mozilla/source/mailnews/news/src/nsNewsFolder.cpp#116">nsNewsFolder</a>, nsLocalMailFolder (for POP3)
</p><p>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 classes usually have their own interface, but they also implement nsIMsgMessageService.
</p><p>A url object. These implement nsIMsgMailNewsUrl, inherit from nsMsgMailNewsUrl, and implement their own protocol-specific interface (nsIImapUrl, nsINNTPUrl, nsIPop3Url).
</p>
Revert to this revision