Reply
Thread Tools
Marcus's Avatar
Posts: 173 | Thanked: 72 times | Joined on Mar 2010 @ Denmark
#1
Hey guys.

Is it possible to get a list of the logged-in contacts that are you using IM?

What I'd like to do is to create a Python script which pops up a notification whenever a contact of mine logs in, but where, or how, could I possibly find that "list"?

Regards,
Marcus
 
Posts: 131 | Thanked: 78 times | Joined on May 2010
#2
open your contacts -> press all contacts at the top -> press availability at the top.

it'll sort your list based on who's online.
 
Marcus's Avatar
Posts: 173 | Thanked: 72 times | Joined on Mar 2010 @ Denmark
#3
Obviously that is not what I'm interested in though. I need to "read" the list within my application.
 
Posts: 2,802 | Thanked: 4,490 times | Joined on Nov 2007
#4
You probably want telepathy-python, see the roster.py example in particular.
 
Marcus's Avatar
Posts: 173 | Thanked: 72 times | Joined on Mar 2010 @ Denmark
#5
I must admit that I've never looked into Telepathy, perhaps you could show me the spot where roster.py outputs the online contacts?
 
Posts: 180 | Thanked: 76 times | Joined on May 2010
#6
You can use Qt Mobility Contacts API.
 
Marcus's Avatar
Posts: 173 | Thanked: 72 times | Joined on Mar 2010 @ Denmark
#7
Diph: That requires that I loop through all my contacts to check if they are online, correct?
 
Posts: 180 | Thanked: 76 times | Joined on May 2010
#8
Use QContactManager. I don't know about Python, but in Qt C++ you can get all contacts from manager and then listen contactsChanged() signal which notifys when contact has been modified. Then get presence state from contact.

E: You can also get filtered list of contacts from manager if you want to get only IM contacts.

Last edited by Diph; 2010-08-29 at 15:29.
 
Marcus's Avatar
Posts: 173 | Thanked: 72 times | Joined on Mar 2010 @ Denmark
#9
So I guess there is no possible way without Qt? I have not been messing with Qt much.
 
Posts: 180 | Thanked: 76 times | Joined on May 2010
#10
Never mind, check Imas link.

Last edited by Diph; 2010-08-29 at 16:24.
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 20:30.