<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>
<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><iq type='result'...><BR><<query xmlns='http://jabber.org/protocol/disco#info'><BR><feature var='http://jabber.org/geoloc'/><BR><feature var='http://jabber.org/geoloc+notify'/><BR>
<BR>
2) Client should add <c> 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<<A href="http://jabber.org/protcol/geoloc<http://jabber.org/protcol/geoloc+notify">http://jabber.org/protcol/geoloc<http://jabber.org/protcol/geoloc+notify</A><"<BR>
<BR>
The stanza looks something like:<BR>
<presence <A href="mailto:from='romeo@montague.lit/orchard'">from='romeo@montague.lit/orchard'</A>><BR> <c xmlns='http://jabber.org/protocol/caps' <BR> hash='sha-1'<BR> node='http://www.chatopus.com'<BR> ver='zHyEOgxTrkpSdGcQKH8EFPLsriY='/><BR></presence><BR>
<BR>
3) When location changes the client publishes its new location:<BR>
<iq type='set' <A href="mailto:from='portia@merchantofvenice.lit/pda'">from='portia@merchantofvenice.lit/pda'</A> 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) Subscribers will receive:<BR><message <A href="mailto:from='portia@merchantofvenice.lit'">from='portia@merchantofvenice.lit'</A> <BR> <A href="mailto:to='bassanio@merchantofvenice.lit'">to='bassanio@merchantofvenice.lit'</A>><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> </geoloc><BR> </item><BR> </items><BR> </event><BR></message><BR>
<BR> <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>