예제 #1
0
파일: Util.cs 프로젝트: Br3nda/sfdocsamples
        /// <summary>
        /// Busca los participantes de la sala. Solo los que estan conectados.-
        /// </summary>
        /// <param name="roomName">nombreSala@server</param>
        public void FindParticipants(String roomName)
        {
            DiscoItemsIq discoIq = new DiscoItemsIq(IqType.get);

            //discoIq.To = new Jid((string)roomName);
            //discoIq.To = new Jid("amigos.conference.santana");
            discoIq.To   = new Jid("*****@*****.**");
            discoIq.From = xmppCon.MyJID;

            this.XmppCon.IqGrabber.SendIq(discoIq, new IqCB(OnGetParticipants), roomName);
        }
예제 #2
0
파일: Util.cs 프로젝트: Br3nda/sfdocsamples
        /// <summary>
        /// Busca las salas de conferencias de alguna sala.-
        ///
        /// </summary>
        /// <param name="name">Reprecentan Chatservers
        /// EJ: conference.jabbers.ogr</param>
        public void FindChatRooms(string name)
        {
            //wChatRoomsList = new List<ChatRooms>();
            if (this.XmppCon == null)
            {
                return;
            }
            DiscoItemsIq discoIq = new DiscoItemsIq(IqType.get);

            discoIq.To = new Jid(name);
            this.XmppCon.IqGrabber.SendIq(discoIq, new IqCB(OnGetChatRooms), name);
        }
예제 #3
0
        /// <summary>
        /// Builds a request to discover the items of an entity
        /// </summary>
        /// <param name="to">The xmpp entity to discover</param>
        /// <returns></returns>
        /// <param name="node">Optional node information</param>
        /// <returns></returns>
        public static Iq DiscoverItems(Jid to, string node = null)
        {
            var discoItemsIq = new DiscoItemsIq {
                Type = IqType.Get, To = to
            };

            if (!String.IsNullOrEmpty(node))
            {
                discoItemsIq.Items.Node = node;
            }

            return(discoItemsIq);
        }
예제 #4
0
        public void DiscoverItems(Jid to, Jid from, string node, IqCB cb, object cbArgs)
        {
            DiscoItemsIq discoIq = new DiscoItemsIq(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);
        }
예제 #5
0
 public void ListRooms(string jid, Action<IEnumerable<IChatRoom>> callback)
 {
     DiscoItemsIq discoIq = new DiscoItemsIq(IqType.get);
      discoIq.To = new Jid(jid);
      m_client.IqGrabber.SendIq(discoIq, (sender, iq, data) => OnGetChatRooms(iq, callback), null);
 }
예제 #6
0
        public void DiscoverItems(Jid to, Jid from, string node, IqCB cb, object cbArgs)
        {
            DiscoItemsIq discoIq = new DiscoItemsIq(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);
        }