diff options
author | Lars-Dominik Braun <PromyLOPh@gmail.com> | 2008-06-12 13:11:41 +0200 |
---|---|---|
committer | Lars-Dominik Braun <PromyLOPh@gmail.com> | 2008-06-12 13:11:41 +0200 |
commit | e721307fa51241247e73ae2096b6b160671dbeb4 (patch) | |
tree | 0e4637062e464f0e05eecb070a8b35d3ba80b3b1 /libpiano/piano.h | |
parent | 31ff2f7dfd0b6eb98cb90d44d87044321def0f7a (diff) | |
download | pianobar-e721307fa51241247e73ae2096b6b160671dbeb4.tar.gz pianobar-e721307fa51241247e73ae2096b6b160671dbeb4.tar.bz2 pianobar-e721307fa51241247e73ae2096b6b160671dbeb4.zip |
lib: Initial music search implementation
Diffstat (limited to 'libpiano/piano.h')
-rw-r--r-- | libpiano/piano.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/libpiano/piano.h b/libpiano/piano.h index ebb7f55..bbe0a9e 100644 --- a/libpiano/piano.h +++ b/libpiano/piano.h @@ -101,11 +101,24 @@ struct PianoSong { char *title; char *focusTraitId; char *identity; + int score; /* only used for search results */ struct PianoSong *next; }; typedef struct PianoSong PianoSong_t; +/* currently only used for search results */ +struct PianoArtist { + /* disabled: iscomposer */ + /* disabled: likelymatch */ + char *name; + char *musicId; + int score; + struct PianoArtist *next; +}; + +typedef struct PianoArtist PianoArtist_t; + struct PianoHandle { CURL *curlHandle; char routeId[9]; @@ -117,6 +130,13 @@ struct PianoHandle { typedef struct PianoHandle PianoHandle_t; +struct PianoSearchResult { + PianoSong_t *songs; + PianoArtist_t *artists; +}; + +typedef struct PianoSearchResult PianoSearchResult_t; + /* FIXME: more error types (http failed, e.g.) later */ enum PianoReturn {PIANO_RET_OK, PIANO_RET_ERR}; typedef enum PianoReturn PianoReturn_t; @@ -124,6 +144,7 @@ typedef enum PianoReturn PianoReturn_t; void PianoInit (PianoHandle_t *); void PianoDestroy (PianoHandle_t *); void PianoDestroyPlaylist (PianoHandle_t *ph); +void PianoDestroySearchResult (PianoSearchResult_t *searchResult); void PianoConnect (PianoHandle_t *, char *, char *); void PianoGetStations (PianoHandle_t *ph); |