summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-09-27 16:18:18 +0800
committerꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-09-27 16:18:18 +0800
commit2950dbe8099c6ffe17f05aa59175e7c71bc97bfd (patch)
treed31924c74c4ed67100d991663a8c695e86523938
parent8d7952b68665b0668428d65c277eb699d7523833 (diff)
Order prototype
-rw-r--r--icclient/ord.h28
1 files changed, 28 insertions, 0 deletions
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