summaryrefslogtreecommitdiff
path: root/src/libpiano/piano.h
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2015-08-10 10:36:03 +0200
committerLars-Dominik Braun <lars@6xq.net>2015-08-10 10:40:50 +0200
commit3a196f51581ffca2d2a902e83a9b69ac4702316c (patch)
treee19c3474e46ab4da4c9f08a24f0082cc3290c7e8 /src/libpiano/piano.h
parentbf814cabd1e9913d6153b65f97ad851be3da9b29 (diff)
downloadpianobar-windows-3a196f51581ffca2d2a902e83a9b69ac4702316c.tar.gz
pianobar-windows-3a196f51581ffca2d2a902e83a9b69ac4702316c.tar.bz2
pianobar-windows-3a196f51581ffca2d2a902e83a9b69ac4702316c.zip
Add feature to change Pandora settings
Currently exposed settings: Username, password and explicit content filter. New key for settings is ‘!’, changeable with “act_settings”. Fixes issues #524 and #506.
Diffstat (limited to 'src/libpiano/piano.h')
-rw-r--r--src/libpiano/piano.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/libpiano/piano.h b/src/libpiano/piano.h
index 28a2b45..f0ba4cf 100644
--- a/src/libpiano/piano.h
+++ b/src/libpiano/piano.h
@@ -148,6 +148,11 @@ typedef struct {
PianoSong_t *feedback;
} PianoStationInfo_t;
+typedef struct {
+ char *username;
+ bool explicitContentFilter;
+} PianoSettings_t;
+
typedef enum {
/* 0 is reserved: memset (x, 0, sizeof (x)) */
PIANO_REQUEST_LOGIN = 1,
@@ -170,6 +175,8 @@ typedef enum {
PIANO_REQUEST_GET_STATION_INFO = 20,
PIANO_REQUEST_DELETE_FEEDBACK = 21,
PIANO_REQUEST_DELETE_SEED = 22,
+ PIANO_REQUEST_GET_SETTINGS = 23,
+ PIANO_REQUEST_CHANGE_SETTINGS = 24,
} PianoRequestType_t;
typedef struct PianoRequest {
@@ -245,6 +252,18 @@ typedef struct {
PianoStation_t *station;
} PianoRequestDataDeleteSeed_t;
+typedef enum {
+ PIANO_UNDEFINED = 0,
+ PIANO_FALSE = 1,
+ PIANO_TRUE = 2,
+} PianoTristate_t;
+
+typedef struct {
+ char *currentUsername, *newUsername;
+ char *currentPassword, *newPassword;
+ PianoTristate_t explicitContentFilter;
+} PianoRequestDataChangeSettings_t;
+
/* pandora error code offset */
#define PIANO_RET_OFFSET 1024
typedef enum {