summaryrefslogtreecommitdiff
path: root/member.c
diff options
context:
space:
mode:
Diffstat (limited to 'member.c')
-rw-r--r--member.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/member.c b/member.c
index ca3bd87..b8076d0 100644
--- a/member.c
+++ b/member.c
@@ -1,7 +1,25 @@
+#include <stddef.h>
#include <stdbool.h>
-#include "request.h"
+#include "login.h"
#include "icclient/member.h"
+void icclient_member_newaccount(size_t (*handler)(void *, size_t, size_t, void *),
+ struct icclient_member *member, const char *username, const char *password,
+ const char *verify, const char *successpage, const char *nextpage,
+ const char *failpage)
+{
+ login(handler, member, username, password, verify, "NewAccount", successpage,
+ nextpage, failpage);
+}
+
+void icclient_member_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, member, username, password, NULL, "Login", successpage, nextpage,
+ failpage);
+}
+
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)
@@ -98,3 +116,8 @@ void icclient_member_changepassword(const char *password_old, const char *passwo
curl_formfree(post);
post = NULL;
}
+
+void icclient_member_logout()
+{
+ request(NULL, NULL, NULL, "%s", "logout");
+}