diff options
author | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2020-06-29 21:09:16 +0800 |
---|---|---|
committer | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2020-06-29 21:09:16 +0800 |
commit | 3074a867e052af594f1c7252c9cb967ff0747f42 (patch) | |
tree | 0be445b3dc745f985f82d5a89d459e9faa135ed5 | |
parent | e13c106e8b28111feb0f71e5c04cab8637fcadb9 (diff) |
Remove unnecessary cURL handler parameter variables
-rw-r--r-- | client.c | 40 | ||||
-rw-r--r-- | icclient/client.h | 15 |
2 files changed, 23 insertions, 32 deletions
@@ -40,8 +40,7 @@ bool icclient_init(const char *url, const char *certificate) } void icclient_results(const char *prodgroup, - size_t (*handler)(void *contents, size_t size, - size_t nmemb, void *userdata), + size_t (*handler)(void *, size_t, size_t, void *), struct icclient_catalog **catalogptr) { char nonspaced[strlen(prodgroup) + 1]; @@ -52,8 +51,8 @@ void icclient_results(const char *prodgroup, request(handler, (void *)catalogptr, NULL, "%s", nonspaced); } -void icclient_allproducts(size_t (*handler)(void *, size_t, size_t, void *) - , icclient_catalog **catalogptr) +void icclient_allproducts(size_t (*handler)(void *, size_t, size_t, void *), + icclient_catalog **catalogptr) { request(handler, (void *)catalogptr, NULL, "%s", "All-Products"); } @@ -131,26 +130,22 @@ void icclient_order(const char *sku, const icclient_catalog *catalog, request(NULL, NULL, NULL, "%s%s", "order?mv_arg=", sku); } -void icclient_newaccount(size_t (*handler)(void *contents, size_t size - , size_t nmemb, void *userdata) - , struct icclient_user *user - , const char *username, const char *password - , const char *verify, const char *successpage, const char *nextpage - , const char *failpage) +void icclient_newaccount(size_t (*handler)(void *, size_t, size_t, void *), + struct icclient_user *user, + const char *username, const char *password, const char *verify, + const char *successpage, const char *nextpage, const char *failpage) { - login(handler, user, username, password, verify, "NewAccount", successpage - , nextpage, failpage); + login(handler, user, username, password, verify, + "NewAccount", successpage, nextpage, failpage); } -void icclient_login(size_t (*handler)(void *contents, size_t size - , size_t nmemb, void *userdata) - , struct icclient_user *user - , const char *username, const char *password - , const char *successpage, const char *nextpage - , const char *failpage) +void icclient_login(size_t (*handler)(void *, size_t, size_t, void *), + struct icclient_user *user, + const char *username, const char *password, + const char *successpage, const char *nextpage, const char *failpage) { - login(handler, user, username, password, NULL, "Login", successpage - , nextpage, failpage); + login(handler, user, username, password, NULL, "Login", + successpage, nextpage, failpage); } void icclient_logout() @@ -158,8 +153,9 @@ void icclient_logout() request(NULL, NULL, NULL, "%s", "logout"); } -void icclient_page(const char *path, size_t (*handler)(void *, size_t, size_t - , void *), void **dataptr) +void icclient_page(const char *path, + size_t (*handler)(void *, size_t, size_t, void *), + void **dataptr) { request(handler, (void *)dataptr, NULL, "%s", path); } diff --git a/icclient/client.h b/icclient/client.h index af3cc24..7b7306d 100644 --- a/icclient/client.h +++ b/icclient/client.h @@ -25,8 +25,7 @@ extern "C" { * \param catalogptr A pointer to pointer to the catalog to store the data. */ void icclient_results(const char *prodgroup, - size_t (*handler)(void *contents, size_t size, - size_t nmemb, void *userdata), + size_t (*handler)(void *, size_t, size_t, void *), struct icclient_catalog **catalogptr); /*! @@ -34,8 +33,7 @@ extern "C" { * \param handler A pointer to a cURL write function callback. * \param catalogptr A pointer to pointer to the catalog to store the data. */ - void icclient_allproducts(size_t (*handler)(void *contents, size_t size, - size_t nmemb, void *userdata), + void icclient_allproducts(size_t (*handler)(void *, size_t, size_t, void *), struct icclient_catalog **catalogptr); /*! @@ -56,22 +54,19 @@ extern "C" { */ void icclient_order(const char *sku, const struct icclient_catalog *catalog, struct icclient_ord_order **orderptr); - void icclient_newaccount(size_t (*handler)(void *contents, size_t size, - size_t nmemb, void *userdata), + void icclient_newaccount(size_t (*handler)(void *, size_t, size_t, void *), struct icclient_user *user, const char *username, const char *password, const char *verify, const char *successpage, const char *nextpage, const char *failpage); - void icclient_login(size_t (*handler)(void *contents, size_t size - , size_t nmemb, void *userdata), + void icclient_login(size_t (*handler)(void *, size_t, size_t, void *), struct icclient_user *user, const char *username, const char *password, const char *successpage, const char *nextpage, const char *failpage); void icclient_logout(); void icclient_page(const char *path, - size_t (*handler)(void *contents, size_t size, - size_t nmemb, void *userdata), + size_t (*handler)(void *, size_t, size_t, void *), void **dataptr); void icclient_cleanup(); |