1# Copyright (c) 2016 CentralNic Ltd. All rights reserved. This program is
2# free software; you can redistribute it and/or modify it under the same
3# terms as Perl itself.
4#
5# $Id: Greeting.pm,v 1.3 2011/12/03 11:44:51 gavin Exp $
6package Net::EPP::Frame::Greeting;
7use base qw(Net::EPP::Frame);
8
9=pod
10
11=head1 NAME
12
13Net::EPP::Frame::Greeting - an instance of L<Net::EPP::Frame> for server greetings
14
15=head1 DESCRIPTION
16
17This module is a subclass of L<Net::EPP::Frame> that represents EPP server
18greetings.
19
20According to the EPP RFC, the server must transmit an EPP greeting frame to the
21client upon connection, and in response to an EPP C<E<lt>helloE<gt>> command.
22The C<E<lt>greetingE<gt>> frame provides information about the server,
23including the server time, access control rules, and a list of the object
24types that are provisioned by the server.
25
26=head1 OBJECT HIERARCHY
27
28    L<XML::LibXML::Node>
29    +----L<XML::LibXML::Document>
30        +----L<Net::EPP::Frame>
31            +----L<Net::EPP::Frame::Greeting>
32
33
34=cut
35
36sub _addExtraElements {
37	my $self = shift;
38	$self->greeting->addChild($self->createElement('svID'));
39	$self->greeting->addChild($self->createElement('svDate'));
40	$self->greeting->addChild($self->createElement('svcMenu'));
41	$self->greeting->addChild($self->createElement('dcp'));
42	return 1;
43}
44
45=pod
46
47=head1 METHODS
48
49	my $node = $frame->greeting;
50
51This method returns the L<XML::LibXML::Element> object corresponding to the
52C<E<lt>greetingE<gt>> element.
53
54	my $node = $frame->svID;
55
56This method returns the L<XML::LibXML::Element> object corresponding to the
57C<E<lt>svIDE<gt>> element.
58
59	my $node = $frame->svDate;
60
61This method returns the L<XML::LibXML::Element> object corresponding to the
62C<E<lt>svDateE<gt>> element.
63
64	my $node = $frame->svcMenu;
65
66This method returns the L<XML::LibXML::Element> object corresponding to the
67C<E<lt>svcMenuE<gt>> element.
68
69	my $node = $frame->dcp;
70
71This method returns the L<XML::LibXML::Element> object corresponding to the
72C<E<lt>dcpE<gt>> element.
73
74=cut
75
76sub greeting { $_[0]->getNode('greeting') }
77sub svID { $_[0]->getNode('svID') }
78sub svDate { $_[0]->getNode('svDate') }
79sub svcMenu { $_[0]->getNode('svcMenu') }
80sub dcp { $_[0]->getNode('dcp') }
81
82=pod
83
84=head1 AUTHOR
85
86CentralNic Ltd (http://www.centralnic.com/).
87
88=head1 COPYRIGHT
89
90This module is (c) 2016 CentralNic Ltd. This module is free software; you can
91redistribute it and/or modify it under the same terms as Perl itself.
92
93=head1 SEE ALSO
94
95=over
96
97=item * L<Net::EPP::Frame>
98
99=back
100
101=cut
102
1031;
104