summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzmike <michael.blumenkrantz@gmail.com>2014-02-05 21:54:45 -0500
committerzmike <michael.blumenkrantz@gmail.com>2014-02-05 21:54:45 -0500
commitc87900a9c1271d450afd6d6ff4b405fd7f1ccb5a (patch)
treedfbee0301e418147f8f08f8a89a4f19d30e2183f
parent95e51d86755ad55623c2e0b1ee44b87aeebf0302 (diff)
add cancel
-rw-r--r--excetra.c6
-rw-r--r--excetra.h3
2 files changed, 8 insertions, 1 deletions
diff --git a/excetra.c b/excetra.c
index 91c83bf..07a2cf7 100644
--- a/excetra.c
+++ b/excetra.c
@@ -162,6 +162,12 @@ lyricwiki_complete(void *d EINA_UNUSED, int type EINA_UNUSED, Ecore_Con_Event_Ur
162 return ECORE_CALLBACK_DONE; 162 return ECORE_CALLBACK_DONE;
163} 163}
164 164
165void
166lyricwiki_request_cancel(Excetra_Req *req)
167{
168 if (req) excetra_req_free(req);
169}
170
165Excetra_Req * 171Excetra_Req *
166lyricwiki_request(const char *artist, const char *song, Excetra_Result_Cb cb, const void *data) 172lyricwiki_request(const char *artist, const char *song, Excetra_Result_Cb cb, const void *data)
167{ 173{
diff --git a/excetra.h b/excetra.h
index fc4feb0..fff83ea 100644
--- a/excetra.h
+++ b/excetra.h
@@ -6,4 +6,5 @@ typedef void (*Excetra_Result_Cb)(void *user_data, 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);
9Excetra_Req *lyricwiki_request(const char *artist, const char *song, Excetra_Result_Cb cb, const void *data); 9EAPI Excetra_Req *lyricwiki_request(const char *artist, const char *song, Excetra_Result_Cb cb, const void *data);
10EAPI void lyricwiki_request_cancel(Excetra_Req *req);