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

NAME

Protocol::XMPP::Base - base class for Protocol::XMPP

VERSION

Version 0.006

SYNOPSIS

DESCRIPTION

METHODS

new

Constructor. Stores all parameters on $self, including the top level stack item as parent.

debug

Helper method for displaying a debug message. Only displayed if the debug flag was passed to configure.

_ref_to_xml

Convert an arrayref to an XML fragment.

Input such as the following:

 [ 'iq', type => 'set', id => 'xyz', _content => [ [ 'session', _ns => 'xmpp-session' ] ] ]

would be converted to:

 <iq type=>'set' id=>'xyz'><session xmlns='...:xmpp-session'/></iq>

PROXY METHODS

The following methods are proxied to the Protocol::XMPP::Stream class via stream.

is_loggedin

Accessor for the loggedin state - will call the appropriate on_(login|logout) event when changing state.

write_xml

Write XML reference to stream.

write_text

Write XML reference to stream.

dispatch_event

Pass through an event (on_XXX handler).

stream

Returns the active Protocol::XMPP::Stream object.

next_id

Returns the next ID for to use in outgoing messages.

INHERITED METHODS

Mixin::Event::Dispatch

add_handler_for_event, clear_event_handlers, event_handlers, invoke_event, subscribe_to_event, unsubscribe_from_event

AUTHOR

Tom Molesworth <cpan@entitymodel.com>

LICENSE

Copyright Tom Molesworth 2010-2014. Licensed under the same terms as Perl itself.