++ed by:

2 non-PAUSE users.

Ryan Eatmon

NAME

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

SYNOPSIS

  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.

DESCRIPTION

  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.

Retrieval functions

    $version     = $release->GetVersion();
    $description = $release->GetDesc();
    $url         = $release->GetURL();
    $priority    = $release->GetPriority();

    @release     = $release->GetTree();
    $str          = $release->GetXML();

Creation functions

    $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");

Test functions

    $test = $release->DefinedVersion();
    $test = $release->DefinedDesc();
    $test = $release->DefinedURL();
    $test = $release->DefinedPriority();

METHODS

Retrieval functions

  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.

Creation functions

  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".

Test functions

  DefinedVersion() - returns 1 if <version/> is defined in the query, 0
                     otherwise.

  DefinedDesc() -  returns 1 if <desc/> is defined in the query, 0
                   otherwise.

  DefinedURL() -  returns 1 if <url/> is defined in the query, 0
                  otherwise.

  DefinedPriority() -  returns 1 if priority is defined in the query, 0
                       otherwise.

AUTHOR

By Ryan Eatmon in July 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.