<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>Hi, I thought I would put together a simple "cookbook" on how to add GEOLOC XEP-0080 support to a client. Hopefully it will help someone else out. If anyone sees any problems with the steps below, please let me know. BTW, I am not sure why Step 1 is needed since Step 2 advertises the same capabilities.<BR>
&nbsp;<BR>
STEPS TO ADD GEOLOC SUPPORT:<BR>
1) Client should respond to iq query <A href="http://jabber.org/protocol/disco#info">http://jabber.org/protocol/disco#info</A> with a stanza like: <BR>&lt;iq type='result'...&gt;<BR>&lt;&lt;query xmlns='http://jabber.org/protocol/disco#info'&gt;<BR>&lt;feature var='http://jabber.org/geoloc'/&gt;<BR>&lt;feature var='http://jabber.org/geoloc+notify'/&gt;<BR>
&nbsp;<BR>
2) Client should add &lt;c&gt; stanza to presence stanza with the proper "ver" attribute indicating geoloc support. <BR>The "ver" attribute is a SHA-1 hash of a string like:<BR>"client/pc//fooclient 1.0&lt;<A href="http://jabber.org/protcol/geoloc<http://jabber.org/protcol/geoloc+notify">http://jabber.org/protcol/geoloc&lt;http://jabber.org/protcol/geoloc+notify</A>&lt;"<BR>
&nbsp;<BR>
The stanza looks something&nbsp;like:<BR>
&lt;presence <A href="mailto:from='romeo@montague.lit/orchard'">from='romeo@montague.lit/orchard'</A>&gt;<BR>&nbsp; &lt;c xmlns='http://jabber.org/protocol/caps' <BR>&nbsp;&nbsp;&nbsp;&nbsp; hash='sha-1'<BR>&nbsp;&nbsp;&nbsp;&nbsp; node='http://www.chatopus.com'<BR>&nbsp;&nbsp;&nbsp;&nbsp; ver='zHyEOgxTrkpSdGcQKH8EFPLsriY='/&gt;<BR>&lt;/presence&gt;<BR>
&nbsp;<BR>
3) When location changes the client publishes its new location:<BR>
&lt;iq type='set' <A href="mailto:from='portia@merchantofvenice.lit/pda'">from='portia@merchantofvenice.lit/pda'</A> id='publish1'&gt;<BR>&nbsp; &lt;pubsub xmlns='http://jabber.org/protocol/pubsub'&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;publish node='http://jabber.org/protocol/geoloc'&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;item&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;geoloc xmlns='http://jabber.org/protocol/geoloc' xml:lang='en'&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;country&gt;Italy&lt;/country&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;lat&gt;45.44&lt;/lat&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;locality&gt;Venice&lt;/locality&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;lon&gt;12.33&lt;/lon&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/geoloc&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/item&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;/publish&gt;<BR>&nbsp; &lt;/pubsub&gt;<BR>&lt;/iq&gt;<BR>
<BR>4) Subscribers will receive:<BR>&lt;message <A href="mailto:from='portia@merchantofvenice.lit'">from='portia@merchantofvenice.lit'</A> <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <A href="mailto:to='bassanio@merchantofvenice.lit'">to='bassanio@merchantofvenice.lit'</A>&gt;<BR>&nbsp; &lt;event xmlns='http://jabber.org/protocol/pubsub#event'&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;items node='http://jabber.org/protocol/geoloc'&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;item id='d81a52b8-0f9c-11dc-9bc8-001143d5d5db'&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;geoloc xmlns='http://jabber.org/protocol/geoloc' xml:lang='en'&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;country&gt;Italy&lt;/country&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;lat&gt;45.44&lt;/lat&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;locality&gt;Venice&lt;/locality&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;lon&gt;12.33&lt;/lon&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/geoloc&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/item&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;/items&gt;<BR>&nbsp; &lt;/event&gt;<BR>&lt;/message&gt;<BR>
<BR>&nbsp;<BR><br /><hr />Stay up to date on your PC, the Web, and your mobile phone with Windows Live. <a href='http://clk.atdmt.com/MRT/go/msnnkwxp1020093185mrt/direct/01/' target='_new'>See Now</a></body>
</html>