Skip to content
- nsIMessenger
Interface
is exposed to the Thunderbird javascript
- currently <code>void openAttachment ( char* contentTpe , char*
url , char* displayName , char* messageUri , PRBool
isExternalAttachment )</code> is called when you open an attachment
- it’d be preferable to call <code> nsILocalFile
saveAttachmentToFolder ( char* contentType , char* url , char*
displayName , char* messageUri , nsILocalFile destFolder )</code>
- nsILocalFile
is returned by saveAttachmentToFolder
- the method takes a target folder, which could force the
download to a specific temporary location
- the <code> void launch ( )</code> method asks the operating
system to “double-click” the described file launch() only seems
to work for executables
- @mozilla.org/uriloader/external-helper-app-service;1 provides
the loadURI and load Url methods which should work
- nsILocalFile inherits from
nsIFile
- nsIFile defines an attribute PRUint32
permissions
which contains the Unix-style permissions for the target
file. This should be able to be manipulated before calling <code>launch()</code>.
- The file
msgHdrViewOverlay.xul
in Thunderbird defines the user interface for attachment handling
- The attachmentListContext popup element will need to be overriden.
- The
@mozilla.org/process/environment;1
XPCOM object will let us get the value (and test for the existence)
of an environment variable
- We need to use this instead of hard-coded paths in methods.js.
date: | 2008-11-13 17:37:55 |
wordpress_id: | 717 |
layout: | page |
slug: | development-notes |
comments: | |