On Thu, Feb 26, 2009 at 3:33 AM, Peter Saint-Andre <stpe...@stpeter.im> wrote:
> The basic idea is that you could ask the server to send you only > contacts in the roster group(s) you specify. The XML might look > something like this: > > <iq type='get'> > <query xmlns='jabber:iq:roster'> > <group xmlns='urn:xmpp:rosterviews'>VIPs</group> > </query> > </iq> > > (Naturally you would need to discover support for this feature before > sending that IQ-get to the server.) > > The server would then send you only the contacts in the group(s) you > specified: > > <iq type='result'> > <query xmlns='jabber:iq:roster'> > <item jid='f...@example.com'> > <group>VIPs</group> > </item> > <item jid='b...@example.net'> > <group>VIPs</group> > </item> > </query> > </iq> > > The server would also filter inbound presence so that you would receive > presence notifications only from contacts in the group(s) you specified. After Bruxelles I've reflected a bit about this and I think the approach is not completely correct, since we are trying to do two things together: - retrieving a part of the roster - making just a part of it active What about having two separate commands for that? In order to activate any part port of the roster you could send: <iq type='set'> <query xmlns='urm:xmpp:activeroster'> <group in="true" out="true">VIPs</group> <group in="false" out="true">Lesser VIPs</group> </query> </iq> In this way with the true / false flag I can toggle in/out presence of any group, and also make myself invisible to everybody or some groups Instead for retrieving part of the roster the thing becomes a bit more complex. Few examples: - for retrieving one or more groups: <iq type='get'> <query xmlns='jabber:iq:roster'> <view xmlns='urn:xmpp:rosterview'> <group>VIPs</group </view> </query> </iq> - for retrieving all the contacts but those with node subscription state: <iq type='get'> <query xmlns='jabber:iq:roster'> <view xmlns='urn:xmpp:rosterview'> <subscription>both</subscription> <subscription>to</subscription> <subscription>from</subscription> </view> </query> </iq> The language for making queries is still to be defined, but I wanted to make an example of different use cases. The latter in particular could be good if we use the roster also as general purpose "contact list", making it to grow to thousands of contacts with just a small part having an actual subscription. In this case I don't want to retrieve the full roster (at least on my mobile), but I'd like to be able to query on it and the operation shouldn't automatically activate/deactivate presence distribution bye -- Fabio Forno, Ph.D. Bluendo srl http://www.bluendo.com jabber id: f...@jabber.bluendo.com