From 560a47463ec705715b4ce5f53a39030feb48e305 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: Tue, 22 Oct 2019 18:08:56 +0800 Subject: order is not a slot and takes a catalog argument --- client.cxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'client.cxx') diff --git a/client.cxx b/client.cxx index 7ffe780..d3146ce 100644 --- a/client.cxx +++ b/client.cxx @@ -21,6 +21,12 @@ namespace ICClient { emit gotAllProducts(catalog); } + void Client::order(QString const& sku, icclient_catalog* catalog) + { + icclient_ord_order* order = nullptr; + icclient_order(&order, sku.toLatin1().constData(), catalog); + } + void Client::logIn(QString const& username, QString const& password) { icclient_login(username.toLatin1().constData() -- cgit v1.2.3 From 29857eef59c6a7bd6958743c83c05932678f2855 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: Tue, 22 Oct 2019 22:36:35 +0800 Subject: order emit ordered signal --- client.cxx | 1 + 1 file changed, 1 insertion(+) (limited to 'client.cxx') diff --git a/client.cxx b/client.cxx index d3146ce..74a64ba 100644 --- a/client.cxx +++ b/client.cxx @@ -25,6 +25,7 @@ namespace ICClient { { icclient_ord_order* order = nullptr; icclient_order(&order, sku.toLatin1().constData(), catalog); + emit ordered(order); } void Client::logIn(QString const& username, QString const& password) -- cgit v1.2.3 From d7b7252da7f110d8903250c83109cd73e6b2de34 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, 4 Nov 2019 19:17:53 +0700 Subject: order function takes a pointer to order argument --- client.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'client.cxx') diff --git a/client.cxx b/client.cxx index 74a64ba..1dad6fe 100644 --- a/client.cxx +++ b/client.cxx @@ -21,10 +21,11 @@ namespace ICClient { emit gotAllProducts(catalog); } - void Client::order(QString const& sku, icclient_catalog* catalog) + void Client::order(icclient_ord_order** orderPtr, QString const& sku + , icclient_catalog* catalog) { - icclient_ord_order* order = nullptr; - icclient_order(&order, sku.toLatin1().constData(), catalog); + icclient_order(orderPtr, sku.toLatin1().constData(), catalog); + icclient_ord_order* order = *orderPtr; emit ordered(order); } -- cgit v1.2.3 From 2bf032f097da081fc45ff7249f789bdfe142fd28 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, 18 Nov 2019 19:25:35 +0700 Subject: logIn takes page arguments and is not a slot any more --- client.cxx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'client.cxx') diff --git a/client.cxx b/client.cxx index 1dad6fe..0aafc46 100644 --- a/client.cxx +++ b/client.cxx @@ -29,11 +29,15 @@ namespace ICClient { emit ordered(order); } - void Client::logIn(QString const& username, QString const& password) + void Client::logIn(QString const& username, QString const& password + , QString const& successPage, QString const& nextPage + , QString const& failPage) { icclient_login(username.toLatin1().constData() - , password.toLatin1().constData(), nullptr, nullptr - , nullptr); + , password.toLatin1().constData() + , successPage.toLatin1().constData() + , nextPage.toLatin1().constData() + , failPage.toLatin1().constData()); emit loggedIn(username); } -- cgit v1.2.3 From 7079898ae28c6cc417ba8eadc4bd2466886bbc63 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: Sun, 29 Dec 2019 08:45:06 +0800 Subject: Add parameters for handler and user pointers to login related functions. These are the cURL write function and data respectively. --- client.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'client.cxx') diff --git a/client.cxx b/client.cxx index 0aafc46..c0dd1c2 100644 --- a/client.cxx +++ b/client.cxx @@ -1,5 +1,6 @@ #include #include +#include #include "qicclient/client.hxx" namespace ICClient { @@ -29,11 +30,12 @@ namespace ICClient { emit ordered(order); } - void Client::logIn(QString const& username, QString const& password - , QString const& successPage, QString const& nextPage - , QString const& failPage) + void Client::logIn(size_t (*handler)(void*, size_t, size_t, void*) + , icclient_user* user, QString const& username + , QString const& password, QString const& successPage + , QString const& nextPage, QString const& failPage) { - icclient_login(username.toLatin1().constData() + icclient_login(handler, user, username.toLatin1().constData() , password.toLatin1().constData() , successPage.toLatin1().constData() , nextPage.toLatin1().constData() -- cgit v1.2.3 From baefbee691355fccc6b64b0171d2f02959759a37 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: Sun, 29 Dec 2019 08:45:39 +0800 Subject: Change loggedIn signal parameter type to IC client user --- client.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'client.cxx') diff --git a/client.cxx b/client.cxx index c0dd1c2..8484387 100644 --- a/client.cxx +++ b/client.cxx @@ -40,7 +40,7 @@ namespace ICClient { , successPage.toLatin1().constData() , nextPage.toLatin1().constData() , failPage.toLatin1().constData()); - emit loggedIn(username); + emit loggedIn(user); } void Client::logOut() -- cgit v1.2.3