line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
## Domain Registry Interface, DNSBE Registrar EPP extension notifications |
2
|
|
|
|
|
|
|
## (introduced in release 5.6 october 2008) |
3
|
|
|
|
|
|
|
## |
4
|
|
|
|
|
|
|
## Copyright (c) 2013 Michael Holloway . All rights reserved. |
5
|
|
|
|
|
|
|
## |
6
|
|
|
|
|
|
|
## This file is part of Net::DRI |
7
|
|
|
|
|
|
|
## |
8
|
|
|
|
|
|
|
## Net::DRI is free software; you can redistribute it and/or modify |
9
|
|
|
|
|
|
|
## it under the terms of the GNU General Public License as published by |
10
|
|
|
|
|
|
|
## the Free Software Foundation; either version 2 of the License, or |
11
|
|
|
|
|
|
|
## (at your option) any later version. |
12
|
|
|
|
|
|
|
## |
13
|
|
|
|
|
|
|
## See the LICENSE file that comes with this distribution for more details. |
14
|
|
|
|
|
|
|
#################################################################################################### |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
package Net::DRI::Protocol::EPP::Extensions::DNSBE::Notifications; |
17
|
|
|
|
|
|
|
|
18
|
1
|
|
|
1
|
|
956
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
27
|
|
19
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
23
|
|
20
|
|
|
|
|
|
|
|
21
|
1
|
|
|
1
|
|
4
|
use Net::DRI::Util; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
398
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=pod |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head1 NAME |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
Net::DRI::Protocol::EPP::Extensions::DNSBE::Notifications - DNSBE EPP Notifications Handling for Net::DRI |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 DESCRIPTION |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
Please see the README file for details. |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 SUPPORT |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
For now, support questions should be sent to: |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
Enetdri@dotandco.comE |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
Please also see the SUPPORT file in the distribution. |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 SEE ALSO |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
Ehttp://www.dotandco.com/services/software/Net-DRI/E |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 AUTHOR |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
Michael Holloway, Emichael@thedarkwinter.comE |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 COPYRIGHT |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
Copyright (c) 2013 Michael Holloway . |
52
|
|
|
|
|
|
|
All rights reserved. |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify |
55
|
|
|
|
|
|
|
it under the terms of the GNU General Public License as published by |
56
|
|
|
|
|
|
|
the Free Software Foundation; either version 2 of the License, or |
57
|
|
|
|
|
|
|
(at your option) any later version. |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
See the LICENSE file that comes with this distribution for more details. |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=cut |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
#################################################################################################### |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
sub register_commands |
66
|
|
|
|
|
|
|
{ |
67
|
0
|
|
|
0
|
0
|
|
my ($class,$version)=@_; |
68
|
0
|
|
|
|
|
|
my %tmp=( |
69
|
|
|
|
|
|
|
notification => [ undef, \&parse ], |
70
|
|
|
|
|
|
|
); |
71
|
|
|
|
|
|
|
|
72
|
0
|
|
|
|
|
|
return { 'message' => \%tmp }; |
73
|
|
|
|
|
|
|
} |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
#################################################################################################### |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
sub parse |
78
|
|
|
|
|
|
|
{ |
79
|
0
|
|
|
0
|
0
|
|
my ($po,$otype,$oaction,$oname,$rinfo)=@_; |
80
|
0
|
|
|
|
|
|
my $mes=$po->message(); |
81
|
0
|
0
|
|
|
|
|
return unless $mes->is_success(); |
82
|
0
|
|
|
|
|
|
my $poll=$mes->get_response('dnsbe','pollRes'); |
83
|
0
|
0
|
|
|
|
|
return unless defined $poll; |
84
|
|
|
|
|
|
|
|
85
|
0
|
|
|
|
|
|
my %n; |
86
|
0
|
|
|
|
|
|
foreach my $el (Net::DRI::Util::xml_list_children($poll)) |
87
|
|
|
|
|
|
|
{ |
88
|
0
|
|
|
|
|
|
my ($name,$c)=@$el; |
89
|
0
|
0
|
|
|
|
|
if ($name=~m/^(action|returncode|type|contact|domainname|date|email|level)$/) |
90
|
|
|
|
|
|
|
{ |
91
|
0
|
|
|
|
|
|
$n{$1}=$c->textContent(); |
92
|
|
|
|
|
|
|
} |
93
|
|
|
|
|
|
|
} |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
# determin object type and set name/id |
96
|
0
|
0
|
|
|
|
|
if (Net::DRI::Util::has_key(\%n,'domainname')) |
|
|
0
|
|
|
|
|
|
97
|
|
|
|
|
|
|
{ |
98
|
0
|
|
|
|
|
|
$otype = 'domain'; |
99
|
0
|
|
|
|
|
|
$rinfo->{$otype}->{$oname}->{name} = $oname = $n{domainname}; |
100
|
|
|
|
|
|
|
} elsif (Net::DRI::Util::has_key(\%n,'contact')) |
101
|
|
|
|
|
|
|
{ |
102
|
0
|
|
|
|
|
|
$otype='contact'; |
103
|
0
|
|
|
|
|
|
$rinfo->{$otype}->{$oname}->{srid} = $oname=$n{contact}; |
104
|
|
|
|
|
|
|
} |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
# add other values to object if it is an object |
107
|
0
|
0
|
|
|
|
|
if (defined $otype) |
108
|
|
|
|
|
|
|
{ |
109
|
0
|
|
|
|
|
|
$rinfo->{$otype}->{$oname}->{exist} = 1; |
110
|
0
|
0
|
0
|
|
|
|
$rinfo->{$otype}->{$oname}->{date} = $po->parse_iso8601($n{date}) if Net::DRI::Util::has_key(\%n,'date') && length $n{date}; |
111
|
0
|
|
|
|
|
|
foreach ('action','returncode','type','contact','email','level') |
112
|
|
|
|
|
|
|
{ |
113
|
0
|
0
|
|
|
|
|
$rinfo->{$otype}->{$oname}->{$_} = $n{$_} if defined $n{$_}; |
114
|
|
|
|
|
|
|
} |
115
|
|
|
|
|
|
|
} else |
116
|
|
|
|
|
|
|
{ |
117
|
0
|
|
|
|
|
|
$rinfo->{session}->{notification}=\%n; |
118
|
|
|
|
|
|
|
} |
119
|
0
|
0
|
0
|
|
|
|
$oname=undef if defined $otype && $otype eq 'contact'; |
120
|
0
|
|
|
|
|
|
return; |
121
|
|
|
|
|
|
|
} |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
#################################################################################################### |
124
|
|
|
|
|
|
|
1; |