mozilla

Revision 128630 of Message Summary Database

  • Revision slug: Message_Summary_Database
  • Revision title: Message Summary Database
  • Revision id: 128630
  • Created:
  • Creator: DavidBienvenu
  • Is current revision? No
  • Comment New page: The Mail Summary Files (.msf) are used to store summary information about messages and threads in a folder, and some meta information about the folder. == nsIMsgDatabase == The main acc...

Revision Content

The Mail Summary Files (.msf) are used to store summary information about messages and threads in a folder, and some meta information about the folder.


nsIMsgDatabase

The main access point to the summary information is nsIMsgDatabase. nsIMsgFolder has a method to get the database for a folder.

nsIMsgDatabase is an abstraction on top of MDB, which is a set of db interfaces. The MDB interfaces are implemented in Mork. MDB is a schema-less db interface, so it's trivial to add new attributes without regenerating the db, and it's trivial for older code to read newer databases, because the code can ignore but maintain the attributes it doesn't know about.

Message Headers

The message header object implements the nsIMsgDBHdr interface. This includes a set of per-message flags, the more commonly used headers, e.g., subject, sender, from, to, cc, date, etc) and a few other attributes, e.g., keywords. There are a set of generic property methods so that core code and extensions can set attributes on msg headers without changing nsIMsgHdr.idl.


Meta Information

The nsIDBFolderInfo interface handles the folder meta data. This also supports generic properties. There is a method on nsIMsgDatabase to get the dbFolderInfo

Revision Source

<p>The Mail Summary Files (.msf) are used to store summary information about messages and threads in a folder, and some meta information about the folder. 
</p><p><br>
</p>
<h3 name="nsIMsgDatabase"> nsIMsgDatabase </h3>
<p>The main access point to the summary information is <a class="external" href="http://mxr.mozilla.org/mailnews/source/mailnews/db/msgdb/public/nsIMsgDatabase.idl#122">nsIMsgDatabase</a>. nsIMsgFolder has a <a class="external" href="http://mxr.mozilla.org/mailnews/source/mailnews/base/public/nsIMsgFolder.idl#360">method</a> to get the database for a folder.
</p><p>nsIMsgDatabase is an abstraction on top of <a class="external" href="http://mxr.mozilla.org/mozilla/source/db/mdb/public/mdb.h#39">MDB</a>, which is a set of db interfaces. The MDB interfaces are implemented in Mork. MDB is a schema-less db interface, so it's trivial to add new attributes without regenerating the db, and it's trivial for older code to read newer databases, because the code can ignore but maintain the attributes it doesn't know about.
</p>
<h3 name="Message_Headers"> Message Headers </h3>
<p>The message header object implements the <a class="external" href="http://mxr.mozilla.org/mailnews/source/mailnews/base/public/nsIMsgHdr.idl#51">nsIMsgDBHdr</a> interface. This includes a set of per-message <a class="external" href="http://mxr.mozilla.org/mailnews/source/mailnews/public/MailNewsTypes.h#94">flags</a>, the more commonly used headers, e.g., subject, sender, from, to, cc, date, etc) and a few other attributes, e.g., keywords. There are a set of generic <a class="external" href="http://mxr.mozilla.org/mailnews/source/mailnews/base/public/nsIMsgHdr.idl#55">property methods</a> so that core code and extensions can set attributes on msg headers without changing nsIMsgHdr.idl.
</p><p><br>
</p>
<h3 name="Meta_Information"> Meta Information </h3>
<p>The <a class="external" href="http://mxr.mozilla.org/mailnews/source/mailnews/db/msgdb/public/nsIDBFolderInfo.idl#42">nsIDBFolderInfo</a> interface handles the folder meta data. This also supports <a class="external" href="http://mxr.mozilla.org/mailnews/source/mailnews/db/msgdb/public/nsIDBFolderInfo.idl#72">generic properties</a>. There is a <a class="external" href="http://mxr.mozilla.org/mailnews/source/mailnews/db/msgdb/public/nsIMsgDatabase.idl#134">method</a> on nsIMsgDatabase to get the dbFolderInfo
</p>
Revert to this revision