Net::Jabber::Query::AutoUpdate::Release - Jabber IQ AutoUpdate Release Module
Net::Jabber::Query::AutoUpdate::Release is a companion to the Net::Jabber::Query::AutoUpdate module. It provides the user a simple interface to set and retrieve all parts of a Jabber AutoUpdate Release.
To initialize the Item with a Jabber <iq/> and then access the auth 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 iq { my $iq = new Net::Jabber::IQ(@_); my $autoupdate = $iq->GetQuery(); my $release = $roster->GetRelease(); . . . } You now have access to all of the retrieval functions available below. To create a new IQ Roster Item to send to the server: use Net::Jabber; $Client = new Net::Jabber::Client(); ... $iq = new Net::Jabber::IQ(); $autoupdate = $iq->NewQuery("jabber:iq:autoupdate"); $release = $roster->AddRelease(type=>"beta"); ... $client->Send($iq); Using $release 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.
$version = $release->GetVersion(); $description = $release->GetDesc(); $url = $release->GetURL(); $priority = $release->GetPriority(); @release = $release->GetTree(); $str = $release->GetXML();
$release->SetRelease(version=>"1.3.2", desc=>"Bob's Client for Jabber", url=>"http://www.bobssite.com/client.1.3.2.tar.gz", priority=>"optional"); $release->SetVersion('5.6'); $release->SetDesc('A description of the client'); $release->SetURL('http://somesite/path/client.tar.gz'); $release->SetPriority("mandatory");
GetVersion() - returns a string with the version number of this release. GetDesc() - returns a string with the description of this release. GetURL() - returns a string with the URL for downloading this release. GetPriority() - returns a string with the priority of this release. optional - The user can get it if they want to mandatory - The user must get this version GetXML() - returns the XML string that represents the <presence/>. This is used by the Send() function in Client.pm to send this object as a Jabber Presence. GetTree() - returns an array that contains the <presence/> tag in XML::Parser Tree format.
SetRelease(version=>string, - set multiple fields in the release desc=>string, at one time. This is a cumulative url=>string, and overwriting action. If you priority=>string, set the "url" twice, the second setting is what is used. If you set the desc, and then set the priority then both will be in the release tag. For valid settings read the specific Set functions below. SetVersion(string) - sets the version number of this release. SetDesc(string) - sets the description of this release. SetURL(string) - sets the url for downloading this release. SetPriotity(string) - sets the priority of this release. If "" or not "optional" or "mandatory" then this defaults to "optional".
By Ryan Eatmon in May of 2000 for http://jabber.org..
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Net::Jabber, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Jabber
CPAN shell
perl -MCPAN -e shell install Net::Jabber
For more information on module installation, please visit the detailed CPAN module installation guide.