line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
## Domain Registry Interface, SIDN EPP Host commands |
2
|
|
|
|
|
|
|
## |
3
|
|
|
|
|
|
|
## Copyright (c) 2009,2013 Patrick Mevzek . All rights reserved. |
4
|
|
|
|
|
|
|
## |
5
|
|
|
|
|
|
|
## This file is part of Net::DRI |
6
|
|
|
|
|
|
|
## |
7
|
|
|
|
|
|
|
## Net::DRI is free software; you can redistribute it and/or modify |
8
|
|
|
|
|
|
|
## it under the terms of the GNU General Public License as published by |
9
|
|
|
|
|
|
|
## the Free Software Foundation; either version 2 of the License, or |
10
|
|
|
|
|
|
|
## (at your option) any later version. |
11
|
|
|
|
|
|
|
## |
12
|
|
|
|
|
|
|
## See the LICENSE file that comes with this distribution for more details. |
13
|
|
|
|
|
|
|
#################################################################################################### |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
package Net::DRI::Protocol::EPP::Extensions::SIDN::Host; |
16
|
|
|
|
|
|
|
|
17
|
1
|
|
|
1
|
|
1042
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
28
|
|
18
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
23
|
|
19
|
|
|
|
|
|
|
|
20
|
1
|
|
|
1
|
|
4
|
use Net::DRI::Util; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
219
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
#################################################################################################### |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub register_commands |
25
|
|
|
|
|
|
|
{ |
26
|
0
|
|
|
0
|
0
|
|
my ($class,$version)=@_; |
27
|
0
|
|
|
|
|
|
my %tmp=( info => [ undef, \&info_parse ], |
28
|
|
|
|
|
|
|
); |
29
|
|
|
|
|
|
|
|
30
|
0
|
|
|
|
|
|
return { 'host' => \%tmp }; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
#################################################################################################### |
34
|
|
|
|
|
|
|
########### Query commands |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub info_parse |
37
|
|
|
|
|
|
|
{ |
38
|
0
|
|
|
0
|
0
|
|
my ($po,$otype,$oaction,$oname,$rinfo)=@_; |
39
|
0
|
|
|
|
|
|
my $mes=$po->message(); |
40
|
0
|
0
|
|
|
|
|
return unless $mes->is_success(); |
41
|
|
|
|
|
|
|
|
42
|
0
|
|
|
|
|
|
my $infdata=$mes->get_extension('sidn','ext'); |
43
|
0
|
0
|
|
|
|
|
return unless defined $infdata; |
44
|
|
|
|
|
|
|
|
45
|
0
|
|
|
|
|
|
my $ns=$mes->ns('sidn'); |
46
|
0
|
|
|
|
|
|
$infdata=Net::DRI::Util::xml_traverse($infdata,$ns,'infData','host'); |
47
|
0
|
0
|
|
|
|
|
return unless defined $infdata; |
48
|
|
|
|
|
|
|
|
49
|
0
|
|
|
|
|
|
my $ho=$rinfo->{host}->{$oname}->{self}; |
50
|
|
|
|
|
|
|
|
51
|
0
|
|
|
|
|
|
foreach my $el (Net::DRI::Util::xml_list_children($infdata)) |
52
|
|
|
|
|
|
|
{ |
53
|
0
|
|
|
|
|
|
my ($name,$c)=@$el; |
54
|
0
|
0
|
|
|
|
|
if ($name eq 'limited') |
55
|
|
|
|
|
|
|
{ |
56
|
0
|
|
|
|
|
|
my $v=Net::DRI::Util::xml_parse_boolean($c->textContent()); |
57
|
0
|
|
|
|
|
|
$rinfo->{host}->{$oname}->{limited}=$v; |
58
|
0
|
|
|
|
|
|
$rinfo->{host}->{$oname}->{self}->add($oname,undef,undef,{limited => $v}); |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
} |
61
|
0
|
|
|
|
|
|
return; |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
#################################################################################################### |
65
|
|
|
|
|
|
|
1; |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
__END__ |