Thunderbird:Backend Hacking Guide For Newbies: Difference between revisions

Change Pastebin into link
(→‎Development Process: Add some review links)
(Change Pastebin into link)
 
(18 intermediate revisions by 4 users not shown)
Line 23: Line 23:
* [http://developer.mozilla.org/en/docs/Build_Documentation#Build_prerequisites Others]
* [http://developer.mozilla.org/en/docs/Build_Documentation#Build_prerequisites Others]


If you wish to build the palm sync extension, you will need to install the [https://www.developerpavilion.com/palmos/page.asp?page_id=365&tool_id=14 Palm CDK] (requires free registration).
If you wish to build the palm sync extension, you will need to install the [https://www.developerpavilion.com/palmos/page.asp?page_id=365&tool_id=14 Palm CDK] (requires free registration).  And BUILD_PALMSYNC=1 and PALM_CDK_DIR=c:/PALMCDK403 env vars. (do not use PALM CDK v6)  [http://tomfrauenhofer.com/wordpress/?p=4 Building Palm OS Conduits with CDK 4.0.3 and VS 2005] may also have useful info.


==== Debuggers ====
==== Debuggers ====
Line 51: Line 51:
* Patch
* Patch
==== Collaboration ====
==== Collaboration ====
* Pastebin <link>
* [https://wiki.mozilla.org/Education/Collaboration/IRC#Using_pastebin.mozilla.org Pastebin]
==== Build Automation ====
==== Build Automation ====
* [http://tinderbox.mozilla.org/Thunderbird/ Thunderbird Tinderbox]
* [http://tinderbox.mozilla.org/Thunderbird/ Thunderbird Tinderbox]
Line 86: Line 86:
<link>
<link>


=== Important Components of Mozilla Framework ===
=== Mozilla Framework Libraries used by Thunderbird ===
==== PL ====
==== PL ====
  What is PL? How it is different than platform's C runtime, Secure C functions, etc...
  What is PL? How it is different than platform's C runtime, Secure C functions, etc...
Line 105: Line 105:


* [http://www.mozilla.org/projects/security/pki/nss/ NSS Home Page]
* [http://www.mozilla.org/projects/security/pki/nss/ NSS Home Page]
==== libMime ====
short introduction


==== XPCOM ====
==== XPCOM ====
Line 115: Line 118:
* [http://developer.mozilla.org/en/docs/Creating_XPCOM_Components Creating XPCOM Components]
* [http://developer.mozilla.org/en/docs/Creating_XPCOM_Components Creating XPCOM Components]
* [http://developer.mozilla.org/en/docs/XPCOM_string_guide XPCOM string guide]
* [http://developer.mozilla.org/en/docs/XPCOM_string_guide XPCOM string guide]
* [http://www.xulplanet.com/references/xpcomref XPCOM Reference]


==== NECKO ====
==== NECKO ====
Line 139: Line 143:
  What is XUL  
  What is XUL  


[http://ted.mielczarek.org/code/mozilla/xuledit/xuledit.xul Online XUL editor from Ted Mielczarek]
* [http://www.xulplanet.com XUL Planet]
* [http://ted.mielczarek.org/code/mozilla/xuledit/xuledit.xul Online XUL editor from Ted Mielczarek]


=== Best Practices ===
=== Best Practices ===
Line 150: Line 155:
==== Logging/Tracing Thunderbird ====
==== Logging/Tracing Thunderbird ====


Thunderbird logging mechanism is activated by setting couple environment variables before running Thunderbird. Two environment variables that should set are;
See [[MailNews:Logging]] for how to do general NSPR logging in MailNews. Note that there are many more logging options/protocols in the core code, search for [http://mxr.mozilla.org/seamonkey/search?string=PR_NewLogModule PR_NewLogModule] to find them.
 
1) '''NSPR_LOG_MODULES''': Module name and level separated by colon
2) '''NSPR_LOG_FILE''': Path to the log file
 
* Module activity logging
General rule is to set NSPR_LOG_MODULES to the literal defined in the implementation file of the module in question. For example to log timer events, the value should be set to "nsTimerImpl:5" as defined in [http://mxr.mozilla.org/seamonkey/source/xpcom/threads/nsTimerImpl.h#55 the header file of the timer module].
 
* Protocol logging
Detailed information about protocol logging can be found at [http://www.mozilla.org/quality/mailnews/mail-troubleshoot.html Mail Logging/Troubleshotting] and [Mailnews:LDAP Address Books|LDAP Protocol Logging].


* Misc
* Misc
Line 171: Line 167:


* [[MailNews:Performance_Testing]]
* [[MailNews:Performance_Testing]]
* [[MailNews:Automated_Testing]]
* [https://developer.mozilla.org/en/MailNews/MailNews_Automated_Testing MailNews Automated Testing]
* [http://developer.mozilla.org/en/docs/Mozilla_automated_testing Mozilla Automated Testing]
* [http://developer.mozilla.org/en/docs/Mozilla_automated_testing Mozilla Automated Testing]


Line 201: Line 197:
* ...  
* ...  


=== Major Thunderbird Components ===  
=== Major Thunderbird Entities ===
 
* [http://doxygen.db48x.net/mozilla/html/classes.html Thunderbird class diagrams]
Currently, Thunderbird supports four different incoming (IMAP, POP3, NNTP, RSS) and one outgoing messaging protocols (SMTP). Each incoming protocol provide its own [http://wiki.mozilla.org/User:Emre/tb/architecture/diagrams/messageincomingserver|<code>IncomingServer</code>] component implementation.
* [http://wiki.mozilla.org/User:Emre/tb/architecture/diagrams Architectural overview]
 
Each message source is represented by an <code>Account</code> component, and all accounts are managed by [http://wiki.mozilla.org/User:Emre/tb/architecture/diagrams/accountmanager|<code>AccountManager</code>]. Depending on its type, each account also has an associated [http://wiki.mozilla.org/User:Emre/tb/architecture/diagrams/messageincomingserver|<code>IncomingServer</code>] that implements the underlaying messaging protocol.
 
<code>Identity</code> contains all the personal outgoing mail information
for a given person. Although all account types can have multiple associated identities by design, RSS do not need this entity, as does any other account that does not interact with compose code.
 
<code>AddressBook</code> is the central repository of the user's contacts.
MORE INFO NEEDED HERE ABOUT ITS RELATION TO OTHER ENTITIES
 
[http://wiki.mozilla.org/User:Emre/tb/architecture/diagrams/messagefolder|<code>Folder</code>] is the logical entity of message contents. Every account has a root folder, which has several subfolders (each potentially with their own subfolders, ad infinitum) which are actual folders on the hosting operating system for local folders and summary files for IMAP and NNTP folders.
 
<code>Database</code> component, on the other hand, is the physical store of message headers in '''Mork''' format. This store is the '''msf''' file, e.g. Inbox.msf or mozilla.dev.apps.thunderbird.msf.
 
[[Image:Tb-system-overview.png | TB Class diagram ]]
 
 
 
* MIME
* IMAP
* [[MailNews:Address Book|Address Book]]
* ...
 
[[category:Thunderbird|*]]
Confirmed users
52

edits