1AnyEvent::XMPP::IM::AccUosuenrt(C3o)ntributed Perl DocumAennytEavteinotn::XMPP::IM::Account(3)
2
3
4
6 AnyEvent::XMPP::IM::Account - Instant messaging account
7
9 my $cl = AnyEvent::XMPP::IM::Client->new;
10 ...
11 my $acc = $cl->get_account ($jid);
12
14 This module represents a class for IM accounts. It is used by
15 AnyEvent::XMPP::Client.
16
17 You can get an instance of this class only by calling the "get_account"
18 method on a AnyEvent::XMPP::Client object.
19
21 connection ()
22 Returns the AnyEvent::XMPP::IM::Connection object if this account
23 already has one (undef otherwise).
24
25 is_connected ()
26 Returns true if this accunt is connected.
27
28 jid ()
29 Returns either the full JID if the account is connected or returns
30 the bare jid if not.
31
32 bare_jid ()
33 Returns always the bare JID of this account after stringprep has
34 been applied, so you can compare the JIDs returned from this
35 function.
36
37 nickname ()
38 Your nickname for this account.
39
40 nickname_for_jid ($jid)
41 This method transforms the $jid to a nickname. It looks the $jid up
42 in the roster and looks for a nickname. If no nickname could be
43 found in the roster it returns the node part for the $jid.
44
45 send_tracked_message ($msg)
46 This method sends the AnyEvent::XMPP::IM::Message object in $msg.
47 The "to" attribute of the message is adjusted by the conversation
48 tracking mechanism.
49
51 For these events callbacks can be registered (with the Object::Event
52 interface):
53
54 tracked_message_destination => $bare_jid, $full_jid
55 This event is emitted whenever the message tracking mechanism
56 changes (or sets) it's destination resource for the $bare_jid to
57 $full_jid.
58
59 removed
60 Whenever the account is removed from the AnyEvent::XMPP::Client
61 (eg. when disconnected) this event is emitted before it is
62 destroyed.
63
65 Robin Redeker, "<elmex at ta-sa.org>", JID: "<elmex at jabber.org>"
66
68 Copyright 2007, 2008 Robin Redeker, all rights reserved.
69
70 This program is free software; you can redistribute it and/or modify it
71 under the same terms as Perl itself.
72
73
74
75perl v5.32.0 2020-07-28 AnyEvent::XMPP::IM::Account(3)