Exemple #1
0
 public void GotRootItems(DiscoManager manager, DiscoNode node, object state)
 {
     m_outstanding = node.Children.Count;
     foreach (DiscoNode n in node.Children)
     {
         manager.BeginGetFeatures(n, new DiscoNodeHandler(GotFeatures), state);
     }
 }
Exemple #2
0
        private void jc_OnPresence(object sender, Presence pres)
        {
            if ((m_cache == null) || (m_discoManager == null))
            {
                return;
            }
            Caps c = pres["c", URI.CAPS] as Caps;

            if (c == null)
            {
                return;
            }

            // TODO: ignoring old-style caps for now.
            if (!c.NewStyle)
            {
                return;
            }
            string ver = c.Version;

            if ((ver == null) || (ver == ""))
            {
                return;
            }
            string node = c.Node;

            if ((node == null) || (node == ""))
            {
                return;
            }

            if (m_cache.Contains(ver))
            {
                return;
            }

            m_discoManager.BeginGetFeatures(pres.From, c.Node + "#" + ver, GotCaps, ver);
        }