Net::CLI::Transport::XMPP - xmpp transport for Net::CLI
The following attributes are accessible through standard accessor/mutator methods and may be set as a parameter to new unless otherwise noted.
xmpp id of user we're connecting as' set_jid will only accept SCALAR type values.
jserver will only accept SCALAR type values.
The password for the transport to use to log in to the server. jpassword will only accept scalar type values.
Sets the debug (verbosity) level for the XMPP libraries
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.
An array of peers set_peers will only accept ARRAYREF type values.
A max number to retry connection before giving up. connection_retries will only accept NUMERIC type values.
How long to wait beteen connection attempts when failed. Defaults to 30 seconds. connection_delay will only accept NUMERIC type values.
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.
The time at the server. Useful for determining if messages were sent before we started up. server_time should only contain hash values.
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.
The group_prefix used for group moded prefixed. group_prefix should only contain a single scalar value.
Get things rolling. Starts up a POE::Component::Jabber::Client using the user provided config info.
Mostly just a placeholder.
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.
This event interfaces with the XMPP Process to have it check for new data
Sends a xmpp presence message. See Net::XMPP::Presence for parameter details.
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.
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.
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.
Eric Hacker hacker can be emailed at cpan.org
SHOULDS and MUSTS are currently not enforced.
New commands could clobber old ones under certain circumstances.
Test scripts not thorough enough.
Probably many others.
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.