summaryrefslogtreecommitdiff
path: root/src/libpiano/piano.h
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2012-05-01 12:12:37 +0200
committerLars-Dominik Braun <lars@6xq.net>2012-05-01 12:12:37 +0200
commit94c1eec169db66bb4ad9d633342aead3b0f35b9f (patch)
tree969bcb05d5fcbe9e48a4b2ecd83e8fcc22e078f7 /src/libpiano/piano.h
parent2996dda98357643334a334a6fcac05cd0c9065ea (diff)
downloadpianobar-windows-94c1eec169db66bb4ad9d633342aead3b0f35b9f.tar.gz
pianobar-windows-94c1eec169db66bb4ad9d633342aead3b0f35b9f.tar.bz2
pianobar-windows-94c1eec169db66bb4ad9d633342aead3b0f35b9f.zip
Don’t hardcode passwords
It’s a bad idea to hardcode these, although playback does not work with non-android login yet.
Diffstat (limited to 'src/libpiano/piano.h')
-rw-r--r--src/libpiano/piano.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/libpiano/piano.h b/src/libpiano/piano.h
index 6d20747..86dcce0 100644
--- a/src/libpiano/piano.h
+++ b/src/libpiano/piano.h
@@ -25,6 +25,7 @@ THE SOFTWARE.
#define _PIANO_H
#include <stdbool.h>
+#include <gcrypt.h>
/* this is our public API; don't expect this api to be stable as long as
* pandora does not provide a stable api
@@ -106,14 +107,19 @@ typedef struct PianoGenreCategory {
struct PianoGenreCategory *next;
} PianoGenreCategory_t;
+typedef struct PianoPartner {
+ gcry_cipher_hd_t in, out;
+ char *authToken, *device, *user, *password;
+ unsigned int id;
+} PianoPartner_t;
+
typedef struct PianoHandle {
PianoUserInfo_t user;
/* linked lists */
PianoStation_t *stations;
PianoGenreCategory_t *genreStations;
+ PianoPartner_t partner;
int timeOffset;
- char *partnerAuthToken;
- unsigned int partnerId;
} PianoHandle_t;
typedef struct PianoSearchResult {
@@ -291,7 +297,9 @@ typedef enum {
} PianoReturn_t;
-void PianoInit (PianoHandle_t *);
+void PianoInit (PianoHandle_t *, const char *,
+ const char *, const char *, const char *,
+ const char *);
void PianoDestroy (PianoHandle_t *);
void PianoDestroyPlaylist (PianoSong_t *);
void PianoDestroySearchResult (PianoSearchResult_t *);