summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzmike <michael.blumenkrantz@gmail.com>2014-02-05 22:54:02 -0500
committerzmike <michael.blumenkrantz@gmail.com>2014-02-05 22:54:02 -0500
commitfb23cb084407cecc53fda923c1666aa270be560c (patch)
tree7fa5c7183d0216e5d9cdda16fe3a5097efac5ae9
parentc6c2527458980211cded80ef3fa18aabf7afead2 (diff)
add req param to cb
-rw-r--r--excetra.c8
-rw-r--r--excetra.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/excetra.c b/excetra.c
index 9f5eec8..a98342f 100644
--- a/excetra.c
+++ b/excetra.c
@@ -147,13 +147,13 @@ lyricwiki_complete(void *d EINA_UNUSED, int type EINA_UNUSED, Ecore_Con_Event_Ur
147 break; 147 break;
148 } 148 }
149 149
150 req->cb(req->data, NULL); 150 req->cb(req->data, req, NULL);
151 excetra_req_free(req); 151 excetra_req_free(req);
152 return ECORE_CALLBACK_DONE; 152 return ECORE_CALLBACK_DONE;
153 } 153 }
154 if (ev->status != 200) 154 if (ev->status != 200)
155 { 155 {
156 req->cb(req->data, NULL); 156 req->cb(req->data, req, NULL);
157 excetra_req_free(req); 157 excetra_req_free(req);
158 return ECORE_CALLBACK_DONE; 158 return ECORE_CALLBACK_DONE;
159 } 159 }
@@ -162,7 +162,7 @@ lyricwiki_complete(void *d EINA_UNUSED, int type EINA_UNUSED, Ecore_Con_Event_Ur
162 else 162 else
163 { 163 {
164 lyric = lyricwiki_parse_lyric(req->buf); 164 lyric = lyricwiki_parse_lyric(req->buf);
165 req->cb(req->data, lyric); 165 req->cb(req->data, req, lyric);
166 free(lyric); 166 free(lyric);
167 excetra_req_free(req); 167 excetra_req_free(req);
168 } 168 }
@@ -258,7 +258,7 @@ excetra_shutdown(void)
258 258
259#ifndef EXCETRA_LIB 259#ifndef EXCETRA_LIB
260static void 260static void
261result_cb(void *data EINA_UNUSED, const char *lyric) 261result_cb(void *data EINA_UNUSED, Excetra_Req *req EINA_UNUSED, const char *lyric)
262{ 262{
263 INF("\n%s", lyric); 263 INF("\n%s", lyric);
264 ecore_main_loop_quit(); 264 ecore_main_loop_quit();
diff --git a/excetra.h b/excetra.h
index 279ef2a..1f7554f 100644
--- a/excetra.h
+++ b/excetra.h
@@ -2,7 +2,7 @@
2 2
3typedef struct Excetra_Req Excetra_Req; 3typedef struct Excetra_Req Excetra_Req;
4 4
5typedef void (*Excetra_Result_Cb)(void *user_data, const char *lyrics); 5typedef void (*Excetra_Result_Cb)(void *user_data, Excetra_Req *req, const char *lyrics);
6 6
7EAPI int excetra_init(void); 7EAPI int excetra_init(void);
8EAPI void excetra_shutdown(void); 8EAPI void excetra_shutdown(void);