1Net::Jabber::Dialback::UVseerrifCyo(n3t)ributed Perl DocNuemte:n:tJaatbiboenr::Dialback::Verify(3)
2
3
4
6 Net::Jabber::Dialback::Verify - Jabber Dialback Verify Module
7
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
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 $to = $Verify->GetTo();
52 $from = $Verify->GetFrom();
53 $type = $Verify->GetType();
54 $id = $Verify->GetID();
55 $data = $Verify->GetData();
56
57 $str = $Verify->GetXML();
58 @dialback = $Verify->GetTree();
59
60 Creation functions
61 $Verify->SetVerify(from=>"jabber.org",
62 to=>"jabber.com",
63 id=>id,
64 data=>key);
65 $Verify->SetTo("jabber.org");
66 $Verify->SetFrom("jabber.com");
67 $Verify->SetType("valid");
68 $Verify->SetID(id);
69 $Verify->SetData(key);
70
71 Test functions
72 $test = $Verify->DefinedTo();
73 $test = $Verify->DefinedFrom();
74 $test = $Verify->DefinedType();
75 $test = $Verify->DefinedID();
76
78 Retrieval functions
79 GetTo() - returns a string with server that the <db:verify/> is being
80 sent to.
81
82 GetFrom() - returns a string with server that the <db:verify/> is being
83 sent from.
84
85 GetType() - returns a string with the type <db:verify/> this is.
86
87 GetID() - returns a string with the id <db:verify/> this is.
88
89 GetData() - returns a string with the cdata of the <db:verify/>.
90
91 GetXML() - returns the XML string that represents the <db:verify/>.
92 This is used by the Send() function in Server.pm to send
93 this object as a Jabber Dialback Verify.
94
95 GetTree() - returns an array that contains the <db:verify/> tag
96 in XML::Parser::Tree format.
97
98 Creation functions
99 SetVerify(to=>string, - set multiple fields in the <db:verify/>
100 from=>string, at one time. This is a cumulative
101 type=>string, and over writing action. If you set
102 id=>string, the "from" attribute twice, the second
103 data=>string) setting is what is used. If you set
104 the type, and then set the data
105 then both will be in the <db:verify/>
106 tag. For valid settings read the
107 specific Set functions below.
108
109 SetTo(string) - sets the to attribute.
110
111 SetFrom(string) - sets the from attribute.
112
113 SetType(string) - sets the type attribute. Valid settings are:
114
115 valid
116 invalid
117
118 SetID(string) - sets the id attribute.
119
120 SetData(string) - sets the cdata of the <db:verify/>.
121
122 Test functions
123 DefinedTo() - returns 1 if the to attribute is defined in the
124 <db:verify/>, 0 otherwise.
125
126 DefinedFrom() - returns 1 if the from attribute is defined in the
127 <db:verify/>, 0 otherwise.
128
129 DefinedType() - returns 1 if the type attribute is defined in the
130 <db:verify/>, 0 otherwise.
131
132 DefinedID() - returns 1 if the id attribute is defined in the
133 <db:verify/>, 0 otherwise.
134
136 By Ryan Eatmon in May of 2001 for http://jabber.org..
137
139 This module is free software; you can redistribute it and/or modify it
140 under the same terms as Perl itself.
141
142
143
144perl v5.10.1 2004-08-17 Net::Jabber::Dialback::Verify(3)