diff options
Diffstat (limited to 'comm/chat/protocols/yahoo/yahoo.sys.mjs')
-rw-r--r-- | comm/chat/protocols/yahoo/yahoo.sys.mjs | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/comm/chat/protocols/yahoo/yahoo.sys.mjs b/comm/chat/protocols/yahoo/yahoo.sys.mjs new file mode 100644 index 0000000000..c44d27e8e5 --- /dev/null +++ b/comm/chat/protocols/yahoo/yahoo.sys.mjs @@ -0,0 +1,60 @@ +/* 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/. */ + +import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs"; +import { l10nHelper } from "resource:///modules/imXPCOMUtils.sys.mjs"; +import { + GenericAccountPrototype, + GenericProtocolPrototype, +} from "resource:///modules/jsProtoHelper.sys.mjs"; + +const lazy = {}; + +XPCOMUtils.defineLazyGetter(lazy, "_", () => + l10nHelper("chrome://chat/locale/yahoo.properties") +); + +function YahooAccount(aProtoInstance, aImAccount) { + this._init(aProtoInstance, aImAccount); +} +YahooAccount.prototype = { + __proto__: GenericAccountPrototype, + + connect() { + this.WARN( + "The legacy versions of Yahoo Messenger was disabled on August " + + "5, 2016. It is currently not possible to connect to Yahoo " + + "Messenger. See bug 1316000." + ); + this.reportDisconnecting( + Ci.prplIAccount.ERROR_OTHER_ERROR, + lazy._("yahoo.disabled") + ); + this.reportDisconnected(); + }, + + // Nothing to do. + unInit() {}, + remove() {}, +}; + +export function YahooProtocol() {} +YahooProtocol.prototype = { + __proto__: GenericProtocolPrototype, + get id() { + return "prpl-yahoo"; + }, + get normalizedName() { + return "yahoo"; + }, + get name() { + return "Yahoo"; + }, + get iconBaseURI() { + return "chrome://prpl-yahoo/skin/"; + }, + getAccount(aImAccount) { + return new YahooAccount(this, aImAccount); + }, +}; |