From 7f6457aa9b7110869e89111c42651b1055728679 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Fri, 7 Aug 2020 08:08:10 +0200 Subject: Allow changing station mode Fixes #700. --- src/libpiano/piano.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/libpiano/piano.h') diff --git a/src/libpiano/piano.h b/src/libpiano/piano.h index 0ec6c49..f7360aa 100644 --- a/src/libpiano/piano.h +++ b/src/libpiano/piano.h @@ -155,6 +155,13 @@ typedef struct { bool explicitContentFilter; } PianoSettings_t; +typedef struct { + PianoListHead_t head; + char *name, *description; + bool isAlgorithmic, isTakeover, active; + int id; +} PianoStationMode_t; + typedef enum { /* 0 is reserved: memset (x, 0, sizeof (x)) */ PIANO_REQUEST_LOGIN = 1, @@ -179,6 +186,8 @@ typedef enum { PIANO_REQUEST_DELETE_SEED = 22, PIANO_REQUEST_GET_SETTINGS = 23, PIANO_REQUEST_CHANGE_SETTINGS = 24, + PIANO_REQUEST_GET_STATION_MODES = 25, + PIANO_REQUEST_SET_STATION_MODE = 26, } PianoRequestType_t; typedef struct PianoRequest { @@ -266,6 +275,16 @@ typedef struct { PianoTristate_t explicitContentFilter; } PianoRequestDataChangeSettings_t; +typedef struct { + PianoStation_t *station; + PianoStationMode_t *retModes; +} PianoRequestDataGetStationModes_t; + +typedef struct { + PianoStation_t *station; + unsigned int id; +} PianoRequestDataSetStationMode_t; + /* pandora error code offset */ #define PIANO_RET_OFFSET 1024 typedef enum { @@ -355,6 +374,7 @@ void PianoDestroy (PianoHandle_t *); void PianoDestroyPlaylist (PianoSong_t *); void PianoDestroySearchResult (PianoSearchResult_t *); void PianoDestroyStationInfo (PianoStationInfo_t *); +void PianoDestroyStationMode (PianoStationMode_t * const); /* pandora rpc */ PianoReturn_t PianoRequest (PianoHandle_t *, PianoRequest_t *, -- cgit v1.2.3