From 3f5ece56ba0aa55be5c6a7973866ffda432de1ce 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, 12 Jul 2020 20:08:31 +0800 Subject: login functions return users --- icclient/admin.h | 14 ++++++++++---- icclient/member.h | 14 +++++++------- 2 files changed, 17 insertions(+), 11 deletions(-) (limited to 'icclient') diff --git a/icclient/admin.h b/icclient/admin.h index faff559..fa38676 100644 --- a/icclient/admin.h +++ b/icclient/admin.h @@ -1,15 +1,21 @@ #ifndef ICCLIENT_ADMIN_H #define ICCLIENT_ADMIN_H +struct icclient_admin { + char *name; + char *username; + bool super; +}; + #ifdef __cplusplus extern "C" { #endif - void icclient_admin_login(size_t (*handler)(void *, size_t, size_t, void *), - struct icclient_member *member, const char *username, + struct icclient_admin *icclient_admin_login(const char *username, const char *password, const char *successpage, - const char *nextpage, const char *failpage); - void icclient_admin_logout(); + const char *nextpage, const char *failpage, + size_t (*handler)(void *, size_t, size_t, void *)); + void icclient_admin_logout(struct icclient_admin *admin); #ifdef __cplusplus } diff --git a/icclient/member.h b/icclient/member.h index a91c5d6..d68f814 100644 --- a/icclient/member.h +++ b/icclient/member.h @@ -55,21 +55,21 @@ struct icclient_member { extern "C" { #endif - void icclient_member_newaccount(size_t (*handler)(void *, size_t, size_t, void *), - struct icclient_member *member, const char *username, + struct icclient_member *icclient_member_newaccount(const char *username, const char *password, const char *verify, const char *successpage, - const char *nextpage, const char *failpage); - void icclient_member_login(size_t (*handler)(void *, size_t, size_t, void *), - struct icclient_member *member, const char *username, + const char *nextpage, const char *failpage, + size_t (*handler)(void *, size_t, size_t, void *)); + struct icclient_member *icclient_member_login(const char *username, const char *password, const char *successpage, - const char *nextpage, const char *failpage); + const char *nextpage, const char *failpage, + size_t (*handler)(void *, size_t, size_t, void *)); 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(); + void icclient_member_logout(struct icclient_member *member); #ifdef __cplusplus } -- cgit v1.2.3