summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars-Dominik Braun <PromyLOPh@lavabit.com>2009-06-28 21:02:47 +0200
committerLars-Dominik Braun <PromyLOPh@lavabit.com>2009-06-28 21:04:29 +0200
commit2c7a776e8882b7896090a24dc09ccd42e6f8a6ca (patch)
treedec27dc70d4bf6d77e268dfe7933c84818bab90d
parent07f712797df608f20f2dc119d41e3325cb20a99d (diff)
downloadpianobar-2c7a776e8882b7896090a24dc09ccd42e6f8a6ca.tar.gz
pianobar-2c7a776e8882b7896090a24dc09ccd42e6f8a6ca.tar.bz2
pianobar-2c7a776e8882b7896090a24dc09ccd42e6f8a6ca.zip
Finally clean up curl garbage
I missed some #includes. Documentation had to be updated, too.
-rw-r--r--libpiano/src/http.c22
-rw-r--r--libpiano/src/main.c8
-rw-r--r--libwardrobe/src/main.c2
-rw-r--r--src/FindFaad.cmake6
-rw-r--r--src/FindLibAo.cmake8
-rw-r--r--src/FindMad.cmake6
-rw-r--r--src/main.c2
-rw-r--r--src/player.c11
8 files changed, 28 insertions, 37 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
*/
diff --git a/libwardrobe/src/main.c b/libwardrobe/src/main.c
index a4583d1..1be8e92 100644
--- a/libwardrobe/src/main.c
+++ b/libwardrobe/src/main.c
@@ -42,7 +42,7 @@ inline void WardrobeSongInit (WardrobeSong_t *ws) {
memset (ws, 0, sizeof (*ws));
}
-/* initialize wardrobe handle (setup curl, e.g.)
+/* initialize wardrobe handle (setup waitress, e.g.)
* @param wardrobe handle
*/
inline void WardrobeInit (WardrobeHandle_t *wh) {
diff --git a/src/FindFaad.cmake b/src/FindFaad.cmake
index 9a8fc57..724b82f 100644
--- a/src/FindFaad.cmake
+++ b/src/FindFaad.cmake
@@ -1,6 +1,6 @@
-# FAAD_INCLUDE_DIRS - where to find curl/curl.h, etc.
-# FAAD_LIBRARIES - List of libraries when using curl.
-# FAAD_FOUND - True if curl found.
+# FAAD_INCLUDE_DIRS - where to find faad.h, etc.
+# FAAD_LIBRARIES - List of libraries when using libfaad.
+# FAAD_FOUND - True if libfaad found.
# Look for the header file.
FIND_PATH(FAAD_INCLUDE_DIR NAMES faad.h)
diff --git a/src/FindLibAo.cmake b/src/FindLibAo.cmake
index be15975..f026548 100644
--- a/src/FindLibAo.cmake
+++ b/src/FindLibAo.cmake
@@ -1,8 +1,8 @@
-# - Find readline
+# - Find libao
#
-# LIBAO_INCLUDE_DIRS - where to find curl/curl.h, etc.
-# LIBAO_LIBRARIES - List of libraries when using curl.
-# LIBAO_FOUND - True if curl found.
+# LIBAO_INCLUDE_DIRS - where to find ao/ao.h, etc.
+# LIBAO_LIBRARIES - List of libraries when using libao.
+# LIBAO_FOUND - True if libao found.
# Look for the header file.
FIND_PATH(LIBAO_INCLUDE_DIR NAMES ao/ao.h)
diff --git a/src/FindMad.cmake b/src/FindMad.cmake
index f05f469..1917cd4 100644
--- a/src/FindMad.cmake
+++ b/src/FindMad.cmake
@@ -1,6 +1,6 @@
-# MAD_INCLUDE_DIRS - where to find curl/curl.h, etc.
-# MAD_LIBRARIES - List of libraries when using curl.
-# MAD_FOUND - True if curl found.
+# MAD_INCLUDE_DIRS - where to find mad.h, etc.
+# MAD_LIBRARIES - List of libraries when using libmad.
+# MAD_FOUND - True if libmad found.
# Look for the header file.
FIND_PATH(MAD_INCLUDE_DIR NAMES mad.h)
diff --git a/src/main.c b/src/main.c
index 58007d8..2802546 100644
--- a/src/main.c
+++ b/src/main.c
@@ -39,8 +39,6 @@ THE SOFTWARE.
/* last.fm scrobbling library */
#include <wardrobe.h>
-#include <curl/curl.h>
-
#include <libxml/parser.h>
#include <libxml/tree.h>
diff --git a/src/player.c b/src/player.c
index 4768ecc..beccc37 100644
--- a/src/player.c
+++ b/src/player.c
@@ -116,12 +116,11 @@ inline void BarPlayerBufferMove (struct audioPlayer *player) {
/* play aac stream
* @param streamed data
- * @param block size
- * @param received blocks
+ * @param received bytes
* @param extra data (player data)
* @return received bytes or less on error
*/
-char BarPlayerAACCurlCb (void *ptr, size_t size, void *stream) {
+char BarPlayerAACCb (void *ptr, size_t size, void *stream) {
char *data = ptr;
struct audioPlayer *player = stream;
@@ -300,7 +299,7 @@ inline signed short int BarPlayerMadToShort (mad_fixed_t fixed) {
return (signed short int) (fixed >> (MAD_F_FRACBITS - 15));
}
-char BarPlayerMp3CurlCb (void *ptr, size_t size, void *stream) {
+char BarPlayerMp3Cb (void *ptr, size_t size, void *stream) {
char *data = ptr;
struct audioPlayer *player = stream;
size_t i;
@@ -421,7 +420,7 @@ void *BarPlayerThread (void *data) {
conf->downMatrix = 1;
NeAACDecSetConfiguration(player->aacHandle, conf);
- player->waith.callback = BarPlayerAACCurlCb;
+ player->waith.callback = BarPlayerAACCb;
break;
#endif /* ENABLE_FAAD */
@@ -431,7 +430,7 @@ void *BarPlayerThread (void *data) {
mad_frame_init (&player->mp3Frame);
mad_synth_init (&player->mp3Synth);
- player->waith.callback = BarPlayerMp3CurlCb;
+ player->waith.callback = BarPlayerMp3Cb;
break;
#endif /* ENABLE_MAD */