summaryrefslogtreecommitdiff
path: root/login.h
diff options
context:
space:
mode:
authorꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-12-29 08:36:39 +0800
committerꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-12-29 08:36:39 +0800
commit4c00d748c3c86cbb5039660c2a5bebac0c826386 (patch)
treeb83f96a57506561131af1209c4dfedb421a5c3cb /login.h
parent30d862751ce42ecf667d08c360009aca3aacc1f8 (diff)
Add parameters for handler and user pointers
to login related functions. These are the cURL write function and data respectively.
Diffstat (limited to 'login.h')
-rw-r--r--login.h8
1 files changed, 6 insertions, 2 deletions
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 <stdbool.h>
+#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;
}