NAME
Net::Jabber::Query::Agents - Jabber Query Agents Module
SYNOPSIS
Net::Jabber::Query::Agents 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 Query Agents.
DESCRIPTION
To initialize the Agents with a Jabber <iq/> you must pass it the
XML::Parser Tree array from the module trying to access the <iq/>.
In the callback function:
use Net::Jabber;
sub iqCB {
my $iq = new Net::Jabber::IQ(@_);
my $agents = $iq->GetQuery();
.
.
.
}
You now have access to all of the retrieval functions available.
To create a new Agents request to send to the server:
use Net::Jabber;
$client = new Net::Jabber::Client();
$iq = new Net::Jabber::IQ();
$agents = $iq->NewQuery("jabber:iq:agents");
$client->Send($iq);
Or you can call the creation functions below before sending.
For more information about the array format being passed to the CallBack
please read the Net::Jabber::Client documentation.
Retrieval functions
@agents = $agents->GetAgents();
Creation functions
$agent = $agents->NewAgent(jid=>"icq.jabber.org",
name=>"ICQ Transport",
description=>"This is the ICQ Transport",
transport=>"ICQ#",
service=>"icq",
register=>"",
search=>"");
$agent = $agents->NewAgent();
$agent->SetXXXXX()
METHODS
Retrieval functions
GetAgents() - returns an array of jabber:iq:agent objects. For
more info on this object see the docs for
Net::Jabber::Query::Agent.
Creation functions
NewAgent(jid=>string, - creates a new jabber:iq:agent object
name=>string, and sets multiple fields in the <iq/>
description=>string, at one time. This is a cumulative and
transport=>string, over writing action. If you set the
service=>string, "jid" attribute twice, the second
register=>string, setting is what is used. If you set
search=>string) the name, and then set the search
then both will be in the <iq/> tag.
For valid settings read the specific
Set functions in Net::Jabber::Query::Agent.
This function returns a new JID object
that you can call the SetXXX functions
on directly if you want.
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.