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/admin.h | 39 -------------------------- icclient/member.h | 79 ----------------------------------------------------- icclient/ord.h | 37 ------------------------- icclient/typedefs.h | 18 ------------ 4 files changed, 173 deletions(-) delete mode 100644 icclient/admin.h delete mode 100644 icclient/member.h delete mode 100644 icclient/ord.h delete mode 100644 icclient/typedefs.h (limited to 'icclient') diff --git a/icclient/admin.h b/icclient/admin.h deleted file mode 100644 index 08e4751..0000000 --- a/icclient/admin.h +++ /dev/null @@ -1,39 +0,0 @@ -#ifndef ICCLIENT_ADMIN_H -#define ICCLIENT_ADMIN_H - -#include "typedefs.h" - -enum icclient_admin_group { - ICCLIENT_ADMIN_GROUP_CONTENT, - ICCLIENT_ADMIN_GROUP_MERCH, - ICCLIENT_ADMIN_GROUP_ORDERS -}; - -struct icclient_admin { - char *username; - char *password; - char *name; - bool super; - enum icclient_admin_group group; -}; - -#ifdef __cplusplus -extern "C" { -#endif - -void icclient_admin_login(const char *username, const char *password, void (*handler)(icclient_response *), - void (*callback)(struct icclient_admin *)); -void icclient_admin_new_admin(const char *username, const char *password, const char *name, bool super, - enum icclient_admin_group group, void (*handler)(icclient_response *)); -void icclient_admin_new_item(const char *description, const char *comment, const char *price, - const char *image_path, void (*handler)(icclient_response *)); -void icclient_admin_new_transaction(const struct icclient_ord_order *order, - const struct icclient_member *member, bool new_customer_id, - void (*handler)(icclient_response *)); -void icclient_admin_logout(struct icclient_admin *admin, void (*handler)(icclient_response *)); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/icclient/member.h b/icclient/member.h deleted file mode 100644 index 6b9d2ee..0000000 --- a/icclient/member.h +++ /dev/null @@ -1,79 +0,0 @@ -#ifndef ICCLIENT_MEMBER_H -#define ICCLIENT_MEMBER_H - -#include -#include "typedefs.h" - -struct icclient_member_preferences { - bool mv_same_billing; - bool email_copy; -}; - -struct icclient_member { - char *username; - char *usernick; - char *password; - char *expiration; - char *acl; - char *mod_time; - char *s_nickname; - char *company; - char *fname; /*!< Shipping first name */ - char *lname; /*!< Shipping last name */ - char *address1; - char *address2; - char *address3; - char *city; - char *state; - char *zip; - char *country; - char *phone_day; - char *mv_shipmode; - char *b_nickname; - char *b_fname; /*!< Billing first name */ - char *b_lname; /*!< Billing last name */ - char *b_company; - char *b_address1; - char *b_address2; - char *b_address3; - char *b_city; - char *b_state; - char *b_zip; - char *b_country; - char *b_phone; - char *p_nickname; - char *email; - char *fax; - char *phone_night; - char *address_book; - char *accounts; - struct icclient_member_preferences *preferences; - char *carts; - char *owner; - char *file_acl; - char *db_acl; - char *mail_list; - char *credit_limit; - bool inactive; - bool dealer; - char *price_level; -}; - -#ifdef __cplusplus -extern "C" { -#endif - - void icclient_member_newaccount(const char *username, const char *password, const char *verify, - void (*handler)(icclient_response *), void (*callback)(struct icclient_member *)); - void icclient_member_login(const char *username, const char *password, void (*handler)(icclient_response *), - void (*callback)(struct icclient_member *)); - void icclient_member_account(const char *fname, const char *lname, const char *address1, const char *address2, - const char *city, const char *state, const char *zip, const char *email, const char *phone_day); - void icclient_member_changepassword(const char *password_old, const char *password, const char *verify); - void icclient_member_logout(struct icclient_member *member); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/icclient/ord.h b/icclient/ord.h deleted file mode 100644 index eccc822..0000000 --- a/icclient/ord.h +++ /dev/null @@ -1,37 +0,0 @@ -#ifndef ICCLIENT_ORD_H -#define ICCLIENT_ORD_H - -struct icclient_ord_item { - struct icclient_product *product; - unsigned int quantity; -}; - -struct icclient_ord_order { - double subtotal; - double shipping; - double total_cost; - char *profile; - size_t nitems; - struct icclient_ord_item *items[]; -}; - -#ifdef __cplusplus -extern "C" { -#endif - -/*! - * \brief For putting an item to a cart. - * \param sku The SKU of the item to order. - * \param catalog The catalog from which the item is. - * \param order The address of an order instance. - */ -void icclient_ord_order(const char *sku, const struct icclient_catalog *catalog, - struct icclient_ord_order **order); -void icclient_ord_checkout(const struct icclient_ord_order *order, const struct icclient_member *member); -void icclient_ord_free(struct icclient_ord_order *order); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/icclient/typedefs.h b/icclient/typedefs.h deleted file mode 100644 index 4bb6dcc..0000000 --- a/icclient/typedefs.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef ICCLIENT_TYPEDEFS_H -#define ICCLIENT_TYPEDEFS_H - -#include -#ifdef __EMSCRIPTEN__ -#include -typedef emscripten_fetch_t icclient_response; -#else -#include -typedef struct { - void *userData; - char *data; - size_t numBytes; - CURL *curl; -} icclient_response; -#endif - -#endif -- cgit v1.2.3