diff options
Diffstat (limited to 'libpiano')
-rw-r--r-- | libpiano/src/http.c | 22 | ||||
-rw-r--r-- | libpiano/src/main.c | 8 |
2 files changed, 12 insertions, 18 deletions
diff --git a/libpiano/src/http.c b/libpiano/src/http.c index 5c74d26..6173c89 100644 --- a/libpiano/src/http.c +++ b/libpiano/src/http.c @@ -29,14 +29,12 @@ THE SOFTWARE. #include "http.h" -/* FIXME: we may use a callback given by the library client here. would be - * more flexible... */ /* post data to url and receive answer as string - * @param initialized curl handle - * @param call this url - * @param post this data - * @param put received data here, memory is allocated by this function - * @return nothing yet + * @param initialized waitress handle + * @param null-terminated post data string + * @param receive buffer + * @param buffer size + * @return _RET_OK or _RET_NET_ERROR */ PianoReturn_t PianoHttpPost (WaitressHandle_t *waith, const char *postData, char *retData, size_t retDataSize) { @@ -50,11 +48,11 @@ PianoReturn_t PianoHttpPost (WaitressHandle_t *waith, const char *postData, return PIANO_RET_NET_ERROR; } -/* get data - * @param initialized curl handle - * @param call this url - * @param put received data here, memory is allocated by this function - * @return nothing yet +/* http get request, return server response body + * @param initialized waitress handle + * @param receive buffer + * @param buffer size + * @return _RET_OK or _RET_NET_ERROR */ PianoReturn_t PianoHttpGet (WaitressHandle_t *waith, char *retData, size_t retDataSize) { diff --git a/libpiano/src/main.c b/libpiano/src/main.c index 94afee9..bb282fb 100644 --- a/libpiano/src/main.c +++ b/libpiano/src/main.c @@ -61,9 +61,7 @@ void PianoFree (void *ptr, size_t size) { } } -/* initialize piano handle, set up curl handle and settings; note: _you_ have - * to init curl and libxml2 using curl_global_init (CURL_GLOBAL_SSL) and - * xmlInitParser (), _you_ also have to cleanup their garbage on your own! +/* initialize piano handle * @param piano handle * @return nothing */ @@ -157,9 +155,7 @@ void PianoDestroyPlaylist (PianoHandle_t *ph) { ph->playlist = NULL; } -/* frees the whole piano handle structure; this will _not_ cleanup curl's - * internal garbage, you have to call curl_global_cleanup () and - * xmlCleanupParser () for libxml2 +/* frees the whole piano handle structure * @param piano handle * @return nothing */ |