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. --- login.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'login.h') diff --git a/login.h b/login.h index a9dbe43..6d02cde 100644 --- a/login.h +++ b/login.h @@ -1,9 +1,13 @@ #ifndef ICCLIENT_LOGIN_H #define ICCLIENT_LOGIN_H +#include +#include "icclient/member.h" #include "request.h" -inline void login(const char *username, const char *password, const char *verify +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) { @@ -41,7 +45,7 @@ inline void login(const char *username, const char *password, const char *verify , CURLFORM_PTRCONTENTS, failpage , CURLFORM_END); last = NULL; - request(NULL, NULL, post, "%s", "process"); + request(handler, user, post, "%s", "process"); curl_formfree(post); post = NULL; } -- cgit v1.2.3