summaryrefslogtreecommitdiff
path: root/icclient.h
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 /icclient.h
parentdfb76ba5abcc5b00411db4d880a39c16ad6b59b2 (diff)
Generalise function names
to using words like catalog and product instead of results and flypage.
Diffstat (limited to 'icclient.h')
-rw-r--r--icclient.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/icclient.h b/icclient.h
index c02e8f7..b962a24 100644
--- a/icclient.h
+++ b/icclient.h
@@ -26,11 +26,11 @@ struct icclient_catalog {
};
/*!
- * \brief For fetching data about all of the products that are active.
+ * \brief For fetching data about all active products.
* \param handler A pointer to the function when a custom handler is needed to arrange the data into the catalog.
* \param callback A pointer to the function that needs to be called after the catalog is ready.
*/
-#define icclient_allproducts(handler, callback) icclient_results("All-Products", handler, callback)
+#define icclient_allproducts(handler, callback) icclient_catalog("All-Products", handler, callback)
#ifdef __cplusplus
extern "C" {
@@ -50,17 +50,17 @@ void icclient_init(const char *sampleurl, const char *image_dir, const char *cer
* \param handler A pointer to the function when a custom handler is needed to arrange the data into the catalog.
* \param callback A pointer to the function that needs to be called after the catalog is ready.
*/
-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 *));
/*!
* \brief For fetching data about a specific product.
* \param sku The SKU of the product.
- * \param handler A pointer to a cURL write function callback.
- * \param productptr A pointer to pointer to the product to store the data.
- */
-void icclient_flypage(const char *sku, void (*handler)(icclient_response *), struct icclient_product **productptr);
+ * \param handler A pointer to the function when a custom handler is needed to arrange the data into the product.
+ * \param callback A pointer to the function that needs to be called after the product is ready.
+*/
+void icclient_product(const char *sku, void (*handler)(icclient_response *), void (*callback)(struct icclient_product *));
-void icclient_page(const char *path, void (*handler)(icclient_response *), void **dataptr);
+void icclient_page(const char *path, void (*handler)(icclient_response *));
void icclient_free_product(struct icclient_product *product);