From a3bae55d41f5159df3a0125f02a8fa322e81bbe3 Mon Sep 17 00:00:00 2001 From: Michał Cichoń Date: Tue, 25 Aug 2015 06:45:41 +0200 Subject: libpiano: Abstract out blowfish cipher to PianoCipher_t so different implementations than gcrypt can be used. --- src/libpiano/piano.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/libpiano/piano.h') 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 #include -#ifdef __FreeBSD__ -#define _GCRYPT_IN_LIBGCRYPT -#endif -#include /* 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, -- cgit v1.2.3