diff options
Diffstat (limited to 'src/libpiano/request.c')
-rw-r--r-- | src/libpiano/request.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/libpiano/request.c b/src/libpiano/request.c index 35feda9..69e49a1 100644 --- a/src/libpiano/request.c +++ b/src/libpiano/request.c @@ -369,6 +369,36 @@ PianoReturn_t PianoRequest (PianoHandle_t *ph, PianoRequest_t *req, break; } + case PIANO_REQUEST_GET_STATION_MODES: { + PianoRequestDataGetStationModes_t *reqData = req->data; + assert (reqData != NULL); + PianoStation_t * const station = reqData->station; + assert (station != NULL); + + json_object_object_add (j, "stationId", + json_object_new_string (station->id)); + + method = "interactiveradio.v1.getAvailableModesSimple"; + req->secure = true; + break; + } + + case PIANO_REQUEST_SET_STATION_MODE: { + PianoRequestDataSetStationMode_t *reqData = req->data; + assert (reqData != NULL); + PianoStation_t * const station = reqData->station; + assert (station != NULL); + + json_object_object_add (j, "stationId", + json_object_new_string (station->id)); + json_object_object_add (j, "modeId", + json_object_new_int (reqData->id)); + + method = "interactiveradio.v1.setAndGetAvailableModes"; + req->secure = true; + break; + } + case PIANO_REQUEST_DELETE_FEEDBACK: { PianoSong_t *song = req->data; |