Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
softyboy #1
Member since Sep 2006 · 31 posts · Location: india
Group memberships: Members
Show profile · Link to this post
Subject: Conference service name
Hi all,

 Pls tell me how can get conference service name. like ( confererence.msn )

parwej Ahamad
India
Avatar
Jabberer #2
Member since Feb 2006 · 249 posts
Group memberships: Members
Show profile · Link to this post
You have to use service dicovery (Disco) to discover services. Examples are in the MiniClient. It is using disco to disover the search services.

see also: JEP-0030 Service Discovery
Software Developer
AG-Software
Avatar
softyboy #3
Member since Sep 2006 · 31 posts · Location: india
Group memberships: Members
Show profile · Link to this post
thanks for reply

i don't understand code pls can u post code sample ( hints ).


Parwej Ahamad
This post was edited on 2006-09-13, 11:43 by softyboy.
Avatar
Alex #4
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
The code is in the MiniClient located in the region << Disco Server >>
Please read this code.

Alex
Avatar
softyboy #5
Member since Sep 2006 · 31 posts · Location: india
Group memberships: Members
Show profile · Link to this post
thanks Alex,

but i have seen MiniClient Sample , but i have not found region <<Disco server>>./
Please help me.


Parwej Ahamad
Avatar
Alex #6
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
make sure that you have the latest code. i also post the code here.

#region << Disco Server >>
        // Sending Disco request to the server we are connected to for discovering
        // the services runing on our server
        private void DiscoServer()
        {            
            DiscoManager dm = new DiscoManager(XmppCon);
            dm.DisoverItems(new Jid(XmppCon.Server), new IqCB(OnDiscoServerResult), null);           
        }

        /// <summary>
        /// Callback
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="iq"></param>
        /// <param name="data"></param>
        private void OnDiscoServerResult(object sender, IQ iq, object data)
        {
            if (iq.Type == IqType.result)
            {
                Element query = iq.Query;
                if (query != null && query.GetType() == typeof(DiscoItems))
                {
                    DiscoItems items = query as DiscoItems;
                    DiscoItem[] itms = items.GetDiscoItems();
                   
                    DiscoManager dm = new DiscoManager(XmppCon);

                    foreach (DiscoItem itm in itms)
                    {
                        if (itm.Jid != null)
                            dm.DisoverInformation(itm.Jid, new IqCB(OnDiscoInfoResult), itm);
                    }
                }
            }
        }

        private void OnDiscoInfoResult(object sender, IQ iq, object data)
        {
            // <iq from='proxy.cachet.myjabber.net' to='gnauck@jabber.org/Exodus' type='result' id='jcl_19'>
            //  <query xmlns='http://jabber.org/protocol/disco#info'>
            //      <identity category='proxy' name='SOCKS5 Bytestreams Service' type='bytestreams'/>
            //      <feature var='http://jabber.org/protocol/bytestreams'/>
            //      <feature var='http://jabber.org/protocol/disco#info'/>
            //  </query>
            // </iq>
            if (iq.Type == IqType.result)
            {
                if (iq.Query is DiscoInfo)
                {
                    DiscoInfo di = iq.Query as DiscoInfo;
                    if (di.HasFeature(agsXMPP.Uri.IQ_SEARCH))
                    {
                        Jid jid = iq.From;
                        if (!Util.Services.Search.Contains(jid))
                            Util.Services.Search.Add(jid);
                    }
                    else if (di.HasFeature(agsXMPP.Uri.BYTESTREAMS))
                    {
                        Jid jid = iq.From;
                        if (!Util.Services.Proxy.Contains(jid))
                            Util.Services.Proxy.Add(jid);
                    }                   
                }
            }
        }
        #endregion
Avatar
softyboy #7
Member since Sep 2006 · 31 posts · Location: india
Group memberships: Members
Show profile · Link to this post
thanks alex,

i m implementing in vb.net but Util.Services.Search. not found in library.
pls help me.

Problem facing part  (Util.Services.Search.Contains(jid))
Avatar
Alex #8
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
This class does not belong to the library, it belongs to the c# MiniClient Sample.

Alex
Avatar
softyboy #9
Member since Sep 2006 · 31 posts · Location: india
Group memberships: Members
Show profile · Link to this post
but util.services.search method not found in thant class
Avatar
Alex #10
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
It is in Util.cs in the MiniClient example
Avatar
softyboy #11
Member since Sep 2006 · 31 posts · Location: india
Group memberships: Members
Show profile · Link to this post
ya alex i m using class but not get methods
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: agsXMPP RSS