From c3ede83912dd2d9e63806da18e71728b29f924ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Fri, 18 Jun 2021 21:30:01 +0800 Subject: Generalise function names to using words like catalog and product instead of results and flypage. --- client.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'client.c') diff --git a/client.c b/client.c index 436ae99..b42bc16 100644 --- a/client.c +++ b/client.c @@ -47,24 +47,24 @@ void icclient_init(const char *url, const char *dir, const char *certificate) #endif } -void icclient_results(const char *prod_group, void (*handler)(icclient_response *), void (*callback)(struct icclient_catalog *)) +void icclient_catalog(const char *prod_group, void (*handler)(icclient_response *), void (*callback)(struct icclient_catalog *)) { char nonspaced[strlen(prod_group) + 1]; strcpy(nonspaced, prod_group); char *space = NULL; while ((space = strchr(nonspaced, ' '))) *space = '-'; - request(handler ? handler : handle_results, (void *)callback, 0, "%s", nonspaced); + request(handler ? handler : handle_results, (void (*)(void *))callback, NULL, "%s", nonspaced); } -void icclient_flypage(const char *sku, void (*handler)(icclient_response *), struct icclient_product **productptr) +void icclient_product(const char *sku, void (*handler)(icclient_response *), void (*callback)(struct icclient_product *)) { - request(handler, (void *)productptr, 0, "%s", sku); + request(handler, (void (*)(void *))callback, NULL, "%s", sku); } -void icclient_page(const char *path, void (*handler)(icclient_response *), void **dataptr) +void icclient_page(const char *path, void (*handler)(icclient_response *)) { - request(handler, (void *)dataptr, 0, "%s", path); + request(handler, NULL, NULL, "%s", path); } void icclient_free_product(struct icclient_product *product) -- cgit v1.2.3