1 # ---------------------------------------------------------------
2 # Copyright © 2014 Jason J.A. Stephenson <jason@sigio.com>
4 # This file is part of NCIPServer.
6 # NCIPServer is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
11 # NCIPServer is distributed in the hope that it will be useful, but
12 # WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 # General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with NCIPServer. If not, see <http://www.gnu.org/licenses/>.
18 # ---------------------------------------------------------------
19 package NCIP::Response;
20 use parent qw(Class::Accessor);
22 # This is the Response object to be returned by the ILS' handlers.
25 # type: A string representing the name of the response this is usually
26 # the initiation message name with Response tacked on, i.e.
27 # LookupUserResponse, etc. This value is used to lookup the
28 # appropriate template include for formatting the response message to
31 # data: This is an object or struct with the response data for a
32 # successful result. It's value and needs vary by message type.
34 # problem: If the response is reporting a problem, this should point
35 # to a NCIP::Problem object to be used in the problem template.
37 # header: A NCIP::Header object for the optional ResponseHeader in the
40 # Presently, only one data or problem object is supported. If one is
41 # supplied the other must be left undefined/unset. Only 1 header is
42 # supported, but it is entirely optional according to the standard.
44 NCIP::Problem->mk_accessors(qw(type data problem header));