AnyEvent::XMPP::IM::Account - Instant messaging account
my $cl = AnyEvent::XMPP::IM::Client->new; ... my $acc = $cl->get_account ($jid);
This module represents a class for IM accounts. It is used by AnyEvent::XMPP::Client.
You can get an instance of this class only by calling the get_account method on a AnyEvent::XMPP::Client object.
get_account
Returns the AnyEvent::XMPP::IM::Connection object if this account already has one (undef otherwise).
Returns true if this accunt is connected.
Returns either the full JID if the account is connected or returns the bare jid if not.
Returns always the bare JID of this account after stringprep has been applied, so you can compare the JIDs returned from this function.
Your nickname for this account.
This method transforms the $jid to a nickname. It looks the $jid up in the roster and looks for a nickname. If no nickname could be found in the roster it returns the node part for the $jid.
$jid
This method sends the AnyEvent::XMPP::IM::Message object in $msg. The to attribute of the message is adjusted by the conversation tracking mechanism.
$msg
to
For these events callbacks can be registered (with the Object::Event interface):
This event is emitted whenever the message tracking mechanism changes (or sets) it's destination resource for the $bare_jid to $full_jid.
$bare_jid
$full_jid
Whenever the account is removed from the AnyEvent::XMPP::Client (eg. when disconnected) this event is emitted before it is destroyed.
Robin Redeker, <elmex at ta-sa.org>, JID: <elmex at jabber.org>
<elmex at ta-sa.org>
<elmex at jabber.org>
Copyright 2007, 2008 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 AnyEvent::XMPP, copy and paste the appropriate command in to your terminal.
cpanm
cpanm AnyEvent::XMPP
CPAN shell
perl -MCPAN -e shell install AnyEvent::XMPP
For more information on module installation, please visit the detailed CPAN module installation guide.