MDN Extended Technical Documentation

De Trustedbird Client Wiki
English | Français

> Documentation > Add-on: MDN Extended > Technical documentation


Specifications

The reference for the implementation of this functionality is the RFC 3798

Architecture

Synthetic presentation of the architecture of the extension

This functionality is developed in the form of a Thunderbird extension.

Architecture

The heart of this implementation rests on the addition of a controller to the existing windows to manage the events of deletion of a message.

GUI files

The unique goal of the overlay XUL files is to include the library mdn_extended.js to the existing windows. The overloaded windows are the main navigation window and the window that display a message. In other words, there are the windows that allow the deletion of a message.

This is this library mdn_extended.js that record a new controller to handle the message deletion events.

This library overload the built-in function SetupCommandUpdateHandlers() to add a new event controller has the default controller. This function is called on page opening. We need to overload this function to be sure that our controller is defined has the default controller. This controller handle only the followings standard events:

  • cmd_delete
  • button_delete
  • cmd_shiftDelete

When a deletion event occurs, it catches the event, then calls the XPCOM nsIMsgMdnGenerator with the right arguments, and then delegates the processing to the standard controllers. The other events are not caught.

XPCOM files

This extension doesn't provided any new XPCOM. Mainly, it uses the built-in XPCOM nsIMsgMdnGenerator.