Example #1
0
        /// <summary>
        /// Add a StreamHost
        /// </summary>
        /// <param name="jid"></param>
        /// <param name="host"></param>
        /// <param name="port"></param>
        /// <param name="zeroconf"></param>
        /// <returns></returns>
        public StreamHost AddStreamHost(Jid jid, string host, int port, string zeroconf)
        {
            StreamHost sh = new StreamHost(jid, host, port, zeroconf);

            AddChild(sh);
            return(sh);
        }
Example #2
0
        /// <summary>
        ///     Add a StreamHost
        /// </summary>
        /// <param name="jid"></param>
        /// <param name="host"></param>
        /// <param name="port"></param>
        /// <returns></returns>
        public StreamHost AddStreamHost(Jid jid, string host, int port)
        {
            var sh = new StreamHost(jid, host, port);

            AddChild(sh);
            return(sh);
        }
Example #3
0
        /// <summary>
        /// Add a StreamHost
        /// </summary>
        /// <param name="jid"></param>
        /// <param name="host"></param>
        /// <returns></returns>
        public StreamHost AddStreamHost(Jid jid, string host)
        {
            StreamHost sh = new StreamHost(jid, host);

            AddChild(sh);
            return(sh);
        }
Example #4
0
        /// <summary>
        /// Add a StreamHost
        /// </summary>
        /// <returns></returns>
        public StreamHost AddStreamHost()
        {
            StreamHost sh = new StreamHost();

            AddChild(sh);
            return(sh);
        }
Example #5
0
        /// <summary>
        ///     Get the list of streamhosts
        /// </summary>
        /// <returns></returns>
        public StreamHost[] GetStreamHosts()
        {
            var nl    = SelectElements(typeof(StreamHost));
            var hosts = new StreamHost[nl.Count];
            var i     = 0;

            foreach (Element e in nl)
            {
                hosts[i] = (StreamHost)e;
                i++;
            }
            return(hosts);
        }
Example #6
0
        /// <summary>
        /// Get the list of streamhosts
        /// </summary>
        /// <returns></returns>
        public StreamHost[] GetStreamHosts()
        {
            ElementList nl = SelectElements(typeof(StreamHost));

            StreamHost[] hosts = new StreamHost[nl.Count];
            int          i     = 0;

            foreach (Element e in nl)
            {
                hosts[i] = (StreamHost)e;
                i++;
            }
            return(hosts);
        }
        private void SendStreamHostUsedResponse(StreamHost sh, IQ iq)
        {
            ByteStreamIq bsIQ = new ByteStreamIq(IqType.result, Contact.FullJid);
            bsIQ.Id = iq.Id;

            bsIQ.Query.StreamHostUsed = new StreamHostUsed(sh.Jid);
            _xmppConnection.Send(bsIQ);
        }
        private void OnProxyDiscoResult(object sender, IQ iq, object data)
        {
            _streamHostProxy = null;

            if (iq.Error == null &&
                iq.Type == IqType.result)
            {
                ByteStream byteStream = iq.Query as ByteStream;

                if (byteStream != null
                    && byteStream.GetStreamHosts().Length > 0)
                {
                    _streamHostProxy = byteStream.GetStreamHosts()[0];
                }
            }

            SendStreamHosts();
        }
Example #9
0
 /// <summary>
 /// Add a StreamHost
 /// </summary>
 /// <param name="sh"></param>
 /// <returns></returns>
 public StreamHost AddStreamHost(StreamHost sh)
 {
     AddChild(sh);
     return(sh);
 }
Example #10
0
        private void SendStreamHostUsedResponse(StreamHost sh, IQ iq)
        {
            ByteStreamIq bsIQ = new ByteStreamIq(IqType.result, m_From);
            bsIQ.Id = iq.Id;

            bsIQ.Query.StreamHostUsed = new StreamHostUsed(sh.Jid);
            m_XmppCon.Send(bsIQ);
        }
Example #11
0
 /// <summary>
 /// Add a StreamHost
 /// </summary>
 /// <returns></returns>
 public StreamHost AddStreamHost()
 {
     StreamHost sh = new StreamHost();
     AddChild(sh);
     return sh;
 }
Example #12
0
 /// <summary>
 /// Get the list of streamhosts
 /// </summary>
 /// <returns></returns>
 public StreamHost[] GetStreamHosts()
 {
     ElementList nl = SelectElements(typeof(StreamHost));
     StreamHost[] hosts = new StreamHost[nl.Count];
     int i = 0;
     foreach (Element e in nl)
     {
         hosts[i] = (StreamHost) e;
         i++;
     }
     return hosts;
 }
Example #13
0
 /// <summary>
 /// Add a StreamHost
 /// </summary>
 /// <param name="jid"></param>
 /// <param name="host"></param>
 /// <param name="port"></param>
 /// <param name="zeroconf"></param>
 /// <returns></returns>
 public StreamHost AddStreamHost(Jid jid, string host, int port, string zeroconf)
 {
     StreamHost sh = new StreamHost(jid, host, port, zeroconf);
     AddChild(sh);
     return sh;
 }
Example #14
0
 /// <summary>
 /// Add a StreamHost
 /// </summary>
 /// <param name="jid"></param>
 /// <param name="host"></param>
 /// <returns></returns>
 public StreamHost AddStreamHost(Jid jid, string host)
 {
     StreamHost sh = new StreamHost(jid, host);
     AddChild(sh);
     return sh;
 }
Example #15
0
 /// <summary>
 /// Add a StreamHost
 /// </summary>
 /// <param name="sh"></param>
 /// <returns></returns>
 public StreamHost AddStreamHost(StreamHost sh)
 {            
     AddChild(sh);
     return sh;
 }