View Full Version : XEP-0115: Entity Capabilities - Presence Stanza
santhosh.kulandaiyan
05-13-2008, 07:55 AM
XEP 115 talks about presence based messaging for entity capabilities.
As an example, it talks about presence packets being sent like this
<c xmlns='http://jabber.org/protocol/caps'
hash='sha-1'
node='http://code.google.com/p/exodus'
ver='QgayPKawpkPSDYmwT/WM94uAlu0='/>
I have 2 questions.
(a) is it possible to modify the <c> element to include information that i would like to send based on the status of the xmpp client? like for instance if the xmpp client is coupled to a service and if the service is running, then i would like to send
"service1_running" within the <c> element. And if the service is not running then i would like to send "service1_notrunning" within the <c> element.. Or encapsulating that same information within an xml tag within the <c> element should also be just fine..
Since the <c> element is namespaced within xmlns='http://jabber.org/protocol/caps, i am doubtful if this make sense and is possible at all?
(b) Is it possible to send <c> element at any other time other than the time when the xmpp client logs in / logs out?
I use Jabber.NET client for c#. does this offer any such support?
-Thanks!
Norman Rasmussen
05-13-2008, 11:59 AM
Why not just send an additional stanza in a new namespace?
--
- Norman Rasmussen
- Email: norman (AT) rasmussen (DOT) co.za
- Home page: http://norman.rasmussen.co.za/
Dave Cridland
05-13-2008, 12:36 PM
On Tue May 13 06:55:16 2008, JabberForum wrote:
>
> XEP 115 talks about presence based messaging for entity
> capabilities.
>
> As an example, it talks about presence packets being sent like this
> <c xmlns='http://jabber.org/protocol/caps'
> hash='sha-1'
> node='http://code.google.com/p/exodus'
> ver='QgayPKawpkPSDYmwT/WM94uAlu0='/>
>
>
Not quite - it talks about presence stanzas containing such elements.
You can have other elements, and quite often you would (for status,
priority, etc).
> (b) Is it possible to send <c> element at any other time other than
> the
> time when the xmpp client logs in / logs out?
You can send presence stanzas whenever you like - it's generally done
whenever the presence state changes.
Dave.
--
Dave Cridland - mailto:dave (AT) cridland (DOT) net - xmpp:dwd (AT) jabber (DOT) org
- acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/
- http://dave.cridland.net/
Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade
Peter Saint-Andre
05-13-2008, 03:58 PM
On 05/12/2008 11:55 PM, JabberForum wrote:
> XEP 115 talks about presence based messaging for entity capabilities.
>
> As an example, it talks about presence packets being sent like this
> <c xmlns='http://jabber.org/protocol/caps'
> hash='sha-1'
> node='http://code.google.com/p/exodus'
> ver='QgayPKawpkPSDYmwT/WM94uAlu0='/>
>
> I have 2 questions.
> (a) is it possible to modify the <c> element to include information
> that i would like to send based on the status of the xmpp client? like
> for instance if the xmpp client is coupled to a service and if the
> service is running, then i would like to send
> "service1_running" within the <c> element. And if the service is not
> running then i would like to send "service1_notrunning" within the <c>
> element.. Or encapsulating that same information within an xml tag
> within the <c> element should also be just fine..
> Since the <c> element is namespaced within
> xmlns='http://jabber.org/protocol/caps, i am doubtful if this make sense
> and is possible at all?
You send entity capabilities ("caps") when your capabilities change. So
if your client has different capabilities (i.e., supports different
features) when the service is running, then it is appropriate to send
new caps data when the service is running (and send new caps data when
the service is not running). Alternatively you could create your own
custom namespace for service data (or use XEP-0004 or whatever) and
advertise that data via presence (may or may not be appropriate) or via
a pubsub node (probably using "personal eventing", see XEP-0163).
Peter
--
Peter Saint-Andre
https://stpeter.im/
santhosh.kulandaiyan
05-14-2008, 04:04 PM
Thanks for the reply! I think i will try advertising 'special' presence information with a pub sub node for now and see how it fares against implementing a new namespace..
Thanks!
Peter Saint-Andre
05-14-2008, 11:26 PM
On 05/14/2008 8:04 AM, JabberForum wrote:
> Thanks for the reply! I think i will try advertising 'special' presence
> information with a pub sub node for now and see how it fares against
> implementing a new namespace..
Sounds like a good plan!
Peter
--
Peter Saint-Andre
https://stpeter.im/
vBulletin® v3.8.0 Release Candidate 2, Copyright ©2000-2009, Jelsoft Enterprises Ltd.