From 7f934ce683df5252fa6350dcc15e187b1c7623cf 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: Sun, 25 Sep 2022 10:20:12 +0800 Subject: Rename remaining icclient to interchange --- icclient.h | 77 -------------------------------------------------------------- 1 file changed, 77 deletions(-) delete mode 100644 icclient.h (limited to 'icclient.h') diff --git a/icclient.h b/icclient.h deleted file mode 100644 index b962a24..0000000 --- a/icclient.h +++ /dev/null @@ -1,77 +0,0 @@ -#ifndef ICCLIENT_H -#define ICCLIENT_H - -#include "icclient/typedefs.h" - -struct icclient_product { - char *sku; - char *description; - char *comment; - char *thumb; - char *image; - double price; - char *prod_group; - char *category; - double weight; - char *author; - struct icclient_product_crosssell { - size_t length; - char *skus[]; - } *crosssell; -}; - -struct icclient_catalog { - size_t length; - struct icclient_product *products[]; -}; - -/*! - * \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_catalog("All-Products", handler, callback) - -#ifdef __cplusplus -extern "C" { -#endif - -/*! - * \brief A function that needs to be run first. - * \param sampleurl The value of the SAMPLEURL setting in products/variable.txt. - * \param image_dir The value of the IMAGE_DIR setting in products/variable.txt. - * \param certificate Path to the CA certificate file. - */ -void icclient_init(const char *sampleurl, const char *image_dir, const char *certificate); - -/*! - * \brief For fetching data about products that belong a specific group. - * \param prod_group The name of the product group. - * \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_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 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 icclient_free_product(struct icclient_product *product); - -void icclient_free_catalog(struct icclient_catalog *catalog); - -void icclient_free_response(icclient_response *response); - -void icclient_cleanup(); - -#ifdef __cplusplus -} -#endif - -#endif -- cgit v1.2.3