diff options
-rw-r--r-- | admin.c | 14 | ||||
-rw-r--r-- | client.c | 12 | ||||
-rw-r--r-- | icclient/admin.h | 10 | ||||
-rw-r--r-- | icclient/client.h | 6 | ||||
-rw-r--r-- | icclient/member.h | 14 | ||||
-rw-r--r-- | login.c | 7 | ||||
-rw-r--r-- | login.h | 11 | ||||
-rw-r--r-- | member.c | 6 |
8 files changed, 37 insertions, 43 deletions
@@ -1,15 +1,13 @@ #include "login.h" #include "icclient/admin.h" -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_login(size_t (*handler)(void *, size_t, size_t, void *), + struct icclient_member *member, const char *username, + const char *password, const char *successpage, const char *nextpage, + const char *failpage) { - login(handler, user, username, password, NULL, "MMLogin", successpage - , nextpage, failpage); + login(handler, member, username, password, NULL, "MMLogin", successpage, nextpage, + failpage); } void icclient_admin_logout() @@ -131,21 +131,21 @@ void icclient_order(const char *sku, const icclient_catalog *catalog, } void icclient_newaccount(size_t (*handler)(void *, size_t, size_t, void *), - struct icclient_user *user, + struct icclient_member *member, const char *username, const char *password, const char *verify, const char *successpage, const char *nextpage, const char *failpage) { - login(handler, user, username, password, verify, - "NewAccount", successpage, nextpage, failpage); + login(handler, member, username, password, verify, "NewAccount", successpage, + nextpage, failpage); } void icclient_login(size_t (*handler)(void *, size_t, size_t, void *), - struct icclient_user *user, + struct icclient_member *member, const char *username, const char *password, const char *successpage, const char *nextpage, const char *failpage) { - login(handler, user, username, password, NULL, "Login", - successpage, nextpage, failpage); + login(handler, member, username, password, NULL, "Login", successpage, nextpage, + failpage); } void icclient_logout() diff --git a/icclient/admin.h b/icclient/admin.h index 1b6bd68..faff559 100644 --- a/icclient/admin.h +++ b/icclient/admin.h @@ -5,12 +5,10 @@ extern "C" { #endif - 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_login(size_t (*handler)(void *, size_t, size_t, void *), + struct icclient_member *member, const char *username, + const char *password, const char *successpage, + const char *nextpage, const char *failpage); void icclient_admin_logout(); #ifdef __cplusplus diff --git a/icclient/client.h b/icclient/client.h index 7b7306d..a58bce1 100644 --- a/icclient/client.h +++ b/icclient/client.h @@ -3,7 +3,7 @@ struct icclient_product; struct icclient_catalog; -struct icclient_user; +struct icclient_member; struct icclient_ord_order; #ifdef __cplusplus @@ -55,12 +55,12 @@ extern "C" { void icclient_order(const char *sku, const struct icclient_catalog *catalog, struct icclient_ord_order **orderptr); void icclient_newaccount(size_t (*handler)(void *, size_t, size_t, void *), - struct icclient_user *user, + struct icclient_member *member, const char *username, const char *password, const char *verify, const char *successpage, const char *nextpage, const char *failpage); void icclient_login(size_t (*handler)(void *, size_t, size_t, void *), - struct icclient_user *user, + struct icclient_member *member, const char *username, const char *password, const char *successpage, const char *nextpage, const char *failpage); diff --git a/icclient/member.h b/icclient/member.h index 682b5d2..dd44e78 100644 --- a/icclient/member.h +++ b/icclient/member.h @@ -1,7 +1,7 @@ #ifndef ICCLIENT_MEMBER_H #define ICCLIENT_MEMBER_H -struct icclient_user { +struct icclient_member { char *username; char *usernick; char *password; @@ -55,12 +55,12 @@ struct icclient_user { extern "C" { #endif - void icclient_user_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_user_changepassword(const char *password_old, const char *password - , const char *verify); + 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); #ifdef __cplusplus } @@ -1,6 +1,5 @@ #include "login.h" -extern inline void login(size_t (*handler)(void *contents, size_t size - , size_t nmemb, void *userdata), struct icclient_user *user - , const char *, const char *, const char *, const char * - , const char *, const char *, const char *); +extern inline void login(size_t (*)(void *, size_t, size_t, void *), + struct icclient_member *, const char *, const char *, const char *, + const char *, const char *, const char *, const char *); @@ -5,11 +5,10 @@ #include "icclient/member.h" #include "request.h" -inline void 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 *verify - , const char *click, const char *successpage, const char *nextpage - , const char *failpage) +inline void login(size_t (*handler)(void *, size_t, size_t, void *), + struct icclient_member *member, const char *username, const char *password, + const char *verify, const char *click, const char *successpage, + const char *nextpage, const char *failpage) { struct curl_httppost *post, *last = NULL; curl_formadd(&post, &last @@ -45,7 +44,7 @@ inline void login(size_t (*handler)(void *contents, size_t size , CURLFORM_PTRCONTENTS, failpage , CURLFORM_END); last = NULL; - request(handler, user, post, "%s", "process"); + request(handler, member, post, "%s", "process"); curl_formfree(post); post = NULL; } @@ -2,7 +2,7 @@ #include "request.h" #include "icclient/member.h" -void icclient_account(const char *fname, const char *lname, const char *address1, +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) { @@ -65,8 +65,8 @@ void icclient_account(const char *fname, const char *lname, const char *address1 post = NULL; } -void icclient_changepassword(const char *password_old, const char *password - , const char *verify) +void icclient_member_changepassword(const char *password_old, const char *password, + const char *verify) { struct curl_httppost *post, *last = NULL; curl_formadd(&post, &last, |