Mercurial > eldonilo > lightstring
comparison plugins/pubsub.js @ 89:55548845b177
typos
author | Sonny Piers <sonny.piers@gmail.com> |
---|---|
date | Wed, 29 Feb 2012 17:48:05 +0100 |
parents | 0f6f213f0a33 |
children | c1566c6981e5 |
comparison
equal
deleted
inserted
replaced
88:595be4a8584f | 89:55548845b177 |
---|---|
44 return "<iq type='set' to='" + aTo + "'><pubsub xmlns='" + Lightstring.ns.pubsub + "'><publish node='" + aNode + "'><item id='" + aId + "'>" + aItem + "</item></publish></pubsub></iq>"; | 44 return "<iq type='set' to='" + aTo + "'><pubsub xmlns='" + Lightstring.ns.pubsub + "'><publish node='" + aNode + "'><item id='" + aId + "'>" + aItem + "</item></publish></pubsub></iq>"; |
45 }, | 45 }, |
46 retract: function(aTo, aNode, aItem) { | 46 retract: function(aTo, aNode, aItem) { |
47 return "<iq type='set' to='" + aTo + "'><pubsub xmlns='" + Lightstring.ns.pubsub + "'><retract node='" + aNode + "'><item id='" + aItem + "'/></retract></pubsub></iq>"; | 47 return "<iq type='set' to='" + aTo + "'><pubsub xmlns='" + Lightstring.ns.pubsub + "'><retract node='" + aNode + "'><item id='" + aItem + "'/></retract></pubsub></iq>"; |
48 }, | 48 }, |
49 'delete': function(aTo, aNode, aURI) { | 49 delete: function(aTo, aNode) { |
50 return "<iq type='set' to='" + aTo + "'><pubsub xmlns='" + Lightstring.ns.pubsub_owner + "'><delete node='" + aNode + "'/></pubsub></iq>"; | 50 return "<iq type='set' to='" + aTo + "'><pubsub xmlns='" + Lightstring.ns.pubsub_owner + "'><delete node='" + aNode + "'/></pubsub></iq>"; |
51 }, | |
52 purge: function(aTo, aNode) { | |
53 return "<iq type='set' to='" + aTo + "'><pubsub xmlns='" + Lightstring.ns.pubsub_owner + "'><purge node='" + aNode + "'/></pubsub></iq>"; | |
51 }, | 54 }, |
52 create: function(aTo, aNode, aFields) { | 55 create: function(aTo, aNode, aFields) { |
53 var iq = "<iq type='set' to='" + aTo + "'><pubsub xmlns='" + Lightstring.ns.pubsub + "'><create node='" + aNode + "'/>"; | 56 var iq = "<iq type='set' to='" + aTo + "'><pubsub xmlns='" + Lightstring.ns.pubsub + "'><create node='" + aNode + "'/>"; |
54 if (aFields) { | 57 if (aFields) { |
55 iq += "<configure><x xmlns='" + Lightstring.ns.x + "' type='submit'>" | 58 iq += "<configure><x xmlns='" + Lightstring.ns.x + "' type='submit'>" |
110 this.send(Lightstring.stanzas.pubsub.retract(aTo, aNode, aItem), aResult, aError); | 113 this.send(Lightstring.stanzas.pubsub.retract(aTo, aNode, aItem), aResult, aError); |
111 }, | 114 }, |
112 publish: function(aTo, aNode, aItem, aId, aResult, aError) { | 115 publish: function(aTo, aNode, aItem, aId, aResult, aError) { |
113 this.send(Lightstring.stanzas.pubsub.publish(aTo, aNode, aItem, aId), aResult, aError); | 116 this.send(Lightstring.stanzas.pubsub.publish(aTo, aNode, aItem, aId), aResult, aError); |
114 }, | 117 }, |
115 'delete': function(aTo, aNode, aResult, aError) { | 118 delete: function(aTo, aNode, aResult, aError) { |
116 this.send(Lightstring.stanzas.pubsub.delete(aTo, aNode), aResult, aError); | 119 this.send(Lightstring.stanzas.pubsub.delete(aTo, aNode), aResult, aError); |
120 }, | |
121 purge: function(aTo, aNode, aResult, aError) { | |
122 this.send(Lightstring.stanzas.pubsub.purge(aTo, aNode), aResult, aError); | |
117 }, | 123 }, |
118 getAffiliations: function(aTo, aNode, aResult, aError) { | 124 getAffiliations: function(aTo, aNode, aResult, aError) { |
119 this.send(Lightstring.stanzas.pubsub.affiliations(aTo, aNode), function(stanza) { | 125 this.send(Lightstring.stanzas.pubsub.affiliations(aTo, aNode), function(stanza) { |
120 if((stanza.DOM.getAttribute('type') === 'result') && aResult, aError) { | 126 if((stanza.DOM.getAttribute('type') === 'result') && aResult, aError) { |
121 var affiliations = {}; | 127 var affiliations = {}; |