<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>
> From: hildjj@gmail.com<BR>> To: jdev@jabber.org<BR>> Date: Thu, 11 Sep 2008 16:26:44 -0600<BR>> Subject: Re: [jdev] GEOLOC Support<BR>> <BR>> <BR>> On Sep 9, 2008, at 10:24 AM, Stephen Pendleton wrote:<BR>> <BR>> > Hi, I thought I would put together a simple "cookbook" on how to add <BR>> > GEOLOC XEP-0080 support to a client. Hopefully it will help someone <BR>> > else out. If anyone sees any problems with the steps below, please <BR>> > let me know. BTW, I am not sure why Step 1 is needed since Step 2 <BR>> > advertises the same capabilities.<BR>> <BR>> Step 1 is required, because when someone asks what your caps hash <BR>> means, you have to be able to answer. It's important that the results <BR>> 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>
<BR>
So based on your feedback the correct "cookbook" would be:<BR>
<BR>
<BR>
<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><iq type='result'...><BR><query xmlns='http://jabber.org/protocol/disco#info'><BR><feature var='http://jabber.org/geoloc+notify'/><BR> <BR>2) Client should add <c> 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<http://jabber.org/protcol/geoloc+notify<"<BR><BR>The stanza looks something like:<BR><presence from='romeo@montague.lit/orchard'><BR><c xmlns='http://jabber.org/protocol/caps' hash='sha-1' node='http://www.chatopus.com' ver='zHyEOgxTrkpSdGcQKH8EFPLsriY='/><BR></presence><BR><BR>3) When location changes the client publishes its new location:<BR><iq type='set' from='portia@merchantofvenice.lit/pda' id='publish1'><BR><pubsub xmlns='http://jabber.org/protocol/pubsub'><BR><publish node='http://jabber.org/protocol/geoloc'><BR><item><BR><geoloc xmlns='http://jabber.org/protocol/geoloc' xml:lang='en'><BR><country>Italy</country><BR><lat>45.44</lat><BR><locality>Venice</locality><BR><lon>12.33</lon><BR></geoloc><BR></item><BR></publish><BR></pubsub><BR></iq><BR><BR>
4) If a client receives a location update it will be in the form:<BR>
<message from='portia@merchantofvenice.lit' <BR> to='bassanio@merchantofvenice.lit'><BR> <event xmlns='http://jabber.org/protocol/pubsub#event'><BR> <items node='http://jabber.org/protocol/geoloc'><BR> <item id='d81a52b8-0f9c-11dc-9bc8-001143d5d5db'><BR> <geoloc xmlns='http://jabber.org/protocol/geoloc' xml:lang='en'><BR> <country>Italy</country><BR> <lat>45.44</lat><BR> <locality>Venice</locality><BR> <lon>12.33</lon><BR> <accuracy>20</accuracy><BR> </geoloc><BR> </item><BR> </items><BR> </event><BR></message><BR>The client then should use the location information in this packet as it sees fit!<BR>
<BR>
Thanks<BR>
<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>