NAME

Net::Chat::Jabber - Jabber protocol adapter for Net::Chat::Daemon

API

new()
class - the name of the class we're creating

jid - a string giving the JID, or a JID object

%options

  password - the password to provide during authentication. TODO: if
  this is not provided but a password is needed, some sort of
  authCallback is needed.

  loglevel - logs with level higher than this are not displayed.
  Defaults to 0.
connect()

Connect to the server, attempting to register if the specified user is not yet registered.

reconnect()

Reestablish a broken connection.

subscribe($jid)

Subscribe to messages coming from $jid.

post($to,$message,options...)

Send the message text $message to $to. Available options:

subject: set the subject of the message (rarely used)

thread: mark the message as a reply in the given thread

attachments: an array of attachments, where each attachment
is either a chunk of text, or an XML tree.
send_request(to,message,options...)

Send out a request, but do not wait for the reply.

request(to,message,options...)

Make a synchronous request. Returns the body of the reply message.

start_transaction($transaction_id, $onReply)

Start a transaction. A transaction is identified by the given id, and... blah blah blah this is very important but I don't remember what I did here.

end_transaction($transaction_id)

Normally called automatically. Terminates a transaction and erases the transaction callback.

count_transactions($transaction_id)

Return the number of active karfloomer hangers for the given transaction. The method name is awful; this is counting karfloomer hangers for a given transaction, not the number of transactions. FIXME when I figure this all out.

barrier()

Wait until no more active transactions are outstanding.

poll()

Check whether any messages are available.

wait([$timeout])

Wait $timeout seconds for more messages to come in. If $timeout is not given or undefined, block until a message is received.

Return value: 1 = data received, 0 = ok but no data received, undef = error

SEE ALSO

Net::Chat::Daemon, Net::Jabber, Net::XMPP

AUTHOR

Steve Fink <sfink@cpan.org>

Send bug reports directly to me. Include the module name in the subject of the email message.

COPYRIGHT AND LICENSE

Copyright 2004 by Steve Fink

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.