From 4c00d748c3c86cbb5039660c2a5bebac0c826386 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: Sun, 29 Dec 2019 08:36:39 +0800 Subject: Add parameters for handler and user pointers to login related functions. These are the cURL write function and data respectively. --- icclient/admin.h | 5 ++++- icclient/client.h | 11 +++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) (limited to 'icclient') diff --git a/icclient/admin.h b/icclient/admin.h index e01fdc9..1b6bd68 100644 --- a/icclient/admin.h +++ b/icclient/admin.h @@ -5,7 +5,10 @@ extern "C" { #endif - void icclient_admin_login(const char *username, const char *password + void icclient_admin_login(size_t (*handler)(void *contents, size_t size + , size_t nmemb, void *userdata) + , struct icclient_user *user + , const char *username, const char *password , const char *successpage, const char *nextpage , const char *failpage); void icclient_admin_logout(); diff --git a/icclient/client.h b/icclient/client.h index db38926..56db8fd 100644 --- a/icclient/client.h +++ b/icclient/client.h @@ -3,6 +3,7 @@ struct icclient_product; struct icclient_catalog; +struct icclient_user; struct icclient_ord_order; #ifdef __cplusplus @@ -15,10 +16,16 @@ extern "C" { , struct icclient_catalog **catalogptr); void icclient_order(struct icclient_ord_order **orderptr, const char *sku , struct icclient_catalog *catalog); - void icclient_newaccount(const char *username, const char *password + void icclient_newaccount(size_t (*handler)(void *contents, size_t size + , size_t nmemb, void *userdata) + , struct icclient_user *user + , const char *username, const char *password , const char *verify, const char *successpage , const char *nextpage, const char *failpage); - void icclient_login(const char *username, const char *password + void icclient_login(size_t (*handler)(void *contents, size_t size + , size_t nmemb, void *userdata) + , struct icclient_user *user + , const char *username, const char *password , const char *successpage, const char *nextpage , const char *failpage); void icclient_logout(); -- cgit v1.2.3