From b790a16e986a0296b3a006f0db2b1011e5377ce9 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Wed, 2 Apr 2008 01:03:31 +0000 Subject: * Updating the version of the ODE library. (big update). The Mac library needs to be updated still. * Adding some XMPP stuff that's incomplete. --- OpenSim/Framework/Communications/XMPP/Stanza.cs | 31 ++++++++++++++++ .../Framework/Communications/XMPP/XMPPParser.cs | 14 ++++++++ OpenSim/Framework/JId.cs | 42 ++++++++++++++++++++++ 3 files changed, 87 insertions(+) create mode 100644 OpenSim/Framework/Communications/XMPP/Stanza.cs create mode 100644 OpenSim/Framework/Communications/XMPP/XMPPParser.cs create mode 100644 OpenSim/Framework/JId.cs (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/Communications/XMPP/Stanza.cs b/OpenSim/Framework/Communications/XMPP/Stanza.cs new file mode 100644 index 0000000..4c57114 --- /dev/null +++ b/OpenSim/Framework/Communications/XMPP/Stanza.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Xml; + +namespace OpenSim.Framework.Communications.XMPP +{ + public class Stanza + { + + public string localName = String.Empty; + public JId to; + public JId from; + string id; + string lang; + string nodeName; + + public Stanza(XmlNode node, Object defaults, bool hasID) + { + + } + //public virtual XmlElement getNode() + //{ + //return new XmlElement(); + //} + public virtual string generateId() + { + return ""; + } + } +} diff --git a/OpenSim/Framework/Communications/XMPP/XMPPParser.cs b/OpenSim/Framework/Communications/XMPP/XMPPParser.cs new file mode 100644 index 0000000..0539afb --- /dev/null +++ b/OpenSim/Framework/Communications/XMPP/XMPPParser.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Xml; +using OpenSim.Framework; + + +namespace OpenSim.Framework.Communications.XMPP +{ + public class XMPPParser + { + + } +} diff --git a/OpenSim/Framework/JId.cs b/OpenSim/Framework/JId.cs new file mode 100644 index 0000000..790a9e0 --- /dev/null +++ b/OpenSim/Framework/JId.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OpenSim.Framework +{ + public class JId + { + public string ServerIP = String.Empty; + public int ServerPort = 0; + public string username = String.Empty; + public string resource = String.Empty; + + public JId() + { + + } + public JId(string sJId) + { + // user@address:port/resource + string[] jidsplit = sJId.Split('@'); + if (jidsplit.GetUpperBound(0) == 2) + { + string[] serversplit = jidsplit[1].Split(':'); + if (serversplit.GetUpperBound(0) == 2) + { + ServerIP = serversplit[0]; + string[] resourcesplit = serversplit[1].Split('/'); + + ServerPort = Convert.ToInt32(resourcesplit[0]); + + if (resourcesplit.GetUpperBound(0) == 2) + resource = resourcesplit[1]; + + username = jidsplit[0]; + + } + } + } + + } +} -- cgit v1.1