Bug 812921 - Land in comm-central Instantbird's changes to chat/ - 4 - Bio 1742 - Add Odnoklassniki protocol, r=clokep.
authorAlexander L. Slovesnik <unghost@gmail.com>
Fri, 02 Nov 2012 23:57:16 +0100
changeset 14278 fafeae1d11401c1d1eee00e5087d1bfa82f240ca
parent 14277 bc4d49d95baa672daf1e496bf8967f9adfadd820
child 14279 14a8bfcb9fcbbebab45daa028f129bc96cdf59d5
push id804
push userbugzilla@standard8.plus.com
push dateMon, 07 Jan 2013 21:31:35 +0000
treeherdercomm-beta@9fdc5c67cdb1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersclokep
bugs812921
Bug 812921 - Land in comm-central Instantbird's changes to chat/ - 4 - Bio 1742 - Add Odnoklassniki protocol, r=clokep.
chat/Makefile.in
chat/locales/en-US/xmpp.properties
chat/makefiles.sh
chat/protocols/odnoklassniki/Makefile.in
chat/protocols/odnoklassniki/icons/prpl-odnoklassniki-32.png
chat/protocols/odnoklassniki/icons/prpl-odnoklassniki-48.png
chat/protocols/odnoklassniki/icons/prpl-odnoklassniki.png
chat/protocols/odnoklassniki/jar.mn
chat/protocols/odnoklassniki/odnoklassniki.js
chat/protocols/odnoklassniki/odnoklassniki.manifest
--- a/chat/Makefile.in
+++ b/chat/Makefile.in
@@ -8,16 +8,17 @@ srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 PROTOCOLS = \
 		facebook \
 		gtalk \
 		irc \
+		odnoklassniki \
 		twitter \
 		vkontakte \
 		xmpp \
 		$(NULL)
 
 ifdef MOZ_DEBUG
 PROTOCOLS += jsTest
 endif
--- a/chat/locales/en-US/xmpp.properties
+++ b/chat/locales/en-US/xmpp.properties
@@ -77,8 +77,14 @@ options.connectPort=Port
 #  configuring a Google Talk account.
 gtalk.usernameHint=email address
 
 # LOCALIZATION NOTE (vkontakte.usernameHint):
 #  This is displayed inside the accountUsernameInfoWithDescription
 #  string defined in imAccounts.properties when the user is
 #  configuring a Vkontakte account.
 vkontakte.usernameHint=Profile ID
+
+# LOCALIZATION NOTE (odnoklassniki.usernameHint):
+#  This is displayed inside the accountUsernameInfoWithDescription
+#  string defined in imAccounts.properties when the user is
+#  configuring a Odnoklassniki account.
+odnoklassniki.usernameHint=Profile ID
--- a/chat/makefiles.sh
+++ b/chat/makefiles.sh
@@ -8,13 +8,14 @@ chat/components/public/Makefile
 chat/components/src/Makefile
 chat/content/Makefile
 chat/locales/Makefile
 chat/modules/Makefile
 chat/protocols/facebook/Makefile
 chat/protocols/gtalk/Makefile
 chat/protocols/irc/Makefile
 chat/protocols/jsTest/Makefile
+chat/protocols/odnoklassniki/Makefile
 chat/protocols/twitter/Makefile
 chat/protocols/vkontakte/Makefile
 chat/protocols/xmpp/Makefile
 chat/themes/Makefile
 "
new file mode 100644
--- /dev/null
+++ b/chat/protocols/odnoklassniki/Makefile.in
@@ -0,0 +1,17 @@
+# 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/.
+
+DEPTH		= ../../..
+topsrcdir	= @top_srcdir@
+srcdir		= @srcdir@
+VPATH		= @srcdir@
+
+include $(DEPTH)/config/autoconf.mk
+
+EXTRA_COMPONENTS = \
+		odnoklassniki.js \
+		odnoklassniki.manifest \
+		$(NULL)
+
+include $(topsrcdir)/config/rules.mk
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..5057ef77bfab5895bb253783611ef75c29086ad7
GIT binary patch
literal 2165
zc$@)s2#WWKP)<h;3K|Lk000e1NJLTq001BW001Be1^@s6b9#F800006VoOIv0RI60
z0RN!9r;`8x010qNS#tmY3ljhU3ljkVnw%H_000McNliru+zJ~F7bd&bEb{;W2m(n&
zK~z}7#aC-^ROK0dp6{HqmxOE*ZZU*#3-?Pf70OI$wTP{^mMT*ywAOa&4|V9>PN&qV
zf(~{3;W(wORmYBl!#EaOaXQ=vp+#;54Im0JA%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010qNS#tmY3ljhU3ljkVnw%H_000McNliru+zJ~F7!C>hn8pAA0)9zE
zK~y-)rISraRB;r=&-uTZc{<~aMQKTb4G~!pg^L2AqG;EqWfm<e+C))n3rdJ6+XPV?
z``84zXc+}<3Tn|ehKL18N@X@`&ggSy-kbOSr^Wcy+Pl7&`#a~{3oNq;0N$fh`!(^c
zlaoXHKtP}rg$9s?2tW><cti*S$c9a?xUTJZ>d^J?F#yn?!7K7|n<0UqAVF^W2V*tw
z=)|C4b|?H|GYA2KriQmGkvRw8JON;)t0j_DT`n2bWInqq8!oGH%R5cwVE&Hn3c{%_
zl&80mw2~#<G}4`ej+xUTLy8jR#C^KS2T#5P{iUJz7yOB#&gbLmW8A$j6Z0WaFp@tl
z05DZ6L_h#Q8plTz{b*~+G_#cNU}g63*2ctI8%85E#s^6fqKOdzVoUra2q_9vh$nWe
zZ%E!P*EC&>{7RH<TK&r#^$yC9QUpZOXl^RDFg%Z7L!y{J;f<SV)~$ZbbP}@@xuYn}
z9H)&~ZCy-ofj|N%5%J`2)UD}7CD>RVFWhj`B_h&aW}13c7(IeYajk@TfTa=^l=y%%
z5alOcq)*;*?bvsOuO9|-QU?IzL-V_<W&U%36oT0-in(j?*7n1dk&$5=l!wilY=^wj
zs|dUnkd_2VYLP&)VD-*KV`<#41U{KcZYM-o;R8)#P&Dm?B}8j&xJY10N*0jFm|Kuj
z+hY;;!~Un;;lQ(Qx%IwGqK8hRP`z`Dc-@L69wb+NM7gj9p<j#8Pch7&*3Y*Y74xkC
zfWW&$8%`q%Qi3GMEl<wW-&=^H^z!Bg`>XGa9e#5bfhPb)fWW!TBvBwpi$oG8yZd(7
jy!TT5o@0gOelz|7p4CNJZga;E00000NkvXXu0mjfItfjo
new file mode 100644
--- /dev/null
+++ b/chat/protocols/odnoklassniki/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-odnoklassniki classic/1.0 %skin/classic/prpl/odnoklassniki/
+	skin/classic/prpl/odnoklassniki/icon32.png	(icons/prpl-odnoklassniki-32.png)
+	skin/classic/prpl/odnoklassniki/icon48.png	(icons/prpl-odnoklassniki-48.png)
+	skin/classic/prpl/odnoklassniki/icon.png	(icons/prpl-odnoklassniki.png)
new file mode 100644
--- /dev/null
+++ b/chat/protocols/odnoklassniki/odnoklassniki.js
@@ -0,0 +1,56 @@
+/* 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/. */
+
+const {interfaces: Ci, utils: Cu} = Components;
+
+Cu.import("resource:///modules/imXPCOMUtils.jsm");
+Cu.import("resource:///modules/jsProtoHelper.jsm");
+Cu.import("resource:///modules/xmpp.jsm");
+Cu.import("resource:///modules/xmpp-session.jsm");
+
+XPCOMUtils.defineLazyGetter(this, "_", function()
+  l10nHelper("chrome://chat/locale/xmpp.properties")
+);
+
+function OdnoklassnikiAccount(aProtoInstance, aImAccount) {
+  this._init(aProtoInstance, aImAccount);
+}
+OdnoklassnikiAccount.prototype = {
+  __proto__: XMPPAccountPrototype,
+  get canJoinChat() false,
+  connect: function() {
+    if (this.name.indexOf("@") == -1) {
+      let jid = this.name + "@odnoklassniki.ru/" + XMPPDefaultResource;
+      this._jid = this._parseJID(jid);
+    }
+    else {
+      this._jid = this._parseJID(this.name);
+      if (this._jid.domain != "odnoklassniki.ru") {
+        // We can't use this.onError because this._connection doesn't exist.
+        this.reportDisconnecting(Ci.prplIAccount.ERROR_INVALID_USERNAME,
+                                 _("connection.error.invalidUsername"));
+        this.reportDisconnected();
+        return;
+      }
+    }
+
+    this._connection = new XMPPSession("odnoklassniki.ru", 5222,
+                                       "require_tls", this._jid,
+                                       this.imAccount.password, this);
+  }
+};
+
+function OdnoklassnikiProtocol() {
+}
+OdnoklassnikiProtocol.prototype = {
+  __proto__: GenericProtocolPrototype,
+  get normalizedName() "odnoklassniki",
+  get name() "Odnoklassniki",
+  get iconBaseURI() "chrome://prpl-odnoklassniki/skin/",
+  get usernameEmptyText() _("odnoklassniki.usernameHint"),
+  getAccount: function(aImAccount) new OdnoklassnikiAccount(this, aImAccount),
+  classID: Components.ID("{29b09a83-81c1-2032-11e2-6d9bc4f8e969}")
+};
+
+const NSGetFactory = XPCOMUtils.generateNSGetFactory([OdnoklassnikiProtocol]);
new file mode 100644
--- /dev/null
+++ b/chat/protocols/odnoklassniki/odnoklassniki.manifest
@@ -0,0 +1,3 @@
+component {29b09a83-81c1-2032-11e2-6d9bc4f8e969} odnoklassniki.js
+contract @mozilla.org/chat/odnoklassniki;1 {29b09a83-81c1-2032-11e2-6d9bc4f8e969}
+category im-protocol-plugin prpl-odnoklassniki @mozilla.org/chat/odnoklassniki;1