chungvodim / jabber-net

Automatically exported from code.google.com/p/jabber-net
Other
0 stars 0 forks source link

getting friends list #72

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Dear friends,
I use jabber-net component to establish a chat robot in google.
I need to get my friends list but I don't know what should I do. I 
downloaded the help .chm file but it has no any helpful article about this.
can anybody help me on these subject? :
1- how can I get friends list ?
2- Is there a way to be notified when a friends get online or offline?

I would so appreciate if someone tell me what I should do or give a me 
helpful article/tutorial about jabber-net capabilities.

Original issue reported on code.google.com by mora...@gmail.com on 7 May 2009 at 10:56

GoogleCodeExporter commented 8 years ago
you need RosterManager and PresenceManager.

Example:
public RosterManager rm= new RosterManager();
public PresenceManager pm = new PresenceManager();

rm.Stream = pm.Stream = jabber client stream

then...

foreach (JID user in rm)
{
   if (pm.IsAvailable(user))
   {
        //do something
   }
}

if you want to see some code, take a look at our gtalk conference bot project at
http://code.google.com/p/confbot/

Original comment by debe.mechero on 8 May 2009 at 10:02

GoogleCodeExporter commented 8 years ago
can anyone tell me the correct syntax in c# for this line of code:
rm.Stream = pm.Stream = jabber client stream ???
i do have a JabberClient (callded j) in my project, but there is noch such 
Attribute like a j.Stream ... there's only a .StreamID which doesn't really 
help me out.

Original comment by fbt...@gmail.com on 3 Feb 2011 at 7:43

GoogleCodeExporter commented 8 years ago
Actually i don't know where to place this code to get buddies list
foreach (JID user in rm)
{
   if (pm.IsAvailable(user))
   {
        //do something
   }
}
Can anyone come up with a clean tutorial

Original comment by unfussyd...@gmail.com on 5 Nov 2011 at 3:27

GoogleCodeExporter commented 8 years ago
 fbtb84, just try "j".

Original comment by hil...@gmail.com on 9 Nov 2011 at 8:08

GoogleCodeExporter commented 8 years ago
unfussydanny85, you do that when you want to loop over the buddies, any time 
*after* rm.OnRosterEnd fires.

Original comment by hil...@gmail.com on 9 Nov 2011 at 8:10

GoogleCodeExporter commented 8 years ago
Why don't any body come up with a clean tutorial of What to do for freshers to 
Jabber-net like me....

Original comment by unfussyd...@gmail.com on 10 Nov 2011 at 5:19

GoogleCodeExporter commented 8 years ago
I Will state my clear requirements... I want to bind all my contacts in a 
listbox.. I dont want to use rostertree... Can anybody tell me how to do 
that... i am a fresher to jabber-net

Original comment by unfussyd...@gmail.com on 10 Nov 2011 at 5:22

GoogleCodeExporter commented 8 years ago
u have to use the roster tree, but you can hide it. Bind the listbox to the 
roster tree and on roster updation, the list box shoud be updated

Original comment by saurav....@navsoft.in on 2 Feb 2013 at 8:55

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Please refer to link below
http://www.codeproject.com/Articles/34300/Google-Chat-Desktop-Application-using-
Jabber-Net

Original comment by er.davin...@gmail.com on 1 Apr 2013 at 10:12