Bug 1562313 - Convert JavaScript components to use static registration in mailnews/. r=mkmelin
--HG-- rename : mailnews/addrbook/src/nsAbAutoCompleteMyDomain.js => mailnews/addrbook/src/AbAutoCompleteMyDomain.jsm rename : mailnews/addrbook/src/nsAbAutoCompleteSearch.js => mailnews/addrbook/src/AbAutoCompleteSearch.jsm rename : mailnews/addrbook/src/nsAbLDAPAttributeMap.js => mailnews/addrbook/src/AbLDAPAttributeMap.jsm rename : mailnews/addrbook/src/nsAbLDAPAutoCompleteSearch.js => mailnews/addrbook/src/AbLDAPAutoCompleteSearch.jsm rename : mailnews/base/search/src/nsMsgTraitService.js => mailnews/base/search/src/MsgTraitService.jsm rename : mailnews/base/src/folderLookupService.js => mailnews/base/src/FolderLookupService.jsm rename : mailnews/base/src/nsMailNewsCommandLineHandler.js => mailnews/base/src/MailNewsCommandLineHandler.jsm rename : mailnews/base/src/newMailNotificationService.js => mailnews/base/src/MailNotificationService.jsm rename : mailnews/base/src/msgAsyncPrompter.js => mailnews/base/src/MsgAsyncPrompter.jsm rename : mailnews/base/src/msgOAuth2Module.js => mailnews/base/src/OAuth2Module.jsm rename : mailnews/compose/src/nsSMTPProtocolHandler.js => mailnews/compose/src/SMTPProtocolHandler.jsm rename : mailnews/db/gloda/components/glautocomp.js => mailnews/db/gloda/components/GlodaAutoComplete.jsm rename : mailnews/db/gloda/components/jsmimeemitter.js => mailnews/db/gloda/components/MimeMessageEmitter.jsm rename : mailnews/extensions/dsn/src/dsn-service.js => mailnews/extensions/dsn/src/DSNService.jsm rename : mailnews/extensions/mdn/src/mdn-service.js => mailnews/extensions/mdn/src/MDNService.jsm rename : mailnews/extensions/newsblog/js/newsblog.js => mailnews/extensions/newsblog/content/NewsBlog.jsm rename : mailnews/extensions/offline-startup/js/offlineStartup.js => mailnews/extensions/offline-startup/OfflineStartup.jsm rename : mailnews/extensions/smime/src/smime-service.js => mailnews/extensions/smime/src/SMIMEService.jsm rename : mailnews/import/test/unit/resources/TestMailImporter.js => mailnews/import/test/unit/resources/TestMailImporter.jsm rename : mailnews/jsaccount/test/unit/resources/testJaMsgProtocolInfoComponent.js => mailnews/jsaccount/test/unit/resources/TestJaMsgProtocolInfoComponent.jsm rename : mailnews/mime/src/mimeJSComponents.js => mailnews/mime/src/MimeJSComponents.jsm rename : mailnews/news/src/nsNewsAutoCompleteSearch.js => mailnews/news/src/NewsAutoCompleteSearch.jsm
This commit is contained in:
Родитель
f2ccc4aa27
Коммит
2cd0230d32
|
@ -128,8 +128,6 @@
|
|||
[newsblog]
|
||||
@RESPATH@/chrome/newsblog@JAREXT@
|
||||
@RESPATH@/chrome/newsblog.manifest
|
||||
@RESPATH@/components/newsblog.js
|
||||
@RESPATH@/components/newsblog.manifest
|
||||
|
||||
[mail]
|
||||
#ifndef XP_UNIX
|
||||
|
@ -177,18 +175,10 @@
|
|||
@RESPATH@/components/EnterprisePolicies.js
|
||||
@RESPATH@/components/EnterprisePolicies.manifest
|
||||
@RESPATH@/components/EnterprisePoliciesContent.js
|
||||
@RESPATH@/components/folderLookupService.js
|
||||
; interfaces.manifest doesn't get packaged because it is dynamically
|
||||
; re-created at packaging time when linking the xpts that will actually
|
||||
; go into the package, so the test related interfaces aren't included.
|
||||
@RESPATH@/components/mimeJSComponents.js
|
||||
@RESPATH@/components/msgMime.manifest
|
||||
@RESPATH@/components/msgAsyncPrompter.js
|
||||
@RESPATH@/components/msgBase.manifest
|
||||
@RESPATH@/components/nsAddrbook.manifest
|
||||
@RESPATH@/components/nsMailNewsCommandLineHandler.js
|
||||
@RESPATH@/components/nsNewsAutoCompleteSearch.js
|
||||
@RESPATH@/components/nsNewsAutoCompleteSearch.manifest
|
||||
@RESPATH@/chrome/toolkit@JAREXT@
|
||||
@RESPATH@/chrome/toolkit.manifest
|
||||
@RESPATH@/chrome/comm@JAREXT@
|
||||
|
@ -215,15 +205,6 @@
|
|||
; Gloda
|
||||
@RESPATH@/chrome/gloda@JAREXT@
|
||||
@RESPATH@/chrome/gloda.manifest
|
||||
@RESPATH@/components/glautocomp.js
|
||||
@RESPATH@/components/gloda.manifest
|
||||
@RESPATH@/components/jsmimeemitter.js
|
||||
|
||||
; OAuth2 for mail
|
||||
@RESPATH@/components/msgOAuth2Module.js
|
||||
|
||||
; New message notification
|
||||
@RESPATH@/components/newMailNotificationService.js
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Mail Extensions (smime, etc.)
|
||||
|
@ -232,14 +213,6 @@
|
|||
@BINPATH@/MapiProxy.dll
|
||||
@BINPATH@/mozMapi32.dll
|
||||
#endif
|
||||
@RESPATH@/components/offlineStartup.js
|
||||
@RESPATH@/components/offlineStartup.manifest
|
||||
|
||||
|
||||
@RESPATH@/components/mdn-service.js
|
||||
@RESPATH@/components/mdn-service.manifest
|
||||
@RESPATH@/components/smime-service.js
|
||||
@RESPATH@/components/smime-service.manifest
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; instant messaging
|
||||
|
@ -322,9 +295,7 @@
|
|||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
; LDAP components
|
||||
@RESPATH@/components/nsAbLDAPAttributeMap.js
|
||||
#ifdef MOZ_LDAP_XPCOM
|
||||
@RESPATH@/components/nsAbLDAPAutoCompleteSearch.js
|
||||
@RESPATH@/components/nsLDAPProtocolHandler.js
|
||||
@RESPATH@/components/ldapComponents.manifest
|
||||
@BINPATH@/@DLL_PREFIX@ldap60@DLL_SUFFIX@
|
||||
|
@ -332,29 +303,17 @@
|
|||
@BINPATH@/@DLL_PREFIX@prldap60@DLL_SUFFIX@
|
||||
#endif
|
||||
|
||||
; Protocol/Content handling
|
||||
@RESPATH@/components/nsSMTPProtocolHandler.js
|
||||
@RESPATH@/components/nsSMTPProtocolHandler.manifest
|
||||
|
||||
; misson control, autoconfig
|
||||
#ifdef MOZ_PREF_EXTENSIONS
|
||||
@RESPATH@/defaults/autoconfig/prefcalls.js
|
||||
#endif
|
||||
|
||||
; Address Book autocomplete
|
||||
@RESPATH@/components/nsAbAutoCompleteMyDomain.js
|
||||
@RESPATH@/components/nsAbAutoCompleteSearch.js
|
||||
|
||||
; Windows Search integration
|
||||
; the module is included as part of the "Modules" rule
|
||||
#ifdef XP_WIN
|
||||
@BINPATH@/WSEnable.exe
|
||||
#endif
|
||||
|
||||
; Bayesian trait analysis
|
||||
@RESPATH@/components/nsMsgTraitService.js
|
||||
@RESPATH@/components/nsMsgTraitService.manifest
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Base Package Files
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
|
|
@ -2,17 +2,15 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
var EXPORTED_SYMBOLS = ["AbAutoCompleteMyDomain"];
|
||||
|
||||
var { MailServices } = ChromeUtils.import(
|
||||
"resource:///modules/MailServices.jsm"
|
||||
);
|
||||
var { XPCOMUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/XPCOMUtils.jsm"
|
||||
);
|
||||
|
||||
function nsAbAutoCompleteMyDomain() {}
|
||||
function AbAutoCompleteMyDomain() {}
|
||||
|
||||
nsAbAutoCompleteMyDomain.prototype = {
|
||||
classID: Components.ID("{5b259db2-e451-4de9-8a6f-cfba91402973}"),
|
||||
AbAutoCompleteMyDomain.prototype = {
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIAutoCompleteSearch]),
|
||||
|
||||
cachedIdKey: "",
|
||||
|
@ -69,6 +67,3 @@ nsAbAutoCompleteMyDomain.prototype = {
|
|||
|
||||
stopSearch() {},
|
||||
};
|
||||
|
||||
var components = [nsAbAutoCompleteMyDomain];
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory(components);
|
|
@ -2,6 +2,8 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
var EXPORTED_SYMBOLS = ["AbAutoCompleteSearch"];
|
||||
|
||||
var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
var { MailServices } = ChromeUtils.import(
|
||||
"resource:///modules/MailServices.jsm"
|
||||
|
@ -12,9 +14,6 @@ var {
|
|||
modelQueryHasUserValue,
|
||||
generateQueryURI,
|
||||
} = ChromeUtils.import("resource:///modules/ABQueryUtils.jsm");
|
||||
var { XPCOMUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/XPCOMUtils.jsm"
|
||||
);
|
||||
|
||||
var ACR = Ci.nsIAutoCompleteResult;
|
||||
var nsIAbAutoCompleteResult = Ci.nsIAbAutoCompleteResult;
|
||||
|
@ -90,12 +89,9 @@ nsAbAutoCompleteResult.prototype = {
|
|||
QueryInterface: ChromeUtils.generateQI([ACR, nsIAbAutoCompleteResult]),
|
||||
};
|
||||
|
||||
function nsAbAutoCompleteSearch() {}
|
||||
|
||||
nsAbAutoCompleteSearch.prototype = {
|
||||
// For component registration
|
||||
classID: Components.ID("2f946df9-114c-41fe-8899-81f10daf4f0c"),
|
||||
function AbAutoCompleteSearch() {}
|
||||
|
||||
AbAutoCompleteSearch.prototype = {
|
||||
// This is set from a preference,
|
||||
// 0 = no comment column, 1 = name of address book this card came from
|
||||
// Other numbers currently unused (hence default to zero)
|
||||
|
@ -516,8 +512,3 @@ nsAbAutoCompleteSearch.prototype = {
|
|||
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIAutoCompleteSearch]),
|
||||
};
|
||||
|
||||
// Module
|
||||
|
||||
var components = [nsAbAutoCompleteSearch];
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory(components);
|
|
@ -2,26 +2,16 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
var EXPORTED_SYMBOLS = ["AbLDAPAttributeMap", "AbLDAPAttributeMapService"];
|
||||
|
||||
var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
var { XPCOMUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/XPCOMUtils.jsm"
|
||||
);
|
||||
|
||||
var NS_ABLDAPATTRIBUTEMAP_CID = Components.ID(
|
||||
"{127b341a-bdda-4270-85e1-edff569a9b85}"
|
||||
);
|
||||
var NS_ABLDAPATTRIBUTEMAPSERVICE_CID = Components.ID(
|
||||
"{4ed7d5e1-8800-40da-9e78-c4f509d7ac5e}"
|
||||
);
|
||||
|
||||
function nsAbLDAPAttributeMap() {
|
||||
function AbLDAPAttributeMap() {
|
||||
this.mPropertyMap = {};
|
||||
this.mAttrMap = {};
|
||||
}
|
||||
|
||||
nsAbLDAPAttributeMap.prototype = {
|
||||
classID: NS_ABLDAPATTRIBUTEMAP_CID,
|
||||
|
||||
AbLDAPAttributeMap.prototype = {
|
||||
getAttributeList(aProperty) {
|
||||
if (!(aProperty in this.mPropertyMap)) {
|
||||
return null;
|
||||
|
@ -192,11 +182,9 @@ nsAbLDAPAttributeMap.prototype = {
|
|||
QueryInterface: ChromeUtils.generateQI([Ci.nsIAbLDAPAttributeMap]),
|
||||
};
|
||||
|
||||
function nsAbLDAPAttributeMapService() {}
|
||||
|
||||
nsAbLDAPAttributeMapService.prototype = {
|
||||
classID: NS_ABLDAPATTRIBUTEMAPSERVICE_CID,
|
||||
function AbLDAPAttributeMapService() {}
|
||||
|
||||
AbLDAPAttributeMapService.prototype = {
|
||||
mAttrMaps: {},
|
||||
|
||||
getMapForPrefBranch(aPrefBranchName) {
|
||||
|
@ -206,7 +194,7 @@ nsAbLDAPAttributeMapService.prototype = {
|
|||
}
|
||||
|
||||
// otherwise, try and create it
|
||||
var attrMap = new nsAbLDAPAttributeMap();
|
||||
var attrMap = new AbLDAPAttributeMap();
|
||||
attrMap.setFromPrefs("ldap_2.servers.default.attrmap");
|
||||
attrMap.setFromPrefs(aPrefBranchName + ".attrmap");
|
||||
|
||||
|
@ -219,8 +207,3 @@ nsAbLDAPAttributeMapService.prototype = {
|
|||
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIAbLDAPAttributeMapService]),
|
||||
};
|
||||
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory([
|
||||
nsAbLDAPAttributeMap,
|
||||
nsAbLDAPAttributeMapService,
|
||||
]);
|
|
@ -3,13 +3,12 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
var EXPORTED_SYMBOLS = ["AbLDAPAutoCompleteSearch"];
|
||||
|
||||
var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
var { MailServices } = ChromeUtils.import(
|
||||
"resource:///modules/MailServices.jsm"
|
||||
);
|
||||
var { XPCOMUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/XPCOMUtils.jsm"
|
||||
);
|
||||
|
||||
var ACR = Ci.nsIAutoCompleteResult;
|
||||
var nsIAbAutoCompleteResult = Ci.nsIAbAutoCompleteResult;
|
||||
|
@ -80,15 +79,12 @@ nsAbLDAPAutoCompleteResult.prototype = {
|
|||
QueryInterface: ChromeUtils.generateQI([ACR, nsIAbAutoCompleteResult]),
|
||||
};
|
||||
|
||||
function nsAbLDAPAutoCompleteSearch() {
|
||||
function AbLDAPAutoCompleteSearch() {
|
||||
Services.obs.addObserver(this, "quit-application");
|
||||
this._timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
|
||||
}
|
||||
|
||||
nsAbLDAPAutoCompleteSearch.prototype = {
|
||||
// For component registration
|
||||
classID: Components.ID("227e6482-fe9f-441f-9b7d-7b60375e7449"),
|
||||
|
||||
AbLDAPAutoCompleteSearch.prototype = {
|
||||
// A short-lived LDAP directory cache.
|
||||
// To avoid recreating components as the user completes, we maintain the most
|
||||
// recently used address book, nsAbLDAPDirectoryQuery and search context.
|
||||
|
@ -359,9 +355,3 @@ nsAbLDAPAutoCompleteSearch.prototype = {
|
|||
Ci.nsIAbDirSearchListener,
|
||||
]),
|
||||
};
|
||||
|
||||
// Module
|
||||
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory([
|
||||
nsAbLDAPAutoCompleteSearch,
|
||||
]);
|
|
@ -0,0 +1,38 @@
|
|||
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
Classes = [
|
||||
{
|
||||
'cid': '{5b259db2-e451-4de9-8a6f-cfba91402973}',
|
||||
'contract_ids': ['@mozilla.org/autocomplete/search;1?name=mydomain'],
|
||||
'jsm': 'resource:///modules/AbAutoCompleteMyDomain.jsm',
|
||||
'constructor': 'AbAutoCompleteMyDomain',
|
||||
},
|
||||
{
|
||||
'cid': '{2f946df9-114c-41fe-8899-81f10daf4f0c}',
|
||||
'contract_ids': ['@mozilla.org/autocomplete/search;1?name=addrbook'],
|
||||
'jsm': 'resource:///modules/AbAutoCompleteSearch.jsm',
|
||||
'constructor': 'AbAutoCompleteSearch',
|
||||
},
|
||||
{
|
||||
'cid': '{127b341a-bdda-4270-85e1-edff569a9b85}',
|
||||
'contract_ids': ['@mozilla.org/addressbook/ldap-attribute-map;1'],
|
||||
'jsm': 'resource:///modules/AbLDAPAttributeMap.jsm',
|
||||
'constructor': 'AbLDAPAttributeMap',
|
||||
},
|
||||
{
|
||||
'cid': '{4ed7d5e1-8800-40da-9e78-c4f509d7ac5e}',
|
||||
'contract_ids': ['@mozilla.org/addressbook/ldap-attribute-map-service;1'],
|
||||
'jsm': 'resource:///modules/AbLDAPAttributeMap.jsm',
|
||||
'constructor': 'AbLDAPAttributeMapService',
|
||||
},
|
||||
{
|
||||
'cid': '{227e6482-fe9f-441f-9b7d-7b60375e7449}',
|
||||
'contract_ids': ['@mozilla.org/autocomplete/search;1?name=ldap'],
|
||||
'jsm': 'resource:///modules/AbLDAPAutoCompleteSearch.jsm',
|
||||
'constructor': 'AbLDAPAutoCompleteSearch',
|
||||
},
|
||||
]
|
|
@ -74,20 +74,20 @@ if CONFIG['MOZ_LDAP_XPCOM']:
|
|||
# nsAbLDAPChangeLogQuery.cpp
|
||||
# nsAbLDAPChangeLogData.cpp
|
||||
|
||||
EXTRA_COMPONENTS += [
|
||||
'nsAbLDAPAutoCompleteSearch.js',
|
||||
EXTRA_JS_MODULES += [
|
||||
'AbLDAPAutoCompleteSearch.jsm',
|
||||
]
|
||||
|
||||
DEFINES['MOZ_LDAP_XPCOM'] = True
|
||||
|
||||
EXTRA_COMPONENTS += [
|
||||
'nsAbAutoCompleteMyDomain.js',
|
||||
'nsAbAutoCompleteSearch.js',
|
||||
'nsAbLDAPAttributeMap.js',
|
||||
]
|
||||
|
||||
EXTRA_PP_COMPONENTS += [
|
||||
'nsAddrbook.manifest',
|
||||
EXTRA_JS_MODULES += [
|
||||
'AbAutoCompleteMyDomain.jsm',
|
||||
'AbAutoCompleteSearch.jsm',
|
||||
'AbLDAPAttributeMap.jsm',
|
||||
]
|
||||
|
||||
FINAL_LIBRARY = 'mail'
|
||||
|
||||
XPCOM_MANIFESTS += [
|
||||
'components.conf',
|
||||
]
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
component {5b259db2-e451-4de9-8a6f-cfba91402973} nsAbAutoCompleteMyDomain.js
|
||||
contract @mozilla.org/autocomplete/search;1?name=mydomain {5b259db2-e451-4de9-8a6f-cfba91402973}
|
||||
component {2f946df9-114c-41fe-8899-81f10daf4f0c} nsAbAutoCompleteSearch.js
|
||||
contract @mozilla.org/autocomplete/search;1?name=addrbook {2f946df9-114c-41fe-8899-81f10daf4f0c}
|
||||
component {127b341a-bdda-4270-85e1-edff569a9b85} nsAbLDAPAttributeMap.js
|
||||
contract @mozilla.org/addressbook/ldap-attribute-map;1 {127b341a-bdda-4270-85e1-edff569a9b85}
|
||||
component {4ed7d5e1-8800-40da-9e78-c4f509d7ac5e} nsAbLDAPAttributeMap.js
|
||||
contract @mozilla.org/addressbook/ldap-attribute-map-service;1 {4ed7d5e1-8800-40da-9e78-c4f509d7ac5e}
|
||||
#ifdef MOZ_LDAP_XPCOM
|
||||
component {227e6482-fe9f-441f-9b7d-7b60375e7449} nsAbLDAPAutoCompleteSearch.js
|
||||
contract @mozilla.org/autocomplete/search;1?name=ldap {227e6482-fe9f-441f-9b7d-7b60375e7449}
|
||||
#endif
|
|
@ -2,10 +2,9 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
var EXPORTED_SYMBOLS = ["MsgTraitService"];
|
||||
|
||||
var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
var { XPCOMUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/XPCOMUtils.jsm"
|
||||
);
|
||||
|
||||
// local static variables
|
||||
|
||||
|
@ -23,12 +22,10 @@ function _registerTrait(aId, aIndex) {
|
|||
_traits[aId] = trait;
|
||||
}
|
||||
|
||||
function nsMsgTraitService() {}
|
||||
function MsgTraitService() {}
|
||||
|
||||
nsMsgTraitService.prototype = {
|
||||
MsgTraitService.prototype = {
|
||||
// Component setup
|
||||
classID: Components.ID("{A2E95F4F-DA72-4a41-9493-661AD353C00A}"),
|
||||
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIMsgTraitService]),
|
||||
|
||||
// nsIMsgTraitService implementation
|
||||
|
@ -203,6 +200,3 @@ function _init() {
|
|||
// dump("\nindex of " + traitId + " is " + _traits[traitId].index);
|
||||
// dump("\n");
|
||||
}
|
||||
|
||||
var components = [nsMsgTraitService];
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory(components);
|
|
@ -0,0 +1,14 @@
|
|||
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
Classes = [
|
||||
{
|
||||
'cid': '{A2E95F4F-DA72-4a41-9493-661AD353C00A}',
|
||||
'contract_ids': ['@mozilla.org/msg-trait-service;1'],
|
||||
'jsm': 'resource:///modules/MsgTraitService.jsm',
|
||||
'constructor': 'MsgTraitService',
|
||||
},
|
||||
]
|
|
@ -17,13 +17,13 @@ SOURCES += [
|
|||
'nsMsgSearchValue.cpp',
|
||||
]
|
||||
|
||||
EXTRA_COMPONENTS += [
|
||||
'nsMsgTraitService.js',
|
||||
'nsMsgTraitService.manifest',
|
||||
EXTRA_JS_MODULES += [
|
||||
'MsgTraitService.jsm',
|
||||
'PeriodicFilterManager.jsm',
|
||||
]
|
||||
|
||||
EXTRA_JS_MODULES += [
|
||||
'PeriodicFilterManager.jsm',
|
||||
XPCOM_MANIFESTS += [
|
||||
'components.conf',
|
||||
]
|
||||
|
||||
FINAL_LIBRARY = 'mail'
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
component {A2E95F4F-DA72-4a41-9493-661AD353C00A} nsMsgTraitService.js
|
||||
contract @mozilla.org/msg-trait-service;1 {A2E95F4F-DA72-4a41-9493-661AD353C00A}
|
|
@ -8,19 +8,17 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
var { XPCOMUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/XPCOMUtils.jsm"
|
||||
);
|
||||
var EXPORTED_SYMBOLS = ["FolderLookupService"];
|
||||
|
||||
// This ensures that the service is only created once.
|
||||
var gCreated = false;
|
||||
|
||||
/**
|
||||
* folderLookupService maintains an index of folders and provides
|
||||
* FolderLookupService maintains an index of folders and provides
|
||||
* lookup by folder URI.
|
||||
* @class
|
||||
*/
|
||||
function folderLookupService() {
|
||||
function FolderLookupService() {
|
||||
if (gCreated) {
|
||||
throw Cr.NS_ERROR_ALREADY_INITIALIZED;
|
||||
}
|
||||
|
@ -28,9 +26,8 @@ function folderLookupService() {
|
|||
gCreated = true;
|
||||
}
|
||||
|
||||
folderLookupService.prototype = {
|
||||
FolderLookupService.prototype = {
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIFolderLookupService]),
|
||||
classID: Components.ID("{a30be08c-afc8-4fed-9af7-79778a23db23}"),
|
||||
|
||||
/**
|
||||
* Fetch the folder corresponding to the given URI.
|
||||
|
@ -146,5 +143,3 @@ folderLookupService.prototype = {
|
|||
}
|
||||
},
|
||||
};
|
||||
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory([folderLookupService]);
|
|
@ -2,10 +2,9 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
var EXPORTED_SYMBOLS = ["MailNewsCommandLineHandler"];
|
||||
|
||||
var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
var { XPCOMUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/XPCOMUtils.jsm"
|
||||
);
|
||||
var { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
);
|
||||
|
@ -13,13 +12,8 @@ var { AppConstants } = ChromeUtils.import(
|
|||
var MAPI_STARTUP_ARG = "MapiStartup";
|
||||
var MESSAGE_ID_PARAM = "?messageid=";
|
||||
|
||||
var CMDLINEHANDLER_CID = Components.ID(
|
||||
"{2f86d554-f9d9-4e76-8eb7-243f047333ee}"
|
||||
);
|
||||
var CMDLINEHANDLER_CONTRACTID =
|
||||
"@mozilla.org/commandlinehandler/general-startup;1?type=mail";
|
||||
|
||||
var nsMailNewsCommandLineHandler = {
|
||||
function MailNewsCommandLineHandler() {}
|
||||
MailNewsCommandLineHandler.prototype = {
|
||||
get _messenger() {
|
||||
delete this._messenger;
|
||||
return (this._messenger = Cc["@mozilla.org/messenger;1"].createInstance(
|
||||
|
@ -163,18 +157,6 @@ var nsMailNewsCommandLineHandler = {
|
|||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.nsICommandLineHandler,
|
||||
Ci.nsIFactory,
|
||||
Ci.nsIModule,
|
||||
]),
|
||||
};
|
||||
|
||||
function mailNewsCommandLineHandlerModule() {}
|
||||
mailNewsCommandLineHandlerModule.prototype = {
|
||||
// XPCOM registration
|
||||
classID: CMDLINEHANDLER_CID,
|
||||
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIModule]),
|
||||
|
||||
_xpcom_factory: nsMailNewsCommandLineHandler,
|
||||
};
|
||||
|
||||
var components = [mailNewsCommandLineHandlerModule];
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory(components);
|
|
@ -12,6 +12,8 @@
|
|||
* "mail.notification.logging.dump" (for stderr) to the string indicating the level you want.
|
||||
*/
|
||||
|
||||
var EXPORTED_SYMBOLS = ["NewMailNotificationService"];
|
||||
|
||||
var { Log4Moz } = ChromeUtils.import("resource:///modules/gloda/log4moz.js");
|
||||
var { fixIterator } = ChromeUtils.import(
|
||||
"resource:///modules/iteratorUtils.jsm"
|
||||
|
@ -20,9 +22,6 @@ var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
|||
var { MailServices } = ChromeUtils.import(
|
||||
"resource:///modules/MailServices.jsm"
|
||||
);
|
||||
var { XPCOMUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/XPCOMUtils.jsm"
|
||||
);
|
||||
|
||||
var NMNS = Ci.mozINewMailNotificationService;
|
||||
|
||||
|
@ -60,17 +59,11 @@ function NewMailNotificationService() {
|
|||
}
|
||||
|
||||
NewMailNotificationService.prototype = {
|
||||
classDescription: "Maintain counts of new and unread messages",
|
||||
classID: Components.ID("{740880E6-E299-4165-B82F-DF1DCAB3AE22}"),
|
||||
contractID: "@mozilla.org/newMailNotificationService;1",
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.nsIObserver,
|
||||
Ci.nsIFolderListener,
|
||||
Ci.mozINewMailNotificationService,
|
||||
]),
|
||||
_xpcom_factory: XPCOMUtils.generateSingletonFactory(
|
||||
NewMailNotificationService
|
||||
),
|
||||
|
||||
_mUnreadCount: 0,
|
||||
_mNewCount: 0,
|
||||
|
@ -500,7 +493,3 @@ NewMailNotificationService.prototype = {
|
|||
}
|
||||
},
|
||||
};
|
||||
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory([
|
||||
NewMailNotificationService,
|
||||
]);
|
|
@ -2,13 +2,12 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
var EXPORTED_SYMBOLS = ["MsgAsyncPrompter"];
|
||||
|
||||
var { Deprecated } = ChromeUtils.import(
|
||||
"resource://gre/modules/Deprecated.jsm"
|
||||
);
|
||||
var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
var { XPCOMUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/XPCOMUtils.jsm"
|
||||
);
|
||||
var { Log4Moz } = ChromeUtils.import("resource:///modules/gloda/log4moz.js");
|
||||
|
||||
function runnablePrompter(asyncPrompter, hashKey) {
|
||||
|
@ -79,7 +78,7 @@ runnablePrompter.prototype = {
|
|||
},
|
||||
};
|
||||
|
||||
function msgAsyncPrompter() {
|
||||
function MsgAsyncPrompter() {
|
||||
this._pendingPrompts = {};
|
||||
// By default, only log warnings to the error console and errors to dump().
|
||||
// You can use the preferences:
|
||||
|
@ -94,8 +93,7 @@ function msgAsyncPrompter() {
|
|||
);
|
||||
}
|
||||
|
||||
msgAsyncPrompter.prototype = {
|
||||
classID: Components.ID("{49b04761-23dd-45d7-903d-619418a4d319}"),
|
||||
MsgAsyncPrompter.prototype = {
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIMsgAsyncPrompter]),
|
||||
|
||||
_pendingPrompts: null,
|
||||
|
@ -156,6 +154,3 @@ msgAsyncPrompter.prototype = {
|
|||
Services.tm.mainThread.dispatch(runnable, Ci.nsIThread.DISPATCH_NORMAL);
|
||||
},
|
||||
};
|
||||
|
||||
var components = [msgAsyncPrompter];
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory(components);
|
|
@ -4,14 +4,13 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
var EXPORTED_SYMBOLS = ["OAuth2Module"];
|
||||
|
||||
var { OAuth2 } = ChromeUtils.import("resource:///modules/OAuth2.jsm");
|
||||
var { OAuth2Providers } = ChromeUtils.import(
|
||||
"resource:///modules/OAuth2Providers.jsm"
|
||||
);
|
||||
var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
var { XPCOMUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/XPCOMUtils.jsm"
|
||||
);
|
||||
|
||||
function OAuth2Module() {
|
||||
this._refreshToken = "";
|
||||
|
@ -19,7 +18,6 @@ function OAuth2Module() {
|
|||
OAuth2Module.prototype = {
|
||||
// XPCOM registration stuff
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.msgIOAuth2Module]),
|
||||
classID: Components.ID("{b63d8e4c-bf60-439b-be0e-7c9f67291042}"),
|
||||
|
||||
_loadOAuthClientDetails(aIssuer) {
|
||||
let details = OAuth2Providers.getIssuerDetails(aIssuer);
|
||||
|
@ -192,5 +190,3 @@ OAuth2Module.prototype = {
|
|||
asyncprompter.queueAsyncAuthPrompt(promptkey, false, promptlistener);
|
||||
},
|
||||
};
|
||||
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory([OAuth2Module]);
|
|
@ -0,0 +1,40 @@
|
|||
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
Classes = [
|
||||
{
|
||||
'cid': '{a30be08c-afc8-4fed-9af7-79778a23db23}',
|
||||
'contract_ids': ['@mozilla.org/mail/folder-lookup;1'],
|
||||
'jsm': 'resource:///modules/FolderLookupService.jsm',
|
||||
'constructor': 'FolderLookupService',
|
||||
},
|
||||
{
|
||||
'cid': '{49b04761-23dd-45d7-903d-619418a4d319}',
|
||||
'contract_ids': ['@mozilla.org/messenger/msgAsyncPrompter;1'],
|
||||
'jsm': 'resource:///modules/MsgAsyncPrompter.jsm',
|
||||
'constructor': 'MsgAsyncPrompter',
|
||||
},
|
||||
{
|
||||
'cid': '{b63d8e4c-bf60-439b-be0e-7c9f67291042}',
|
||||
'contract_ids': ['@mozilla.org/mail/oauth2-module;1'],
|
||||
'jsm': 'resource:///modules/OAuth2Module.jsm',
|
||||
'constructor': 'OAuth2Module',
|
||||
},
|
||||
{
|
||||
'cid': '{740880E6-E299-4165-B82F-DF1DCAB3AE22}',
|
||||
'contract_ids': ['@mozilla.org/newMailNotificationService;1'],
|
||||
'jsm': 'resource:///modules/MailNotificationService.jsm',
|
||||
'constructor': 'NewMailNotificationService',
|
||||
'categories': {'profile-after-change': 'NewMailNotificationService'},
|
||||
},
|
||||
{
|
||||
'cid': '{2f86d554-f9d9-4e76-8eb7-243f047333ee}',
|
||||
'contract_ids': ['@mozilla.org/commandlinehandler/general-startup;1?type=mail'],
|
||||
'jsm': 'resource:///modules/MailNewsCommandLineHandler.jsm',
|
||||
'constructor': 'MailNewsCommandLineHandler',
|
||||
'categories': {'command-line-handler': 'm-mail'},
|
||||
},
|
||||
]
|
|
@ -57,16 +57,12 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk':
|
|||
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
|
||||
SOURCES += ['nsMessengerOSXIntegration.mm']
|
||||
|
||||
EXTRA_COMPONENTS += [
|
||||
'folderLookupService.js',
|
||||
'msgAsyncPrompter.js',
|
||||
'msgBase.manifest',
|
||||
'msgOAuth2Module.js',
|
||||
'newMailNotificationService.js',
|
||||
'nsMailNewsCommandLineHandler.js',
|
||||
]
|
||||
|
||||
EXTRA_JS_MODULES += [
|
||||
'FolderLookupService.jsm',
|
||||
'MailNewsCommandLineHandler.jsm',
|
||||
'MailNotificationService.jsm',
|
||||
'MsgAsyncPrompter.jsm',
|
||||
'OAuth2Module.jsm',
|
||||
'virtualFolderWrapper.js',
|
||||
]
|
||||
LOCAL_INCLUDES += [
|
||||
|
@ -77,3 +73,6 @@ include('/ipc/chromium/chromium-config.mozbuild')
|
|||
|
||||
FINAL_LIBRARY = 'mail'
|
||||
|
||||
XPCOM_MANIFESTS += [
|
||||
'components.conf',
|
||||
]
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
component {49b04761-23dd-45d7-903d-619418a4d319} msgAsyncPrompter.js
|
||||
contract @mozilla.org/messenger/msgAsyncPrompter;1 {49b04761-23dd-45d7-903d-619418a4d319}
|
||||
component {2f86d554-f9d9-4e76-8eb7-243f047333ee} nsMailNewsCommandLineHandler.js
|
||||
contract @mozilla.org/commandlinehandler/general-startup;1?type=mail {2f86d554-f9d9-4e76-8eb7-243f047333ee}
|
||||
category command-line-handler m-mail @mozilla.org/commandlinehandler/general-startup;1?type=mail
|
||||
component {740880E6-E299-4165-B82F-DF1DCAB3AE22} newMailNotificationService.js
|
||||
contract @mozilla.org/newMailNotificationService;1 {740880E6-E299-4165-B82F-DF1DCAB3AE22}
|
||||
category profile-after-change NewMailNotificationService @mozilla.org/newMailNotificationService;1
|
||||
component {a30be08c-afc8-4fed-9af7-79778a23db23} folderLookupService.js
|
||||
contract @mozilla.org/mail/folder-lookup;1 {a30be08c-afc8-4fed-9af7-79778a23db23}
|
||||
component {b63d8e4c-bf60-439b-be0e-7c9f67291042} msgOAuth2Module.js
|
||||
contract @mozilla.org/mail/oauth2-module;1 {b63d8e4c-bf60-439b-be0e-7c9f67291042}
|
|
@ -2,16 +2,12 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
var { XPCOMUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/XPCOMUtils.jsm"
|
||||
);
|
||||
var EXPORTED_SYMBOLS = ["SMTPProtocolHandler", "SMTPSProtocolHandler"];
|
||||
|
||||
var kNetworkProtocolCIDPrefix = "@mozilla.org/network/protocol;1?name=";
|
||||
var nsIProtocolHandler = Ci.nsIProtocolHandler;
|
||||
|
||||
function makeProtocolHandler(aProtocol, aDefaultPort, aClassID) {
|
||||
return {
|
||||
classID: Components.ID(aClassID),
|
||||
QueryInterface: ChromeUtils.generateQI([nsIProtocolHandler]),
|
||||
|
||||
scheme: aProtocol,
|
||||
|
@ -33,21 +29,18 @@ function makeProtocolHandler(aProtocol, aDefaultPort, aClassID) {
|
|||
};
|
||||
}
|
||||
|
||||
function nsSMTPProtocolHandler() {}
|
||||
function SMTPProtocolHandler() {}
|
||||
|
||||
nsSMTPProtocolHandler.prototype = makeProtocolHandler(
|
||||
SMTPProtocolHandler.prototype = makeProtocolHandler(
|
||||
"smtp",
|
||||
Ci.nsISmtpUrl.DEFAULT_SMTP_PORT,
|
||||
"b14c2b67-8680-4c11-8d63-9403c7d4f757"
|
||||
);
|
||||
|
||||
function nsSMTPSProtocolHandler() {}
|
||||
function SMTPSProtocolHandler() {}
|
||||
|
||||
nsSMTPSProtocolHandler.prototype = makeProtocolHandler(
|
||||
SMTPSProtocolHandler.prototype = makeProtocolHandler(
|
||||
"smtps",
|
||||
Ci.nsISmtpUrl.DEFAULT_SMTPS_PORT,
|
||||
"057d0997-9e3a-411e-b4ee-2602f53fe05f"
|
||||
);
|
||||
|
||||
var components = [nsSMTPProtocolHandler, nsSMTPSProtocolHandler];
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory(components);
|
|
@ -0,0 +1,20 @@
|
|||
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
Classes = [
|
||||
{
|
||||
'cid': '{b14c2b67-8680-4c11-8d63-9403c7d4f757}',
|
||||
'contract_ids': ['@mozilla.org/network/protocol;1?name=smtp'],
|
||||
'jsm': 'resource:///modules/SMTPProtocolHandler.jsm',
|
||||
'constructor': 'SMTPProtocolHandler',
|
||||
},
|
||||
{
|
||||
'cid': '{057d0997-9e3a-411e-b4ee-2602f53fe05f}',
|
||||
'contract_ids': ['@mozilla.org/network/protocol;1?name=smtps'],
|
||||
'jsm': 'resource:///modules/SMTPProtocolHandler.jsm',
|
||||
'constructor': 'SMTPSProtocolHandler',
|
||||
},
|
||||
]
|
|
@ -46,11 +46,6 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
|
|||
'nsMsgAppleDouble.h',
|
||||
]
|
||||
|
||||
EXTRA_COMPONENTS += [
|
||||
'nsSMTPProtocolHandler.js',
|
||||
'nsSMTPProtocolHandler.manifest',
|
||||
]
|
||||
|
||||
LOCAL_INCLUDES += [
|
||||
'/%s/dom/base' % CONFIG['mozreltopsrcdir'],
|
||||
]
|
||||
|
@ -60,3 +55,11 @@ FINAL_LIBRARY = 'mail'
|
|||
# clang-cl rightly complains about switch on nsresult.
|
||||
if CONFIG['CC_TYPE'] == 'clang-cl':
|
||||
CXXFLAGS += ['-Wno-switch']
|
||||
|
||||
EXTRA_JS_MODULES += [
|
||||
'SMTPProtocolHandler.jsm',
|
||||
]
|
||||
|
||||
XPCOM_MANIFESTS += [
|
||||
'components.conf',
|
||||
]
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
component {b14c2b67-8680-4c11-8d63-9403c7d4f757} nsSMTPProtocolHandler.js
|
||||
contract @mozilla.org/network/protocol;1?name=smtp {b14c2b67-8680-4c11-8d63-9403c7d4f757}
|
||||
component {057d0997-9e3a-411e-b4ee-2602f53fe05f} nsSMTPProtocolHandler.js
|
||||
contract @mozilla.org/network/protocol;1?name=smtps {057d0997-9e3a-411e-b4ee-2602f53fe05f}
|
|
@ -9,13 +9,13 @@
|
|||
* gloda-fulltext-all-richlistitem, gloda-fulltext-single-richlistitem, gloda-multi-richlistitem,
|
||||
* gloda-single-identity-richlistitem, gloda-single-tag-richlistitem.
|
||||
*/
|
||||
var { XPCOMUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/XPCOMUtils.jsm"
|
||||
);
|
||||
|
||||
var EXPORTED_SYMBOLS = ["GlodaAutoComplete"];
|
||||
|
||||
var { logException } = ChromeUtils.import("resource:///modules/errUtils.js");
|
||||
|
||||
var Gloda = null;
|
||||
var GlodaUtils = null;
|
||||
var GlodaUtils = null; // eslint-disable-line no-unused-vars
|
||||
var MultiSuffixTree = null;
|
||||
var TagNoun = null;
|
||||
var FreeTagNoun = null;
|
||||
|
@ -506,9 +506,9 @@ FullTextCompleter.prototype = {
|
|||
},
|
||||
};
|
||||
|
||||
var LOG;
|
||||
var LOG; // eslint-disable-line no-unused-vars
|
||||
|
||||
function nsAutoCompleteGloda() {
|
||||
function GlodaAutoComplete() {
|
||||
this.wrappedJSObject = this;
|
||||
try {
|
||||
// set up our awesome globals!
|
||||
|
@ -541,8 +541,7 @@ function nsAutoCompleteGloda() {
|
|||
}
|
||||
}
|
||||
|
||||
nsAutoCompleteGloda.prototype = {
|
||||
classID: Components.ID("{3bbe4d77-3f70-4252-9500-bc00c26f476d}"),
|
||||
GlodaAutoComplete.prototype = {
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIAutoCompleteSearch]),
|
||||
|
||||
startSearch(aString, aParam, aResult, aListener) {
|
||||
|
@ -579,6 +578,3 @@ nsAutoCompleteGloda.prototype = {
|
|||
this.curResult.active = false;
|
||||
},
|
||||
};
|
||||
|
||||
var components = [nsAutoCompleteGloda];
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory(components);
|
|
@ -2,9 +2,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
var { XPCOMUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/XPCOMUtils.jsm"
|
||||
);
|
||||
var EXPORTED_SYMBOLS = ["MimeMessageEmitter"];
|
||||
|
||||
var kStateUnknown = 0;
|
||||
var kStateInHeaders = 1;
|
||||
|
@ -68,8 +66,6 @@ function MimeMessageEmitter() {
|
|||
var deathToNewlines = /\n/g;
|
||||
|
||||
MimeMessageEmitter.prototype = {
|
||||
classID: Components.ID("{8cddbbbc-7ced-46b0-a936-8cddd1928c24}"),
|
||||
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIMimeEmitter]),
|
||||
|
||||
initialize(aUrl, aChannel, aFormat) {
|
||||
|
@ -503,6 +499,3 @@ MimeMessageEmitter.prototype = {
|
|||
this.write(aBuf, aBuf.length, {});
|
||||
},
|
||||
};
|
||||
|
||||
var components = [MimeMessageEmitter];
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory(components);
|
|
@ -0,0 +1,21 @@
|
|||
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
Classes = [
|
||||
{
|
||||
'cid': '{3bbe4d77-3f70-4252-9500-bc00c26f476d}',
|
||||
'contract_ids': ['@mozilla.org/autocomplete/search;1?name=gloda'],
|
||||
'jsm': 'resource:///modules/GlodaAutoComplete.jsm',
|
||||
'constructor': 'GlodaAutoComplete',
|
||||
},
|
||||
{
|
||||
'cid': '{8cddbbbc-7ced-46b0-a936-8cddd1928c24}',
|
||||
'contract_ids': ['@mozilla.org/gloda/jsmimeemitter;1',],
|
||||
'jsm': 'resource:///modules/MimeMessageEmitter.jsm',
|
||||
'constructor': 'MimeMessageEmitter',
|
||||
'categories': {'mime-emitter': '@mozilla.org/messenger/mimeemitter;1?type=application/x-js-mime-message'},
|
||||
},
|
||||
]
|
|
@ -1,5 +0,0 @@
|
|||
component {3bbe4d77-3f70-4252-9500-bc00c26f476d} glautocomp.js
|
||||
contract @mozilla.org/autocomplete/search;1?name=gloda {3bbe4d77-3f70-4252-9500-bc00c26f476d}
|
||||
component {8cddbbbc-7ced-46b0-a936-8cddd1928c24} jsmimeemitter.js
|
||||
contract @mozilla.org/gloda/jsmimeemitter;1 {8cddbbbc-7ced-46b0-a936-8cddd1928c24}
|
||||
category mime-emitter @mozilla.org/messenger/mimeemitter;1?type=application/x-js-mime-message @mozilla.org/gloda/jsmimeemitter;1
|
|
@ -3,9 +3,11 @@
|
|||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
EXTRA_COMPONENTS += [
|
||||
'glautocomp.js',
|
||||
'gloda.manifest',
|
||||
'jsmimeemitter.js',
|
||||
EXTRA_JS_MODULES += [
|
||||
'GlodaAutoComplete.jsm',
|
||||
'MimeMessageEmitter.jsm',
|
||||
]
|
||||
|
||||
XPCOM_MANIFESTS += [
|
||||
'components.conf',
|
||||
]
|
||||
|
|
|
@ -3,9 +3,12 @@
|
|||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
EXTRA_COMPONENTS += [
|
||||
'src/dsn-service.js',
|
||||
'src/dsn-service.manifest',
|
||||
EXTRA_JS_MODULES += [
|
||||
'src/DSNService.jsm',
|
||||
]
|
||||
|
||||
XPCOM_MANIFESTS += [
|
||||
'src/components.conf',
|
||||
]
|
||||
|
||||
JAR_MANIFESTS += ['jar.mn']
|
||||
|
|
|
@ -3,9 +3,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
var { XPCOMUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/XPCOMUtils.jsm"
|
||||
);
|
||||
var EXPORTED_SYMBOLS = ["DSNService"];
|
||||
|
||||
function DSNService() {}
|
||||
|
||||
|
@ -20,8 +18,4 @@ DSNService.prototype = {
|
|||
},
|
||||
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIMsgAccountManagerExtension]),
|
||||
classID: Components.ID("{849dab91-9bc9-4508-a0ee-c2453e7c092d}"),
|
||||
};
|
||||
|
||||
var components = [DSNService];
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory(components);
|
|
@ -0,0 +1,15 @@
|
|||
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
Classes = [
|
||||
{
|
||||
'cid': '{849dab91-9bc9-4508-a0ee-c2453e7c092d}',
|
||||
'contract_ids': ['@mozilla.org/accountmanager/extension;1?name=dsn'],
|
||||
'jsm': 'resource:///modules/DSNService.jsm',
|
||||
'constructor': 'DSNService',
|
||||
'categories': {'mailnews-accountmanager-extensions': 'dsn-account-manager-extension'},
|
||||
},
|
||||
]
|
|
@ -1,3 +0,0 @@
|
|||
component {849dab91-9bc9-4508-a0ee-c2453e7c092d} dsn-service.js
|
||||
contract @mozilla.org/accountmanager/extension;1?name=dsn {849dab91-9bc9-4508-a0ee-c2453e7c092d}
|
||||
category mailnews-accountmanager-extensions dsn-account-manager-extension @mozilla.org/accountmanager/extension;1?name=dsn
|
|
@ -3,9 +3,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
var { XPCOMUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/XPCOMUtils.jsm"
|
||||
);
|
||||
var EXPORTED_SYMBOLS = ["MDNService"];
|
||||
|
||||
function MDNService() {}
|
||||
|
||||
|
@ -23,8 +21,4 @@ MDNService.prototype = {
|
|||
},
|
||||
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIMsgAccountManagerExtension]),
|
||||
classID: Components.ID("{e007d92e-1dd1-11b2-a61e-dc962c9b8571}"),
|
||||
};
|
||||
|
||||
var components = [MDNService];
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory(components);
|
|
@ -0,0 +1,15 @@
|
|||
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
Classes = [
|
||||
{
|
||||
'cid': '{e007d92e-1dd1-11b2-a61e-dc962c9b8571}',
|
||||
'contract_ids': ['@mozilla.org/accountmanager/extension;1?name=mdn'],
|
||||
'jsm': 'resource:///modules/MDNService.jsm',
|
||||
'constructor': 'MDNService',
|
||||
'categories': {'mailnews-accountmanager-extensions': 'mdn-account-manager-extension'},
|
||||
},
|
||||
]
|
|
@ -1,3 +0,0 @@
|
|||
component {e007d92e-1dd1-11b2-a61e-dc962c9b8571} mdn-service.js
|
||||
contract @mozilla.org/accountmanager/extension;1?name=mdn {e007d92e-1dd1-11b2-a61e-dc962c9b8571}
|
||||
category mailnews-accountmanager-extensions mdn-account-manager-extension @mozilla.org/accountmanager/extension;1?name=mdn
|
|
@ -7,9 +7,12 @@ SOURCES += [
|
|||
'nsMsgMdnGenerator.cpp',
|
||||
]
|
||||
|
||||
EXTRA_COMPONENTS += [
|
||||
'mdn-service.js',
|
||||
'mdn-service.manifest',
|
||||
EXTRA_JS_MODULES += [
|
||||
'MDNService.jsm',
|
||||
]
|
||||
|
||||
XPCOM_MANIFESTS += [
|
||||
'components.conf',
|
||||
]
|
||||
|
||||
FINAL_LIBRARY = 'mail'
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
Classes = [
|
||||
{
|
||||
'cid': '{5c124537-adca-4456-b2b5-641ab687d1f6}',
|
||||
'contract_ids': ['@mozilla.org/newsblog-feed-downloader;1'],
|
||||
'jsm': 'resource:///modules/NewsBlog.jsm',
|
||||
'constructor': 'FeedDownloader',
|
||||
},
|
||||
{
|
||||
'cid': '{E109C05F-D304-4ca5-8C44-6DE1BFAF1F74}',
|
||||
'contract_ids': ['@mozilla.org/accountmanager/extension;1?name=newsblog'],
|
||||
'jsm': 'resource:///modules/NewsBlog.jsm',
|
||||
'constructor': 'FeedAcctMgrExtension',
|
||||
'categories': {'mailnews-accountmanager-extensions': 'newsblog'},
|
||||
},
|
||||
]
|
|
@ -3,10 +3,9 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
var EXPORTED_SYMBOLS = ["FeedDownloader", "FeedAcctMgrExtension"];
|
||||
|
||||
var { FeedUtils } = ChromeUtils.import("resource:///modules/FeedUtils.jsm");
|
||||
var { XPCOMUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/XPCOMUtils.jsm"
|
||||
);
|
||||
|
||||
function FeedDownloader() {}
|
||||
FeedDownloader.prototype = {
|
||||
|
@ -20,7 +19,6 @@ FeedDownloader.prototype = {
|
|||
FeedUtils.updateSubscriptionsDS(aFolder, aOrigFolder, aAction);
|
||||
},
|
||||
|
||||
classID: Components.ID("{5c124537-adca-4456-b2b5-641ab687d1f6}"),
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsINewsBlogFeedDownloader]),
|
||||
};
|
||||
|
||||
|
@ -30,9 +28,5 @@ FeedAcctMgrExtension.prototype = {
|
|||
chromePackageName: "messenger-newsblog",
|
||||
showPanel: server => false,
|
||||
|
||||
classID: Components.ID("{E109C05F-D304-4ca5-8C44-6DE1BFAF1F74}"),
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIMsgAccountManagerExtension]),
|
||||
};
|
||||
|
||||
var components = [FeedDownloader, FeedAcctMgrExtension];
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory(components);
|
|
@ -1,5 +0,0 @@
|
|||
component {5c124537-adca-4456-b2b5-641ab687d1f6} newsblog.js
|
||||
contract @mozilla.org/newsblog-feed-downloader;1 {5c124537-adca-4456-b2b5-641ab687d1f6}
|
||||
component {E109C05F-D304-4ca5-8C44-6DE1BFAF1F74} newsblog.js
|
||||
contract @mozilla.org/accountmanager/extension;1?name=newsblog {E109C05F-D304-4ca5-8C44-6DE1BFAF1F74}
|
||||
category mailnews-accountmanager-extensions newsblog @mozilla.org/accountmanager/extension;1?name=newsblog
|
|
@ -3,13 +3,13 @@
|
|||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
EXTRA_COMPONENTS += [
|
||||
'js/newsblog.js',
|
||||
'js/newsblog.manifest',
|
||||
]
|
||||
|
||||
EXTRA_JS_MODULES += [
|
||||
'content/FeedUtils.jsm',
|
||||
'content/NewsBlog.jsm',
|
||||
]
|
||||
|
||||
XPCOM_MANIFESTS += [
|
||||
'components.conf',
|
||||
]
|
||||
|
||||
JAR_MANIFESTS += ['jar.mn']
|
||||
|
|
|
@ -3,10 +3,9 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
var EXPORTED_SYMBOLS = ["OfflineStartup"];
|
||||
|
||||
var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
var { XPCOMUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/XPCOMUtils.jsm"
|
||||
);
|
||||
|
||||
var kDebug = false;
|
||||
var kOfflineStartupPref = "offline.startup_state";
|
||||
|
@ -38,7 +37,8 @@ if (!kDebug) {
|
|||
// If the user shutdown offline, and is now starting up in online
|
||||
// mode, we will set the boolean pref "mailnews.playback_offline" to true.
|
||||
|
||||
var nsOfflineStartup = {
|
||||
function OfflineStartup() {}
|
||||
OfflineStartup.prototype = {
|
||||
onProfileStartup() {
|
||||
gDebugLog("onProfileStartup");
|
||||
|
||||
|
@ -125,26 +125,3 @@ var nsOfflineStartup = {
|
|||
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIObserver"]),
|
||||
};
|
||||
|
||||
function nsOfflineStartupModule() {}
|
||||
|
||||
nsOfflineStartupModule.prototype = {
|
||||
classID: Components.ID("3028a3c8-2165-42a4-b878-398da5d32736"),
|
||||
_xpcom_factory: {
|
||||
createInstance(aOuter, aIID) {
|
||||
if (aOuter != null) {
|
||||
throw Cr.NS_ERROR_NO_AGGREGATION;
|
||||
}
|
||||
|
||||
// return the singleton
|
||||
return nsOfflineStartup.QueryInterface(aIID);
|
||||
},
|
||||
|
||||
lockFactory(aLock) {
|
||||
// quieten warnings
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
var components = [nsOfflineStartupModule];
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory(components);
|
|
@ -0,0 +1,15 @@
|
|||
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
Classes = [
|
||||
{
|
||||
'cid': '{3028a3c8-2165-42a4-b878-398da5d32736}',
|
||||
'contract_ids': ['@mozilla.org/offline-startup;1'],
|
||||
'jsm': 'resource:///modules/OfflineStartup.jsm',
|
||||
'constructor': 'OfflineStartup',
|
||||
'categories': {'app-startup': 'Offline-startup'},
|
||||
},
|
||||
]
|
|
@ -1,3 +0,0 @@
|
|||
component {3028a3c8-2165-42a4-b878-398da5d32736} offlineStartup.js
|
||||
contract @mozilla.org/offline-startup;1 {3028a3c8-2165-42a4-b878-398da5d32736}
|
||||
category app-startup Offline-startup @mozilla.org/offline-startup;1
|
|
@ -3,8 +3,10 @@
|
|||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
EXTRA_COMPONENTS += [
|
||||
'js/offlineStartup.js',
|
||||
'js/offlineStartup.manifest',
|
||||
EXTRA_JS_MODULES += [
|
||||
'OfflineStartup.jsm',
|
||||
]
|
||||
|
||||
XPCOM_MANIFESTS += [
|
||||
'components.conf',
|
||||
]
|
||||
|
|
|
@ -3,9 +3,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
var { XPCOMUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/XPCOMUtils.jsm"
|
||||
);
|
||||
var EXPORTED_SYMBOLS = ["SMIMEService"];
|
||||
|
||||
function SMIMEService() {}
|
||||
|
||||
|
@ -23,8 +21,4 @@ SMIMEService.prototype = {
|
|||
},
|
||||
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIMsgAccountManagerExtension]),
|
||||
classID: Components.ID("{f2809796-1dd1-11b2-8c1b-8f15f007c699}"),
|
||||
};
|
||||
|
||||
var components = [SMIMEService];
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory(components);
|
|
@ -0,0 +1,15 @@
|
|||
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
Classes = [
|
||||
{
|
||||
'cid': '{f2809796-1dd1-11b2-8c1b-8f15f007c699}',
|
||||
'contract_ids': ['@mozilla.org/accountmanager/extension;1?name=smime'],
|
||||
'jsm': 'resource:///modules/SMIMEService.jsm',
|
||||
'constructor': 'SMIMEService',
|
||||
'categories': {'mailnews-accountmanager-extensions': 'smime-account-manager-extension'},
|
||||
},
|
||||
]
|
|
@ -10,9 +10,12 @@ SOURCES += [
|
|||
'nsSMimeJSHelper.cpp',
|
||||
]
|
||||
|
||||
EXTRA_COMPONENTS += [
|
||||
'smime-service.js',
|
||||
'smime-service.manifest',
|
||||
EXTRA_JS_MODULES += [
|
||||
'SMIMEService.jsm',
|
||||
]
|
||||
|
||||
XPCOM_MANIFESTS += [
|
||||
'components.conf',
|
||||
]
|
||||
|
||||
FINAL_LIBRARY = 'mail'
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
component {f2809796-1dd1-11b2-8c1b-8f15f007c699} smime-service.js
|
||||
contract @mozilla.org/accountmanager/extension;1?name=smime {f2809796-1dd1-11b2-8c1b-8f15f007c699}
|
||||
category mailnews-accountmanager-extensions smime-account-manager-extension @mozilla.org/accountmanager/extension;1?name=smime
|
|
@ -0,0 +1,15 @@
|
|||
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
Classes = [
|
||||
{
|
||||
'cid': '{a81438ef-aca1-41a5-9b3a-3ccfbbe4f5e1}',
|
||||
'contract_ids': ['@mozilla.org/import/test;1'],
|
||||
'jsm': 'resource:///modules/TestMailImpoter.jsm',
|
||||
'constructor': 'TestMailImpoter',
|
||||
'categories': {'mailnewsimport': 'mail'},
|
||||
},
|
||||
]
|
|
@ -5,3 +5,11 @@
|
|||
|
||||
XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
|
||||
|
||||
EXTRA_JS_MODULES += [
|
||||
'unit/resources/TestMailImporter.jsm',
|
||||
]
|
||||
|
||||
XPCOM_MANIFESTS += [
|
||||
'components.conf',
|
||||
]
|
||||
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
var { XPCOMUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/XPCOMUtils.jsm"
|
||||
);
|
||||
var EXPORTED_SYMBOLS = ["TestMailImpoter"];
|
||||
|
||||
function TestMailImpoter() {}
|
||||
|
||||
|
@ -134,5 +132,3 @@ TestMailImpoter.prototype = {
|
|||
return folderName;
|
||||
},
|
||||
};
|
||||
|
||||
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([TestMailImpoter]);
|
|
@ -1,4 +0,0 @@
|
|||
component {a81438ef-aca1-41a5-9b3a-3ccfbbe4f5e1} TestMailImporter.js
|
||||
contract @mozilla.org/import/test;1 {a81438ef-aca1-41a5-9b3a-3ccfbbe4f5e1}
|
||||
category mailnewsimport {a81438ef-aca1-41a5-9b3a-3ccfbbe4f5e1} mail
|
||||
|
|
@ -667,5 +667,3 @@ FiltersImportHelper.prototype = {
|
|||
}
|
||||
},
|
||||
};
|
||||
|
||||
do_load_manifest("resources/TestMailImporter.manifest");
|
||||
|
|
|
@ -10,8 +10,14 @@ DIRS += [
|
|||
]
|
||||
|
||||
EXTRA_JS_MODULES.jsaccount += [
|
||||
'modules/JaBaseUrl.jsm',
|
||||
'modules/JSAccountUtils.jsm',
|
||||
'modules/JaBaseUrl.jsm',
|
||||
'modules/JSAccountUtils.jsm',
|
||||
'test/unit/resources/TestJaMsgProtocolInfoComponent.jsm',
|
||||
]
|
||||
|
||||
XPCOM_MANIFESTS += [
|
||||
'test/components.conf',
|
||||
]
|
||||
|
||||
|
||||
TEST_DIRS += ['test']
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
Classes = [
|
||||
{
|
||||
'cid': '{74b9b9c3-9594-41c4-b9f0-326e5daac2e0}',
|
||||
'contract_ids': ['@mozilla.org/messenger/protocol/info;1?type=testja'],
|
||||
'jsm': 'resource:///modules/jsaccount/TestJaMsgProtocolInfoComponent.jsm',
|
||||
'constructor': 'TestJaMsgProtocolInfo',
|
||||
},
|
||||
]
|
|
@ -4,7 +4,7 @@
|
|||
# http://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
TEST_DIRS += [
|
||||
'idl',
|
||||
'idl',
|
||||
]
|
||||
|
||||
XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
|
||||
|
|
|
@ -6,18 +6,17 @@
|
|||
// This file is the component definition for a demo base implementation of a
|
||||
// javascript nsIMsgProtocolInfo implementation.
|
||||
|
||||
var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
var { XPCOMUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/XPCOMUtils.jsm"
|
||||
);
|
||||
var EXPORTED_SYMBOLS = ["TestJaMsgProtocolInfo"];
|
||||
|
||||
function testJaMsgProtocolInfo() {
|
||||
var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
function TestJaMsgProtocolInfo() {
|
||||
dump("testJaMsgProtocolInfo");
|
||||
// nsIFile object to be used for the default local path.
|
||||
this._defaultLocalPath = null;
|
||||
}
|
||||
|
||||
testJaMsgProtocolInfo.prototype = {
|
||||
TestJaMsgProtocolInfo.prototype = {
|
||||
// Flag this item as CPP needs to delegate to JS.
|
||||
_JsPrototypeToDelegate: true,
|
||||
|
||||
|
@ -74,10 +73,5 @@ testJaMsgProtocolInfo.prototype = {
|
|||
return false;
|
||||
},
|
||||
|
||||
classDescription: "testja Msg Protocol Info implementation",
|
||||
classID: Components.ID("{74b9b9c3-9594-41c4-b9f0-326e5daac2e0}"),
|
||||
contractID: "@mozilla.org/messenger/protocol/info;1?type=testja",
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIMsgProtocolInfo]),
|
||||
};
|
||||
|
||||
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([testJaMsgProtocolInfo]);
|
|
@ -14,7 +14,3 @@ contract @mozilla.org/mail/folder-factory;1?name=testja {8508ddeb-3eab-4877-a420
|
|||
# nsIMsgIncomingServer implementation
|
||||
component {0eec03cd-da67-4949-ab2d-5fa4bdc68135} testJaBaseIncomingServerComponent.js
|
||||
contract @mozilla.org/messenger/server;1?type=testja {0eec03cd-da67-4949-ab2d-5fa4bdc68135}
|
||||
|
||||
# nsIMsgProtocolInfo implementation
|
||||
component {74b9b9c3-9594-41c4-b9f0-326e5daac2e0} testJaMsgProtocolInfoComponent.js
|
||||
contract @mozilla.org/messenger/protocol/info;1?type=testja {74b9b9c3-9594-41c4-b9f0-326e5daac2e0}
|
||||
|
|
|
@ -2,11 +2,15 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
var EXPORTED_SYMBOLS = [
|
||||
"MimeHeaders",
|
||||
"MimeWritableStructuredHeaders",
|
||||
"MimeAddressParser",
|
||||
"MimeConverter",
|
||||
];
|
||||
|
||||
var { jsmime } = ChromeUtils.import("resource:///modules/jsmime.jsm");
|
||||
var { MimeParser } = ChromeUtils.import("resource:///modules/mimeParser.jsm");
|
||||
var { XPCOMUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/XPCOMUtils.jsm"
|
||||
);
|
||||
|
||||
function HeaderHandler() {
|
||||
this.value = "";
|
||||
|
@ -143,8 +147,6 @@ function MimeHeaders() {}
|
|||
MimeHeaders.prototype = {
|
||||
__proto__: MimeStructuredHeaders.prototype,
|
||||
classDescription: "Mime headers implementation",
|
||||
classID: Components.ID("d1258011-f391-44fd-992e-c6f4b461a42f"),
|
||||
contractID: "@mozilla.org/messenger/mimeheaders;1",
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.nsIMimeHeaders,
|
||||
Ci.msgIStructuredHeaders,
|
||||
|
@ -180,7 +182,6 @@ function MimeWritableStructuredHeaders() {
|
|||
}
|
||||
MimeWritableStructuredHeaders.prototype = {
|
||||
__proto__: MimeStructuredHeaders.prototype,
|
||||
classID: Components.ID("c560806a-425f-4f0f-bf69-397c58c599a7"),
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.msgIStructuredHeaders,
|
||||
Ci.msgIWritableStructuredHeaders,
|
||||
|
@ -279,7 +280,6 @@ function fixArray(addresses, preserveGroups, count) {
|
|||
|
||||
function MimeAddressParser() {}
|
||||
MimeAddressParser.prototype = {
|
||||
classID: Components.ID("96bd8769-2d0e-4440-963d-22b97fb3ba77"),
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIMsgHeaderParser]),
|
||||
|
||||
parseEncodedHeader(aHeader, aCharset, aPreserveGroups) {
|
||||
|
@ -454,7 +454,6 @@ MimeAddressParser.prototype = {
|
|||
|
||||
function MimeConverter() {}
|
||||
MimeConverter.prototype = {
|
||||
classID: Components.ID("93f8c049-80ed-4dda-9000-94ad8daba44c"),
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIMimeConverter]),
|
||||
|
||||
encodeMimePartIIStr_UTF8(aHeader, aStructured, aFieldNameLen, aLineLength) {
|
||||
|
@ -523,11 +522,3 @@ MimeConverter.prototype = {
|
|||
return this.decodeMimeHeader(...aArgs);
|
||||
},
|
||||
};
|
||||
|
||||
var components = [
|
||||
MimeHeaders,
|
||||
MimeWritableStructuredHeaders,
|
||||
MimeAddressParser,
|
||||
MimeConverter,
|
||||
];
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory(components);
|
|
@ -0,0 +1,32 @@
|
|||
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
Classes = [
|
||||
{
|
||||
'cid': '{d1258011-f391-44fd-992e-c6f4b461a42f}',
|
||||
'contract_ids': ['@mozilla.org/messenger/mimeheaders;1'],
|
||||
'jsm': 'resource:///modules/MimeJSComponents.jsm',
|
||||
'constructor': 'MimeHeaders',
|
||||
},
|
||||
{
|
||||
'cid': '{c560806a-425f-4f0f-bf69-397c58c599a7}',
|
||||
'contract_ids': ['@mozilla.org/messenger/structuredheaders;1'],
|
||||
'jsm': 'resource:///modules/MimeJSComponents.jsm',
|
||||
'constructor': 'MimeWritableStructuredHeaders',
|
||||
},
|
||||
{
|
||||
'cid': '{96bd8769-2d0e-4440-963d-22b97fb3ba77}',
|
||||
'contract_ids': ['@mozilla.org/messenger/headerparser;1'],
|
||||
'jsm': 'resource:///modules/MimeJSComponents.jsm',
|
||||
'constructor': 'MimeAddressParser',
|
||||
},
|
||||
{
|
||||
'cid': '{93f8c049-80ed-4dda-9000-94ad8daba44c}',
|
||||
'contract_ids': ['@mozilla.org/messenger/mimeconverter;1'],
|
||||
'jsm': 'resource:///modules/MimeJSComponents.jsm',
|
||||
'constructor': 'MimeConverter',
|
||||
},
|
||||
]
|
|
@ -77,14 +77,18 @@ LOCAL_INCLUDES += [
|
|||
]
|
||||
|
||||
EXTRA_COMPONENTS += [
|
||||
'mimeJSComponents.js',
|
||||
'msgMime.manifest',
|
||||
]
|
||||
|
||||
EXTRA_JS_MODULES += [
|
||||
'extraMimeParsers.jsm',
|
||||
'jsmime.jsm',
|
||||
'mimeParser.jsm'
|
||||
'MimeJSComponents.jsm',
|
||||
'mimeParser.jsm',
|
||||
]
|
||||
|
||||
XPCOM_MANIFESTS += [
|
||||
'components.conf',
|
||||
]
|
||||
|
||||
FINAL_LIBRARY = 'mail'
|
||||
|
|
|
@ -1,9 +1 @@
|
|||
component {d1258011-f391-44fd-992e-c6f4b461a42f} mimeJSComponents.js
|
||||
component {96bd8769-2d0e-4440-963d-22b97fb3ba77} mimeJSComponents.js
|
||||
component {93f8c049-80ed-4dda-9000-94ad8daba44c} mimeJSComponents.js
|
||||
component {c560806a-425f-4f0f-bf69-397c58c599a7} mimeJSComponents.js
|
||||
contract @mozilla.org/messenger/mimeheaders;1 {d1258011-f391-44fd-992e-c6f4b461a42f}
|
||||
contract @mozilla.org/messenger/mimeconverter;1 {93f8c049-80ed-4dda-9000-94ad8daba44c}
|
||||
contract @mozilla.org/messenger/headerparser;1 {96bd8769-2d0e-4440-963d-22b97fb3ba77}
|
||||
contract @mozilla.org/messenger/structuredheaders;1 {c560806a-425f-4f0f-bf69-397c58c599a7}
|
||||
category custom-mime-encoder A-extra resource:///modules/extraMimeParsers.jsm
|
||||
|
|
|
@ -3,24 +3,23 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
var EXPORTED_SYMBOLS = ["NewsAutoCompleteSearch"];
|
||||
|
||||
var { MailServices } = ChromeUtils.import(
|
||||
"resource:///modules/MailServices.jsm"
|
||||
);
|
||||
var { XPCOMUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/XPCOMUtils.jsm"
|
||||
);
|
||||
|
||||
var kACR = Ci.nsIAutoCompleteResult;
|
||||
var kSupportedTypes = new Set(["addr_newsgroups", "addr_followup"]);
|
||||
|
||||
function nsNewsAutoCompleteResult(aSearchString) {
|
||||
function NewsAutoCompleteResult(aSearchString) {
|
||||
// Can't create this in the prototype as we'd get the same array for
|
||||
// all instances
|
||||
this._searchResults = [];
|
||||
this.searchString = aSearchString;
|
||||
}
|
||||
|
||||
nsNewsAutoCompleteResult.prototype = {
|
||||
NewsAutoCompleteResult.prototype = {
|
||||
_searchResults: null,
|
||||
|
||||
// nsIAutoCompleteResult
|
||||
|
@ -65,12 +64,11 @@ nsNewsAutoCompleteResult.prototype = {
|
|||
QueryInterface: ChromeUtils.generateQI([kACR]),
|
||||
};
|
||||
|
||||
function nsNewsAutoCompleteSearch() {}
|
||||
function NewsAutoCompleteSearch() {}
|
||||
|
||||
nsNewsAutoCompleteSearch.prototype = {
|
||||
NewsAutoCompleteSearch.prototype = {
|
||||
// For component registration
|
||||
classDescription: "Newsgroup Autocomplete",
|
||||
classID: Components.ID("e9bb3330-ac7e-11de-8a39-0800200c9a66"),
|
||||
|
||||
cachedAccountKey: "",
|
||||
cachedServer: null,
|
||||
|
@ -93,7 +91,7 @@ nsNewsAutoCompleteSearch.prototype = {
|
|||
// nsIAutoCompleteSearch
|
||||
startSearch(aSearchString, aSearchParam, aPreviousResult, aListener) {
|
||||
let params = aSearchParam ? JSON.parse(aSearchParam) : {};
|
||||
let result = new nsNewsAutoCompleteResult(aSearchString);
|
||||
let result = new NewsAutoCompleteResult(aSearchString);
|
||||
if (
|
||||
!("type" in params) ||
|
||||
!("accountKey" in params) ||
|
||||
|
@ -136,6 +134,3 @@ nsNewsAutoCompleteSearch.prototype = {
|
|||
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIAutoCompleteSearch]),
|
||||
};
|
||||
|
||||
// Module
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory([nsNewsAutoCompleteSearch]);
|
|
@ -0,0 +1,14 @@
|
|||
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
Classes = [
|
||||
{
|
||||
'cid': '{e9bb3330-ac7e-11de-8a39-0800200c9a66}',
|
||||
'contract_ids': ['@mozilla.org/autocomplete/search;1?name=news'],
|
||||
'jsm': 'resource:///modules/NewsAutoCompleteSearch.jsm',
|
||||
'constructor': 'NewsAutoCompleteSearch',
|
||||
},
|
||||
]
|
|
@ -18,9 +18,12 @@ SOURCES += [
|
|||
'nsNntpUrl.cpp',
|
||||
]
|
||||
|
||||
EXTRA_COMPONENTS += [
|
||||
'nsNewsAutoCompleteSearch.js',
|
||||
'nsNewsAutoCompleteSearch.manifest',
|
||||
EXTRA_JS_MODULES += [
|
||||
'NewsAutoCompleteSearch.jsm',
|
||||
]
|
||||
|
||||
XPCOM_MANIFESTS += [
|
||||
'components.conf',
|
||||
]
|
||||
|
||||
FINAL_LIBRARY = 'mail'
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
component {e9bb3330-ac7e-11de-8a39-0800200c9a66} nsNewsAutoCompleteSearch.js
|
||||
contract @mozilla.org/autocomplete/search;1?name=news {e9bb3330-ac7e-11de-8a39-0800200c9a66}
|
Загрузка…
Ссылка в новой задаче