summaryrefslogtreecommitdiff
path: root/src/libpiano/piano.h
diff options
context:
space:
mode:
authorMichał Cichoń <michcic@gmail.com>2015-08-25 06:45:41 +0200
committerMichał Cichoń <michcic@gmail.com>2015-08-25 06:45:41 +0200
commita3bae55d41f5159df3a0125f02a8fa322e81bbe3 (patch)
tree06163f5e15a4902428ece78fb278e3f5429f697b /src/libpiano/piano.h
parent34b6068d229efcb934fa40b5f4d47a46cedae552 (diff)
downloadpianobar-windows-a3bae55d41f5159df3a0125f02a8fa322e81bbe3.tar.gz
pianobar-windows-a3bae55d41f5159df3a0125f02a8fa322e81bbe3.tar.bz2
pianobar-windows-a3bae55d41f5159df3a0125f02a8fa322e81bbe3.zip
libpiano: Abstract out blowfish cipher to PianoCipher_t so different implementations than gcrypt can be used.
Diffstat (limited to 'src/libpiano/piano.h')
-rw-r--r--src/libpiano/piano.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/libpiano/piano.h b/src/libpiano/piano.h
index 1a84d4a..ca33626 100644
--- a/src/libpiano/piano.h
+++ b/src/libpiano/piano.h
@@ -26,11 +26,8 @@ THE SOFTWARE.
#include "../config.h"
+#include <stdlib.h>
#include <stdbool.h>
-#ifdef __FreeBSD__
-#define _GCRYPT_IN_LIBGCRYPT
-#endif
-#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
@@ -44,6 +41,8 @@ THE SOFTWARE.
#define PIANO_RPC_HOST "tuner.pandora.com"
#define PIANO_RPC_PATH "/services/json/?"
+typedef struct _PianoCipher_t* PianoCipher_t;
+
typedef struct PianoListHead {
struct PianoListHead *next;
} PianoListHead_t;
@@ -124,7 +123,7 @@ typedef struct PianoGenreCategory {
} PianoGenreCategory_t;
typedef struct PianoPartner {
- gcry_cipher_hd_t in, out;
+ PianoCipher_t in, out;
char *authToken, *device, *user, *password;
unsigned int id;
} PianoPartner_t;
@@ -276,7 +275,7 @@ typedef enum {
PIANO_RET_OUT_OF_MEMORY = 4,
PIANO_RET_INVALID_LOGIN = 5,
PIANO_RET_QUALITY_UNAVAILABLE = 6,
- PIANO_RET_GCRY_ERR = 7,
+ PIANO_RET_CIPHER_ERR = 7,
/* pandora error codes */
PIANO_RET_P_INTERNAL = PIANO_RET_OFFSET+0,