GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Net::XMPP2::Ext::Version(3) User Contributed Perl Documentation Net::XMPP2::Ext::Version(3)

Net::XMPP2::Ext::Version - Software version

   use Net::XMPP2::Ext::Version;

This module defines an extension to provide the abilities to answer to software version requests and to request software version from other entities.

See also XEP-0092

This class is derived from Net::XMPP2::Ext and can be added as extension to objects that implement the Net::XMPP2::Extendable interface or derive from it.

new (%args)
Creates a new software version handle.
set_name ($name)
This method sets the software $name string, the default is "Net::XMPP2".
set_version ($version)
This method sets the software $version string that is replied.

The default is $Net::XMPP2::VERSION.

set_os ($os)
This method sets the operating system string $os. If you pass undef the string will be removed.

The default is no operating system string at all.

You may want to pass something like this:

   $version->set_os (`uname -s -r -m -o`);
    
request_version ($con, $dest, $cb)
This method sends a version request to $dest on the connection $con.

$cb is the callback that will be called if either an error occured or the result was received. The callback will also be called after the default IQ timeout for the connection $con. The second argument for the callback will be either undef if no error occured or a Net::XMPP2::Error::IQ error. The first argument will be a hash reference with the following fields:

jid
The JID of the entity this version reply belongs to.
version
The software version string of the entity.
name
The software name of the entity.
os
The operating system of the entity, which might be undefined if none was provided.

Here an example of the structure of the hash reference:

  {
     jid     => 'juliet@capulet.com/balcony',
     name    => 'Exodus',
     version => '0.7.0.4',
     os      => 'Windows-XP 5.01.2600',
  }

Robin Redeker, "<elmex at ta-sa.org>", JID: "<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.

2008-03-24 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.