1Net::Jabber::Dialback::UVseerrifCyo(n3t)ributed Perl DocNuemte:n:tJaatbiboenr::Dialback::Verify(3)
2
3
4

NAME

6       Net::Jabber::Dialback::Verify - Jabber Dialback Verify Module
7

SYNOPSIS

9         Net::Jabber::Dialback::Verify is a companion to the Net::Jabber::Dialback
10         module.  It provides the user a simple interface to set and retrieve all
11         parts of a Jabber Dialback Verify.
12

DESCRIPTION

14         To initialize the Verify with a Jabber <db:*/> you must pass it
15         the XML::Stream hash.  For example:
16
17           my $dialback = new Net::Jabber::Dialback::Verify(%hash);
18
19         There has been a change from the old way of handling the callbacks.
20         You no longer have to do the above yourself, a NJ::Dialback::Verify
21         object is passed to the callback function for the message.  Also,
22         the first argument to the callback functions is the session ID from
23         XML::Streams.  There are some cases where you might want this
24         information, like if you created a Client that connects to two servers
25         at once, or for writing a mini server.
26
27           use Net::Jabber qw(Server);
28
29           sub dialbackVerify {
30             my ($sid,$Verify) = @_;
31             .
32             .
33             .
34           }
35
36         You now have access to all of the retrieval functions available.
37
38         To create a new dialback to send to the server:
39
40           use Net::Jabber qw(Server);
41
42           $Verify = new Net::Jabber::Dialback::Verify();
43
44         Now you can call the creation functions below to populate the tag before
45         sending it.
46
47         For more information about the array format being passed to the CallBack
48         please read the Net::Jabber::Client documentation.
49
50       Retrieval functions
51
52           $to         = $Verify->GetTo();
53           $from       = $Verify->GetFrom();
54           $type       = $Verify->GetType();
55           $id         = $Verify->GetID();
56           $data       = $Verify->GetData();
57
58           $str        = $Verify->GetXML();
59           @dialback   = $Verify->GetTree();
60
61       Creation functions
62
63           $Verify->SetVerify(from=>"jabber.org",
64                              to=>"jabber.com",
65                              id=>id,
66                              data=>key);
67           $Verify->SetTo("jabber.org");
68           $Verify->SetFrom("jabber.com");
69           $Verify->SetType("valid");
70           $Verify->SetID(id);
71           $Verify->SetData(key);
72
73       Test functions
74
75           $test = $Verify->DefinedTo();
76           $test = $Verify->DefinedFrom();
77           $test = $Verify->DefinedType();
78           $test = $Verify->DefinedID();
79

METHODS

81       Retrieval functions
82
83         GetTo() -  returns a string with server that the <db:verify/> is being
84                    sent to.
85
86         GetFrom() -  returns a string with server that the <db:verify/> is being
87                      sent from.
88
89         GetType() - returns a string with the type <db:verify/> this is.
90
91         GetID() - returns a string with the id <db:verify/> this is.
92
93         GetData() - returns a string with the cdata of the <db:verify/>.
94
95         GetXML() - returns the XML string that represents the <db:verify/>.
96                    This is used by the Send() function in Server.pm to send
97                    this object as a Jabber Dialback Verify.
98
99         GetTree() - returns an array that contains the <db:verify/> tag
100                     in XML::Parser::Tree format.
101
102       Creation functions
103
104         SetVerify(to=>string,   - set multiple fields in the <db:verify/>
105                   from=>string,   at one time.  This is a cumulative
106                   type=>string,   and over writing action.  If you set
107                   id=>string,     the "from" attribute twice, the second
108                   data=>string)   setting is what is used.  If you set
109                                   the type, and then set the data
110                                   then both will be in the <db:verify/>
111                                   tag.  For valid settings read the
112                                   specific Set functions below.
113
114         SetTo(string) - sets the to attribute.
115
116         SetFrom(string) - sets the from attribute.
117
118         SetType(string) - sets the type attribute.  Valid settings are:
119
120                           valid
121                           invalid
122
123         SetID(string) - sets the id attribute.
124
125         SetData(string) - sets the cdata of the <db:verify/>.
126
127       Test functions
128
129         DefinedTo() - returns 1 if the to attribute is defined in the
130                       <db:verify/>, 0 otherwise.
131
132         DefinedFrom() - returns 1 if the from attribute is defined in the
133                         <db:verify/>, 0 otherwise.
134
135         DefinedType() - returns 1 if the type attribute is defined in the
136                         <db:verify/>, 0 otherwise.
137
138         DefinedID() - returns 1 if the id attribute is defined in the
139                         <db:verify/>, 0 otherwise.
140

AUTHOR

142       By Ryan Eatmon in May of 2001 for http://jabber.org..
143
145       This module is free software; you can redistribute it and/or modify it
146       under the same terms as Perl itself.
147
148
149
150perl v5.8.8                       2004-08-16  Net::Jabber::Dialback::Verify(3)
Impressum