SourceForge.net Logo
Jabber.org Logo

Project Summary
CVS
Download
Lists:

Jabber Bookmark Directory (JBD)

 
Jabber Bookmark Directory (JBD) is a directory that stores user's bookmarks.

Users can add multiple bookmarks to his/her jid, which is stored in the XDB spool file. Interesting thing about this feature is that when storing bookmarks, users can choose to set the 'browsable' attribute to '1', which signifies that this URL is public and can be queried by anybody by simply passing their JID (Jabber ID) in the protocol request to bookmark module.

Unpack the tarball into your jabberd server folder, and type 'make' to build the bookmark.so. Add the following to the "browse" part of jabber.xml configuration file, just to let clients know if you are offering this service: <service type="bookmark" jid="bookmark.myserver" name="Bookmark Directory"> <ns>jabber:iq:bookmark</ns> </service> NOTE: Substitute "myserver" with appropriate host name of yours, for example, on my box, its 'localhost' ;-) Add this to "service" part of the jabber.xml configuration file, to load the bookmark module of course :-D <service id="bookmark"> <host>bookmark.myserver</host> <load><bookmark>./bookmark/bookmark.so</bookmark></load> <bookmark xmlns="jabber:config:bkd"> <vCard> <FN>Bookmark Directory</FN> <DESC>This service provides bookmark service.</DESC> <URL>http://localhost/</URL> </vCard> </bookmark> </service> In case of compilation of this module, if you experience INCLUDE path problem, pls check bk_hash.c and change the lib.h's path. BEWARE: I have got time only to test this module with jabberd-1.4.1 & jabberd-1.4.3, so pls bear in case of functionalities not working with other versions. Others willing to test the code are welcome, but at their own risk of running it! :) TODO: Deletion/Modification of bookmarks. Right now the module skips on modification, if the title name is the same as what exists in XDB. General Format of an example request : REQUEST: <iq id='3' to='bookmark.myserver' type='get'> <query xmlns='jabber:iq:bookmark'> <url/> <title/> <browsable/> </query> </iq> RESPONSE: <iq id='3' to='praz@myserver/Resource' type='result' from='bookmark.myserver'> <query xmlns='jabber:iq:register'> <instructions> Complete the form to submit your bookmark attributes in the Jabber Bookmark Directory. Setting browsable as 1 would enable other users to query your bookmarks! </instructions> <bookmark> <title>Yahoo! Home Page</title> <url>http://www.yahoo.com</url> <browsable>1</browsable> </bookmark> </query> </iq> You can enable browsable tag's value to 1, then it means other users would be able to query your enabled bookmarks. For example, REQUEST: <iq id='3' to='bookmark.myserver' type='get'> <query xmlns='jabber:iq:bookmark' of='kris@myserver'> <url/> <title/> <browsable/> </query> </iq> RESPONSE: <iq id='3' to='praz@myserver/Resource' type='result' from='bookmark.myserver'> <query xmlns='jabber:iq:register'> <instructions>Complete the form to submit your bookmark attributes in the Jabber Bookmark Directory. Setting browsable as 1 would enable other users to query your bookmarks! </instructions> <bookmark of='kris@myserver'> <title>Yahoo! Search Home Page</title> <url>http://search.yahoo.com</url> <browsable>1</browsable> </bookmark> <bookmark of='kris@myserver'> <title>Yahoo Video Search Home Page</title> <url>http://video.search.yahoo.com</url> <browsable>1</browsable> </bookmark> </query> </iq> The SPOOL file storing bookmarks would be located in <spooldirectory>/bookmark/global.xdb Author: Krishna Prasanth (praz) <krishna.prasanth AT gmail.com> Good Luck!