a:25:{s:9:"#provides";s:22:"dojox.xmpp.ChatService";s:9:"#resource";s:19:"xmpp/ChatService.js";s:22:"dojox.xmpp.ChatService";a:4:{s:4:"type";s:8:"Function";s:6:"source";s:78:" this.state=""; this.chatid = Math.round(Math.random() * 1000000000000000);";s:9:"classlike";b:1;s:7:"summary";s:0:"";}s:28:"dojox.xmpp.ChatService.state";a:3:{s:9:"prototype";s:22:"dojox.xmpp.ChatService";s:8:"instance";s:22:"dojox.xmpp.ChatService";s:7:"summary";s:0:"";}s:37:"dojox.xmpp.ChatService.recieveMessage";a:5:{s:9:"prototype";s:22:"dojox.xmpp.ChatService";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:3:"msg";a:1:{s:4:"type";s:0:"";}s:7:"initial";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:52:" if (msg&&!initial){ this.onNewMessage(msg); }";s:7:"summary";s:0:"";}s:33:"dojox.xmpp.ChatService.setSession";a:5:{s:9:"prototype";s:22:"dojox.xmpp.ChatService";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:7:"session";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:25:" this.session = session;";s:7:"summary";s:0:"";}s:31:"dojox.xmpp.ChatService.setState";a:5:{s:9:"prototype";s:22:"dojox.xmpp.ChatService";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:5:"state";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:54:" if (this.state != state){ this.state = state; }";s:7:"summary";s:0:"";}s:29:"dojox.xmpp.ChatService.invite";a:5:{s:9:"prototype";s:22:"dojox.xmpp.ChatService";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:7:"contact";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:775:" if (this.uid){return;} if(!contact || contact==''){ throw new Error("ChatService::invite() contact is NULL"); } this.uid = contact; var req = { xmlns: "jabber:client", to: this.uid, from: this.session.jid + "/" + this.session.resource, type: "chat" } var request = new dojox.string.Builder(dojox.xmpp.util.createElement("message", req, false)); request.append(dojox.xmpp.util.createElement("thread",{},false)); request.append(this.chatid); request.append(""); request.append(dojox.xmpp.util.createElement("active",{xmlns: dojox.xmpp.chat.CHAT_STATE_NS},true)); request.append(""); this.session.dispatchPacket(request.toString()); this.onInvite(contact); this.setState(dojox.xmpp.chat.CHAT_STATE_NS);";s:7:"summary";s:0:"";}s:34:"dojox.xmpp.ChatService.sendMessage";a:5:{s:9:"prototype";s:22:"dojox.xmpp.ChatService";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:3:"msg";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:1816:" if (!this.uid){ //console.log("ChatService::sendMessage() - Contact Id is null, need to invite to chat"); return; } if ((!msg.body || msg.body=="") && !msg.xhtml){return;} var req = { xmlns: "jabber:client", to: this.uid, from: this.session.jid + "/" + this.session.resource, type: "chat" } var message = new dojox.string.Builder(dojox.xmpp.util.createElement("message",req,false)); var html = dojox.xmpp.util.createElement("html", { "xmlns":dojox.xmpp.xmpp.XHTML_IM_NS},false) var bodyTag = dojox.xmpp.util.createElement("body", {"xml:lang":this.session.lang, "xmlns":dojox.xmpp.xmpp.XHTML_BODY_NS}, false) + msg.body + ""; var bodyPlainTag = dojox.xmpp.util.createElement("body", {}, false) + dojox.xmpp.util.stripHtml(msg.body) + ""; /* if (msg.xhtml){ if (msg.xhtml.getAttribute('xmlns') != dojox.xmpp.xmpp.XHTML_IM_NS){ //console.log("ChatService::sendMessage() - Cannot use this xhtml without the propper xmlns"); }else{ //FIXME do this in some portable way //console.log("ChatService::sendMessage() - FIXME Serialize XHTML to string: ", msg.xhtml.toString()); } } */ if (message.subject && message.subject != ""){ message.append(dojox.xmpp.util.createElement("subject",{},false)); message.append(message.subject); message.append(""); } message.append(bodyPlainTag); message.append(html); message.append(bodyTag); message.append(""); message.append(dojox.xmpp.util.createElement("thread", {}, false)); message.append(this.chatid); message.append(""); if (this.useChatStates){ message.append(dojox.xmpp.util.createElement("active",{xmlns: dojox.xmpp.chat.CHAT_STATE_NS},true)); } message.append(""); this.session.dispatchPacket(message.toString());";s:7:"summary";s:0:"";}s:36:"dojox.xmpp.ChatService.sendChatState";a:5:{s:9:"prototype";s:22:"dojox.xmpp.ChatService";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:5:"state";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:620:" if (!this.useChatState || this.firstMessage){return;} if (state==this._currentState){return;} var req={ xmlns: "jabber:client", to: this.uid, from: this.session.jid + "/" + this.session.resource, type: "chat" } var request = new dojox.string.Builder(dojox.xmpp.util.createElement("message",req,false)); request.append(dojox.xmpp.util.createElement(state, {xmlns: dojox.xmpp.chat.CHAT_STATE_NS},true)); this._currentState = state; request.append(""); request.append(this.chatid); request.append(""); this.session.dispatchPacket(request.toString());";s:7:"summary";s:0:"";}s:35:"dojox.xmpp.ChatService.onNewMessage";a:5:{s:9:"prototype";s:22:"dojox.xmpp.ChatService";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:3:"msg";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:3:"} ";s:7:"summary";s:0:"";}s:31:"dojox.xmpp.ChatService.onInvite";a:5:{s:9:"prototype";s:22:"dojox.xmpp.ChatService";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:7:"contact";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:2:"} ";s:7:"summary";s:0:"";}s:30:"dojox.xmpp.ChatService.session";a:2:{s:8:"instance";s:22:"dojox.xmpp.ChatService";s:7:"summary";s:0:"";}s:26:"dojox.xmpp.ChatService.uid";a:2:{s:8:"instance";s:22:"dojox.xmpp.ChatService";s:7:"summary";s:0:"";}s:36:"dojox.xmpp.ChatService._currentState";a:3:{s:8:"instance";s:22:"dojox.xmpp.ChatService";s:7:"private";b:1;s:7:"summary";s:0:"";}s:29:"dojox.xmpp.ChatService.chatid";a:2:{s:8:"instance";s:22:"dojox.xmpp.ChatService";s:7:"summary";s:0:"";}s:15:"dojox.xmpp.chat";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:29:"dojox.xmpp.chat.CHAT_STATE_NS";a:1:{s:7:"summary";s:0:"";}s:28:"dojox.xmpp.chat.ACTIVE_STATE";a:1:{s:7:"summary";s:0:"";}s:31:"dojox.xmpp.chat.COMPOSING_STATE";a:1:{s:7:"summary";s:0:"";}s:30:"dojox.xmpp.chat.INACTIVE_STATE";a:1:{s:7:"summary";s:0:"";}s:28:"dojox.xmpp.chat.PAUSED_STATE";a:1:{s:7:"summary";s:0:"";}s:26:"dojox.xmpp.chat.GONE_STATE";a:1:{s:7:"summary";s:0:"";}s:10:"dojox.xmpp";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:5:"dojox";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}}