From 95d3383fd3996c8a181c04379f6ff57a685933d3 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Wed, 13 Aug 2008 12:11:44 +0200 Subject: piano: Describe narrative functions added in last commit --- libpiano/src/main.c | 6 ++++++ libpiano/src/xml.c | 6 ++++++ 2 files changed, 12 insertions(+) (limited to 'libpiano') diff --git a/libpiano/src/main.c b/libpiano/src/main.c index 2b51303..dbc273b 100644 --- a/libpiano/src/main.c +++ b/libpiano/src/main.c @@ -779,6 +779,12 @@ PianoReturn_t PianoTransformShared (PianoHandle_t *ph, return ret; } +/* "why dit you play this song?" + * @param piano handle + * @param song (from playlist) + * @param return allocated string; you have to free it yourself + * @return _OK or error + */ PianoReturn_t PianoExplain (const PianoHandle_t *ph, const PianoSong_t *song, char **retExplain) { char xmlSendBuf[PIANO_SEND_BUFFER_SIZE], url[PIANO_URL_BUFFER_SIZE]; diff --git a/libpiano/src/xml.c b/libpiano/src/xml.c index 6d4dad8..4d945e7 100644 --- a/libpiano/src/xml.c +++ b/libpiano/src/xml.c @@ -745,6 +745,11 @@ PianoReturn_t PianoXmlParseTranformStation (const char *searchXml) { return PIANO_RET_OK; } +/* parses "why did you play ...?" answer + * @param xml + * @param returns the answer + * @return _OK or error + */ PianoReturn_t PianoXmlParseNarrative (const char *xml, char **retNarrative) { xmlNode *docRoot; xmlDocPtr doc; @@ -754,6 +759,7 @@ PianoReturn_t PianoXmlParseNarrative (const char *xml, char **retNarrative) { return ret; } + /* $textnode */ xmlNode *val = docRoot->children->children->children->children; *retNarrative = strdup ((char *) val->content); -- cgit v1.2.3