summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client.c6
-rw-r--r--icclient/client.h4
2 files changed, 10 insertions, 0 deletions
diff --git a/client.c b/client.c
index c64dc0b..56dbf79 100644
--- a/client.c
+++ b/client.c
@@ -59,6 +59,12 @@ void icclient_logout()
request(NULL, NULL, NULL, "%s", "logout");
}
+void icclient_page(const char *path, size_t (*handler)(void *, size_t, size_t
+ , void *), void **dataptr)
+{
+ request(handler, (void *)dataptr, NULL, "%s", path);
+}
+
void icclient_cleanup()
{
if (curl) {
diff --git a/icclient/client.h b/icclient/client.h
index 9527300..053eee5 100644
--- a/icclient/client.h
+++ b/icclient/client.h
@@ -18,6 +18,10 @@ extern "C" {
, const char *successpage, const char *nextpage
, const char *failpage);
void icclient_logout();
+ void icclient_page(const char *path
+ , size_t (*handler)(void *contents, size_t size
+ , size_t nmemb, void *userdata)
+ , void **dataptr);
void icclient_cleanup();
#ifdef __cplusplus