Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
codycook #1
Member since Nov 2014 · 1 post · Location: Switzerland
Group memberships: Members
Show profile · Link to this post
I would say sorry if i put my question in wrong place.I am new to c#.net and i meet a problem with c#.net agsxmpp documentation.Exists any agsxmpp documentation? I cannot find anything. I'm making IM and I need know following:
How can i get contact list (contains - current availability, nickname, identificator (user@site))?
Not sure if this event works (need for availability change) :
  1. static void xmpp_OnPresence(object sender, Presence pres)
Is where any timestamp or datetime value in incoming message?
What I found is this for getting contacts:
  1. public void RequestRoster()
  2.     {     
  3.         RosterIq iq = new RosterIq(IqType.get);
  4.         xmpp.IqGrabber.SendIq(iq, new IqCB(OnRosterResult), null);
  5.     }
  6.  
  7.     private void OnRosterResult(object sender, IQ iq, object data)
  8.     {         
  9.         Roster r = iq.Query as Roster;
  10.         if (r != null)
  11.         {
  12.             foreach (RosterItem i in r.GetRoster())
  13.             {
  14.                 Console.WriteLine(i.Name);
  15.             }
  16.         }
  17.     }
But there aren't all properties (I need also availability, identificator) or are they?
This post was edited on 2014-11-27, 06:54 by Alex.
Avatar
Alex #2
Member since Feb 2003 · 4296 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
1) I suggest to use MatriX which is the successor of agsXMPP and has lots of samples and documentation.
2) For agsXMPP look at the MiniClient example, there you can see how the roster works. This example is included in the full download from our website.
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