[jdev] XEP-0115: Entity Capabilities - Presence Stanza

Peter Saint-Andre stpeter at stpeter.im
Tue May 13 08:57:06 CDT 2008


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/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 7338 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.jabber.org/pipermail/jdev/attachments/20080513/2d36bfe2/attachment-0002.bin>


More information about the JDev mailing list