You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by js...@apache.org on 2009/03/19 12:13:15 UTC

svn commit: r755922 [5/5] - in /camel/trunk/components/camel-web/src/main/webapp/js/dojox: widget/ widget/Calendar/ widget/ColorPicker/ widget/ColorPicker/images/ widget/Dialog/ widget/Dialog/images/ widget/DocTester/ widget/FilePicker/ widget/FilePick...

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/ChatService.js
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/ChatService.js?rev=755922&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/ChatService.js (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/ChatService.js Thu Mar 19 11:13:08 2009
@@ -0,0 +1,90 @@
+/*
+	Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+	Available via Academic Free License >= 2.1 OR the modified BSD license.
+	see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.xmpp.ChatService"]){
+dojo._hasResource["dojox.xmpp.ChatService"]=true;
+dojo.provide("dojox.xmpp.ChatService");
+dojox.xmpp.chat={CHAT_STATE_NS:"http://jabber.org/protocol/chatstates",ACTIVE_STATE:"active",COMPOSING_STATE:"composing",INACTIVE_STATE:"inactive",PAUSED_STATE:"paused",GONE_STATE:"gone"};
+dojo.declare("dojox.xmpp.ChatService",null,{state:"",constructor:function(){
+this.state="";
+this.chatid=Math.round(Math.random()*1000000000000000);
+},recieveMessage:function(_1,_2){
+if(_1&&!_2){
+this.onNewMessage(_1);
+}
+},setSession:function(_3){
+this.session=_3;
+},setState:function(_4){
+if(this.state!=_4){
+this.state=_4;
+}
+},invite:function(_5){
+if(this.uid){
+return;
+}
+if(!_5||_5==""){
+throw new Error("ChatService::invite() contact is NULL");
+}
+this.uid=_5;
+var _6={xmlns:"jabber:client",to:this.uid,from:this.session.jid+"/"+this.session.resource,type:"chat"};
+var _7=new dojox.string.Builder(dojox.xmpp.util.createElement("message",_6,false));
+_7.append(dojox.xmpp.util.createElement("thread",{},false));
+_7.append(this.chatid);
+_7.append("</thread>");
+_7.append(dojox.xmpp.util.createElement("active",{xmlns:dojox.xmpp.chat.CHAT_STATE_NS},true));
+_7.append("</message>");
+this.session.dispatchPacket(_7.toString());
+this.onInvite(_5);
+this.setState(dojox.xmpp.chat.CHAT_STATE_NS);
+},sendMessage:function(_8){
+if(!this.uid){
+return;
+}
+if((!_8.body||_8.body=="")&&!_8.xhtml){
+return;
+}
+var _9={xmlns:"jabber:client",to:this.uid,from:this.session.jid+"/"+this.session.resource,type:"chat"};
+var _a=new dojox.string.Builder(dojox.xmpp.util.createElement("message",_9,false));
+var _b=dojox.xmpp.util.createElement("html",{"xmlns":dojox.xmpp.xmpp.XHTML_IM_NS},false);
+var _c=dojox.xmpp.util.createElement("body",{"xml:lang":this.session.lang,"xmlns":dojox.xmpp.xmpp.XHTML_BODY_NS},false)+_8.body+"</body>";
+var _d=dojox.xmpp.util.createElement("body",{},false)+dojox.xmpp.util.stripHtml(_8.body)+"</body>";
+if(_a.subject&&_a.subject!=""){
+_a.append(dojox.xmpp.util.createElement("subject",{},false));
+_a.append(_a.subject);
+_a.append("</subject>");
+}
+_a.append(_d);
+_a.append(_b);
+_a.append(_c);
+_a.append("</html>");
+_a.append(dojox.xmpp.util.createElement("thread",{},false));
+_a.append(this.chatid);
+_a.append("</thread>");
+if(this.useChatStates){
+_a.append(dojox.xmpp.util.createElement("active",{xmlns:dojox.xmpp.chat.CHAT_STATE_NS},true));
+}
+_a.append("</message>");
+this.session.dispatchPacket(_a.toString());
+},sendChatState:function(_e){
+if(!this.useChatState||this.firstMessage){
+return;
+}
+if(_e==this._currentState){
+return;
+}
+var _f={xmlns:"jabber:client",to:this.uid,from:this.session.jid+"/"+this.session.resource,type:"chat"};
+var _10=new dojox.string.Builder(dojox.xmpp.util.createElement("message",_f,false));
+_10.append(dojox.xmpp.util.createElement(_e,{xmlns:dojox.xmpp.chat.CHAT_STATE_NS},true));
+this._currentState=_e;
+_10.append("<thread>");
+_10.append(this.chatid);
+_10.append("</thread></message>");
+this.session.dispatchPacket(_10.toString());
+},onNewMessage:function(msg){
+},onInvite:function(_12){
+}});
+}

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/ChatService.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/PresenceService.js
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/PresenceService.js?rev=755922&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/PresenceService.js (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/PresenceService.js Thu Mar 19 11:13:08 2009
@@ -0,0 +1,163 @@
+/*
+	Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+	Available via Academic Free License >= 2.1 OR the modified BSD license.
+	see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.xmpp.PresenceService"]){
+dojo._hasResource["dojox.xmpp.PresenceService"]=true;
+dojo.provide("dojox.xmpp.PresenceService");
+dojox.xmpp.presence={UPDATE:201,SUBSCRIPTION_REQUEST:202,SUBSCRIPTION_SUBSTATUS_NONE:204,SUBSCRIPTION_NONE:"none",SUBSCRIPTION_FROM:"from",SUBSCRIPTION_TO:"to",SUBSCRIPTION_BOTH:"both",SUBSCRIPTION_REQUEST_PENDING:"pending",STATUS_ONLINE:"online",STATUS_AWAY:"away",STATUS_CHAT:"chat",STATUS_DND:"dnd",STATUS_EXTENDED_AWAY:"xa",STATUS_OFFLINE:"offline",STATUS_INVISIBLE:"invisible"};
+dojo.declare("dojox.xmpp.PresenceService",null,{constructor:function(_1){
+this.session=_1;
+this.isInvisible=false;
+this.avatarHash=null;
+this.presence=null;
+this.restrictedContactjids={};
+},publish:function(_2){
+this.presence=_2;
+this._setPresence();
+},sendAvatarHash:function(_3){
+this.avatarHash=_3;
+this._setPresence();
+},_setPresence:function(){
+var _4=this.presence;
+var p={xmlns:"jabber:client"};
+if(_4&&_4.to){
+p.to=_4.to;
+}
+if(_4.show&&_4.show==dojox.xmpp.presence.STATUS_OFFLINE){
+p.type="unavailable";
+}
+if(_4.show&&_4.show==dojox.xmpp.presence.STATUS_INVISIBLE){
+this._setInvisible();
+this.isInvisible=true;
+return;
+}
+if(this.isInvisible){
+this._setVisible();
+}
+var _6=new dojox.string.Builder(dojox.xmpp.util.createElement("presence",p,false));
+if(_4.show&&_4.show!=dojox.xmpp.presence.STATUS_OFFLINE){
+_6.append(dojox.xmpp.util.createElement("show",{},false));
+_6.append(_4.show);
+_6.append("</show>");
+}
+if(_4.status){
+_6.append(dojox.xmpp.util.createElement("status",{},false));
+_6.append(_4.status);
+_6.append("</status>");
+}
+if(this.avatarHash){
+_6.append(dojox.xmpp.util.createElement("x",{xmlns:"vcard-temp:x:update"},false));
+_6.append(dojox.xmpp.util.createElement("photo",{},false));
+_6.append(this.avatarHash);
+_6.append("</photo>");
+_6.append("</x>");
+}
+if(_4.priority&&_4.show!=dojox.xmpp.presence.STATUS_OFFLINE){
+if(_4.priority>127||_4.priority<-128){
+_4.priority=5;
+}
+_6.append(dojox.xmpp.util.createElement("priority",{},false));
+_6.append(_4.priority);
+_6.append("</priority>");
+}
+_6.append("</presence>");
+this.session.dispatchPacket(_6.toString());
+},toggleBlockContact:function(_7){
+if(!this.restrictedContactjids[_7]){
+this.restrictedContactjids[_7]=this._createRestrictedJid();
+}
+this.restrictedContactjids[_7].blocked=!this.restrictedContactjids[_7].blocked;
+this._updateRestricted();
+return this.restrictedContactjids;
+},toggleContactInvisiblity:function(_8){
+if(!this.restrictedContactjids[_8]){
+this.restrictedContactjids[_8]=this._createRestrictedJid();
+}
+this.restrictedContactjids[_8].invisible=!this.restrictedContactjids[_8].invisible;
+this._updateRestricted();
+return this.restrictedContactjids;
+},_createRestrictedJid:function(){
+return {invisible:false,blocked:false};
+},_updateRestricted:function(){
+var _9={id:this.session.getNextIqId(),from:this.session.jid+"/"+this.session.resource,type:"set"};
+var _a=new dojox.string.Builder(dojox.xmpp.util.createElement("iq",_9,false));
+_a.append(dojox.xmpp.util.createElement("query",{xmlns:"jabber:iq:privacy"},false));
+_a.append(dojox.xmpp.util.createElement("list",{name:"iwcRestrictedContacts"},false));
+var _b=1;
+for(var _c in this.restrictedContactjids){
+var _d=this.restrictedContactjids[_c];
+if(_d.blocked||_d.invisible){
+_a.append(dojox.xmpp.util.createElement("item",{value:dojox.xmpp.util.encodeJid(_c),action:"deny",order:_b++},false));
+if(_d.blocked){
+_a.append(dojox.xmpp.util.createElement("message",{},true));
+}
+if(_d.invisible){
+_a.append(dojox.xmpp.util.createElement("presence-out",{},true));
+}
+_a.append("</item>");
+}else{
+delete this.restrictedContactjids[_c];
+}
+}
+_a.append("</list>");
+_a.append("</query>");
+_a.append("</iq>");
+var _e=new dojox.string.Builder(dojox.xmpp.util.createElement("iq",_9,false));
+_e.append(dojox.xmpp.util.createElement("query",{xmlns:"jabber:iq:privacy"},false));
+_e.append(dojox.xmpp.util.createElement("active",{name:"iwcRestrictedContacts"},true));
+_e.append("</query>");
+_e.append("</iq>");
+this.session.dispatchPacket(_a.toString());
+this.session.dispatchPacket(_e.toString());
+},_setVisible:function(){
+var _f={id:this.session.getNextIqId(),from:this.session.jid+"/"+this.session.resource,type:"set"};
+var req=new dojox.string.Builder(dojox.xmpp.util.createElement("iq",_f,false));
+req.append(dojox.xmpp.util.createElement("query",{xmlns:"jabber:iq:privacy"},false));
+req.append(dojox.xmpp.util.createElement("active",{},true));
+req.append("</query>");
+req.append("</iq>");
+this.session.dispatchPacket(req.toString());
+},_setInvisible:function(){
+var _11={id:this.session.getNextIqId(),from:this.session.jid+"/"+this.session.resource,type:"set"};
+var req=new dojox.string.Builder(dojox.xmpp.util.createElement("iq",_11,false));
+req.append(dojox.xmpp.util.createElement("query",{xmlns:"jabber:iq:privacy"},false));
+req.append(dojox.xmpp.util.createElement("list",{name:"invisible"},false));
+req.append(dojox.xmpp.util.createElement("item",{action:"deny",order:"1"},false));
+req.append(dojox.xmpp.util.createElement("presence-out",{},true));
+req.append("</item>");
+req.append("</list>");
+req.append("</query>");
+req.append("</iq>");
+_11={id:this.session.getNextIqId(),from:this.session.jid+"/"+this.session.resource,type:"set"};
+var _13=new dojox.string.Builder(dojox.xmpp.util.createElement("iq",_11,false));
+_13.append(dojox.xmpp.util.createElement("query",{xmlns:"jabber:iq:privacy"},false));
+_13.append(dojox.xmpp.util.createElement("active",{name:"invisible"},true));
+_13.append("</query>");
+_13.append("</iq>");
+this.session.dispatchPacket(req.toString());
+this.session.dispatchPacket(_13.toString());
+},_manageSubscriptions:function(_14,_15){
+if(!_14){
+return;
+}
+if(_14.indexOf("@")==-1){
+_14+="@"+this.session.domain;
+}
+var req=dojox.xmpp.util.createElement("presence",{to:_14,type:_15},true);
+this.session.dispatchPacket(req);
+},subscribe:function(_17){
+this._manageSubscriptions(_17,"subscribe");
+},approveSubscription:function(_18){
+this._manageSubscriptions(_18,"subscribed");
+},unsubscribe:function(_19){
+this._manageSubscriptions(_19,"unsubscribe");
+},declineSubscription:function(_1a){
+this._manageSubscriptions(_1a,"unsubscribed");
+},cancelSubscription:function(_1b){
+this._manageSubscriptions(_1b,"unsubscribed");
+}});
+}

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/PresenceService.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/README
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/README?rev=755922&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/README (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/README Thu Mar 19 11:13:08 2009
@@ -0,0 +1,32 @@
+-------------------------------------------------------------------------------
+DojoX XMPP (Jabber Client)
+-------------------------------------------------------------------------------
+Version .9
+Release date: 07/05/2008
+-------------------------------------------------------------------------------
+Project state:	experimental
+-------------------------------------------------------------------------------
+[   ]	l18n support?
+[   ]	a11y support?
+-------------------------------------------------------------------------------
+Credits
+	Dustin Machi
+	Jason Cline
+	Revin Guillen
+-------------------------------------------------------------------------------
+Project description
+
+XMPP Service implementation in pure javascript. Uses BOSH and works cross
+domain.
+-------------------------------------------------------------------------------
+Dependencies:
+
+Dojo Core 
+-------------------------------------------------------------------------------
+Documentation
+
+FIXME
+-------------------------------------------------------------------------------
+Installation instructions
+
+FIXME

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/README
------------------------------------------------------------------------------
    svn:eol-style = native

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/RosterService.js
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/RosterService.js?rev=755922&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/RosterService.js (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/RosterService.js Thu Mar 19 11:13:08 2009
@@ -0,0 +1,210 @@
+/*
+	Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+	Available via Academic Free License >= 2.1 OR the modified BSD license.
+	see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.xmpp.RosterService"]){
+dojo._hasResource["dojox.xmpp.RosterService"]=true;
+dojo.provide("dojox.xmpp.RosterService");
+dojox.xmpp.roster={ADDED:101,CHANGED:102,REMOVED:103};
+dojo.declare("dojox.xmpp.RosterService",null,{constructor:function(_1){
+this.session=_1;
+},addRosterItem:function(_2,_3,_4){
+if(!_2){
+throw new Error("Roster::addRosterItem() - User ID is null");
+}
+var _5=this.session.getNextIqId();
+var _6={id:_5,from:this.session.jid+"/"+this.session.resource,type:"set"};
+var _7=new dojox.string.Builder(dojox.xmpp.util.createElement("iq",_6,false));
+_7.append(dojox.xmpp.util.createElement("query",{xmlns:"jabber:iq:roster"},false));
+_2=dojox.xmpp.util.encodeJid(_2);
+if(_2.indexOf("@")==-1){
+_2=_2+"@"+this.session.domain;
+}
+_7.append(dojox.xmpp.util.createElement("item",{jid:_2,name:dojox.xmpp.util.xmlEncode(_3)},false));
+if(_4){
+for(var i=0;i<_4.length;i++){
+_7.append("<group>");
+_7.append(_4[i]);
+_7.append("</group>");
+}
+}
+_7.append("</item></query></iq>");
+var _9=this.session.dispatchPacket(_7.toString(),"iq",_6.id);
+_9.addCallback(this,"verifyRoster");
+return _9;
+},updateRosterItem:function(_a,_b,_c){
+if(_a.indexOf("@")==-1){
+_a+=_a+"@"+this.session.domain;
+}
+var _d={id:this.session.getNextIqId(),from:this.session.jid+"/"+this.session.resource,type:"set"};
+var _e=new dojox.string.Builder(dojox.xmpp.util.createElement("iq",_d,false));
+_e.append(dojox.xmpp.util.createElement("query",{xmlns:"jabber:iq:roster"},false));
+var i=this.session.getRosterIndex(_a);
+if(i==-1){
+return;
+}
+var _10={jid:_a};
+if(_b){
+_10.name=_b;
+}else{
+if(this.session.roster[i].name){
+_10.name=this.session.roster[i].name;
+}
+}
+if(_10.name){
+_10.name=dojox.xmpp.util.xmlEncode(_10.name);
+}
+_e.append(dojox.xmpp.util.createElement("item",_10,false));
+var _11=_c?_c:this.session.roster[i].groups;
+if(_11){
+for(var x=0;x<_11.length;x++){
+_e.append("<group>");
+_e.append(_11[x]);
+_e.append("</group>");
+}
+}
+_e.append("</item></query></iq>");
+var def=this.session.dispatchPacket(_e.toString(),"iq",_d.id);
+def.addCallback(this,"verifyRoster");
+return def;
+},verifyRoster:function(res){
+if(res.getAttribute("type")=="result"){
+}else{
+var err=this.session.processXmppError(res);
+this.onAddRosterItemFailed(err);
+}
+return res;
+},addRosterItemToGroup:function(jid,_17){
+if(!jid){
+throw new Error("Roster::addRosterItemToGroup() JID is null or undefined");
+}
+if(!_17){
+throw new Error("Roster::addRosterItemToGroup() group is null or undefined");
+}
+var _18=this.session.getRosterIndex(jid);
+if(_18==-1){
+return;
+}
+var _19=this.session.roster[_18];
+var _1a=[];
+var _1b=false;
+for(var i=0;((_19<_19.groups.length)&&(!_1b));i++){
+if(_19.groups[i]!=_17){
+continue;
+}
+_1b=true;
+}
+if(!_1b){
+return this.updateRosterItem(jid,_19.name,_19.groups.concat(_17),_18);
+}
+return dojox.xmpp.xmpp.INVALID_ID;
+},removeRosterGroup:function(_1d){
+var _1e=this.session.roster;
+for(var i=0;i<_1e.length;i++){
+var _20=_1e[i];
+if(_20.groups.length>0){
+for(var j=0;j<_20.groups.length;j++){
+if(_20.groups[j]==_1d){
+_20.groups.splice(j,1);
+this.updateRosterItem(_20.jid,_20.name,_20.groups);
+}
+}
+}
+}
+},renameRosterGroup:function(_22,_23){
+var _24=this.session.roster;
+for(var i=0;i<_24.length;i++){
+var _26=_24[i];
+if(_26.groups.length>0){
+for(var j=0;j<_26.groups.length;j++){
+if(_26.groups[j]==_22){
+_26.groups[j]=_23;
+this.updateRosterItem(_26.jid,_26.name,_26.groups);
+}
+}
+}
+}
+},removeRosterItemFromGroup:function(jid,_29){
+if(!jid){
+throw new Error("Roster::addRosterItemToGroup() JID is null or undefined");
+}
+if(!_29){
+throw new Error("Roster::addRosterItemToGroup() group is null or undefined");
+}
+var _2a=this.session.getRosterIndex(jid);
+if(_2a==-1){
+return;
+}
+var _2b=this.session.roster[_2a];
+var _2c=false;
+for(var i=0;((i<_2b.groups.length)&&(!_2c));i++){
+if(_2b.groups[i]!=_29){
+continue;
+}
+_2c=true;
+_2a=i;
+}
+if(_2c==true){
+_2b.groups.splice(_2a,1);
+return this.updateRosterItem(jid,_2b.name,_2b.groups);
+}
+return dojox.xmpp.xmpp.INVALID_ID;
+},rosterItemRenameGroup:function(jid,_2f,_30){
+if(!jid){
+throw new Error("Roster::rosterItemRenameGroup() JID is null or undefined");
+}
+if(!_30){
+throw new Error("Roster::rosterItemRenameGroup() group is null or undefined");
+}
+var _31=this.session.getRosterIndex(jid);
+if(_31==-1){
+return;
+}
+var _32=this.session.roster[_31];
+var _33=false;
+for(var i=0;((i<_32.groups.length)&&(!_33));i++){
+if(_32.groups[i]==_2f){
+_32.groups[i]=_30;
+_33=true;
+}
+}
+if(_33==true){
+return this.updateRosterItem(jid,_32.name,_32.groups);
+}
+return dojox.xmpp.xmpp.INVALID_ID;
+},renameRosterItem:function(jid,_36){
+if(!jid){
+throw new Error("Roster::addRosterItemToGroup() JID is null or undefined");
+}
+if(!_36){
+throw new Error("Roster::addRosterItemToGroup() New Name is null or undefined");
+}
+var _37=this.session.getRosterIndex(jid);
+if(_37==-1){
+return;
+}
+return this.updateRosterItem(jid,_36,this.session.roster.groups,_37);
+},removeRosterItem:function(jid){
+if(!jid){
+throw new Error("Roster::addRosterItemToGroup() JID is null or undefined");
+}
+var req={id:this.session.getNextIqId(),from:this.session.jid+"/"+this.session.resource,type:"set"};
+var _3a=new dojox.string.Builder(dojox.xmpp.util.createElement("iq",req,false));
+_3a.append(dojox.xmpp.util.createElement("query",{xmlns:"jabber:iq:roster"},false));
+if(jid.indexOf("@")==-1){
+jid+=jid+"@"+this.session.domain;
+}
+_3a.append(dojox.xmpp.util.createElement("item",{jid:jid,subscription:"remove"},true));
+_3a.append("</query></iq>");
+var def=this.session.dispatchPacket(_3a.toString(),"iq",req.id);
+def.addCallback(this,"verifyRoster");
+return def;
+},getAvatar:function(jid){
+},publishAvatar:function(_3d,_3e){
+},onVerifyRoster:function(id){
+},onVerifyRosterFailed:function(err){
+}});
+}

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/RosterService.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/TransportSession.js
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/TransportSession.js?rev=755922&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/TransportSession.js (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/TransportSession.js Thu Mar 19 11:13:08 2009
@@ -0,0 +1,308 @@
+/*
+	Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+	Available via Academic Free License >= 2.1 OR the modified BSD license.
+	see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.xmpp.TransportSession"]){
+dojo._hasResource["dojox.xmpp.TransportSession"]=true;
+dojo.provide("dojox.xmpp.TransportSession");
+dojo.require("dojox.xmpp.util");
+dojo.require("dojo.io.script");
+dojo.require("dojo.io.iframe");
+dojo.require("dojox.data.dom");
+dojox.xmpp.TransportSession=function(_1){
+if(_1&&dojo.isObject(_1)){
+dojo.mixin(this,_1);
+if(this.useScriptSrcTransport){
+this.transportIframes=[];
+}
+}
+};
+dojox.xmpp.TransportSession._iframeOnload=function(_2){
+var _3=dojo.io.iframe.doc(dojo.byId("xmpp-transport-"+_2));
+_3.write("<script>var isLoaded=true; var rid=0; var transmiting=false; function _BOSH_(msg) { transmiting=false; parent.dojox.xmpp.TransportSession.handleBOSH(msg, rid); } </script>");
+};
+dojox.xmpp.TransportSession.handleBOSH=function(_4,_5){
+};
+dojo.extend(dojox.xmpp.TransportSession,{rid:0,hold:1,polling:1000,secure:false,wait:60,lang:"en",submitContentType:"text/xml; charset=utf=8",serviceUrl:"/httpbind",defaultResource:"dojoIm",domain:"imserver.com",sendTimeout:(this.wait+20)*1000,useScriptSrcTransport:false,keepAliveTimer:null,state:"NotReady",transmitState:"Idle",protocolPacketQueue:[],outboundQueue:[],outboundRequests:{},inboundQueue:[],deferredRequests:{},matchTypeIdAttribute:{},open:function(){
+this.status="notReady";
+this.rid=Math.round(Math.random()*1000000000);
+this.protocolPacketQueue=[];
+this.outboundQueue=[];
+this.outboundRequests={};
+this.inboundQueue=[];
+this.deferredRequests={};
+this.matchTypeIdAttribute={};
+this.keepAliveTimer=setTimeout(dojo.hitch(this,"_keepAlive"),10000);
+if(this.useScriptSrcTransport){
+dojo.connect(dojox.xmpp.TransportSession,"handleBOSH",this,"processScriptSrc");
+this.transportIframes=[];
+for(var i=0;i<=this.hold;i++){
+var _7=dojo.io.iframe.create("xmpp-transport-"+i,dojox._scopeName+".xmpp.TransportSession._iframeOnload("+i+");");
+this.transportIframes.push(_7);
+if(i==0){
+dojo.connect(_7,"onload",this,"_sendLogin");
+}
+}
+}else{
+this._sendLogin();
+}
+},_sendLogin:function(){
+var _8=this.rid++;
+var _9={content:this.submitContentType,hold:this.hold,rid:_8,to:this.domain,secure:this.secure,wait:this.wait,"xml:lang":this.lang,xmlns:dojox.xmpp.xmpp.BODY_NS};
+var _a=dojox.xmpp.util.createElement("body",_9,true);
+this.addToOutboundQueue(_a,_8);
+},processScriptSrc:function(_b,_c){
+var _d=dojox.data.dom.createDocument(_b,"text/xml");
+if(_d){
+this.processDocument(_d,_c);
+}else{
+}
+},_keepAlive:function(){
+if(this.state=="wait"||this.isTerminated()){
+return;
+}
+this._dispatchPacket();
+this.keepAliveTimer=setTimeout(dojo.hitch(this,"_keepAlive"),10000);
+},close:function(_e){
+var _f=this.rid++;
+var req={sid:this.sid,rid:_f,type:"terminate"};
+var _11=null;
+if(_e){
+_11=new dojox.string.Builder(dojox.xmpp.util.createElement("body",req,false));
+_11.append(_e);
+_11.append("</body>");
+}else{
+_11=new dojox.string.Builder(dojox.xmpp.util.createElement("body",req,false));
+}
+this.addToOutboundQueue(_11.toString(),_f);
+this.state=="Terminate";
+},dispatchPacket:function(msg,_13,_14,_15){
+if(msg){
+this.protocolPacketQueue.push(msg);
+}
+var def=new dojo.Deferred();
+if(_13&&_14){
+def.protocolMatchType=_13;
+def.matchId=_14;
+def.matchProperty=_15||"id";
+if(def.matchProperty!="id"){
+this.matchTypeIdAttribute[_13]=def.matchProperty;
+}
+}
+this.deferredRequests[def.protocolMatchType+"-"+def.matchId]=def;
+if(!this.dispatchTimer){
+this.dispatchTimer=setTimeout(dojo.hitch(this,"_dispatchPacket"),600);
+}
+return def;
+},_dispatchPacket:function(){
+clearTimeout(this.dispatchTimer);
+delete this.dispatchTimer;
+if(!this.sid){
+
+return;
+}
+if(!this.authId){
+
+return;
+}
+if(this.transmitState!="error"&&(this.protocolPacketQueue.length==0)&&(this.outboundQueue.length>0)){
+return;
+}
+if(this.state=="wait"||this.isTerminated()){
+return;
+}
+var req={sid:this.sid};
+if(this.protocolPacketQueue.length>0){
+req.rid=this.rid++;
+var _18=new dojox.string.Builder(dojox.xmpp.util.createElement("body",req,false));
+_18.append(this.processProtocolPacketQueue());
+_18.append("</body>");
+delete this.lastPollTime;
+}else{
+if(this.lastPollTime){
+var now=new Date().getTime();
+if(now-this.lastPollTime<this.polling){
+this.dispatchTimer=setTimeout(dojo.hitch(this,"_dispatchPacket"),this.polling-(now-this.lastPollTime)+10);
+return;
+}
+}
+req.rid=this.rid++;
+this.lastPollTime=new Date().getTime();
+var _18=new dojox.string.Builder(dojox.xmpp.util.createElement("body",req,true));
+}
+this.addToOutboundQueue(_18.toString(),req.rid);
+},redispatchPacket:function(rid){
+var env=this.outboundRequests[rid];
+this.sendXml(env,rid);
+},addToOutboundQueue:function(msg,rid){
+this.outboundQueue.push({msg:msg,rid:rid});
+this.outboundRequests[rid]=msg;
+this.sendXml(msg,rid);
+},removeFromOutboundQueue:function(rid){
+for(var i=0;i<this.outboundQueue.length;i++){
+if(rid==this.outboundQueue[i]["rid"]){
+this.outboundQueue.splice(i,1);
+break;
+}
+}
+delete this.outboundRequests[rid];
+},processProtocolPacketQueue:function(){
+var _20=new dojox.string.Builder();
+for(var i=0;i<this.protocolPacketQueue.length;i++){
+_20.append(this.protocolPacketQueue[i]);
+}
+this.protocolPacketQueue=[];
+return _20.toString();
+},findOpenIframe:function(){
+for(var i=0;i<this.transportIframes.length;i++){
+var _23=this.transportIframes[i];
+var win=_23.contentWindow;
+if(win.isLoaded&&!win.transmiting){
+return _23;
+}
+}
+},sendXml:function(_25,rid){
+if(this.isTerminated()){
+return;
+}
+this.transmitState="transmitting";
+if(this.useScriptSrcTransport){
+var _27=this.findOpenIframe();
+var _28=dojo.io.iframe.doc(_27);
+_27.contentWindow.rid=rid;
+_27.contentWindow.transmiting=true;
+dojo.io.script.attach("rid-"+rid,this.serviceUrl+"?"+encodeURIComponent(_25),_28);
+}else{
+var def=dojo.rawXhrPost({contentType:"text/xml",url:this.serviceUrl,postData:_25,handleAs:"xml",error:dojo.hitch(this,function(res,io){
+return this.processError(io.xhr.responseXML,io.xhr.status,rid);
+}),timeout:this.sendTimeout});
+def.addCallback(this,function(res){
+return this.processDocument(res,rid);
+});
+return def;
+}
+},processDocument:function(doc,rid){
+if(this.isTerminated()){
+return;
+}
+this.transmitState="idle";
+var _2f=doc.firstChild;
+if(_2f.nodeName!="body"){
+}
+if(this.outboundQueue.length<1){
+return;
+}
+var _30=this.outboundQueue[0]["rid"];
+if(rid==_30){
+this.removeFromOutboundQueue(rid);
+this.processResponse(_2f,rid);
+this.processInboundQueue();
+}else{
+var gap=rid-_30;
+if(gap<this.hold+2){
+this.addToInboundQueue(doc,rid);
+}else{
+}
+}
+return doc;
+},processInboundQueue:function(){
+while(this.inboundQueue.length>0){
+var _32=this.inboundQueue.shift();
+this.processDocument(_32["doc"],_32["rid"]);
+}
+},addToInboundQueue:function(doc,rid){
+for(var i=0;i<this.inboundQueue.length;i++){
+if(rid<this.inboundQueue[i]["rid"]){
+continue;
+}
+this.inboundQueue.splice(i,0,{doc:doc,rid:rid});
+}
+},processResponse:function(_36,rid){
+if(_36.getAttribute("type")=="terminate"){
+var _38=_36.firstChild.firstChild;
+var _39="";
+if(_38.nodeName=="conflict"){
+_39="conflict";
+}
+this.setState("Terminate",_39);
+return;
+}
+if((this.state!="Ready")&&(this.state!="Terminate")){
+var sid=_36.getAttribute("sid");
+if(sid){
+this.sid=sid;
+}else{
+throw new Error("No sid returned during xmpp session startup");
+}
+this.authId=_36.getAttribute("authid");
+if(this.authId==""){
+if(this.authRetries--<1){
+console.error("Unable to obtain Authorization ID");
+this.terminateSession();
+}
+}
+this.wait=_36.getAttribute("wait");
+if(_36.getAttribute("polling")){
+this.polling=parseInt(_36.getAttribute("polling"))*1000;
+}
+this.inactivity=_36.getAttribute("inactivity");
+this.setState("Ready");
+}
+dojo.forEach(_36.childNodes,function(_3b){
+this.processProtocolResponse(_3b,rid);
+},this);
+if(this.transmitState=="idle"){
+this.dispatchPacket();
+}
+},processProtocolResponse:function(msg,rid){
+this.onProcessProtocolResponse(msg);
+var key=msg.nodeName+"-"+msg.getAttribute("id");
+var def=this.deferredRequests[key];
+if(def){
+def.callback(msg);
+delete this.deferredRequests[key];
+}
+},setState:function(_40,_41){
+if(this.state!=_40){
+if(this["on"+_40]){
+this["on"+_40](_40,this.state,_41);
+}
+this.state=_40;
+}
+},isTerminated:function(){
+return this.state=="Terminate";
+},processError:function(err,_43,rid){
+if(this.isTerminated()){
+return;
+}
+if(_43!=200){
+this.setState("Terminate",_45);
+return;
+}
+if(err&&err.dojoType&&err.dojoType=="timeout"){
+}
+this.removeFromOutboundQueue(rid);
+if(err&&err.firstChild){
+if(err.firstChild.getAttribute("type")=="terminate"){
+var _46=err.firstChild.firstChild;
+var _45="";
+if(_46&&_46.nodeName=="conflict"){
+_45="conflict";
+}
+this.setState("Terminate",_45);
+return;
+}
+}
+this.transmitState="error";
+setTimeout(dojo.hitch(this,function(){
+this.dispatchPacket();
+}),200);
+return true;
+},onTerminate:function(_47,_48,_49){
+},onProcessProtocolResponse:function(msg){
+},onReady:function(_4b,_4c){
+}});
+}

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/TransportSession.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/UserService.js
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/UserService.js?rev=755922&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/UserService.js (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/UserService.js Thu Mar 19 11:13:08 2009
@@ -0,0 +1,76 @@
+/*
+	Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+	Available via Academic Free License >= 2.1 OR the modified BSD license.
+	see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.xmpp.UserService"]){
+dojo._hasResource["dojox.xmpp.UserService"]=true;
+dojo.provide("dojox.xmpp.UserService");
+dojo.declare("dojox.xmpp.UserService",null,{constructor:function(_1){
+this.session=_1;
+},getPersonalProfile:function(){
+var _2={id:this.session.getNextIqId(),type:"get"};
+var _3=new dojox.string.Builder(dojox.xmpp.util.createElement("iq",_2,false));
+_3.append(dojox.xmpp.util.createElement("query",{xmlns:"jabber:iq:private"},false));
+_3.append(dojox.xmpp.util.createElement("sunmsgr",{xmlsns:"sun:xmpp:properties"},true));
+_3.append("</query></iq>");
+var _4=this.session.dispatchPacket(_3.toString(),"iq",_2.id);
+_4.addCallback(this,"_onGetPersonalProfile");
+},setPersonalProfile:function(_5){
+var _6={id:this.session.getNextIqId(),type:"set"};
+var _7=new dojox.string.Builder(dojox.xmpp.util.createElement("iq",_6,false));
+_7.append(dojox.xmpp.util.createElement("query",{xmlns:"jabber:iq:private"},false));
+_7.append(dojox.xmpp.util.createElement("sunmsgr",{xmlsns:"sun:xmpp:properties"},false));
+for(var _8 in _5){
+_7.append(dojox.xmpp.util.createElement("property",{name:_8},false));
+_7.append(dojox.xmpp.util.createElement("value",{},false));
+_7.append(_5[_8]);
+_7.append("</value></props>");
+}
+_7.append("</sunmsgr></query></iq>");
+var _9=this.session.dispatchPacket(_7.toString(),"iq",_6.id);
+_9.addCallback(this,"_onSetPersonalProfile");
+},_onSetPersonalProfile:function(_a){
+if(_a.getAttribute("type")=="result"){
+this.onSetPersonalProfile(_a.getAttribute("id"));
+}else{
+if(_a.getAttribute("type")=="error"){
+var _b=this.session.processXmppError(_a);
+this.onSetPersonalProfileFailure(_b);
+}
+}
+},onSetPersonalProfile:function(id){
+},onSetPersonalProfileFailure:function(_d){
+},_onGetPersonalProfile:function(_e){
+if(_e.getAttribute("type")=="result"){
+var _f={};
+if(_e.hasChildNodes()){
+var _10=_e.firstChild;
+if((_10.nodeName=="query")&&(_10.getAttribute("xmlns")=="jabber:iq:private")){
+var _11=_10.firstChild;
+if((_11.nodeName=="query")&&(_11.getAttributes("xmlns")=="sun:xmpp:properties")){
+for(var i=0;i<_11.childNodes.length;i++){
+var n=_11.childNodes[i];
+if(n.nodeName=="property"){
+var _14=n.getAttribute("name");
+var val=n.firstChild||"";
+_f[_14]=val;
+}
+}
+}
+}
+this.onGetPersonalProfile(_f);
+}
+}else{
+if(_e.getAttribute("type")=="error"){
+var err=this.session.processXmppError(_e);
+this.onGetPersonalProfileFailure(err);
+}
+}
+return _e;
+},onGetPersonalProfile:function(_17){
+},onGetPersonalProfileFailure:function(err){
+}});
+}

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/UserService.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/sasl.js
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/sasl.js?rev=755922&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/sasl.js (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/sasl.js Thu Mar 19 11:13:08 2009
@@ -0,0 +1,32 @@
+/*
+	Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+	Available via Academic Free License >= 2.1 OR the modified BSD license.
+	see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.xmpp.sasl"]){
+dojo._hasResource["dojox.xmpp.sasl"]=true;
+dojo.provide("dojox.xmpp.sasl");
+dojo.require("dojox.xmpp.util");
+dojox.xmpp.sasl.saslNS="urn:ietf:params:xml:ns:xmpp-sasl";
+dojox.xmpp.sasl.SunWebClientAuth=function(_1){
+var _2={xmlns:dojox.xmpp.sasl.saslNS,mechanism:"SUN-COMMS-CLIENT-PROXY-AUTH"};
+var _3=dojox.xmpp.util.createElement("auth",_2,true);
+_1.dispatchPacket(_3);
+};
+dojox.xmpp.sasl.SaslPlain=function(_4){
+var _5={xmlns:dojox.xmpp.sasl.saslNS,mechanism:"PLAIN"};
+var _6=new dojox.string.Builder(dojox.xmpp.util.createElement("auth",_5,false));
+var id=_4.jid;
+var _8=_4.jid.indexOf("@");
+if(_8!=-1){
+id=_4.jid.substring(0,_8);
+}
+var _9="\x00"+id+"\x00"+_4.password;
+_9=dojox.xmpp.util.Base64.encode(_9);
+_6.append(_9);
+_6.append("</auth>");
+_4.dispatchPacket(_6.toString());
+};
+}

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/sasl.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/util.js
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/util.js?rev=755922&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/util.js (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/util.js Thu Mar 19 11:13:08 2009
@@ -0,0 +1,167 @@
+/*
+	Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+	Available via Academic Free License >= 2.1 OR the modified BSD license.
+	see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.xmpp.util"]){
+dojo._hasResource["dojox.xmpp.util"]=true;
+dojo.provide("dojox.xmpp.util");
+dojo.require("dojox.string.Builder");
+dojox.xmpp.util.xmlEncode=function(_1){
+if(_1){
+_1=_1.replace("&","&amp;").replace(">","&gt;").replace("<","&lt;").replace("'","&apos;").replace("\"","&quot;");
+}
+return _1;
+};
+dojox.xmpp.util.encodeJid=function(_2){
+var _3=new dojox.string.Builder();
+for(var i=0;i<_2.length;i++){
+var ch=_2.charAt(i);
+var _6=ch;
+switch(ch){
+case " ":
+_6="\\20";
+break;
+case "\"":
+_6="\\22";
+break;
+case "#":
+_6="\\23";
+break;
+case "&":
+_6="\\26";
+break;
+case "'":
+_6="\\27";
+break;
+case "/":
+_6="\\2f";
+break;
+case ":":
+_6="\\3a";
+break;
+case "<":
+_6="\\3c";
+break;
+case ">":
+_6="\\3e";
+break;
+}
+_3.append(_6);
+}
+return _3.toString();
+};
+dojox.xmpp.util.decodeJid=function(_7){
+_7=_7.replace(/\\([23][02367acef])/g,function(_8){
+switch(_8){
+case "\\20":
+return " ";
+case "\\22":
+return "\"";
+case "\\23":
+return "#";
+case "\\26":
+return "&";
+case "\\27":
+return "'";
+case "\\2f":
+return "/";
+case "\\3a":
+return ":";
+case "\\3c":
+return "<";
+case "\\3e":
+return ">";
+}
+return "ARG";
+});
+return _7;
+};
+dojox.xmpp.util.createElement=function(_9,_a,_b){
+var _c=new dojox.string.Builder("<");
+_c.append(_9+" ");
+for(var _d in _a){
+_c.append(_d+"=\"");
+_c.append(_a[_d]);
+_c.append("\" ");
+}
+if(_b){
+_c.append("/>");
+}else{
+_c.append(">");
+}
+return _c.toString();
+};
+dojox.xmpp.util.stripHtml=function(_e){
+var re=/<[^>]*?>/gi;
+for(var i=0;i<arguments.length;i++){
+}
+return _e.replace(re,"");
+};
+dojox.xmpp.util.decodeHtmlEntities=function(str){
+var ta=dojo.doc.createElement("textarea");
+ta.innerHTML=str.replace(/</g,"&lt;").replace(/>/g,"&gt;");
+return ta.value;
+};
+dojox.xmpp.util.htmlToPlain=function(str){
+str=dojox.xmpp.util.decodeHtmlEntities(str);
+str=str.replace(/<br\s*[i\/]{0,1}>/gi,"\n");
+str=dojox.xmpp.util.stripHtml(str);
+return str;
+};
+dojox.xmpp.util.Base64={};
+dojox.xmpp.util.Base64.keylist="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
+dojox.xmpp.util.Base64.encode=function(_14){
+var _15="";
+var c1,c2,c3;
+var _19,_1a,_1b,_1c;
+var i=0;
+do{
+c1=c2=c3="";
+_19=_1a=_1b=_1c="";
+c1=_14.charCodeAt(i++);
+c2=_14.charCodeAt(i++);
+c3=_14.charCodeAt(i++);
+_19=c1>>2;
+_1a=((c1&3)<<4)|(c2>>4);
+_1b=((c2&15)<<2)|(c3>>6);
+_1c=c3&63;
+if(isNaN(c2)){
+_1b=_1c=64;
+}else{
+if(isNaN(c3)){
+_1c=64;
+}
+}
+_15=_15+dojox.xmpp.util.Base64.keylist.charAt(_19)+dojox.xmpp.util.Base64.keylist.charAt(_1a)+dojox.xmpp.util.Base64.keylist.charAt(_1b)+dojox.xmpp.util.Base64.keylist.charAt(_1c);
+}while(i<_14.length);
+return _15;
+};
+dojox.xmpp.util.Base64.decode=function(_1e){
+var _1f="";
+var c1,c2,c3;
+var _23,_24,_25,_26="";
+var i=0;
+do{
+c1=c2=c3="";
+_23=_24=_25=_26="";
+_23=dojox.xmpp.util.Base64.keylist.indexOf(_1e.charAt(i++));
+_24=dojox.xmpp.util.Base64.keylist.indexOf(_1e.charAt(i++));
+_25=dojox.xmpp.util.Base64.keylist.indexOf(_1e.charAt(i++));
+_26=dojox.xmpp.util.Base64.keylist.indexOf(_1e.charAt(i++));
+c1=(_23<<2)|(_24>>4);
+c2=((_24&15)<<4)|(_25>>2);
+c3=((_25&3)<<6)|_26;
+_1f=_1f+String.fromCharCode(c1);
+if(_25!=64){
+_1f=_1f+String.fromCharCode(c2);
+}
+if(_26!=64){
+_1f=_1f+String.fromCharCode(c3);
+}
+}while(i<_1e.length);
+return _1f;
+};
+}

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/util.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/widget/ChatSession.js
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/widget/ChatSession.js?rev=755922&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/widget/ChatSession.js (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/widget/ChatSession.js Thu Mar 19 11:13:08 2009
@@ -0,0 +1,28 @@
+/*
+	Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+	Available via Academic Free License >= 2.1 OR the modified BSD license.
+	see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.xmpp.widget.ChatSession"]){
+dojo._hasResource["dojox.xmpp.widget.ChatSession"]=true;
+dojo.provide("dojox.xmpp.widget.ChatSession");
+dojo.declare("dojox.xmpp.widget.ChatSession",[dijit.layout.LayoutContainer,dijit._Templated],{templateString:"<div>\n<div dojoAttachPoint=\"messages\" dojoType=\"dijit.layout.ContentPane\" layoutAlign=\"client\" style=\"overflow:auto\">\n</div>\n<div dojoType=\"dijit.layout.ContentPane\" layoutAlign=\"bottom\" style=\"border-top: 2px solid #333333; height: 35px;\"><input dojoAttachPoint=\"chatInput\" dojoAttachEvent=\"onkeypress: onKeyPress\" style=\"width: 100%;height: 35px;\" /></div>\n</div>\n",enableSubWidgets:true,widgetsInTemplate:true,widgetType:"ChatSession",chatWith:null,instance:null,postCreate:function(){
+},displayMessage:function(_1,_2){
+if(_1){
+var _3=_1.from?this.chatWith:"me";
+this.messages.domNode.innerHTML+="<b>"+_3+":</b> "+_1.body+"<br/>";
+this.goToLastMessage();
+}
+},goToLastMessage:function(){
+this.messages.domNode.scrollTop=this.messages.domNode.scrollHeight;
+},onKeyPress:function(e){
+var _5=e.keyCode||e.charCode;
+if((_5==dojo.keys.ENTER)&&(this.chatInput.value!="")){
+this.instance.sendMessage({body:this.chatInput.value});
+this.displayMessage({body:this.chatInput.value},"out");
+this.chatInput.value="";
+}
+}});
+}

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/widget/ChatSession.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/widget/templates/ChatSession.html
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/widget/templates/ChatSession.html?rev=755922&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/widget/templates/ChatSession.html (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/widget/templates/ChatSession.html Thu Mar 19 11:13:08 2009
@@ -0,0 +1,5 @@
+<div>
+<div dojoAttachPoint="messages" dojoType="dijit.layout.ContentPane" layoutAlign="client" style="overflow:auto">
+</div>
+<div dojoType="dijit.layout.ContentPane" layoutAlign="bottom" style="border-top: 2px solid #333333; height: 35px;"><input dojoAttachPoint="chatInput" dojoAttachEvent="onkeypress: onKeyPress" style="width: 100%;height: 35px;" /></div>
+</div>
\ No newline at end of file

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/widget/templates/ChatSession.html
------------------------------------------------------------------------------
    svn:mime-type = text/html

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/xmppSession.js
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/xmppSession.js?rev=755922&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/xmppSession.js (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/xmppSession.js Thu Mar 19 11:13:08 2009
@@ -0,0 +1,525 @@
+/*
+	Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+	Available via Academic Free License >= 2.1 OR the modified BSD license.
+	see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.xmpp.xmppSession"]){
+dojo._hasResource["dojox.xmpp.xmppSession"]=true;
+dojo.provide("dojox.xmpp.xmppSession");
+dojo.require("dojox.xmpp.TransportSession");
+dojo.require("dojox.xmpp.RosterService");
+dojo.require("dojox.xmpp.PresenceService");
+dojo.require("dojox.xmpp.UserService");
+dojo.require("dojox.xmpp.ChatService");
+dojo.require("dojox.xmpp.sasl");
+dojox.xmpp.xmpp={STREAM_NS:"http://etherx.jabber.org/streams",CLIENT_NS:"jabber:client",STANZA_NS:"urn:ietf:params:xml:ns:xmpp-stanzas",SASL_NS:"urn:ietf:params:xml:ns:xmpp-sasl",BIND_NS:"urn:ietf:params:xml:ns:xmpp-bind",BODY_NS:"http://jabber.org/protocol/httpbind",XHTML_BODY_NS:"http://www.w3.org/1999/xhtml",XHTML_IM_NS:"http://jabber.org/protocol/xhtml-im",INACTIVE:"Inactive",CONNECTED:"Connected",ACTIVE:"Active",TERMINATE:"Terminate",LOGIN_FAILURE:"LoginFailure",INVALID_ID:-1,NO_ID:0,error:{BAD_REQUEST:"bad-request",CONFLICT:"conflict",FEATURE_NOT_IMPLEMENTED:"feature-not-implemented",FORBIDDEN:"forbidden",GONE:"gone",INTERNAL_SERVER_ERROR:"internal-server-error",ITEM_NOT_FOUND:"item-not-found",ID_MALFORMED:"jid-malformed",NOT_ACCEPTABLE:"not-acceptable",NOT_ALLOWED:"not-allowed",NOT_AUTHORIZED:"not-authorized",SERVICE_UNAVAILABLE:"service-unavailable",SUBSCRIPTION_REQUIRED:"subscription-required",UNEXPECTED_REQUEST:"unexpected-request"}};
+dojox.xmpp.xmppSession=function(_1){
+if(_1&&dojo.isObject(_1)){
+dojo.mixin(this,_1);
+}
+this.session=new dojox.xmpp.TransportSession(_1);
+dojo.connect(this.session,"onReady",this,"onTransportReady");
+dojo.connect(this.session,"onTerminate",this,"onTransportTerminate");
+dojo.connect(this.session,"onProcessProtocolResponse",this,"processProtocolResponse");
+};
+dojo.extend(dojox.xmpp.xmppSession,{roster:[],chatRegister:[],_iqId:Math.round(Math.random()*1000000000),open:function(_2,_3,_4){
+if(!_2){
+throw new Error("User id cannot be null");
+}else{
+this.jid=_2;
+if(_2.indexOf("@")==-1){
+this.jid=this.jid+"@"+this.domain;
+}
+}
+if(_3){
+this.password=_3;
+}
+if(_4){
+this.resource=_4;
+}
+this.session.open();
+},close:function(){
+this.state=dojox.xmpp.xmpp.TERMINATE;
+this.session.close(dojox.xmpp.util.createElement("presence",{type:"unavailable",xmlns:dojox.xmpp.xmpp.CLIENT_NS},true));
+},processProtocolResponse:function(_5){
+var _6=_5.nodeName;
+var _7=_6.indexOf(":");
+if(_7>0){
+_6=_6.substring(_7+1);
+}
+switch(_6){
+case "iq":
+case "presence":
+case "message":
+case "features":
+this[_6+"Handler"](_5);
+break;
+default:
+if(_5.getAttribute("xmlns")==dojox.xmpp.xmpp.SASL_NS){
+this.saslHandler(_5);
+}
+}
+},messageHandler:function(_8){
+switch(_8.getAttribute("type")){
+case "chat":
+this.chatHandler(_8);
+break;
+case "normal":
+default:
+this.simpleMessageHandler(_8);
+}
+},iqHandler:function(_9){
+if(_9.getAttribute("type")=="set"){
+this.iqSetHandler(_9);
+return;
+}else{
+if(_9.getAttribute("type")=="get"){
+return;
+}
+}
+},presenceHandler:function(_a){
+switch(_a.getAttribute("type")){
+case "subscribe":
+this.presenceSubscriptionRequest(_a.getAttribute("from"));
+break;
+case "subscribed":
+case "unsubscribed":
+break;
+case "error":
+this.processXmppError(_a);
+break;
+default:
+this.presenceUpdate(_a);
+break;
+}
+},featuresHandler:function(_b){
+var _c=[];
+var _d=false;
+if(_b.hasChildNodes()){
+for(var i=0;i<_b.childNodes.length;i++){
+var n=_b.childNodes[i];
+switch(n.nodeName){
+case "mechanisms":
+for(var x=0;x<n.childNodes.length;x++){
+_c.push(n.childNodes[x].firstChild.nodeValue);
+}
+break;
+case "bind":
+_d=true;
+break;
+}
+}
+}
+if(this.state==dojox.xmpp.xmpp.CONNECTED&&_d){
+for(var i=0;i<_c.length;i++){
+if(_c[i]=="SUN-COMMS-CLIENT-PROXY-AUTH"){
+dojox.xmpp.sasl.SunWebClientAuth(this);
+break;
+}else{
+if(_c[i]=="PLAIN"){
+dojox.xmpp.sasl.SaslPlain(this);
+break;
+}else{
+console.error("No suitable auth mechanism found for: ",_c[i]);
+}
+}
+}
+delete this.password;
+}
+},saslHandler:function(msg){
+if(msg.nodeName=="success"){
+this.bindResource();
+return;
+}
+if(msg.hasChildNodes()){
+this.onLoginFailure(msg.firstChild.nodeName);
+}
+},chatHandler:function(msg){
+var _13={from:msg.getAttribute("from"),to:msg.getAttribute("to")};
+var _14=null;
+for(var i=0;i<msg.childNodes.length;i++){
+var n=msg.childNodes[i];
+if(n.hasChildNodes()){
+switch(n.nodeName){
+case "thread":
+_13.chatid=n.firstChild.nodeValue;
+break;
+case "body":
+if(!n.getAttribute("xmlns")||(n.getAttribute("xmlns")=="")){
+_13.body=n.firstChild.nodeValue;
+}
+break;
+case "subject":
+_13.subject=n.firstChild.nodeValue;
+case "html":
+if(n.getAttribute("xmlns")==dojox.xmpp.xmpp.XHTML_IM_NS){
+_13.xhtml=n.getElementsByTagName("body")[0];
+}
+break;
+case "x":
+break;
+default:
+}
+}
+}
+var _17=-1;
+if(_13.chatid){
+for(var i=0;i<this.chatRegister.length;i++){
+var ci=this.chatRegister[i];
+if(ci&&ci.chatid==_13.chatid){
+_17=i;
+break;
+}
+}
+}else{
+for(var i=0;i<this.chatRegister.length;i++){
+var ci=this.chatRegister[i];
+if(ci){
+if(ci.uid==this.getBareJid(_13.from)){
+_17=i;
+}
+}
+}
+}
+if(_17>-1&&_14){
+var _19=this.chatRegister[_17];
+_19.setState(_14);
+if(_19.firstMessage){
+if(_14==dojox.xmpp.chat.ACTIVE_STATE){
+_19.useChatState=(_14!=null)?true:false;
+_19.firstMessage=false;
+}
+}
+}
+if((!_13.body||_13.body=="")&&!_13.xhtml){
+return;
+}
+if(_17>-1){
+var _19=this.chatRegister[_17];
+_19.recieveMessage(_13);
+}else{
+var _1a=new dojox.xmpp.ChatService();
+_1a.uid=this.getBareJid(_13.from);
+_1a.chatid=_13.chatid;
+_1a.firstMessage=true;
+if(!_14||_14!=dojox.xmpp.chat.ACTIVE_STATE){
+this.useChatState=false;
+}
+this.registerChatInstance(_1a,_13);
+}
+},simpleMessageHandler:function(msg){
+},registerChatInstance:function(_1c,_1d){
+_1c.setSession(this);
+this.chatRegister.push(_1c);
+this.onRegisterChatInstance(_1c,_1d);
+_1c.recieveMessage(_1d,true);
+},iqSetHandler:function(msg){
+if(msg.hasChildNodes()){
+var fn=msg.firstChild;
+switch(fn.nodeName){
+case "query":
+if(fn.getAttribute("xmlns")=="jabber:iq:roster"){
+this.rosterSetHandler(fn);
+this.sendIqResult(msg.getAttribute("id"),msg.getAttribute("from"));
+}
+break;
+default:
+break;
+}
+}
+},sendIqResult:function(_20,to){
+var req={id:_20,to:to||this.domain,type:"result",from:this.jid+"/"+this.resource};
+this.dispatchPacket(dojox.xmpp.util.createElement("iq",req,true));
+},rosterSetHandler:function(_23){
+for(var i=0;i<_23.childNodes.length;i++){
+var n=_23.childNodes[i];
+if(n.nodeName=="item"){
+var _26=false;
+var _27=-1;
+var _28=null;
+var _29=null;
+for(var x=0;x<this.roster.length;x++){
+var r=this.roster[x];
+if(n.getAttribute("jid")==r.jid){
+_26=true;
+if(n.getAttribute("subscription")=="remove"){
+_28={id:r.jid,name:r.name,groups:[]};
+for(var y=0;y<r.groups.length;y++){
+_28.groups.push(r.groups[y]);
+}
+this.roster.splice(x,1);
+_27=dojox.xmpp.roster.REMOVED;
+}else{
+_29=dojo.clone(r);
+var _2d=n.getAttribute("name");
+if(_2d){
+this.roster[x].name=_2d;
+}
+r.groups=[];
+if(n.getAttribute("subscription")){
+r.status=n.getAttribute("subscription");
+}
+r.substatus=dojox.xmpp.presence.SUBSCRIPTION_SUBSTATUS_NONE;
+if(n.getAttribute("ask")=="subscribe"){
+r.substatus=dojox.xmpp.presence.SUBSCRIPTION_REQUEST_PENDING;
+}
+for(var y=0;y<n.childNodes.length;y++){
+var _2e=n.childNodes[y];
+if((_2e.nodeName=="group")&&(_2e.hasChildNodes())){
+var _2f=_2e.firstChild.nodeValue;
+r.groups.push(_2f);
+}
+}
+_28=r;
+_27=dojox.xmpp.roster.CHANGED;
+}
+break;
+}
+}
+if(!_26&&(n.getAttribute("subscription")!="remove")){
+r=this.createRosterEntry(n);
+_28=r;
+_27=dojox.xmpp.roster.ADDED;
+}
+switch(_27){
+case dojox.xmpp.roster.ADDED:
+this.onRosterAdded(_28);
+break;
+case dojox.xmpp.roster.REMOVED:
+this.onRosterRemoved(_28);
+break;
+case dojox.xmpp.roster.CHANGED:
+this.onRosterChanged(_28,_29);
+break;
+}
+}
+}
+},presenceUpdate:function(msg){
+if(msg.getAttribute("to")){
+var jid=this.getBareJid(msg.getAttribute("to"));
+if(jid!=this.jid){
+return;
+}
+}
+var _32=this.getResourceFromJid(msg.getAttribute("from"));
+if(!_32){
+return;
+}
+var p={from:this.getBareJid(msg.getAttribute("from")),resource:_32,show:dojox.xmpp.presence.STATUS_ONLINE,priority:5,hasAvatar:false};
+if(msg.getAttribute("type")=="unavailable"){
+p.show=dojox.xmpp.presence.STATUS_OFFLINE;
+}
+for(var i=0;i<msg.childNodes.length;i++){
+var n=msg.childNodes[i];
+if(n.hasChildNodes()){
+switch(n.nodeName){
+case "status":
+case "show":
+p[n.nodeName]=n.firstChild.nodeValue;
+break;
+case "status":
+p.priority=parseInt(n.firstChild.nodeValue);
+break;
+case "x":
+if(n.firstChild&&n.firstChild.firstChild&&n.firstChild.firstChild.nodeValue!=""){
+p.avatarHash=n.firstChild.firstChild.nodeValue;
+p.hasAvatar=true;
+}
+break;
+}
+}
+}
+this.onPresenceUpdate(p);
+},retrieveRoster:function(){
+var _36={id:this.getNextIqId(),from:this.jid+"/"+this.resource,type:"get"};
+var req=new dojox.string.Builder(dojox.xmpp.util.createElement("iq",_36,false));
+req.append(dojox.xmpp.util.createElement("query",{xmlns:"jabber:iq:roster"},true));
+req.append("</iq>");
+var def=this.dispatchPacket(req,"iq",_36.id);
+def.addCallback(this,"onRetrieveRoster");
+},getRosterIndex:function(jid){
+if(jid.indexOf("@")==-1){
+jid+="@"+this.domain;
+}
+for(var i=0;i<this.roster.length;i++){
+if(jid==this.roster[i].jid){
+return i;
+}
+}
+return -1;
+},createRosterEntry:function(_3b){
+var re={name:_3b.getAttribute("name"),jid:_3b.getAttribute("jid"),groups:[],status:dojox.xmpp.presence.SUBSCRIPTION_NONE,substatus:dojox.xmpp.presence.SUBSCRIPTION_SUBSTATUS_NONE};
+if(!re.name){
+re.name=re.id;
+}
+for(var i=0;i<_3b.childNodes.length;i++){
+var n=_3b.childNodes[i];
+if(n.nodeName=="group"&&n.hasChildNodes()){
+re.groups.push(n.firstChild.nodeValue);
+}
+}
+if(_3b.getAttribute("subscription")){
+re.status=_3b.getAttribute("subscription");
+}
+if(_3b.getAttribute("ask")=="subscribe"){
+re.substatus=dojox.xmpp.presence.SUBSCRIPTION_REQUEST_PENDING;
+}
+return re;
+},bindResource:function(){
+var _3f={xmlns:"jabber:client",id:this.getNextIqId(),type:"set"};
+var _40=new dojox.string.Builder(dojox.xmpp.util.createElement("iq",_3f,false));
+_40.append(dojox.xmpp.util.createElement("bind",{xmlns:dojox.xmpp.xmpp.BIND_NS},false));
+if(this.resource){
+_40.append(dojox.xmpp.util.createElement("resource"));
+_40.append(this.resource);
+_40.append("</resource>");
+}
+_40.append("</bind></iq>");
+var def=this.dispatchPacket(_40,"iq",_3f.id);
+def.addCallback(this,"onBindResource");
+},getNextIqId:function(){
+return "im_"+this._iqId++;
+},presenceSubscriptionRequest:function(msg){
+this.onSubscriptionRequest(msg);
+},dispatchPacket:function(msg,_44,_45){
+if(this.state!="Terminate"){
+return this.session.dispatchPacket(msg,_44,_45);
+}else{
+}
+},setState:function(_46,_47){
+if(this.state!=_46){
+if(this["on"+_46]){
+this["on"+_46](_46,this.state,_47);
+}
+this.state=_46;
+}
+},search:function(_48,_49,_4a){
+var req={id:this.getNextIqId(),"xml:lang":this.lang,type:"set",from:this.jid+"/"+this.resource,to:_49};
+var _4c=new dojox.string.Builder(dojox.xmpp.util.createElement("iq",req,false));
+_4c.append(dojox.xmpp.util.createElement("query",{xmlns:"jabber:iq:search"},false));
+_4c.append(dojox.xmpp.util.createElement(_4a,{},false));
+_4c.append(_48);
+_4c.append("</").append(_4a).append(">");
+_4c.append("</query></iq>");
+var def=this.dispatchPacket(_4c.toString,"iq",req.id);
+def.addCallback(this,"_onSearchResults");
+},_onSearchResults:function(msg){
+if((msg.getAttribute("type")=="result")&&(msg.hasChildNodes())){
+this.onSearchResults([]);
+}
+},onLogin:function(){
+this.retrieveRoster();
+},onLoginFailure:function(msg){
+},onBindResource:function(msg){
+if(msg.getAttribute("type")=="result"){
+if((msg.hasChildNodes())&&(msg.firstChild.nodeName=="bind")){
+var _51=msg.firstChild;
+if((_51.hasChildNodes())&&(_51.firstChild.nodeName=="jid")){
+if(_51.firstChild.hasChildNodes()){
+var _52=_51.firstChild.firstChild.nodeValue;
+this.jid=this.getBareJid(_52);
+this.resource=this.getResourceFromJid(_52);
+}
+}
+}else{
+}
+this.onLogin();
+}else{
+if(msg.getAttribute("type")=="error"){
+var err=this.processXmppError(msg);
+this.onLoginFailure(err);
+}
+}
+return msg;
+},onSearchResults:function(_54){
+},onRetrieveRoster:function(msg){
+if((msg.getAttribute("type")=="result")&&msg.hasChildNodes()){
+var _56=msg.getElementsByTagName("query")[0];
+if(_56.getAttribute("xmlns")=="jabber:iq:roster"){
+for(var i=0;i<_56.childNodes.length;i++){
+if(_56.childNodes[i].nodeName=="item"){
+this.roster[i]=this.createRosterEntry(_56.childNodes[i]);
+}
+}
+}
+}else{
+if(msg.getAttribute("type")=="error"){
+}
+}
+this.setState(dojox.xmpp.xmpp.ACTIVE);
+this.onRosterUpdated();
+return msg;
+},onRosterUpdated:function(){
+},onSubscriptionRequest:function(req){
+},onPresenceUpdate:function(p){
+},onTransportReady:function(){
+this.setState(dojox.xmpp.xmpp.CONNECTED);
+this.rosterService=new dojox.xmpp.RosterService(this);
+this.presenceService=new dojox.xmpp.PresenceService(this);
+this.userService=new dojox.xmpp.UserService(this);
+},onTransportTerminate:function(_5a,_5b,_5c){
+this.setState(dojox.xmpp.xmpp.TERMINATE,_5c);
+},onConnected:function(){
+},onTerminate:function(_5d,_5e,_5f){
+},onActive:function(){
+},onRegisterChatInstance:function(_60,_61){
+},onRosterAdded:function(ri){
+},onRosterRemoved:function(ri){
+},onRosterChanged:function(ri,_65){
+},processXmppError:function(msg){
+var err={stanzaType:msg.nodeName,id:msg.getAttribute("id")};
+for(var i=0;i<msg.childNodes.length;i++){
+var n=msg.childNodes[i];
+switch(n.nodeName){
+case "error":
+err.errorType=n.getAttribute("type");
+for(var x=0;x<n.childNodes.length;x++){
+var cn=n.childNodes[x];
+if((cn.nodeName=="text")&&(cn.getAttribute("xmlns")==dojox.xmpp.xmpp.STANZA_NS)&&cn.hasChildNodes()){
+err.message=cn.firstChild.nodeValue;
+}else{
+if((cn.getAttribute("xmlns")==dojox.xmpp.xmpp.STANZA_NS)&&(!cn.hasChildNodes())){
+err.condition=cn.nodeName;
+}
+}
+}
+break;
+default:
+break;
+}
+}
+return err;
+},sendStanzaError:function(_6c,to,id,_6f,_70,_71){
+var req={type:"error"};
+if(to){
+req.to=to;
+}
+if(id){
+req.id=id;
+}
+var _73=new dojox.string.Builder(dojox.xmpp.util.createElement(_6c,req,false));
+_73.append(dojox.xmpp.util.createElement("error",{type:_6f},false));
+_73.append(dojox.xmpp.util.createElement("condition",{xmlns:dojox.xmpp.xmpp.STANZA_NS},true));
+if(_71){
+var _74={xmlns:dojox.xmpp.xmpp.STANZA_NS,"xml:lang":this.lang};
+_73.append(dojox.xmpp.util.createElement("text",_74,false));
+_73.append(_71).append("</text>");
+}
+_73.append("</error></").append(_6c).append(">");
+this.dispatchPacket(_73.toString());
+},getBareJid:function(jid){
+var i=jid.indexOf("/");
+if(i!=-1){
+return jid.substring(0,i);
+}
+return jid;
+},getResourceFromJid:function(jid){
+var i=jid.indexOf("/");
+if(i!=-1){
+return jid.substring((i+1),jid.length);
+}
+return "";
+}});
+}

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/xmpp/xmppSession.js
------------------------------------------------------------------------------
    svn:eol-style = native