1AnyEvent::XMPP::Ext::VeUrsseironC(o3n)tributed Perl DocuAmneynEtvaetnito:n:XMPP::Ext::Version(3)
2
3
4

NAME

6       AnyEvent::XMPP::Ext::Version - Software version
7

SYNOPSIS

9          use AnyEvent::XMPP::Ext::Version;
10
11          my $version = AnyEvent::XMPP::Ext::Version->new;
12          $version->set_name    ("My client");
13          $version->set_version ("0.3");
14          $version->set_os      (`uname -a`);
15
16          $disco->enable_feature ($version->disco_feature);
17

DESCRIPTION

19       This module defines an extension to provide the abilities to answer to
20       software version requests and to request software version from other
21       entities.
22
23       See also XEP-0092
24
25       This class is derived from AnyEvent::XMPP::Ext and can be added as
26       extension to objects that implement the AnyEvent::XMPP::Extendable
27       interface or derive from it.
28

METHODS

30       new (%args)
31           Creates a new software version handle.
32
33       set_name ($name)
34           This method sets the software $name string, the default is
35           "AnyEvent::XMPP".
36
37       set_version ($version)
38           This method sets the software $version string that is replied.
39
40           The default is $AnyEvent::XMPP::VERSION.
41
42       set_os ($os)
43           This method sets the operating system string $os. If you pass undef
44           the string will be removed.
45
46           The default is no operating system string at all.
47
48           You may want to pass something like this:
49
50              $version->set_os (`uname -s -r -m -o`);
51
52       request_version ($con, $dest, $cb)
53           This method sends a version request to $dest on the connection
54           $con.
55
56           $cb is the callback that will be called if either an error occured
57           or the result was received. The callback will also be called after
58           the default IQ timeout for the connection $con.  The second
59           argument for the callback will be either undef if no error occured
60           or a AnyEvent::XMPP::Error::IQ error.  The first argument will be a
61           hash reference with the following fields:
62
63           jid The JID of the entity this version reply belongs to.
64
65           version
66               The software version string of the entity.
67
68           name
69               The software name of the entity.
70
71           os  The operating system of the entity, which might be undefined if
72               none was provided.
73
74           Here an example of the structure of the hash reference:
75
76             {
77                jid     => 'juliet@capulet.com/balcony',
78                name    => 'Exodus',
79                version => '0.7.0.4',
80                os      => 'Windows-XP 5.01.2600',
81             }
82

AUTHOR

84       Robin Redeker, "<elmex at ta-sa.org>", JID: "<elmex at jabber.org>"
85
87       Copyright 2007, 2008 Robin Redeker, all rights reserved.
88
89       This program is free software; you can redistribute it and/or modify it
90       under the same terms as Perl itself.
91
92
93
94perl v5.30.1                      2020-01-29   AnyEvent::XMPP::Ext::Version(3)
Impressum