From dd94e52d98aa29e0273176e038864c13fbd4aa6b 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: Mon, 29 Jun 2020 21:19:58 +0800 Subject: Reorder results and flyPage parameters Remove cURL handler parameter variables, and copy documentation from libicclient. --- client.cxx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'client.cxx') diff --git a/client.cxx b/client.cxx index 90b8890..d10c9b6 100644 --- a/client.cxx +++ b/client.cxx @@ -19,9 +19,8 @@ namespace ICClient { icclient_cleanup(); } - void Client::results(size_t (*handler)(void* contents, size_t size, - size_t nmemb, void* userdata), - QString const& prodGroup) + void Client::results(QString const& prodGroup, + size_t (*handler)(void*, size_t, size_t, void*)) { icclient_catalog* catalog = nullptr; icclient_results(prodGroup.toLatin1().constData(), handler, &catalog); @@ -35,9 +34,8 @@ namespace ICClient { if (catalog) emit gotResults(new Catalog{catalog}); } - void Client::flyPage(size_t (*handler)(void* contents, size_t size, - size_t nmemb, void* userdata), - QString const& sku) + void Client::flyPage(QString const& sku, + size_t (*handler)(void*, size_t, size_t, void*)) { icclient_product* product = nullptr; icclient_flypage(sku.toLatin1().constData(), handler, &product); -- cgit v1.2.3