From e721307fa51241247e73ae2096b6b160671dbeb4 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Thu, 12 Jun 2008 13:11:41 +0200 Subject: lib: Initial music search implementation --- libpiano/piano.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'libpiano/piano.h') 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); -- cgit v1.2.3