| 1 | ## Domain Registry Interface, EURid Registrar EPP extension notifications | ||||||||||
| 2 | ## (introduced in release 5.6 october 2008) | ||||||||||
| 3 | ## | ||||||||||
| 4 | ## Copyright (c) 2009,2012-2013,2018 Patrick Mevzek <netdri@dotandco.com>. All rights reserved. | ||||||||||
| 5 | ## 2014 Michael Kefeder <michael.kefeder@world4you.com>. All rights reserved. | ||||||||||
| 6 | ## | ||||||||||
| 7 | ## This file is part of Net::DRI | ||||||||||
| 8 | ## | ||||||||||
| 9 | ## Net::DRI is free software; you can redistribute it and/or modify | ||||||||||
| 10 | ## it under the terms of the GNU General Public License as published by | ||||||||||
| 11 | ## the Free Software Foundation; either version 2 of the License, or | ||||||||||
| 12 | ## (at your option) any later version. | ||||||||||
| 13 | ## | ||||||||||
| 14 | ## See the LICENSE file that comes with this distribution for more details. | ||||||||||
| 15 | #################################################################################################### | ||||||||||
| 16 | |||||||||||
| 17 | package Net::DRI::Protocol::EPP::Extensions::EURid::Notifications; | ||||||||||
| 18 | |||||||||||
| 19 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 20 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 21 | |||||||||||
| 22 | 1 | ▶ | use Net::DRI::Util; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 23 | |||||||||||
| 24 | =pod | ||||||||||
| 25 | |||||||||||
| 26 | =head1 NAME | ||||||||||
| 27 | |||||||||||
| 28 | Net::DRI::Protocol::EPP::Extensions::EURid::Notifications - EURid EPP Notifications Handling for Net::DRI | ||||||||||
| 29 | |||||||||||
| 30 | =head1 DESCRIPTION | ||||||||||
| 31 | |||||||||||
| 32 | Please see the README file for details. | ||||||||||
| 33 | |||||||||||
| 34 | =head1 SUPPORT | ||||||||||
| 35 | |||||||||||
| 36 | For now, support questions should be sent to: | ||||||||||
| 37 | |||||||||||
| 38 | E<lt>netdri@dotandco.comE<gt> | ||||||||||
| 39 | |||||||||||
| 40 | Please also see the SUPPORT file in the distribution. | ||||||||||
| 41 | |||||||||||
| 42 | =head1 SEE ALSO | ||||||||||
| 43 | |||||||||||
| 44 | E<lt>http://www.dotandco.com/services/software/Net-DRI/E<gt> | ||||||||||
| 45 | |||||||||||
| 46 | =head1 AUTHOR | ||||||||||
| 47 | |||||||||||
| 48 | Patrick Mevzek, E<lt>netdri@dotandco.comE<gt> | ||||||||||
| 49 | |||||||||||
| 50 | =head1 COPYRIGHT | ||||||||||
| 51 | |||||||||||
| 52 | Copyright (c) 2009,2012-2013,2018 Patrick Mevzek <netdri@dotandco.com>. | ||||||||||
| 53 | 2014 Michael Kefeder <michael.kefeder@world4you.com>. | ||||||||||
| 54 | All rights reserved. | ||||||||||
| 55 | |||||||||||
| 56 | This program is free software; you can redistribute it and/or modify | ||||||||||
| 57 | it under the terms of the GNU General Public License as published by | ||||||||||
| 58 | the Free Software Foundation; either version 2 of the License, or | ||||||||||
| 59 | (at your option) any later version. | ||||||||||
| 60 | |||||||||||
| 61 | See the LICENSE file that comes with this distribution for more details. | ||||||||||
| 62 | |||||||||||
| 63 | =cut | ||||||||||
| 64 | |||||||||||
| 65 | #################################################################################################### | ||||||||||
| 66 | |||||||||||
| 67 | sub register_commands | ||||||||||
| 68 | 0 | ▶ | { | ||||||||
|
Subroutine
register_commands: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 69 | 0 | my ($class,$version)=@_; | |||||||||
| 70 | 0 | my %tmp=( | |||||||||
| 71 | notification => [ undef, \&parse ], | ||||||||||
| 72 | ); | ||||||||||
| 73 | |||||||||||
| 74 | 0 | return { 'message' => \%tmp }; | |||||||||
| 75 | } | ||||||||||
| 76 | |||||||||||
| 77 | sub setup | ||||||||||
| 78 | 0 | ▶ | { | ||||||||
|
Subroutine
setup: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 79 | 0 | my ($class,$po,$version)=@_; | |||||||||
| 80 | 0 | $po->ns({ 'poll' => 'http://www.eurid.eu/xml/epp/poll-1.1' }); | |||||||||
| 81 | 0 | return; | |||||||||
| 82 | } | ||||||||||
| 83 | |||||||||||
| 84 | #################################################################################################### | ||||||||||
| 85 | |||||||||||
| 86 | sub parse | ||||||||||
| 87 | 0 | ▶ | { | ||||||||
|
Subroutine
parse: not called CC=7 SCAR=40.3
Pod
undocumented
| |||||||||||
| 88 | 0 | my ($po,$otype,$oaction,$oname,$rinfo)=@_; | |||||||||
| 89 | 0 | my $mes=$po->message(); | |||||||||
| 90 | 0 | ▶ | return unless $mes->is_success(); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 91 | |||||||||||
| 92 | 0 | my $poll=$mes->get_response('poll','pollData'); | |||||||||
| 93 | 0 | ▶ | return unless defined $poll; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 94 | |||||||||||
| 95 | 0 | my %n; | |||||||||
| 96 | 0 | foreach my $el (Net::DRI::Util::xml_list_children($poll)) | |||||||||
| 97 | { | ||||||||||
| 98 | 0 | my ($name,$c)=@$el; | |||||||||
| 99 | 0 | ▶ | if ($name=~m/^(context|object|action|code|detail|objectType|objectUnicode)$/) | ||||||||
|
Branch: 1 branch
| |||||||||||
| 100 | { | ||||||||||
| 101 | 0 | $n{$1}=$c->textContent(); | |||||||||
| 102 | } | ||||||||||
| 103 | } | ||||||||||
| 104 | |||||||||||
| 105 | 0 | ▶ | if ($n{context}=~m/^(?:DOMAIN|TRANSFER)$/) | ||||||||
|
Branch: 1 branch
| |||||||||||
| 106 | { | ||||||||||
| 107 | 0 | $oname=$n{object}; | |||||||||
| 108 | 0 | $rinfo->{domain}->{$oname}->{context}=$n{context}; | |||||||||
| 109 | 0 | $rinfo->{domain}->{$oname}->{notification_code}=$n{code}; | |||||||||
| 110 | 0 | $rinfo->{domain}->{$oname}->{action}=$n{action}; | |||||||||
| 111 | 0 | ▶ | $rinfo->{domain}->{$oname}->{detail}=$n{detail} if exists $n{detail}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 112 | 0 | $rinfo->{domain}->{$oname}->{context}=$n{context}; | |||||||||
| 113 | 0 | $rinfo->{domain}->{$oname}->{object_type}=$n{objectType}; | |||||||||
| 114 | 0 | $rinfo->{domain}->{$oname}->{object_unicode}=$n{objectUnicode}; | |||||||||
| 115 | 0 | $rinfo->{domain}->{$oname}->{exist}=1; | |||||||||
| 116 | } else | ||||||||||
| 117 | { | ||||||||||
| 118 | 0 | $rinfo->{session}->{notification}=\%n; | |||||||||
| 119 | } | ||||||||||
| 120 | 0 | return; | |||||||||
| 121 | } | ||||||||||
| 122 | |||||||||||
| 123 | #################################################################################################### | ||||||||||
| 124 | 1 | 1; | |||||||||