++ed by:

2 non-PAUSE users.

Ryan Eatmon


Net::Jabber::Query::Filter - Jabber IQ Filter Module


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


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

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

  To create a new IQ filter to send to the server:

    use Net::Jabber;

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

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


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

    @rules     = $filter->GetRules();
    @ruleTrees = $filter->GetRuleTrees();

Creation functions

    $rule   = $filter->AddRule();
    $rule   = $filter->AddRule(jid=>"bob\@jabber.org",


Retrieval functions

  GetRules() - returns an array of Net::Jabber::Query::Filter::Rule objects.
               These can be modified or accessed with the functions
               available to them.

  GetRuleTrees() - returns an array of XML::Parser objects that contain
                   the data for each rule.

Creation functions

  AddRule(hash) - creates and returns a new Net::Jabbber::Query::Filter::Rule
                  object.  The argument hash is passed to the SetRule 
                  function.  Check the Net::Jabber::Query::Filter::Rule
                  for valid values.


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