NAME
Net::Jabber::Query::Version - Jabber IQ Version Module
SYNOPSIS
Net::Jabber::Query::Version is a companion to the Net::Jabber::Query module.
It provides the user a simple interface to set and retrieve all parts
of a Jabber Version query.
DESCRIPTION
To initialize the Query with a Jabber <iq/> and then access the version
query you must pass it the XML::Parser Tree array from the
Net::Jabber::Client module. In the callback function for the iq:
use Net::Jabber;
sub iqCB {
my $iq = new Net::Jabber::IQ(@_);
my $version = $iq->GetQuery();
.
.
.
}
You now have access to all of the retrieval functions available.
To create a new Query version to send to the server:
use Net::Jabber;
$client = new Net::Jabber::Client();
...
$iq = new Net::Jabber::IQ();
$version = $iq->NewQuery("jabber:iq:version");
...
$client->Send($iq);
Using $version you can call the creation functions below to populate the
tag before sending it.
For more information about the array format being passed to the CallBack
please read the Net::Jabber::Client documentation.
Retrieval functions
$name = $version->GetName();
$ver = $version->GetVer();
$os = $version->GetOS();
Creation functions
$version->SetVersion(name=>'Net::Jabber',
ver=>'1.0',
os=>'Perl');
$version->SetName('JabberClient');
$version->SetVer('0.1');
$version->SetOS('Perl/Tk');
METHODS
Retrieval functions
GetName() - returns a string with the name in the <query/>.
GetVer() - returns a string with the version in the <query/>.
GetOS() - returns a string with the os in the <query/>.
Creation functions
SetVersion(name=>string, - set multiple fields in the <iq/> at one
ver=>string, time. This is a cumulative and over
os=>string) writing action. If you set the "name"
twice, the second setting is what is
used. If you set the ver, and then
set the os then both will be in the
<query/> tag. For valid settings read
the specific Set functions below.
SetName(string) - sets the name of the local client for the <query/>.
SetVer(string) - sets the version of the local client in the <query/>.
SetOS(string) - sets the os, or cross-platform language, of the local
client in the <query/>.
AUTHOR
By Ryan Eatmon in May of 2000 for http://jabber.org..
COPYRIGHT
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.