diff options
author | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2019-09-28 13:05:03 +0800 |
---|---|---|
committer | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2019-09-28 13:05:03 +0800 |
commit | bffd7c68508f793fc00c7453850668f7c654e1d0 (patch) | |
tree | 98dc2a70514b221b1b4d9ab2026b4400f212da2e | |
parent | 4ec7c925e46cebe461cf6c8b21c35b58afb96c78 (diff) |
The app should be able to accept the catalog in QICClient's form
-rw-r--r-- | client.cxx | 8 | ||||
-rw-r--r-- | qicclient/client.hxx | 3 |
2 files changed, 5 insertions, 6 deletions
@@ -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)); |