fred-mod-eppd
|
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <libxml/parser.h>
#include <libxml/xmlschemas.h>
#include <libxml/xmlwriter.h>
#include "epp_common.h"
#include "epp_gen.h"
#include "epp_xmlcommon.h"
Macros | |
#define | START_ELEMENT(writer, err_handler, elem) |
#define | WRITE_ELEMENT(writer, err_handler, elem, str) |
#define | WRITE_ELEMENT_IF_NONEMPTY(writer, err_handler, elem, str) |
#define | WRITE_STRING(writer, err_handler, str) |
#define | WRITE_ATTRIBUTE(writer, err_handler, attr_name, attr_value) |
#define | END_ELEMENT(writer, err_handler) |
Functions | |
gen_status | epp_gen_greeting (void *pool, const char *svid, const char *date, const eppd_server_xml_conf *xml_schema, char **greeting) |
gen_status | epp_gen_response (epp_context *epp_ctx, int validate, void *schema, epp_lang lang, epp_command_data *cdata, char **response, qhead *valerr) |
Component for generating greeting frame and responses to EPP commands in form of xml documents.
Result of generator is the generated string and validation errors if validation of responses is turned on. Greeting frame is not validated, therefore only string is returned (without the list of validation errors).
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. |
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. |