summaryrefslogtreecommitdiff
path: root/client.c
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2021-06-18 21:30:01 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2021-06-18 21:30:01 +0800
commitc3ede83912dd2d9e63806da18e71728b29f924ac (patch)
tree62279d94f96b92b8ec2cfcaf003945df3ab07903 /client.c
parentdfb76ba5abcc5b00411db4d880a39c16ad6b59b2 (diff)
Generalise function names
to using words like catalog and product instead of results and flypage.
Diffstat (limited to 'client.c')
-rw-r--r--client.c12
1 files changed, 6 insertions, 6 deletions
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)