<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>Thanks for the reply.<BR><BR><BR><BR><BR>

<HR id=stopSpelling>
<BR>
&gt; From: hildjj@gmail.com<BR>&gt; To: jdev@jabber.org<BR>&gt; Date: Thu, 11 Sep 2008 16:26:44 -0600<BR>&gt; Subject: Re: [jdev] GEOLOC Support<BR>&gt; <BR>&gt; <BR>&gt; On Sep 9, 2008, at 10:24 AM, Stephen Pendleton wrote:<BR>&gt; <BR>&gt; &gt; Hi, I thought I would put together a simple "cookbook" on how to add <BR>&gt; &gt; GEOLOC XEP-0080 support to a client. Hopefully it will help someone <BR>&gt; &gt; else out. If anyone sees any problems with the steps below, please <BR>&gt; &gt; let me know. BTW, I am not sure why Step 1 is needed since Step 2 <BR>&gt; &gt; advertises the same capabilities.<BR>&gt; <BR>&gt; Step 1 is required, because when someone asks what your caps hash <BR>&gt; means, you have to be able to answer. It's important that the results <BR>&gt; from step 1 match the stuff that is hashed in step 2.<BR>
<BR>I misunderstood the purpose of the hash. I thought the client was expected to unhash it and use it to determine the capabilities. I didnt realize it was used to compare caps efficiently.<BR>
&nbsp;<BR>
So based on your feedback the correct "cookbook" would be:<BR>
&nbsp;<BR>
&nbsp;<BR>
&nbsp;<BR>STEPS TO ADD GEOLOC SUPPORT:<BR>1) Client should respond to iq query http://jabber.org/protocol/disco#info <BR>with a stanza like:<BR>&lt;iq type='result'...&gt;<BR>&lt;query xmlns='http://jabber.org/protocol/disco#info'&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 <BR>"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;http://jabber.org/protcol/geoloc+notify&lt;"<BR><BR>The stanza looks something like:<BR>&lt;presence from='romeo@montague.lit/orchard'&gt;<BR>&lt;c xmlns='http://jabber.org/protocol/caps'&nbsp;hash='sha-1' node='http://www.chatopus.com' ver='zHyEOgxTrkpSdGcQKH8EFPLsriY='/&gt;<BR>&lt;/presence&gt;<BR><BR>3) When location changes the client publishes its new location:<BR>&lt;iq type='set' from='portia@merchantofvenice.lit/pda' id='publish1'&gt;<BR>&lt;pubsub xmlns='http://jabber.org/protocol/pubsub'&gt;<BR>&lt;publish node='http://jabber.org/protocol/geoloc'&gt;<BR>&lt;item&gt;<BR>&lt;geoloc xmlns='http://jabber.org/protocol/geoloc' xml:lang='en'&gt;<BR>&lt;country&gt;Italy&lt;/country&gt;<BR>&lt;lat&gt;45.44&lt;/lat&gt;<BR>&lt;locality&gt;Venice&lt;/locality&gt;<BR>&lt;lon&gt;12.33&lt;/lon&gt;<BR>&lt;/geoloc&gt;<BR>&lt;/item&gt;<BR>&lt;/publish&gt;<BR>&lt;/pubsub&gt;<BR>&lt;/iq&gt;<BR><BR>
4) If a client receives a location update it will be in the form:<BR>
&lt;message from='portia@merchantofvenice.lit' <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; to='bassanio@merchantofvenice.lit'&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;&nbsp;&nbsp; &lt;accuracy&gt;20&lt;/accuracy&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>The client then should use the location information in this packet as it sees fit!<BR>
&nbsp;<BR>
Thanks<BR>
&nbsp;<BR><br /><hr />Store, manage and share up to 5GB with Windows Live SkyDrive. <a href='http://skydrive.live.com/welcome.aspx?provision=1?ocid=TXT_TAGLM_WL_skydrive_102008' target='_new'>Start uploading now</a></body>
</html>