1## Domain Registry Interface, .PRO policies
2##
3## Copyright (c) 2008,2009 Tonnerre Lombard <tonnerre.lombard@sygroup.ch>
4##		      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#
17####################################################################################################
18
19package Net::DRI::DRD::PRO;
20
21use strict;
22use warnings;
23
24use base qw/Net::DRI::DRD/;
25
26use DateTime::Duration;
27
28our $VERSION=do { my @r=(q$Revision: 1.3 $=~/\d+/g); sprintf("%d".".%02d" x $#r, @r); };
29
30=pod
31
32=head1 NAME
33
34Net::DRI::DRD::PRO - .PRO policies for Net::DRI
35
36=head1 DESCRIPTION
37
38Please see the README file for details.
39
40=head1 SUPPORT
41
42For now, support questions should be sent to:
43
44E<lt>development@sygroup.chE<gt>
45
46Please also see the SUPPORT file in the distribution.
47
48=head1 SEE ALSO
49
50E<lt>http://www.bsdprojects.net/project/netdri/E<gt>
51
52=head1 AUTHOR
53
54Tonnerre Lombard, E<lt>tonnerre.lombard@sygroup.chE<gt>,
55Alexander Biehl, E<lt>info@hexonet.netE<gt>, HEXONET Support GmbH,
56E<lt>http://www.hexonet.net/E<gt>.
57
58=head1 COPYRIGHT
59
60Copyright (c) 2008,2009 Tonnerre Lombard <tonnerre.lombard@sygroup.ch>.
61All rights reserved.
62
63This program is free software; you can redistribute it and/or modify
64it under the terms of the GNU General Public License as published by
65the Free Software Foundation; either version 2 of the License, or
66(at your option) any later version.
67
68See the LICENSE file that comes with this distribution for more details.
69
70=cut
71
72####################################################################################################
73
74sub new
75{
76 my $class = shift;
77 my $self = $class->SUPER::new(@_);
78 $self->{info}->{host_as_attr} = 0;
79
80 bless($self, $class);
81 return $self;
82}
83
84sub periods  { return map { DateTime::Duration->new(years => $_) } (1..10); }
85sub name     { return 'RegistryPro'; }
86sub tlds     { return qw/pro law.pro jur.pro bar.pro med.pro cpa.pro aca.pro eng.pro/; }
87sub object_types { return ('domain','contact','ns','av'); }
88sub profile_types { return qw/epp/; }
89
90sub transport_protocol_default
91{
92 my ($self,$type)=@_;
93
94 return ('Net::DRI::Transport::Socket',{},'Net::DRI::Protocol::EPP::Extensions::PRO',{}) if $type eq 'epp';
95 return;
96}
97
98####################################################################################################
99
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                                               icann_reserved => 1,
106                                              });
107}
108
109####################################################################################################
110## TODO : $av should be checked here to be syntaxically correct before doing process()
111
112sub av_create { my ($self,$ndr,$av,$ep)=@_; return $ndr->process('av','create',[$av,$ep]); }
113sub av_check  { my ($self,$ndr,$av,$ep)=@_; return $ndr->process('av','check',[$av,$ep]); }
114sub av_info   { my ($self,$ndr,$av,$ep)=@_; return $ndr->process('av','info',[$av,$ep]); }
115
116####################################################################################################
1171;
118