diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/eurephia_xml.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/common/eurephia_xml.c b/common/eurephia_xml.c index 80f2ccd..91eacf4 100644 --- a/common/eurephia_xml.c +++ b/common/eurephia_xml.c @@ -178,8 +178,19 @@ xmlNode *eurephiaXML_getRoot(eurephiaCTX *ctx, xmlDoc *doc, const char *nodeset, * @param info_n xmlNode with more details about the result * @param fmt stdarg format string * - * @return Returns a valid eurephia XML document as a properly formatted result message. + * @return Returns a valid eurephia ResultMsg XML document as a properly formatted result message. * On failure, NULL is returned + * + * Skeleton for a eurephia ResultMsg XML document + * @code + * <eurephia format="1"> + * <Result status="{Result|Error}"> + * <Message>{String containing a descriptive message}</Message> + * [<Details>{xmlNode including children with more detailed information}</Details>] + * </Result> + * </eurephia> + * @endcode + * The status attribute is set to "Result" on success, and "Error" in error situations */ xmlDoc *eurephiaXML_ResultMsg(eurephiaCTX *ctx, exmlResultType type, xmlNode *info_n, const char *fmt, ... ) { va_list ap; @@ -228,13 +239,14 @@ xmlNode *eurephiaXML_getRoot(eurephiaCTX *ctx, xmlDoc *doc, const char *nodeset, * Parses an eurephia Result XML document * * @param ctx eurephiaCTX - * @param resxml The result XML document + * @param resxml The result XML document, as produced by eurephiaXML_ResultMsg() * * @return Returns a pointer to an eurephiaRESULT structure containing the results. * On failure NULL is returned. This structure can be freed with free_nullsafe(). * * @remark If the result XML document is freed, the information in eurephiaRESULT will be invalidated * Immediately. However, the eurephiaRESULT pointer must still be freed. + * @see eurephiaXML_ResultMsg() */ eurephiaRESULT *eurephiaXML_ParseResultMsg(eurephiaCTX *ctx, xmlDoc *resxml) { eurephiaRESULT *res = NULL; |