summaryrefslogtreecommitdiff
path: root/src/libpiano/piano.h
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2020-08-07 08:08:10 +0200
committerLars-Dominik Braun <lars@6xq.net>2020-08-08 15:15:19 +0200
commit7f6457aa9b7110869e89111c42651b1055728679 (patch)
treeca1138c88748679ad6a564576e922803fdab5ec7 /src/libpiano/piano.h
parentbcc0c5fecfb79f412f45b7befc65b380a7e2bb5d (diff)
downloadpianobar-7f6457aa9b7110869e89111c42651b1055728679.tar.gz
pianobar-7f6457aa9b7110869e89111c42651b1055728679.tar.bz2
pianobar-7f6457aa9b7110869e89111c42651b1055728679.zip
Allow changing station mode
Fixes #700.
Diffstat (limited to 'src/libpiano/piano.h')
-rw-r--r--src/libpiano/piano.h20
1 files changed, 20 insertions, 0 deletions
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 *,