From 3490c318493d6b532fb4eafa4c1973876344b10b 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: Fri, 19 Jun 2020 15:58:13 +0800 Subject: Results page implementation --- client.cxx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'client.cxx') diff --git a/client.cxx b/client.cxx index e459e27..c7950a8 100644 --- a/client.cxx +++ b/client.cxx @@ -15,11 +15,20 @@ namespace ICClient { icclient_cleanup(); } + void Client::results(size_t (*handler)(void* contents, size_t size, + size_t nmemb, void* userdata), + QString const& prodGroup) + { + icclient_catalog* catalog = nullptr; + icclient_results(handler, &catalog, prodGroup.toLatin1().constData()); + emit gotResults(catalog); + } + void Client::allProducts(size_t (*handler)(void*, size_t, size_t, void*)) { icclient_catalog* catalog = nullptr; icclient_allproducts(handler, &catalog); - emit gotAllProducts(catalog); + emit gotResults(catalog); } void Client::flyPage(size_t (*handler)(void* contents, size_t size, -- cgit v1.2.3