fred-mod-eppd-2.14.0
epp_gen.h
Go to the documentation of this file.
00001 /*  
00002  *  Copyright (C) 2007  CZ.NIC, z.s.p.o.
00003  *
00004  *  This file is part of FRED.
00005  *
00006  *  FRED is free software: you can redistribute it and/or modify
00007  *  it under the terms of the GNU General Public License as published by
00008  *  the Free Software Foundation, version 2 of the License.
00009  *
00010  *  FRED is distributed in the hope that it will be useful,
00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *  GNU General Public License for more details.
00014  *
00015  *  You should have received a copy of the GNU General Public License
00016  *  along with FRED.  If not, see <http://www.gnu.org/licenses/>.
00017  */
00023 #ifndef EPP_GEN_H
00024 #define EPP_GEN_H
00025 
00026 #include "epp_common.h"
00027 
00031 #define XSI     "http://www.w3.org/2001/XMLSchema-instance"
00032 
00036 typedef enum {
00037         GEN_OK,         
00038         GEN_EBUFFER,    
00039         GEN_EWRITER,    
00040         GEN_EBUILD,     
00041         /*
00042          * following errors may appear only if response validation is turned on
00043          */
00044         GEN_NOT_XML,    
00045         GEN_EINTERNAL,  
00046         GEN_ESCHEMA,    
00047         GEN_NOT_VALID   
00048 }gen_status;
00049 
00059 gen_status
00060 epp_gen_greeting(void *pool, const char *svid, const char *date, char **greeting);
00061 
00077 gen_status
00078 epp_gen_response(epp_context *epp_ctx,
00079                 int validate,
00080                 void *schema,
00081                 epp_lang lang,
00082                 epp_command_data *cdata,
00083                 char **response,
00084                 qhead *valerr);
00085 
00092 #define epp_gen_dummy_response(p_epp_ctx, p_cdata, pp_response) \
00093         epp_gen_response(p_epp_ctx, 0, NULL, LANG_EN, p_cdata, pp_response, NULL)
00094 
00095 #endif /* EPP_GEN_H */
00096 
00097 /* vim: set ts=4 sw=4: */