summaryrefslogtreecommitdiff
path: root/libwardrobe/src
diff options
context:
space:
mode:
Diffstat (limited to 'libwardrobe/src')
-rw-r--r--libwardrobe/src/main.c19
-rw-r--r--libwardrobe/src/wardrobe.h21
2 files changed, 21 insertions, 19 deletions
diff --git a/libwardrobe/src/main.c b/libwardrobe/src/main.c
index f188d46..2da94f0 100644
--- a/libwardrobe/src/main.c
+++ b/libwardrobe/src/main.c
@@ -28,25 +28,6 @@ THE SOFTWARE.
#include "md5.h"
-typedef struct {
- char *user;
- char *password;
- char authToken[100];
- char postUrl[1024];
- CURL *ch;
-} WardrobeHandle_t;
-
-typedef struct {
- char *artist;
- char *title;
- time_t started;
- time_t length;
-} WardrobeSong_t;
-
-typedef enum {WARDROBE_RET_ERR, WARDROBE_RET_OK,
- WARDROBE_RET_CLIENT_BANNED, WARDROBE_RET_BADAUTH,
- WARDROBE_RET_BADTIME, WARDROBE_RET_BADSESSION} WardrobeReturn_t;
-
#define WARDROBE_HTTP_BUFFER_SIZE 10000
void WardrobeSongInit (WardrobeSong_t *ws) {
diff --git a/libwardrobe/src/wardrobe.h b/libwardrobe/src/wardrobe.h
index 926f4df..aeeda87 100644
--- a/libwardrobe/src/wardrobe.h
+++ b/libwardrobe/src/wardrobe.h
@@ -22,6 +22,27 @@ THE SOFTWARE.
/* public api, not stable yet */
+#include <curl/curl.h>
+
+typedef struct {
+ char *user;
+ char *password;
+ char authToken[100];
+ char postUrl[1024];
+ CURL *ch;
+} WardrobeHandle_t;
+
+typedef struct {
+ char *artist;
+ char *title;
+ time_t started;
+ time_t length;
+} WardrobeSong_t;
+
+typedef enum {WARDROBE_RET_ERR, WARDROBE_RET_OK,
+ WARDROBE_RET_CLIENT_BANNED, WARDROBE_RET_BADAUTH,
+ WARDROBE_RET_BADTIME, WARDROBE_RET_BADSESSION} WardrobeReturn_t;
+
void WardrobeInit (WardrobeHandle_t *wh);
void WardrobeSongInit (WardrobeSong_t *ws);
void WardrobeSongDestroy (WardrobeSong_t *ws);