1## Domain Registry Interface, .BE (DNSBE) policies for Net::DRI 2## 3## Copyright (c) 2006,2007,2008,2009,2010 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::DRD::BE; 19 20use strict; 21use warnings; 22 23use base qw/Net::DRI::DRD/; 24 25use DateTime::Duration; 26 27our $VERSION=do { my @r=(q$Revision: 1.10 $=~/\d+/g); sprintf("%d".".%02d" x $#r, @r); }; 28 29__PACKAGE__->make_exception_for_unavailable_operations(qw/domain_transfer_stop domain_transfer_query domain_transfer_accept domain_transfer_refuse domain_renew contact_check contact_check_multi contact_transfer message_retrieve message_delete message_waiting message_count/); 30 31=pod 32 33=head1 NAME 34 35Net::DRI::DRD::BE - .BE (DNSBE) policies for Net::DRI 36 37=head1 DESCRIPTION 38 39Please see the README file for details. 40 41=head1 SUPPORT 42 43For now, support questions should be sent to: 44 45E<lt>netdri@dotandco.comE<gt> 46 47Please also see the SUPPORT file in the distribution. 48 49=head1 SEE ALSO 50 51E<lt>http://www.dotandco.com/services/software/Net-DRI/E<gt> 52 53=head1 AUTHOR 54 55Patrick Mevzek, E<lt>netdri@dotandco.comE<gt> 56 57=head1 COPYRIGHT 58 59Copyright (c) 2006,2007,2008,2009,2010 Patrick Mevzek <netdri@dotandco.com>. 60All rights reserved. 61 62This program is free software; you can redistribute it and/or modify 63it under the terms of the GNU General Public License as published by 64the Free Software Foundation; either version 2 of the License, or 65(at your option) any later version. 66 67See the LICENSE file that comes with this distribution for more details. 68 69=cut 70 71##################################################################################### 72 73sub new 74{ 75 my $class=shift; 76 my $self=$class->SUPER::new(@_); 77 $self->{info}->{host_as_attr}=1; 78 $self->{info}->{contact_i18n}=1; ## LOC only 79 bless($self,$class); 80 return $self; 81} 82 83sub periods { return map { DateTime::Duration->new(years => $_) } (1); } 84sub name { return 'DNSBE'; } 85sub tlds { return ('be'); } 86sub object_types { return ('domain','contact','nsgroup'); } 87sub profile_types { return qw/epp das/; } 88 89sub transport_protocol_default 90{ 91 my ($self,$type)=@_; 92 93 return ('Net::DRI::Transport::Socket',{},'Net::DRI::Protocol::EPP::Extensions::DNSBE',{}) if $type eq 'epp'; 94 return ('Net::DRI::Transport::Socket',{remote_host=>'whois.dns.be'},'Net::DRI::Protocol::DAS',{no_tld=>1}) if $type eq 'das'; 95 return; 96} 97 98###################################################################################### 99## From �2 of Enduser_Terms_And_Conditions_fr_v3.1.pdf 100sub verify_name_domain 101{ 102 my ($self,$ndr,$domain,$op)=@_; 103 return $self->_verify_name_rules($domain,$op,{ check_name => 1, 104 my_tld => 1, 105 min_length => 2, 106 no_double_hyphen => 1, 107 }); 108} 109 110sub domain_undelete 111{ 112 my ($self,$ndr,$domain,$rd)=@_; 113 $self->enforce_domain_name_constraints($ndr,$domain,'undelete'); 114 115 my $rc=$ndr->process('domain','undelete',[$domain,$rd]); 116 return $rc; 117} 118 119sub domain_transfer_quarantine_start 120{ 121 my ($self,$ndr,$domain,$rd)=@_; 122 $self->enforce_domain_name_constraints($ndr,$domain,'transfer_quarantine'); 123 124 my $rc=$ndr->process('domain','transferq_request',[$domain,$rd]); 125 return $rc; 126} 127 128sub domain_trade_start 129{ 130 my ($self,$ndr,$domain,$rd)=@_; 131 $self->enforce_domain_name_constraints($ndr,$domain,'trade'); 132 133 my $rc=$ndr->process('domain','trade_request',[$domain,$rd]); 134 return $rc; 135} 136 137sub domain_reactivate 138{ 139 my ($self,$ndr,$domain,$rd)=@_; 140 $self->enforce_domain_name_constraints($ndr,$domain,'reactivate'); 141 142 my $rc=$ndr->process('domain','reactivate',[$domain,$rd]); 143 return $rc; 144} 145 146################################################################################################################# 1471; 148