NAME

Net::Jabber::Query::AutoUpdate - Jabber IQ AutoUpdate Module

SYNOPSIS

Net::Jabber::Query::AutoUpdate 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 AutoUpdate query.

DESCRIPTION

To initialize the Query with a Jabber <iq/> and then access the autoupdate
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 $autoupdate = $iq->GetQuery();
    .
    .
    .
  }

You now have access to all of the retrieval functions available.

To create a new Query autoupdate to send to the server:

  use Net::Jabber;

  $client = new Net::Jabber::Client();
  ...

  $iq = new Net::Jabber::IQ();
  $autoupdate = $iq->NewQuery("jabber:iq:autoupdate");
  ...

  $client->Send($iq);

Using $autoupdate 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

$release     = $autoupdate->GetRelease();
$release     = $autoupdate->GetRelease("beta");
$release     = $autoupdate->GetRelease("dev");

@releaseTree = $autoupdate->GetReleaseTree();
@releaseTree = $autoupdate->GetReleaseTree("beta");
@releaseTree = $autoupdate->GetReleaseTree("dev");

Creation functions

$release = $autoupdate->AddRelease();
$release = $autoupdate->AddRelease(type=>"beta",
                                   version=>"1.0b",
                                   desc=>"Beta...",
                                   url=>"http://xxx.yyy/zzz.tar.gz",
                                   priority=>"optional");

METHODS

Retrieval functions

 GetRelease(string) - returns a Net::Jabber::Query::AutoUpdate::Release
                      object that contains the data for that release.
                      The string determines which release is returned:

                        release - returns the latest stable release 
                        beta    - returns the latest beta release
                        dev     - returns the latest dev release in CVS

                      If string is blank or undefined, then the "release"
                      version is returned.

 GetReleaseTree(string) - returns an XML::Parser tree that contains the
                          release specified in string.  If string is
                          empty or undefined then it defaults to 
                          "release".

Creation functions

AddRelease(type=>string, - created a new Release object and populates
           hash)           it with the hash.  The has is passed to the
                           SetRelease function, check the module for
                           valid settings.  The valid setting for type
                           are:

                             release - to indicate the latest stable
                                       release
                             beta    - to indicate the latest beta
                                       release
                             dev     - to indicate the latest dev release 
                                       in CVS

                           If type is blank or undefined, then "release"
                           is assumed.

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.