aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/XMPP/Stanza.cs
diff options
context:
space:
mode:
authorDr Scofield2008-06-04 13:06:24 +0000
committerDr Scofield2008-06-04 13:06:24 +0000
commit67dee6410dcb982b899ec0bb9644d5afa4a8e2d1 (patch)
tree1bad930de9ec6088b6ce8695c028668f54a6ac4d /OpenSim/Framework/Communications/XMPP/Stanza.cs
parentapplied patch from mantis #1268 , thanks mikem (diff)
downloadopensim-SC_OLD-67dee6410dcb982b899ec0bb9644d5afa4a8e2d1.zip
opensim-SC_OLD-67dee6410dcb982b899ec0bb9644d5afa4a8e2d1.tar.gz
opensim-SC_OLD-67dee6410dcb982b899ec0bb9644d5afa4a8e2d1.tar.bz2
opensim-SC_OLD-67dee6410dcb982b899ec0bb9644d5afa4a8e2d1.tar.xz
* fleshing out XMPP entities, adding XmppWriter and XmppSerializer
having spent the last couple of days wrestling with .NET XmlSerializer and trying to get it to do what is required by XMPP (RFC 3920 & 3921) this is the preliminary result of that wrestling (you should see the other guy!): XmppSerializer allows us to serialize Xmpp stanza (and theoretically deserialize [or reify] them), XmppWriter helps avoiding various gratuitous crap added in by off-the-shelf XmlSerializer. this is currently not used anywhere but the plan is to use it for at least an XMPPBridgeModule.
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Communications/XMPP/XmppWriter.cs (renamed from OpenSim/Framework/Communications/XMPP/Stanza.cs)33
1 files changed, 18 insertions, 15 deletions
diff --git a/OpenSim/Framework/Communications/XMPP/Stanza.cs b/OpenSim/Framework/Communications/XMPP/XmppWriter.cs
index 3930bac..c5ad9b4 100644
--- a/OpenSim/Framework/Communications/XMPP/Stanza.cs
+++ b/OpenSim/Framework/Communications/XMPP/XmppWriter.cs
@@ -25,31 +25,34 @@
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28using System; 28using System.IO;
29using System.Text;
29using System.Xml; 30using System.Xml;
30 31
32using IOStream = System.IO.Stream;
33
31namespace OpenSim.Framework.Communications.XMPP 34namespace OpenSim.Framework.Communications.XMPP
32{ 35{
33 public class Stanza 36 public class XMPPWriter: XmlTextWriter
34 { 37 {
35 public string localName = String.Empty; 38 public XMPPWriter(TextWriter textWriter) : base(textWriter)
36 public JId to; 39 {
37 public JId from; 40 }
38 public string id;
39 public string lang;
40 public string nodeName;
41 41
42 public Stanza(XmlNode node, Object defaults, bool hasID) 42 public XMPPWriter(IOStream stream) : this(stream, Encoding.UTF8)
43 { 43 {
44 }
44 45
46 public XMPPWriter(IOStream stream, Encoding enc) : base(stream, enc)
47 {
45 } 48 }
46 //public virtual XmlElement getNode() 49
47 //{ 50 public override void WriteStartDocument()
48 //return new XmlElement(); 51 {
49 //} 52 }
50 public virtual string generateId() 53
54 public override void WriteStartDocument(bool standalone)
51 { 55 {
52 return "";
53 } 56 }
54 } 57 }
55} 58}