From 3fdde5e115af1edf084a81ead04adbca49d39e88 Mon Sep 17 00:00:00 2001 From: ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ Date: Thu, 26 Sep 2019 22:04:11 +0800 Subject: All products related signal and slot --- qicclient/client.hxx | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'qicclient/client.hxx') diff --git a/qicclient/client.hxx b/qicclient/client.hxx index 14c3652..481f9bb 100644 --- a/qicclient/client.hxx +++ b/qicclient/client.hxx @@ -2,6 +2,9 @@ #define QRTCLIENT_CLIENT_HXX #include +#include + +struct icclient_catalog; namespace ICClient { @@ -13,11 +16,17 @@ namespace ICClient { Client(char const* url, char const* certificate = nullptr); ~Client(); + void productAll(icclient_catalog** catalogptr + , size_t (*callback)(void* contents + , size_t size, size_t nmemb + , void* userdata)); + public slots: void logIn(QString const& username, QString const& password); void logOut(); signals: + void gotProductAll(icclient_catalog*); void loggedIn(QString const& username); void loggedOut(); }; -- cgit v1.3 From 721cffc4488b27497b94d8e5bdaf84510f5cfa2b Mon Sep 17 00:00:00 2001 From: ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ Date: Thu, 26 Sep 2019 22:12:53 +0800 Subject: Fix scope --- client.cxx | 6 ++---- qicclient/client.hxx | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'qicclient/client.hxx') diff --git a/client.cxx b/client.cxx index 00f0712..0443ce3 100644 --- a/client.cxx +++ b/client.cxx @@ -13,10 +13,8 @@ namespace ICClient { icclient_cleanup(); } - void productAll(icclient_catalog** catalogptr - , size_t (*callback)(void* contents - , size_t size, size_t nmemb - , void* userdata)) + void Client::productAll(icclient_catalog** catalogptr + , size_t (*callback)(void*, size_t, size_t, void*)) { icclient_product_all(catalogptr, callback); emit gotProductAll(*catalogptr); diff --git a/qicclient/client.hxx b/qicclient/client.hxx index 481f9bb..27ba2af 100644 --- a/qicclient/client.hxx +++ b/qicclient/client.hxx @@ -26,7 +26,7 @@ namespace ICClient { void logOut(); signals: - void gotProductAll(icclient_catalog*); + void gotProductAll(icclient_catalog* catalog); void loggedIn(QString const& username); void loggedOut(); }; -- cgit v1.3