-/* ***** BEGIN LICENSE BLOCK *****
- * Copyright (c) 2008-2009 EADS DEFENCE AND SECURITY - All rights reserved.
- * ximfmail is under the triple license MPL 1.1/GPL 2.0/LGPL 2.1.
- *
- *
- * Redistribution and use, in source and binary forms, with or without modification,
- * are permitted provided that the following conditons are met :
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- * 2. MPL 1.1/GPL 2.0/LGPL 2.1. license agreements must be attached
- * in the redistribution of the source code.
- * 3. Neither the names of the copyright holders nor the names of any contributors
- * may be used to endorse or promote products derived from this software without specific
- * prior written permission from EADS Defence and Security.
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * REMINDER :
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
- * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * EADS Defence and Security - 1 Boulevard Jean Moulin -
- * ZAC de la Clef Saint Pierre - 78990 Elancourt - FRANCE (IDDN.FR.001.480012.002.S.P.2008.000.10000)
- * ***** END LICENSE BLOCK ***** */
-// components defined in this file
-const AM_XIMF_MAIL_EXTENSION_SERVICE_CONTRACTID =
- "@mozilla.org/accountmanager/extension;1?name=am-service-ximfmail";
-const AM_XIMF_MAIL_EXTENSION_SERVICE_CID =
- Components.ID("{E1934208-A30D-4950-8DCE-DCDAB01BDC65}");
-
-
-// interfaces used in this file
-const nsIMsgAccountManagerExtension = Components.interfaces.nsIMsgAccountManagerExtension;
-const nsICategoryManager = Components.interfaces.nsICategoryManager;
-const nsISupports = Components.interfaces.nsISupports;
-
-function XimfmailPrefService(){}
-
-XimfmailPrefService.prototype.name = "ximfmail";
-XimfmailPrefService.prototype.chromePackageName = "ximfmail"
-XimfmailPrefService.prototype.showPanel =
-function (server){
- // show Ximfmail panel for all account types
- return true;
-}
-
-// factory for command line handler service (XimfMailService)
-var XimfmailPrefFactory = new Object();
-
-XimfmailPrefFactory.createInstance =
-function (outer, iid) {
- if (outer != null)
- throw Components.results.NS_ERROR_NO_AGGREGATION;
-
- if (!iid.equals(nsIMsgAccountManagerExtension) && !iid.equals(nsISupports))
- throw Components.results.NS_ERROR_INVALID_ARG;
-
- return new XimfmailPrefService();
-}
-
-var XimfmailPrefsModule = new Object();
-
-XimfmailPrefsModule.registerSelf =
-function (compMgr, fileSpec, location, type)
-{
- dump("Registering Ximfmail account manager extension.\n");
-
- compMgr = compMgr.QueryInterface(Components.interfaces.nsIComponentRegistrar);
- compMgr.registerFactoryLocation(AM_XIMF_MAIL_EXTENSION_SERVICE_CID,
- "Ximfmail Account Manager Extension Service",
- AM_XIMF_MAIL_EXTENSION_SERVICE_CONTRACTID,
- fileSpec,
- location,
- type);
- catman = Components.classes["@mozilla.org/categorymanager;1"].getService(nsICategoryManager);
- catman.addCategoryEntry("mailnews-accountmanager-extensions",
- "ximfmail-accountmanager-extension",
- AM_XIMF_MAIL_EXTENSION_SERVICE_CONTRACTID, true, true);
- dump("Ximfmail account manager extension registered.\n");
-}
-
-XimfmailPrefsModule.unregisterSelf =
-function(compMgr, fileSpec, location)
-{
- compMgr = compMgr.QueryInterface(Components.interfaces.nsIComponentRegistrar);
- compMgr.unregisterFactoryLocation(AM_XIMF_MAIL_EXTENSION_SERVICE_CID, fileSpec);
- catman = Components.classes["@mozilla.org/categorymanager;1"].getService(nsICategoryManager);
- catman.deleteCategoryEntry("mailnews-accountmanager-extensions",
- AM_XIMF_MAIL_EXTENSION_SERVICE_CONTRACTID, true);
-}
-
-XimfmailPrefsModule.getClassObject =
-function (compMgr, cid, iid) {
- if (cid.equals(AM_XIMF_MAIL_EXTENSION_SERVICE_CID))
- return XimfmailPrefFactory;
-
-
- if (!iid.equals(Components.interfaces.nsIFactory))
- throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
-
- throw Components.results.NS_ERROR_NO_INTERFACE;
-}
-
-XimfmailPrefsModule.canUnload =
-function(compMgr)
-{
- return true;
-}
-
-// entrypoint
-function NSGetModule(compMgr, fileSpec) {
- return XimfmailPrefsModule;
+/* ***** BEGIN LICENSE BLOCK *****\r
+ * Copyright (c) 2008-2009 EADS DEFENCE AND SECURITY - All rights reserved.\r
+ * ximfmail is under the triple license MPL 1.1/GPL 2.0/LGPL 2.1.\r
+ * \r
+ *\r
+ * Redistribution and use, in source and binary forms, with or without modification, \r
+ * are permitted provided that the following conditons are met :\r
+ *\r
+ * 1. Redistributions of source code must retain the above copyright notice, \r
+ * 2. MPL 1.1/GPL 2.0/LGPL 2.1. license agreements must be attached \r
+ * in the redistribution of the source code.\r
+ * 3. Neither the names of the copyright holders nor the names of any contributors \r
+ * may be used to endorse or promote products derived from this software without specific \r
+ * prior written permission from EADS Defence and Security.\r
+ * \r
+ * Alternatively, the contents of this file may be used under the terms of\r
+ * either of the GNU General Public License Version 2 or later (the "GPL"),\r
+ * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),\r
+ * in which case the provisions of the GPL or the LGPL are applicable instead\r
+ * of those above. If you wish to allow use of your version of this file only\r
+ * under the terms of either the GPL or the LGPL, and not to allow others to\r
+ * use your version of this file under the terms of the MPL, indicate your\r
+ * decision by deleting the provisions above and replace them with the notice\r
+ * and other provisions required by the GPL or the LGPL. If you do not delete\r
+ * the provisions above, a recipient may use your version of this file under\r
+ * the terms of any one of the MPL, the GPL or the LGPL.\r
+ * \r
+ * REMINDER :\r
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND \r
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \r
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \r
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \r
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES \r
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; \r
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \r
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING \r
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ * \r
+ * EADS Defence and Security - 1 Boulevard Jean Moulin - \r
+ * ZAC de la Clef Saint Pierre - 78990 Elancourt - FRANCE (IDDN.FR.001.480012.002.S.P.2008.000.10000) \r
+ * ***** END LICENSE BLOCK ***** */\r
+// components defined in this file\r
+const AM_XIMF_MAIL_EXTENSION_SERVICE_CONTRACTID =\r
+ "@mozilla.org/accountmanager/extension;1?name=am-service-ximfmail";\r
+const AM_XIMF_MAIL_EXTENSION_SERVICE_CID =\r
+ Components.ID("{E1934208-A30D-4950-8DCE-DCDAB01BDC65}");\r
+ \r
+ \r
+// interfaces used in this file\r
+const nsIMsgAccountManagerExtension = Components.interfaces.nsIMsgAccountManagerExtension;\r
+const nsICategoryManager = Components.interfaces.nsICategoryManager;\r
+const nsISupports = Components.interfaces.nsISupports;\r
+\r
+function XimfmailPrefService(){}\r
+\r
+XimfmailPrefService.prototype.name = "ximfmail";\r
+XimfmailPrefService.prototype.chromePackageName = "ximfmail"\r
+XimfmailPrefService.prototype.showPanel =\r
+function (server){\r
+ // show Ximfmail panel for all account types \r
+ return true;\r
+}\r
+\r
+// factory for command line handler service (XimfMailService)\r
+var XimfmailPrefFactory = new Object();\r
+\r
+XimfmailPrefFactory.createInstance =\r
+function (outer, iid) {\r
+ if (outer != null)\r
+ throw Components.results.NS_ERROR_NO_AGGREGATION;\r
+\r
+ if (!iid.equals(nsIMsgAccountManagerExtension) && !iid.equals(nsISupports))\r
+ throw Components.results.NS_ERROR_INVALID_ARG;\r
+\r
+ return new XimfmailPrefService();\r
+}\r
+\r
+var XimfmailPrefsModule = new Object();\r
+\r
+XimfmailPrefsModule.registerSelf =\r
+function (compMgr, fileSpec, location, type)\r
+{\r
+ dump("Registering Ximfmail account manager extension.\n");\r
+\r
+ compMgr = compMgr.QueryInterface(Components.interfaces.nsIComponentRegistrar);\r
+ compMgr.registerFactoryLocation(AM_XIMF_MAIL_EXTENSION_SERVICE_CID,\r
+ "Ximfmail Account Manager Extension Service",\r
+ AM_XIMF_MAIL_EXTENSION_SERVICE_CONTRACTID,\r
+ fileSpec,\r
+ location,\r
+ type);\r
+ catman = Components.classes["@mozilla.org/categorymanager;1"].getService(nsICategoryManager);\r
+ catman.addCategoryEntry("mailnews-accountmanager-extensions",\r
+ "ximfmail-accountmanager-extension",\r
+ AM_XIMF_MAIL_EXTENSION_SERVICE_CONTRACTID, true, true);\r
+ dump("Ximfmail account manager extension registered.\n");\r
+}\r
+\r
+XimfmailPrefsModule.unregisterSelf =\r
+function(compMgr, fileSpec, location)\r
+{\r
+ compMgr = compMgr.QueryInterface(Components.interfaces.nsIComponentRegistrar);\r
+ compMgr.unregisterFactoryLocation(AM_XIMF_MAIL_EXTENSION_SERVICE_CID, fileSpec);\r
+ catman = Components.classes["@mozilla.org/categorymanager;1"].getService(nsICategoryManager);\r
+ catman.deleteCategoryEntry("mailnews-accountmanager-extensions",\r
+ AM_XIMF_MAIL_EXTENSION_SERVICE_CONTRACTID, true);\r
+}\r
+\r
+XimfmailPrefsModule.getClassObject =\r
+function (compMgr, cid, iid) {\r
+ if (cid.equals(AM_XIMF_MAIL_EXTENSION_SERVICE_CID))\r
+ return XimfmailPrefFactory;\r
+\r
+\r
+ if (!iid.equals(Components.interfaces.nsIFactory))\r
+ throw Components.results.NS_ERROR_NOT_IMPLEMENTED;\r
+\r
+ throw Components.results.NS_ERROR_NO_INTERFACE; \r
+}\r
+\r
+XimfmailPrefsModule.canUnload =\r
+function(compMgr)\r
+{\r
+ return true;\r
+}\r
+\r
+// entrypoint\r
+function NSGetModule(compMgr, fileSpec) {\r
+ return XimfmailPrefsModule;\r
}
\ No newline at end of file