public DiscoverInformation ( Jid to ) : void | ||
to | Jid | |
Результат | void |
private void xmppDiscoServer() { DiscoManager dm = new DiscoManager(xmpp); dm.AutoAnswerDiscoInfoRequests = false; dm.DiscoverInformation(new Jid(xmpp.Server), new IqCB(xmppDiscoServerInformation), new Jid(xmpp.Server)); }
/// <summary> /// Callback /// </summary> /// <param name="sender"></param> /// <param name="iq"></param> /// <param name="data"></param> private void OnDiscoServerResult(object sender, IQ iq, object data) { if (iq.Type == IqType.result) { Element query = iq.Query; if (query != null && query.GetType() == typeof(DiscoItems)) { DiscoItems items = query as DiscoItems; DiscoItem[] itms = items.GetDiscoItems(); DiscoManager dm = new DiscoManager(XmppCon); foreach (DiscoItem itm in itms) { if (itm.Jid != null) dm.DiscoverInformation(itm.Jid, new IqCB(OnDiscoInfoResult), itm); } } } }