1## Domain Registry Interface, SIDN EPP Host commands 2## 3## Copyright (c) 2009 Patrick Mevzek <netdri@dotandco.com>. 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# 16#################################################################################################### 17 18package Net::DRI::Protocol::EPP::Extensions::SIDN::Host; 19 20use strict; 21use warnings; 22 23use Net::DRI::Util; 24 25our $VERSION=do { my @r=(q$Revision: 1.1 $=~/\d+/g); sprintf("%d".".%02d" x $#r, @r); }; 26 27#################################################################################################### 28 29sub register_commands 30{ 31 my ($class,$version)=@_; 32 my %tmp=( info => [ undef, \&info_parse ], 33 ); 34 35 return { 'host' => \%tmp }; 36} 37 38#################################################################################################### 39########### Query commands 40 41sub info_parse 42{ 43 my ($po,$otype,$oaction,$oname,$rinfo)=@_; 44 my $mes=$po->message(); 45 return unless $mes->is_success(); 46 47 my $infdata=$mes->get_extension('sidn','ext'); 48 return unless defined $infdata; 49 50 my $ns=$mes->ns('sidn'); 51 $infdata=Net::DRI::Util::xml_traverse($infdata,$ns,'infData','host'); 52 return unless defined $infdata; 53 54 my $ho=$rinfo->{host}->{$oname}->{self}; 55 56 foreach my $el (Net::DRI::Util::xml_list_children($infdata)) 57 { 58 my ($name,$c)=@$el; 59 if ($name eq 'limited') 60 { 61 my $v=Net::DRI::Util::xml_parse_boolean($c->textContent()); 62 $rinfo->{host}->{$oname}->{limited}=$v; 63 $rinfo->{host}->{$oname}->{self}->add($oname,undef,undef,{limited => $v}); 64 } 65 } 66} 67 68#################################################################################################### 691; 70 71__END__ 72 73=pod 74 75=head1 NAME 76 77Net::DRI::Protocol::EPP::Extensions::SIDN::Host - SIDN EPP Host commands for Net::DRI 78 79=head1 DESCRIPTION 80 81Please see the README file for details. 82 83=head1 SUPPORT 84 85For now, support questions should be sent to: 86 87E<lt>netdri@dotandco.comE<gt> 88 89Please also see the SUPPORT file in the distribution. 90 91=head1 SEE ALSO 92 93E<lt>http://www.dotandco.com/services/software/Net-DRI/E<gt> 94 95=head1 AUTHOR 96 97Patrick Mevzek, E<lt>netdri@dotandco.comE<gt> 98 99=head1 COPYRIGHT 100 101Copyright (c) 2009 Patrick Mevzek <netdri@dotandco.com>. 102All rights reserved. 103 104This program is free software; you can redistribute it and/or modify 105it under the terms of the GNU General Public License as published by 106the Free Software Foundation; either version 2 of the License, or 107(at your option) any later version. 108 109See the LICENSE file that comes with this distribution for more details. 110 111=cut