Thanks for the reply.
> From: [EMAIL PROTECTED]> To: [email protected]> Date: Thu, 11 Sep 2008 16:26:44
> -0600> Subject: Re: [jdev] GEOLOC Support> > > On Sep 9, 2008, at 10:24 AM,
> Stephen Pendleton wrote:> > > 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.> > Step 1 is required, because
> when someone asks what your caps hash > means, you have to be able to answer.
> It's important that the results > from step 1 match the stuff that is hashed
> in step 2.
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.
So based on your feedback the correct "cookbook" would be:
STEPS TO ADD GEOLOC SUPPORT:1) Client should respond to iq query
http://jabber.org/protocol/disco#info with a stanza like:<iq
type='result'...><query xmlns='http://jabber.org/protocol/disco#info'><feature
var='http://jabber.org/geoloc+notify'/> 2) Client should add <c> stanza to
presence stanza with the proper "ver" attribute indicating geoloc support.The
"ver" attribute is a SHA-1 hash of a string like:"client/pc//fooclient
1.0<http://jabber.org/protcol/geoloc+notify<"The stanza looks something
like:<presence from='[EMAIL PROTECTED]/orchard'><c
xmlns='http://jabber.org/protocol/caps' hash='sha-1'
node='http://www.chatopus.com'
ver='zHyEOgxTrkpSdGcQKH8EFPLsriY='/></presence>3) When location changes the
client publishes its new location:<iq type='set' from='[EMAIL PROTECTED]/pda'
id='publish1'><pubsub xmlns='http://jabber.org/protocol/pubsub'><publish
node='http://jabber.org/protocol/geoloc'><item><geoloc
xmlns='http://jabber.org/protocol/geoloc'
xml:lang='en'><country>Italy</country><lat>45.44</lat><locality>Venice</locality><lon>12.33</lon></geoloc></item></publish></pubsub></iq>
4) If a client receives a location update it will be in the form:
<message from='[EMAIL PROTECTED]' to='[EMAIL PROTECTED]'> <event
xmlns='http://jabber.org/protocol/pubsub#event'> <items
node='http://jabber.org/protocol/geoloc'> <item
id='d81a52b8-0f9c-11dc-9bc8-001143d5d5db'> <geoloc
xmlns='http://jabber.org/protocol/geoloc' xml:lang='en'>
<country>Italy</country> <lat>45.44</lat>
<locality>Venice</locality> <lon>12.33</lon>
<accuracy>20</accuracy> </geoloc> </item> </items>
</event></message>The client then should use the location information in this
packet as it sees fit!
Thanks
_________________________________________________________________
Store, manage and share up to 5GB with Windows Live SkyDrive.
http://skydrive.live.com/welcome.aspx?provision=1?ocid=TXT_TAGLM_WL_skydrive_102008
_______________________________________________
JDev mailing list
FAQ: http://www.jabber.org/discussion-lists/jdev-faq
Forum: http://www.jabberforum.org/forumdisplay.php?f=20
Info: http://mail.jabber.org/mailman/listinfo/jdev
Unsubscribe: [EMAIL PROTECTED]
_______________________________________________