[JDEV] Can I get roster of certain group?
Matthias Wimmer
m at tthias.net
Wed Jul 16 02:24:51 CDT 2003
Hi Ru-Shan!
Ru-Shan Cheng schrieb am 2003-07-16 12:26:09:
> How can I achive this function?
> ex:
> 1.Change group definition in xml?
> ex: <iq type='get'> <query xmlns='jabber:iq:roster:group'>
> <query xmlns='jabber:iq:group'>
> or
> <iq type='group_roster'> ?
> 2. Other method?
>
> What kind of solutions will cost less efforts or form better architecture?
Setting the type of an iq to "group_roster" is not allowed. Using your
own namespaces for queries is, but you are not allowed to build your own
namespaces that start with "jabber:". But your company (or you as a
private person) for sure has a http address, that can be used to build
namespaces. You could even use your email-adress with the "mailto:"
prefix as a namespaces.
Therefore the following queries would not break any rules:
<iq type='get'>
<query xmlns='http://yourcompany.example.com/xmlns/limitedroster'>
<limit group='A'/>
</query>
</iq>
or:
<iq type='get'>
<query xmlns='mailto:minamy at pchome.com.tw?subject=limitedroster'>
<limit group='A'/>
</query>
</iq>
But you could even extend the normal query. This would make your client
compatible with servers that don't implement your extension:
<iq type='get'>
<query xmlns='jabber:iq:roster'>
<limit
xmlns='http://yourcompany.example.com/xmlns/limitedroster'
group='A'/>
</query>
</iq>
Tot kijk
Matthias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://www.jabber.org/jdev/attachments/20030716/59934964/attachment-0002.pgp>
More information about the JDev
mailing list