The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Net::CLI::Transport::XMPP - xmpp transport for Net::CLI

SYNOPSIS

todo

DESCRIPTION

GETTING STARTED

INTERFACE

ATTRIBUTES

The following attributes are accessible through standard accessor/mutator methods and may be set as a parameter to new unless otherwise noted.

jid

xmpp id of user we're connecting as' set_jid will only accept SCALAR type values.

jserver

jserver will only accept SCALAR type values.

jpassword

The password for the transport to use to log in to the server. jpassword will only accept scalar type values.

xmpp_debug

Sets the debug (verbosity) level for the XMPP libraries

xmpp_process_time

Sets the time in seconds to wait before calling XMPP Process to look for more XMPP data. Defaults to 1 and shouldn't be much larger.

peers

An array of peers set_peers will only accept ARRAYREF type values.

connection_retries

A max number to retry connection before giving up. connection_retries will only accept NUMERIC type values.

connection_delay

How long to wait beteen connection attempts when failed. Defaults to 30 seconds. connection_delay will only accept NUMERIC type values.

roster

Holds the Net::XMPP::Roster if enabled. To enable the roster, a paramater of 'roster' => 1, must be passed in with new. roster will contain a Net::XMPP::Roster object after initialization if enabled.

server_time

The time at the server. Useful for determining if messages were sent before we started up. server_time should only contain hash values.

group_mode

The default setting to determine how to interact with groups. Options are: 'all' - process everything said in room 'named' - process only when called by name: (name followed by colon). 'log' - don't listen to anything, but log events there (which ones?) 'prefixed' - named + anything beginning with a designated prefix character group_mode should only contain scalar values.

group_prefix

The group_prefix used for group moded prefixed. group_prefix should only contain a single scalar value.

METHODS

start

Get things rolling. Starts up a POE::Component::Jabber::Client using the user provided config info.

stop

Mostly just a placeholder.

shutdown

Forcibly shutdown

JoinPeerRooms

This POE event handler will go through each of the users in the peers array, and if the peers is a groupchat, join the conference room. It will check to make sure it is not already conencted (though this could be buggy). It does not take any arguments.

Process ( )

This event interfaces with the XMPP Process to have it check for new data

send_presence

Sends a xmpp presence message. See Net::XMPP::Presence for parameter details.

send_message

Sends a xmpp message for a control. Takes the thread and the messaage as parameters. It will overwrite the control->send attribute text with the message parameter.

GetControlForNode ( node )

Determines the control from a node and returns the control object.

Takes a node parameter and returns the hash key to the proper control object in the controls array. If the control object is not in the array, it will add it.

When a new control object is created, a new Control session must be started for the control and that is handled here as well.

Peers

This POE event handler performs the transport end of the peer manipulation commands, such as add peer. It takes an action, a User object and an optional Request object as arguments.

Valid actions are add and delete. Currently delete does not force a log off from a chatroom, but it might if I fix that and forget to update the docs.

AUTHOR

Eric Hacker hacker can be emailed at cpan.org

BUGS

SHOULDS and MUSTS are currently not enforced.

New commands could clobber old ones under certain circumstances.

Test scripts not thorough enough.

Probably many others.

LICENSE

Copyright (c) 2007, Alcatel Lucent, All rights resevred.

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