Example #1
0
        public void DiscoverInformation(Jid to, Jid from, string node, IqCB cb, object cbArgs)
        {
            /*
             *
             * Example 9. Querying a specific JID and node combination
             *
             * <iq type='get'
             *  from='[email protected]/orchard'
             *  to='mim.shakespeare.lit'
             *  id='info3'>
             * <query xmlns='http://jabber.org/protocol/disco#info'
             *       node='http://jabber.org/protocol/commands'/>
             * </iq>
             *
             *
             * Example 10. JID+node result
             *
             * <iq type='result'
             *  from='mim.shakespeare.lit'
             *  to='[email protected]/orchard'
             *  id='info3'>
             * <query xmlns='http://jabber.org/protocol/disco#info'
             *       node='http://jabber.org/protocol/commands'>
             *  <identity
             *      category='automation'
             *      type='command-list'/>
             * </query>
             * </iq>
             */
            DiscoInfoIq discoIq = new DiscoInfoIq(IqType.get);

            discoIq.To = to;

            if (from != null)
            {
                discoIq.From = from;
            }

            if (node != null && node.Length > 0)
            {
                discoIq.Query.Node = node;
            }

            xmppConnection.IqGrabber.SendIq(discoIq, cb, cbArgs);
        }
Example #2
0
        public void DiscoverInformation(Jid to, Jid from, string node, IqCB cb, object cbArgs)
        {
            /*

            Example 9. Querying a specific JID and node combination

            <iq type='get'
                from='[email protected]/orchard'
                to='mim.shakespeare.lit'
                id='info3'>
              <query xmlns='http://jabber.org/protocol/disco#info'
                     node='http://jabber.org/protocol/commands'/>
            </iq>

            Example 10. JID+node result

            <iq type='result'
                from='mim.shakespeare.lit'
                to='[email protected]/orchard'
                id='info3'>
              <query xmlns='http://jabber.org/protocol/disco#info'
                     node='http://jabber.org/protocol/commands'>
                <identity
                    category='automation'
                    type='command-list'/>
              </query>
            </iq>
            */
            DiscoInfoIq discoIq = new DiscoInfoIq(IqType.get);
            discoIq.To = to;

            if (from != null)
                discoIq.From = from;

            if (node != null && node.Length > 0)
                discoIq.Query.Node = node;

            xmppConnection.IqGrabber.SendIq(discoIq, cb, cbArgs);
        }