From bffd7c68508f793fc00c7453850668f7c654e1d0 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: Sat, 28 Sep 2019 13:05:03 +0800 Subject: The app should be able to accept the catalog in QICClient's form --- client.cxx | 8 ++++---- qicclient/client.hxx | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/client.cxx b/client.cxx index 8e169a2..4e832ce 100644 --- a/client.cxx +++ b/client.cxx @@ -14,11 +14,11 @@ namespace ICClient { icclient_cleanup(); } - void Client::allProducts(icclient_catalog** catalogptr - , size_t (*callback)(void*, size_t, size_t, void*)) + void Client::allProducts(size_t (*handler)(void*, size_t, size_t, void*)) { - icclient_allproducts(catalogptr, callback); - emit gotAllProducts(*catalogptr); + icclient_catalog* catalog = nullptr; + icclient_allproducts(&catalog, handler); + emit gotAllProducts(catalog); } void Client::logIn(QString const& username, QString const& password) diff --git a/qicclient/client.hxx b/qicclient/client.hxx index a8b50f4..bccd665 100644 --- a/qicclient/client.hxx +++ b/qicclient/client.hxx @@ -17,8 +17,7 @@ namespace ICClient { Client(char const* url, char const* certificate = nullptr); ~Client(); - void allProducts(icclient_catalog** catalogptr - , size_t (*callback)(void* contents + void allProducts(size_t (*handler)(void* contents , size_t size, size_t nmemb , void* userdata)); -- cgit v1.2.3