Exemple #1
0
        public DiscoItemsIQ CreateDiscoItemsQuery()
        {
            DiscoItemsIQ iq = new DiscoItemsIQ(XmppGlobal.InternalClient.Document);

            iq.Type = jabber.protocol.client.IQType.get;
            return(iq);
        }
Exemple #2
0
        /// <summary>
        /// Creates a disco#items IQ packet.
        /// </summary>
        /// <param name="doc">XmlDocument used to create the XML Elements.</param>
        /// <returns>XML element representing the disco#items request.</returns>
        public IQ ItemsIQ(System.Xml.XmlDocument doc)
        {
            m_pendingItems = true;

            DiscoItemsIQ iiq = new DiscoItemsIQ(doc);

            iiq.To   = JID;
            iiq.Type = IQType.get;
            if (Node != null)
            {
                DiscoItems items = iiq.Instruction;
                items.Node = Node;
            }
            return(iiq);
        }
Exemple #3
0
        public void DiscoItemsQuery(jabber.JID to, string node, bool refresh, QueryCallback callback, object state)
        {
            if (!refresh)
            {
                IQ cache_version = XmppGlobal.InternalQueryCache.DiscoItems[to.ToString() + "!!!!!" + node];

                if (cache_version != null)
                {
                    callback.Invoke(this, cache_version, state);
                    return;
                }
            }

            DiscoItemsIQ iq = XmppGlobal.Queries.CreateDiscoItemsQuery();

            iq.To = to;

            if (!string.IsNullOrEmpty(node))
            {
                iq.Node = node;
            }

            XmppGlobal.Queries.SendQuery(iq, callback, state);
        }
Exemple #4
0
        /// <summary>
        /// Creates a disco#items IQ packet.
        /// </summary>
        /// <param name="doc">XmlDocument used to create the XML Elements.</param>
        /// <returns>XML element representing the disco#items request.</returns>
        public IQ ItemsIQ(System.Xml.XmlDocument doc)
        {
            m_pendingItems = true;

            DiscoItemsIQ iiq = new DiscoItemsIQ(doc);
            iiq.To = JID;
            iiq.Type = IQType.get;
            if (Node != null)
            {
                DiscoItems items = iiq.Instruction;
                items.Node = Node;
            }
            return iiq;
        }
 public DiscoItemsIQ CreateDiscoItemsQuery()
 {
     DiscoItemsIQ iq = new DiscoItemsIQ (XmppGlobal.InternalClient.Document);
     iq.Type = jabber.protocol.client.IQType.get;
     return iq;
 }