Monday, November 08, 2010 at 12:06 AM.
system.verbs.builtins.tcp.im.builtinDrivers.jabber.code.messages.iqAuth
on iqAuth ( connection = @system.temp.jabber.connection ) {
<<Changes
<<5/14/02; 1:51:34 PM by JB
<<Changelog created.
on addAtt ( XMLadr, name, value ) {
if not defined ( XMLadr^.["/atts"] ) {
new ( tableType, @XMLadr^.["/atts"] )};
XMLadr^.["/atts"].[name] = value};
if not defined ( connection^ ) {
scriptError ( "Can't send message over Jabber connection because the connection is not established." )};
local ( result, iqTag, queryTag );
connection^.state = "LOGGING IN";
new ( tableType, @result );
bundle { // <iq type="set" id="temporary">
iqTag = xml.addTable ( @result, "iq" );
addAtt (iqTag, "type", "set");
addAtt (iqTag, "id", "loginId")};
bundle { // <query xmlns="jabber:iq:auth">
queryTag = xml.addTable(iqTag, "query" );
addAtt (queryTag, "xmlns", "jabber:iq:auth")};
xml.addValue ( queryTag, "username", connection^.username );
xml.addValue ( queryTag, "password", connection^.password );
xml.addValue ( queryTag, "resource", connection^.resource );
tcp.im.builtinDrivers.jabber.code.writeXML ( @result[1], connection: connection )};
bundle { //test code
iqAuth ( )}
This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.