From e405b28efceb0865910c3821d92f6f3cb9a6f0be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=20=EA=A6=AB=EA=A6=B6=20=EA=A6=8F=EA=A7=80?= =?UTF-8?q?=EA=A6=A6=EA=A6=BF=20=EA=A6=A7=20=EA=A6=AE=20=EA=A6=91=20?= =?UTF-8?q?=EA=A6=A9=20=EA=A6=AD=EA=A7=80?= Date: Mon, 16 Sep 2019 20:43:28 +0800 Subject: Product related structures and functions --- icclient/product.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 icclient/product.h (limited to 'icclient/product.h') diff --git a/icclient/product.h b/icclient/product.h new file mode 100644 index 0000000..f912b17 --- /dev/null +++ b/icclient/product.h @@ -0,0 +1,27 @@ +#ifndef ICCLIENT_PRODUCT_H +#define ICCLIENT_PRODUCT_H + +struct ic_product { + char *sku, *description, *comment, *image; + double price; +}; + +struct ic_catalog { + unsigned int length; + struct ic_product *products[]; +}; + +#ifdef __cplusplus +extern "C" { +#endif + + void icclient_product_all(struct ic_catalog **catalogptr + , size_t (*callback)(void *contents, size_t size + , size_t nmemb, void *userdata)); + void rtclient_product_freecatalog(struct ic_catalog *catalog); + +#ifdef __cplusplus +} +#endif + +#endif // ICCLIENT_PRODUCT_H -- cgit v1.2.3