cgmail.js

Summary
cgmail.js
Constants
FireGPG.Const.Gmail.STARTState ‘start’ for ProgressListener
FireGPG.Const.Gmail.STOPState ‘stop’ for ProgressListener
FireGPG.cGmailListenerThis class implement a listener, to intercept page loaded.
Functions
QueryInterfaceThis function return the Interface of the listen.
onStateChangeThis function is called when the state of a page change (loaded, ..)
onLocationChangeThis function is called when the location change Here to be a good listener.
onProgressChangeThis function is called when the progress change Here to be a good listener.
onStatusChangeThis function is called when the stage change Here to be a good listener.
onSecurityChangeThis function is called when the security change Here to be a good listener.
onLinkIconAvailableThis function is called when the location change Here to be a good listener.
FireGPG.cGmailThis is the main class to manage gmail’s function with the old interface.
Functions
onDelayLoadThis function is called when a gmail page is loaded, after fiew seconds.
simpleLoadThis function is called when a gmail page is loaded.
initSystemThis function init the class : she load specific options, and attach listeners to the webpages.
addBoutonThis function create a html button at the end of a node.
addComposeBoutonsThis function add compose boutons (sign, sign and send, ...)
listenerLoadThis function is called by the listener when a page is loaded.
listenerUnloadThis function is called by the listener when a page is closed.
callBackThis create a function who is called when a button (or a link) is pressed.
getWriteMailContentReturn the content of a mail in composition (his selection if something is selected)
getToCcBccMailReturn the To, CC and BCC filds’ value of a mail in composition.
setWriteMailContentSet the content of a mail in composition (his selection if something is selected)
sendEmailSimulate a click on the send button.
getMailContentRetrun the content of a mail
foundTheGoodIdGet the interal id of a mail based on this mail id of the page (Used by getMimeMailContens).
getMimeMailContensReturn the mime source of a mail

Constants

FireGPG.Const.Gmail.START

State ‘start’ for ProgressListener

FireGPG.Const.Gmail.STOP

State ‘stop’ for ProgressListener

FireGPG.cGmailListener

This class implement a listener, to intercept page loaded.

Summary
Functions
QueryInterfaceThis function return the Interface of the listen.
onStateChangeThis function is called when the state of a page change (loaded, ..)
onLocationChangeThis function is called when the location change Here to be a good listener.
onProgressChangeThis function is called when the progress change Here to be a good listener.
onStatusChangeThis function is called when the stage change Here to be a good listener.
onSecurityChangeThis function is called when the security change Here to be a good listener.
onLinkIconAvailableThis function is called when the location change Here to be a good listener.

Functions

QueryInterface

QueryInterface: function(aIID)

This function return the Interface of the listen.  Here to be a good listener.

Parameters

aIID?

onStateChange

onStateChange: function(aProgress,
aRequest,
aFlag,
aStatus)

This function is called when the state of a page change (loaded, ..)

Parameters

aProgressAn object with the progression ?
aRequestAn object with the request
aFlagFlags about the request.
aStatusThe status of the request.

onLocationChange

onLocationChange: function(aProgress,
aRequest,
aURI)

This function is called when the location change Here to be a good listener.

Parameters

aProgressThe progress
aRequestThe request
aURIThe new url.

onProgressChange

onProgressChange: function()

This function is called when the progress change Here to be a good listener.

onStatusChange

onStatusChange: function()

This function is called when the stage change Here to be a good listener.

onSecurityChange

onSecurityChange: function()

This function is called when the security change Here to be a good listener.

onLinkIconAvailable

onLinkIconAvailable: function()

This function is called when the location change Here to be a good listener.

FireGPG.cGmail

This is the main class to manage gmail’s function with the old interface.

Summary
Functions
onDelayLoadThis function is called when a gmail page is loaded, after fiew seconds.
simpleLoadThis function is called when a gmail page is loaded.
initSystemThis function init the class : she load specific options, and attach listeners to the webpages.
addBoutonThis function create a html button at the end of a node.
addComposeBoutonsThis function add compose boutons (sign, sign and send, ...)
listenerLoadThis function is called by the listener when a page is loaded.
listenerUnloadThis function is called by the listener when a page is closed.
callBackThis create a function who is called when a button (or a link) is pressed.
getWriteMailContentReturn the content of a mail in composition (his selection if something is selected)
getToCcBccMailReturn the To, CC and BCC filds’ value of a mail in composition.
setWriteMailContentSet the content of a mail in composition (his selection if something is selected)
sendEmailSimulate a click on the send button.
getMailContentRetrun the content of a mail
foundTheGoodIdGet the interal id of a mail based on this mail id of the page (Used by getMimeMailContens).
getMimeMailContensReturn the mime source of a mail

Functions

onDelayLoad

onDelayLoad: function()

This function is called when a gmail page is loaded, after fiew seconds.  She test signs, create buttons, etc...

simpleLoad

simpleLoad: function(e)

This function is called when a gmail page is loaded.  She prepare some variables like the number of mails and add some buttons.

initSystem

initSystem: function()

This function init the class : she load specific options, and attach listeners to the webpages.

addBouton

addBouton: function(label,
id,
box,
Ddocument,
info1)

This function create a html button at the end of a node.

Parameters

labelThe label of the button
idThe id of the button
boxThe node where the button is added.
DdocumentThe page’s document (of the node)
info1doesn’t seem to be used.

addComposeBoutons

addComposeBoutons: function(box,
Ddocument,
info1)

This function add compose boutons (sign, sign and send, ...) to a node.

Parameters

boxThe node where buttons are added.
DdocumentThe page’s document (of the node)
info1Information who will be return when a buton is pressed.

listenerLoad

listenerLoad: function(e)

This function is called by the listener when a page is loaded.  She call anothers loadpage-relative function if it’s a gmail page.

listenerUnload

listenerUnload: function()

This function is called by the listener when a page is closed.  Listeners are destroyed.

callBack

callBack: function(id,
info1)

This create a function who is called when a button (or a link) is pressed.  She execute the corespondig action (like sign..)

Parameters

idThe id to save
info1The additionnal information to save.

getWriteMailContent

getWriteMailContent: function(dDocument,
idMail)

Return the content of a mail in composition (his selection if something is selected)

Parameters

dDocument- The html document idMail - The id of the mail (gmail)

getToCcBccMail

getToCcBccMail: function(dDocument,
idMail)

Return the To, CC and BCC filds’ value of a mail in composition.

Parameters

dDocument- The html document idMail - The id of the mail (gmail)

setWriteMailContent

setWriteMailContent: function(dDocument,
idMail,
newText)

Set the content of a mail in composition (his selection if something is selected)

Parameters

dDocument- The html document. idMail - The id of the mail (gmail). newText - The text to set.

sendEmail

sendEmail: function(nodeForScan,
dDocument)

Simulate a click on the send button.

Parameters

nodeForScanThe node with the send button
dDocumentThe document of the page

getMailContent

getMailContent: function(i)

Retrun the content of a mail

Parameters

iThe mail’s id (0 to n) (gmail)

foundTheGoodId

foundTheGoodId: function(id)

Get the interal id of a mail based on this mail id of the page (Used by getMimeMailContens).

Parameters

idThe mail’s id (0 to n) (gmail)

getMimeMailContens

getMimeMailContens: function(id)

Return the mime source of a mail

Parameters

idThe mail’s id (0 to n) (gmail)
QueryInterface: function(aIID)
This function return the Interface of the listen.
onStateChange: function(aProgress,
aRequest,
aFlag,
aStatus)
This function is called when the state of a page change (loaded, ..)
onLocationChange: function(aProgress,
aRequest,
aURI)
This function is called when the location change Here to be a good listener.
onProgressChange: function()
This function is called when the progress change Here to be a good listener.
onStatusChange: function()
This function is called when the stage change Here to be a good listener.
onSecurityChange: function()
This function is called when the security change Here to be a good listener.
onLinkIconAvailable: function()
This function is called when the location change Here to be a good listener.
onDelayLoad: function()
This function is called when a gmail page is loaded, after fiew seconds.
simpleLoad: function(e)
This function is called when a gmail page is loaded.
initSystem: function()
This function init the class : she load specific options, and attach listeners to the webpages.
addBouton: function(label,
id,
box,
Ddocument,
info1)
This function create a html button at the end of a node.
addComposeBoutons: function(box,
Ddocument,
info1)
This function add compose boutons (sign, sign and send, ...)
listenerLoad: function(e)
This function is called by the listener when a page is loaded.
listenerUnload: function()
This function is called by the listener when a page is closed.
callBack: function(id,
info1)
This create a function who is called when a button (or a link) is pressed.
getWriteMailContent: function(dDocument,
idMail)
Return the content of a mail in composition (his selection if something is selected)
getToCcBccMail: function(dDocument,
idMail)
Return the To, CC and BCC filds’ value of a mail in composition.
setWriteMailContent: function(dDocument,
idMail,
newText)
Set the content of a mail in composition (his selection if something is selected)
sendEmail: function(nodeForScan,
dDocument)
Simulate a click on the send button.
getMailContent: function(i)
Retrun the content of a mail
foundTheGoodId: function(id)
Get the interal id of a mail based on this mail id of the page (Used by getMimeMailContens).
getMimeMailContens: function(id)
Return the mime source of a mail
Close