diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
commit | 6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch) | |
tree | a68f146d7fa01f0134297619fbe7e33db084e0aa /comm/chat/protocols/gtalk | |
parent | Initial commit. (diff) | |
download | thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.tar.xz thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.zip |
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'comm/chat/protocols/gtalk')
-rw-r--r-- | comm/chat/protocols/gtalk/components.conf | 15 | ||||
-rw-r--r-- | comm/chat/protocols/gtalk/gtalk.sys.mjs | 60 | ||||
-rw-r--r-- | comm/chat/protocols/gtalk/icons/prpl-gtalk-32.png | bin | 0 -> 2024 bytes | |||
-rw-r--r-- | comm/chat/protocols/gtalk/icons/prpl-gtalk-48.png | bin | 0 -> 3168 bytes | |||
-rw-r--r-- | comm/chat/protocols/gtalk/icons/prpl-gtalk.png | bin | 0 -> 865 bytes | |||
-rw-r--r-- | comm/chat/protocols/gtalk/jar.mn | 9 | ||||
-rw-r--r-- | comm/chat/protocols/gtalk/moz.build | 14 |
7 files changed, 98 insertions, 0 deletions
diff --git a/comm/chat/protocols/gtalk/components.conf b/comm/chat/protocols/gtalk/components.conf new file mode 100644 index 0000000000..a736ae37a2 --- /dev/null +++ b/comm/chat/protocols/gtalk/components.conf @@ -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': '{38a224c1-6748-49a9-8ab2-efc362b1000d}', + 'contract_ids': ['@mozilla.org/chat/gtalk;1'], + 'esModule': 'resource:///modules/gtalk.sys.mjs', + 'constructor': 'GTalkProtocol', + 'categories': {'im-protocol-plugin': 'prpl-gtalk'}, + }, +] diff --git a/comm/chat/protocols/gtalk/gtalk.sys.mjs b/comm/chat/protocols/gtalk/gtalk.sys.mjs new file mode 100644 index 0000000000..ca5b7c33a6 --- /dev/null +++ b/comm/chat/protocols/gtalk/gtalk.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/xmpp.properties") +); + +function GTalkAccount(aProtoInstance, aImAccount) { + this._init(aProtoInstance, aImAccount); +} +GTalkAccount.prototype = { + __proto__: GenericAccountPrototype, + connect() { + this.WARN( + "As Google deprecated its XMPP gateway, it is currently not " + + "possible to connect to Google Talk. See bug 1645217." + ); + this.reportDisconnecting( + Ci.prplIAccount.ERROR_OTHER_ERROR, + lazy._("gtalk.disabled") + ); + this.reportDisconnected(); + }, + + // Nothing to do. + unInit() {}, + remove() {}, +}; + +export function GTalkProtocol() {} +GTalkProtocol.prototype = { + __proto__: GenericProtocolPrototype, + get normalizedName() { + return "gtalk"; + }, + get name() { + return lazy._("gtalk.protocolName"); + }, + get iconBaseURI() { + return "chrome://prpl-gtalk/skin/"; + }, + getAccount(aImAccount) { + return new GTalkAccount(this, aImAccount); + }, + // GTalk accounts which were configured with OAuth2 do not have a password set. + // Show the above error on connect instead of a "needs password" error. + get noPassword() { + return true; + }, +}; diff --git a/comm/chat/protocols/gtalk/icons/prpl-gtalk-32.png b/comm/chat/protocols/gtalk/icons/prpl-gtalk-32.png Binary files differnew file mode 100644 index 0000000000..8390ff8f3e --- /dev/null +++ b/comm/chat/protocols/gtalk/icons/prpl-gtalk-32.png diff --git a/comm/chat/protocols/gtalk/icons/prpl-gtalk-48.png b/comm/chat/protocols/gtalk/icons/prpl-gtalk-48.png Binary files differnew file mode 100644 index 0000000000..e0352ac69f --- /dev/null +++ b/comm/chat/protocols/gtalk/icons/prpl-gtalk-48.png diff --git a/comm/chat/protocols/gtalk/icons/prpl-gtalk.png b/comm/chat/protocols/gtalk/icons/prpl-gtalk.png Binary files differnew file mode 100644 index 0000000000..396b967c65 --- /dev/null +++ b/comm/chat/protocols/gtalk/icons/prpl-gtalk.png diff --git a/comm/chat/protocols/gtalk/jar.mn b/comm/chat/protocols/gtalk/jar.mn new file mode 100644 index 0000000000..6f2d510e4e --- /dev/null +++ b/comm/chat/protocols/gtalk/jar.mn @@ -0,0 +1,9 @@ +# 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/. + +chat.jar: +% skin prpl-gtalk classic/1.0 %skin/classic/prpl/gtalk/ + skin/classic/prpl/gtalk/icon32.png (icons/prpl-gtalk-32.png) + skin/classic/prpl/gtalk/icon48.png (icons/prpl-gtalk-48.png) + skin/classic/prpl/gtalk/icon.png (icons/prpl-gtalk.png) diff --git a/comm/chat/protocols/gtalk/moz.build b/comm/chat/protocols/gtalk/moz.build new file mode 100644 index 0000000000..b147aeaf01 --- /dev/null +++ b/comm/chat/protocols/gtalk/moz.build @@ -0,0 +1,14 @@ +# 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/. + +JAR_MANIFESTS += ["jar.mn"] + +EXTRA_JS_MODULES += [ + "gtalk.sys.mjs", +] + +XPCOM_MANIFESTS += [ + "components.conf", +] |