void ServiceDiscovery(object sender, XPathEventArgs e) { Console.WriteLine("<ServiceDiscovery"); Matrix.Xmpp.Client.Iq xIq = (Matrix.Xmpp.Client.Iq)e.Stanza; Matrix.Xmpp.Client.Iq iq = new Matrix.Xmpp.Client.Iq(); iq.From = this.jid; iq.To = "[email protected]/" + this.session; iq.Type = Matrix.Xmpp.IqType.Result; iq.Id = xIq.Id; string defaultNs = "http://jabber.org/protocol/disco#info"; iq.Query = new Matrix.Xml.XmppXElement(defaultNs, "query", new System.Xml.Linq.XAttribute("node", xIq.Query.GetAttribute("node"))); iq.Query.Add(new Matrix.Xml.XmppXElement(defaultNs, "identity", new System.Xml.Linq.XAttribute("category", "client"), new System.Xml.Linq.XAttribute("name", "legion-0.1"), new System.Xml.Linq.XAttribute("type", "pc"))); iq.Query.Add(new Matrix.Xml.XmppXElement(defaultNs, "feature", new System.Xml.Linq.XAttribute("var", "http://jabber.org/protocol/caps"))); iq.Query.Add(new Matrix.Xml.XmppXElement(defaultNs, "feature", new System.Xml.Linq.XAttribute("var", "http://jabber.org/protocol/disco#info"))); iq.Query.Add(new Matrix.Xml.XmppXElement(defaultNs, "feature", new System.Xml.Linq.XAttribute("var", "urn:ietf:rfc:3264"))); iq.Query.Add(new Matrix.Xml.XmppXElement(defaultNs, "feature", new System.Xml.Linq.XAttribute("var", "urn:xmpp:jingle:apps:dtls:0"))); iq.Query.Add(new Matrix.Xml.XmppXElement(defaultNs, "feature", new System.Xml.Linq.XAttribute("var", "urn:xmpp:jingle:transports:ice-udp:1"))); iq.Query.Add(new Matrix.Xml.XmppXElement(defaultNs, "feature", new System.Xml.Linq.XAttribute("var", "urn:xmpp:jingle:apps:rtp:audio"))); iq.Query.Add(new Matrix.Xml.XmppXElement(defaultNs, "feature", new System.Xml.Linq.XAttribute("var", "urn:xmpp:jingle:apps:rtp:video"))); this.xmppClient.Send(iq); }
private void GetOldChat() { var jid = chatClient.Jid; var list = new Matrix.Xmpp.MessageArchiving.List { With = jid }; var iq = new Matrix.Xmpp.Client.Iq { Type = Matrix.Xmpp.IqType.Get, Query = list }; iq.GenerateId(); mainClient.IqFilter.SendIq(iq, GetChatCallback); }