summaryrefslogtreecommitdiff
path: root/src/libpiano/piano.c
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2011-03-21 12:57:56 +0100
committerLars-Dominik Braun <lars@6xq.net>2011-03-21 12:57:56 +0100
commitc9a55302305ec070cc03f4329e26b98f8034cefc (patch)
treeaa0b2636bc795d488f818a847a7154b57a3f3ffb /src/libpiano/piano.c
parent3ce6e179a94e6000d8dc08650a3614a13a8f29f4 (diff)
downloadpianobar-c9a55302305ec070cc03f4329e26b98f8034cefc.tar.gz
pianobar-c9a55302305ec070cc03f4329e26b98f8034cefc.tar.bz2
pianobar-c9a55302305ec070cc03f4329e26b98f8034cefc.zip
piano: Delete feedback
Diffstat (limited to 'src/libpiano/piano.c')
-rw-r--r--src/libpiano/piano.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/libpiano/piano.c b/src/libpiano/piano.c
index e475799..9075df7 100644
--- a/src/libpiano/piano.c
+++ b/src/libpiano/piano.c
@@ -735,6 +735,26 @@ PianoReturn_t PianoRequest (PianoHandle_t *ph, PianoRequest_t *req,
break;
}
+ case PIANO_REQUEST_DELETE_FEEDBACK: {
+ PianoSong_t *song = req->data;
+
+ assert (song != NULL);
+
+ snprintf (xmlSendBuf, sizeof (xmlSendBuf), "<?xml version=\"1.0\"?>"
+ "<methodCall><methodName>station.deleteFeedback</methodName>"
+ "<params><param><value><int>%lu</int></value></param>"
+ /* auth token */
+ "<param><value><string>%s</string></value></param>"
+ /* feedback id */
+ "<param><value><string>%s</string></value></param>"
+ "</params></methodCall>", (unsigned long) timestamp,
+ ph->user.authToken, song->feedbackId);
+ snprintf (req->urlPath, sizeof (req->urlPath), PIANO_RPC_PATH
+ "rid=%s&lid=%s&method=deleteFeedback&arg1=%s",
+ ph->routeId, ph->user.listenerId, song->feedbackId);
+ break;
+ }
+
/* "high-level" wrapper */
case PIANO_REQUEST_RATE_SONG: {
/* love/ban song */
@@ -1006,6 +1026,7 @@ PianoReturn_t PianoResponse (PianoHandle_t *ph, PianoRequest_t *req) {
case PIANO_REQUEST_SET_QUICKMIX:
case PIANO_REQUEST_BOOKMARK_SONG:
case PIANO_REQUEST_BOOKMARK_ARTIST:
+ case PIANO_REQUEST_DELETE_FEEDBACK:
assert (req->responseData != NULL);
ret = PianoXmlParseSimple (req->responseData);