fred-mod-eppd-2.20.0
|
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, epp_strdup(), GEN_EBUFFER, GEN_EBUILD, GEN_EWRITER, GEN_OK, 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(), and epp_request_loop().
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 epp_avail::avail, epps_check::avails, qhead::body, epp_mailingAddr::City, epp_command_data::clTRID, epps_poll_req::count, epps_poll_ack::count, epps_info::count, epp_mailingAddr::CountryCode, epps_create_contact::crDate, epps_create_domain::crDate, epps_create_nsset::crDate, epps_create_keyset::crDate, epp_zonecredit::credit, epp_command_data::data, END_ELEMENT, epp_strdup(), epp_command_data::errors, epps_create_domain::exDate, epps_renew::exDate, epp_ext_item::ext, epp_ext_item::ext_enum, epp_ext_enum::ext_enumval, epp_ext_item::ext_mailing_addr, epps_info_contact::extensions, epps_info_domain::extensions, epp_ext_item::extType, GEN_EBUFFER, GEN_EBUILD, GEN_EINTERNAL, GEN_ESCHEMA, GEN_EWRITER, gen_info_contact(), gen_info_domain(), gen_info_keyset(), gen_info_nsset(), GEN_NOT_VALID, GEN_NOT_XML, GEN_OK, gen_poll_message(), get_bad_xml(), epps_list::handles, epps_create_contact::id, epps_create_nsset::id, epps_create_keyset::id, epps_check::ids, LOC_CONTACT, LOC_DOMAIN, LOC_ENUMVAL, LOC_EPP, LOC_EXTRAADDR, LOC_FRED, LOC_KEYSET, LOC_NSSET, epp_command_data::msg, epps_poll_req::msgid, epps_create_domain::name, epps_renew::name, epps_poll_ack::newmsgid, epp_command_data::noresdata, NS_CONTACT, NS_DOMAIN, NS_ENUMVAL, NS_EPP, NS_EXTRAADDR, NS_FRED, NS_KEYSET, NS_NSSET, epp_context::pool, epp_mailingAddr::PostalCode, epp_ext_enum::publish, q_content, q_foreach, q_next, q_reset, epps_poll_req::qdate, epp_command_data::rc, epp_error::reason, epp_avail::reason, epp_error::spec, START_ELEMENT, epp_mailingAddr::StateOrProvince, epp_mailingAddr::Street1, epp_mailingAddr::Street2, epp_mailingAddr::Street3, epp_command_data::svTRID, epp_command_data::type, VAL_EINTERNAL, VAL_ESCHEMA, VAL_NOT_VALID, VAL_OK, validate_doc(), epp_error::value, WRITE_ATTRIBUTE, WRITE_ELEMENT, WRITE_STRING, epp_command_data::xml_schema, XSI, epp_zonecredit::zone, and epps_creditInfo::zonecredits.
Referenced by gen_response().