summaryrefslogtreecommitdiff
path: root/interchange/admin.h
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2022-09-25 10:20:12 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2022-09-25 10:20:12 +0800
commit7f934ce683df5252fa6350dcc15e187b1c7623cf (patch)
treef600fc0cdfc9f4397580e44044468858167d0aa9 /interchange/admin.h
parenta606c79d52d2027afaafd424a25fa6a4598aa8d7 (diff)
Rename remaining icclient to interchange
Diffstat (limited to 'interchange/admin.h')
-rw-r--r--interchange/admin.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/interchange/admin.h b/interchange/admin.h
new file mode 100644
index 0000000..d0e47d7
--- /dev/null
+++ b/interchange/admin.h
@@ -0,0 +1,39 @@
+#ifndef INTERCHANGE_ADMIN_H
+#define INTERCHANGE_ADMIN_H
+
+#include "typedefs.h"
+
+enum interchange_admin_group {
+ INTERCHANGE_ADMIN_GROUP_CONTENT,
+ INTERCHANGE_ADMIN_GROUP_MERCH,
+ INTERCHANGE_ADMIN_GROUP_ORDERS
+};
+
+struct interchange_admin {
+ char *username;
+ char *password;
+ char *name;
+ bool super;
+ enum interchange_admin_group group;
+};
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void interchange_admin_login(const char *username, const char *password, void (*handler)(interchange_response *),
+ void (*callback)(struct interchange_admin *));
+void interchange_admin_new_admin(const char *username, const char *password, const char *name, bool super,
+ enum interchange_admin_group group, void (*handler)(interchange_response *));
+void interchange_admin_new_item(const char *description, const char *comment, const char *price,
+ const char *image_path, void (*handler)(interchange_response *));
+void interchange_admin_new_transaction(const struct interchange_ord_order *order,
+ const struct interchange_member *member, bool new_customer_id,
+ void (*handler)(interchange_response *));
+void interchange_admin_logout(struct interchange_admin *admin, void (*handler)(interchange_response *));
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif