Net::XMPP2::Ext - Extension baseclass and documentation
This module has documentation about the supported extensions and also is a base class for all extensions that can be added via the add_extension method of the classes that derive from Net::XMPP2::Extendable. (That are: Net::XMPP2::Client, Net::XMPP2::Connection and Net::XMPP2::IM::Connection)
add_extension
Basically add_extension makes the extension an event receiver for all events that the extended object receives.
This is the list of supported XMPP extensions:
This extension handles data forms as described in XEP-0004. Net::XMPP2::Ext::DataForm allows you to construct, receive and answer data forms. This is neccessary for all sorts of things in XMPP. For example XEP-0055 (Jabber Search) or also In-band registration.
This extension allows you to send service discovery requests and define a set of discoverable information. See also Net::XMPP2::Ext::Disco.
This extension allows the retrieval and storage of XMPP vcards as defined in XEP-0054. It is implemented by Net::XMPP2::Ext::VCard.
This extension allows to receive and send out of band data URLs and provides helperfunctions to handle jabber:x:oob data. See also Net::XMPP2::Ext::OOB.
This extension lets you register new accounts "in-band". For details please take a look at Net::XMPP2::Ext::Registration.
After lots of sweat and curses I implemented finally iq auth. Unfortunately the XEP-0078 specifies things that are not implemented, in fact the only server that worked was openfire and psyced.org.
So I de-analized the iq auth and now it just barfs the IQ set out on the stream with the username and the password.
If you insist on XEP-0078 behaviour enable the anal_iq_auth option when creating the stream.
anal_iq_auth
You can also completly disable iq auth, well, just see the documentation of Net::XMPP2::Connection
Implemented some functions to deal with XMPP timestamps, see Net::XMPP2::Util to_xmpp_time, to_xmpp_datetime, from_xmpp_datetime.
to_xmpp_time
to_xmpp_datetime
from_xmpp_datetime
They are meant as simple formatters for you, you will still need to handle timezone stuff and such yourself.
"A mapping to enable legacy entities to correctly handle errors from XMPP-aware entities."
This extension will enable sending of the old error codes when generating a stanza error with for example the write_error_tag method of Net::XMPP2::Writer.
write_error_tag
Also if only the old numeric codes are supplied the Net::XMPP2::Error::Stanza class tries to map the numeric codes to the new error conditions if possible.
See also XEP-0203 below.
The ability to answer to software version, name and operating system requests and being able to send such requests is implemented in Net::XMPP2::Ext::Version.
This extension allows you to connect to a server as a component and makes it possible to implement services like pubsub, muc, or whatever you can imagine (even gateways). See documentation of Net::XMPP2::Component and the example samples/simple_component.
samples/simple_component
This extension allows to store and retrive avatars from vcards. On top of that it will also signal others that you support avatars and that they might have changed. See Net::XMPP2::Ext::VCard.
You can send ping requests to other entities and also are able to reply to them. On top of that the Net::XMPP2::Ext::Ping extension implements a connection timeout mechanism based on this.
Both delayed delivery XEPs are supported and are implemented by Net::XMPP2::IM::Delayed which is a super class of Net::XMPP2::IM::Message and Net::XMPP2::IM::Presence.
If you need to fetch delay from stanzas you caught yourself in an event you can use a Net::XMPP2::IM::Delayed object to parse/fetch the delay out of the Net::XMPP2::Node.
Use the functions described above in the XEP-0082 item to decode the timestamps of delays.
Robin Redeker, <elmex at ta-sa.org>, JID: <elmex at jabber.org>
<elmex at ta-sa.org>
<elmex at jabber.org>
Copyright 2007 Robin Redeker, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Net::XMPP2, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::XMPP2
CPAN shell
perl -MCPAN -e shell install Net::XMPP2
For more information on module installation, please visit the detailed CPAN module installation guide.