From 2950dbe8099c6ffe17f05aa59175e7c71bc97bfd 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: Fri, 27 Sep 2019 16:18:18 +0800 Subject: Order prototype --- icclient/ord.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 icclient/ord.h diff --git a/icclient/ord.h b/icclient/ord.h new file mode 100644 index 0000000..4491ba4 --- /dev/null +++ b/icclient/ord.h @@ -0,0 +1,28 @@ +#ifndef ICCLIENT_ORD_H +#define ICCLIENT_ORD_H + +#include "product.h" + +struct icclient_item { + struct icclient_product *product; + unsigned int quantity; +}; + +struct icclient_order { + double subtotal, shipping, totalcost; + size_t nitems; + struct icclient_item *items[]; +}; + +#ifdef __cplusplus +extern "C" { +#endif + + void icclient_remove(const unsigned int *indices); + void icclient_checkout(struct ic_order *order); + +#ifdef __cplusplus +} +#endif + +#endif // ICCLIENT_ORD_H -- cgit v1.2.3