/usr/lib/nodejs/node-xmpp/xmpp/stanza.js is in node-node-xmpp 0.3.2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | var util = require('util');
var ltx = require('ltx');
function Stanza(name, attrs) {
ltx.Element.call(this, name, attrs);
}
util.inherits(Stanza, ltx.Element);
/**
* Common attribute getters/setters for all stanzas
*/
Stanza.prototype.__defineGetter__('from', function() {
return this.attrs.from;
});
Stanza.prototype.__defineSetter__('from', function(from) {
this.attrs.from = from;
});
Stanza.prototype.__defineGetter__('to', function() {
return this.attrs.to;
});
Stanza.prototype.__defineSetter__('to', function(to) {
this.attrs.to = to;
});
Stanza.prototype.__defineGetter__('id', function() {
return this.attrs.id;
});
Stanza.prototype.__defineSetter__('id', function(id) {
this.attrs.id = id;
});
Stanza.prototype.__defineGetter__('type', function() {
return this.attrs.type;
});
Stanza.prototype.__defineSetter__('type', function(type) {
this.attrs.type = type;
});
/**
* Stanza kinds
*/
function Message(attrs) {
Stanza.call(this, 'message', attrs);
}
util.inherits(Message, Stanza);
function Presence(attrs) {
Stanza.call(this, 'presence', attrs);
}
util.inherits(Presence, Stanza);
function Iq(attrs) {
Stanza.call(this, 'iq', attrs);
}
util.inherits(Iq, Stanza);
exports.Stanza = Stanza;
exports.Message = Message;
exports.Presence = Presence;
exports.Iq = Iq;
|