fred-mod-eppd-2.20.1
|
Interface to component which generates xml documents and returns result in form of a string. More...
#include "epp_common.h"
Go to the source code of this file.
Macros | |
#define | XSI "http://www.w3.org/2001/XMLSchema-instance" |
Namespace used for specifing location of a schema in xml document. | |
#define | epp_gen_dummy_response(p_epp_ctx, p_cdata, pp_response) epp_gen_response(p_epp_ctx, 0, NULL, LANG_EN, p_cdata, pp_response, NULL) |
Convenient wrapper around epp_gen_response for error cases. More... | |
Enumerations | |
enum | gen_status { GEN_OK, GEN_EBUFFER, GEN_EWRITER, GEN_EBUILD, GEN_NOT_XML, GEN_EINTERNAL, GEN_ESCHEMA, GEN_NOT_VALID } |
XML generator status values. More... | |
Functions | |
gen_status | epp_gen_greeting (void *pool, const char *svid, const char *date, const eppd_server_xml_conf *xml_schema, char **greeting) |
Routine makes up epp greeting frame. More... | |
gen_status | epp_gen_response (epp_context *epp_ctx, int validate, void *schema, epp_lang lang, epp_command_data *cdata, char **response, qhead *valerr) |
Generate command response in XML format. More... | |
Interface to component which generates xml documents and returns result in form of a string.
#define epp_gen_dummy_response | ( | p_epp_ctx, | |
p_cdata, | |||
pp_response | |||
) | epp_gen_response(p_epp_ctx, 0, NULL, LANG_EN, p_cdata, pp_response, NULL) |
Convenient wrapper around epp_gen_response for error cases.
p_epp_ctx | Epp context (session id, connection and pool). |
p_cdata | Input values |
pp_response | Result of generation phase = generated string. |
enum gen_status |
XML generator status values.
gen_status epp_gen_greeting | ( | void * | pool, |
const char * | svid, | ||
const char * | date, | ||
const eppd_server_xml_conf * | xml_schema, | ||
char ** | greeting | ||
) |
Routine makes up epp greeting frame.
pool | Pool to allocate memory from. |
svid | Part of server ID used in svid tag. |
date | Current date as returned from server. |
xml_schema | Entities enabled in xml schemas. |
greeting | Greeting string. |
References END_ELEMENT, GEN_EBUFFER, GEN_EWRITER, eppd_server_xml_conf::has_contact_mailing_address_extension, LOC_EPP, NS_CONTACT, NS_DOMAIN, NS_ENUMVAL, NS_EPP, NS_EXTRAADDR, NS_KEYSET, NS_NSSET, START_ELEMENT, WRITE_ATTRIBUTE, WRITE_ELEMENT, and XSI.
Referenced by epp_process_connection().
gen_status epp_gen_response | ( | epp_context * | epp_ctx, |
int | validate, | ||
void * | schema, | ||
epp_lang | lang, | ||
epp_command_data * | cdata, | ||
char ** | response, | ||
qhead * | valerr | ||
) |
Generate command response in XML format.
There is option that response can be validated, the validation errors are then returned together with generated string in form of a list.
epp_ctx | Epp context (session id, connection and pool). |
validate | Tells if response should be validated or not (boolean). |
schema | Schema against which to validate. |
lang | Language selected by the client. |
cdata | Input values |
response | Result of generation phase = generated string. |
valerr | List of validation errors if validation is turned on. |
References qhead::body, GEN_EBUFFER, GEN_EWRITER, LOC_EPP, NS_EPP, epp_command_data::rc, START_ELEMENT, WRITE_ATTRIBUTE, and XSI.
Referenced by gen_response().