Thanks Xavier.<br><br>I would prefer keeping my current system (unless and until it is _absolutely_ necessary).<br><br><br><br>As part of me making the last-sub-use-case work, I tried the following signals as well ::<br><br>
(i)<br><a href="http://telepathy.freedesktop.org/spec/Channel_Interface_Group.html#Signal:HandleOwnersChangedDetailed">http://telepathy.freedesktop.org/spec/Channel_Interface_Group.html#Signal:HandleOwnersChangedDetailed</a><br>
<br>(ii)<br><a href="http://telepathy.freedesktop.org/spec/Channel_Interface_Group.html#Signal:MembersChanged">http://telepathy.freedesktop.org/spec/Channel_Interface_Group.html#Signal:MembersChanged</a><br><br><br>But none of them hit the callback function (nor do I get any missing function error), when the last-sub-use-case is hit.<br>
<br><br><br><br>So,<br><br>a)<br>Is that expected?<br><br>b)<br>If yes, I just wonder when (if ever) is the case when the above two signal callbacks are hit, with a non-empty "Removed" list?<br><br><br>Thanks and Regards,<br>
Ajay<br><br><br><br><div class="gmail_quote">On Thu, Jun 7, 2012 at 4:37 PM, Xavier Claessens <span dir="ltr"><<a href="mailto:xclaesse@gmail.com" target="_blank">xclaesse@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Your packages are completely outdated. You need at least tp-salut 0.7.2.<br>
<br>
Again you should not use dbus directly. If your app is written in<br>
python, please use telepathy-glib's python binding. see for example:<br>
<br>
<a href="http://cgit.freedesktop.org/telepathy/telepathy-glib/tree/examples/client/python/contact-list.py" target="_blank">http://cgit.freedesktop.org/telepathy/telepathy-glib/tree/examples/client/python/contact-list.py</a><br>
<br>
Regards,<br>
Xavier Claessens<br>
<br>
Le jeudi 07 juin 2012 à 16:14 +0530, Ajay Garg a écrit :<br>
<div class="HOEnZb"><div class="h5">> Thanks a ton Xavier, for the reply.<br>
><br>
> Even I had the uneasy feeling, since the 'GetMembers' had the<br>
> semantics different from the other two.<br>
> Looking at the "Connection_Interface_Contact_List", its semantics seem<br>
> to be in line with the other two.<br>
><br>
><br>
> However, I am getting the following key-error, when I use the above ::<br>
><br>
> ####################################################################################<br>
> Traceback (most recent call last):<br>
> File "/usr/lib/python2.7/site-packages/dbus/connection.py", line<br>
> 586, in msg_reply_handler<br>
> reply_handler(*message.get_args_list(**get_args_opts))<br>
> File "demos/Telepathy/telepathy_test.py", line 371, in<br>
> __get_self_handle_cb<br>
><br>
> self._connection[CONNECTION_INTERFACE_CONTACT_LIST].GetContactListAttributes(<br>
> File<br>
> "/usr/lib/python2.7/site-packages/telepathy/client/interfacefactory.py", line 74, in __getitem__<br>
> raise KeyError(name)<br>
> KeyError:<br>
> 'org.freedesktop.Telepathy.Connection.Interface.ContactList.DRAFT2'<br>
> ^CTraceback (most recent call last):<br>
> File "demos/Telepathy/telepathy_test.py", line 670, in <module><br>
> gobject.MainLoop().run()<br>
> KeyboardInterrupt<br>
> ####################################################################################<br>
><br>
><br>
><br>
><br>
><br>
> Following are the telepathy-packages on my system ::<br>
><br>
> ####################################################################################<br>
> [ajay@localhost ~]$ rpm -qa | grep telepathy<br>
><br>
> telepathy-mission-control-5.6.0-2.fc14.i686<br>
> telepathy-gabble-0.10.3-1.fc14.i686<br>
> telepathy-idle-0.1.6-1.fc14.i686<br>
> telepathy-salut-0.4.0-1.fc14.i686<br>
> telepathy-glib-0.11.16-1.fc14.i686<br>
> python-telepathy-0.15.18-1.fc14.noarch<br>
> telepathy-logger-0.1.5-1.fc14.i686<br>
> telepathy-glib-devel-0.11.16-1.fc14.i686<br>
> telepathy-butterfly-0.5.14-1.fc14.noarch<br>
> telepathy-farsight-0.0.14-2.fc14.i686<br>
> telepathy-glib-vala-0.11.16-1.fc14.i686<br>
> telepathy-haze-0.4.0-1.fc14.i686<br>
> telepathy-filesystem-0.0.2-1.fc12.noarch<br>
> ####################################################################################<br>
><br>
><br>
><br>
> Which (minimum) package(s) do I need to upgrade, so that<br>
> "CONNECTION_INTERFACE_CONTACT_LIST" can be queries upon?<br>
><br>
> I will be grateful for a reply :)<br>
><br>
><br>
> Thanks and Regards,<br>
> Ajay<br>
><br>
><br>
><br>
> On Thu, Jun 7, 2012 at 2:34 PM, Xavier Claessens <<a href="mailto:xclaesse@gmail.com">xclaesse@gmail.com</a>><br>
> wrote:<br>
> Le jeudi 07 juin 2012 à 11:55 +0530, Ajay Garg a écrit :<br>
> > Hi all.<br>
> ><br>
> > I have wriiten a basic python program using telepathy-salut,<br>
> wherein<br>
> > buddies are able to see each other coming offline/online on<br>
> a<br>
> > telepathy-salut connection.<br>
> ><br>
> ><br>
> > Following interfaces/signals are being used ::<br>
> ><br>
> > a)<br>
> ><br>
> <a href="http://telepathy.freedesktop.org/spec/Channel_Interface_Group.html#Method:GetMembers" target="_blank">http://telepathy.freedesktop.org/spec/Channel_Interface_Group.html#Method:GetMembers</a><br>
><br>
> > This interface is used to get the list (one-time, at<br>
> startup) of the<br>
> > buddies, when a machine connects to telepathy-salut<br>
> connection<br>
> > (obviously, one singular time).<br>
><br>
><br>
> That's the old way of getting the list of contacts, this<br>
> interface is<br>
> easier to use:<br>
> <a href="http://telepathy.freedesktop.org/spec/Connection_Interface_Contact_List.html" target="_blank">http://telepathy.freedesktop.org/spec/Connection_Interface_Contact_List.html</a><br>
><br>
> > (iii)<br>
> > M1 disconnects from telepathy-salut.<br>
> > M2 goes offline from M1's context (as obviously expected).<br>
> > HOWEVER, M1 IS STILL SHOWN TO BE ONLINE IN M2'S CONTEXT<br>
> (something not<br>
> > expected).<br>
> ><br>
><br>
><br>
> I think what happens is the contact is removed from your<br>
> roster, but his<br>
> presence may not get updated to offline, since the contact is<br>
> not<br>
> supposed to exist anymore.<br>
><br>
> You should listen to that signal to add/remove contacts from<br>
> the<br>
> context:<br>
> <a href="http://telepathy.freedesktop.org/spec/Connection_Interface_Contact_List.html#Signal:ContactsChangedWithID" target="_blank">http://telepathy.freedesktop.org/spec/Connection_Interface_Contact_List.html#Signal:ContactsChangedWithID</a><br>
><br>
><br>
> You should also consider using telepathy-glib or telepathy-qt<br>
> helper<br>
> libraries instead of listening to dbus directly. Those 2<br>
> libraries<br>
> provides much easier high level API.<br>
><br>
> Regards,<br>
> Xavier Claessens.<br>
><br>
><br>
<br>
<br>
</div></div></blockquote></div><br>