From 552b14eeda6fc65c6246224425a03a4bf1b31154 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, 27 Sep 2019 08:55:15 +0800 Subject: Adjust with the new allproducts function name --- qicclient/client.hxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'qicclient/client.hxx') diff --git a/qicclient/client.hxx b/qicclient/client.hxx index 27ba2af..4994ad9 100644 --- a/qicclient/client.hxx +++ b/qicclient/client.hxx @@ -16,7 +16,7 @@ namespace ICClient { Client(char const* url, char const* certificate = nullptr); ~Client(); - void productAll(icclient_catalog** catalogptr + void allProducts(icclient_catalog** catalogptr , size_t (*callback)(void* contents , size_t size, size_t nmemb , void* userdata)); @@ -26,7 +26,7 @@ namespace ICClient { void logOut(); signals: - void gotProductAll(icclient_catalog* catalog); + void gotAllProducts(icclient_catalog* catalog); void loggedIn(QString const& username); void loggedOut(); }; -- cgit v1.2.3 From 564738b2a05b6dde4f4344f49eb4f14641bca366 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, 27 Sep 2019 16:21:18 +0800 Subject: More prototypes for client --- qicclient/client.hxx | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) (limited to 'qicclient/client.hxx') diff --git a/qicclient/client.hxx b/qicclient/client.hxx index 4994ad9..131f3f4 100644 --- a/qicclient/client.hxx +++ b/qicclient/client.hxx @@ -5,6 +5,7 @@ #include struct icclient_catalog; +struct icclient_order; namespace ICClient { @@ -22,12 +23,39 @@ namespace ICClient { , void* userdata)); public slots: - void logIn(QString const& username, QString const& password); + /* + void order(QString const& sku); + void remove(unsigned int const& indices); + void checkout(); + */ + void logIn(QString const& username + , QString const& password); + /* + void account(QString const& firstName + , QString const& lastName + , QString const& address1 + , QString const& address2 + , QString const& city + , QString const& state + , QString const& zip + , QString const& email + , QString const& phoneDay); + void changePassword(QString const& passwordOld + , QString const& password + , QString const& verify); + */ void logOut(); + /* + void newItem(QString const& description + , QString const& comment, + QString const& price + , QString const& imagePath); + */ signals: void gotAllProducts(icclient_catalog* catalog); - void loggedIn(QString const& username); + void ordered(icclient_order* order); + void loggedIn(QString const& userName); void loggedOut(); }; -- cgit v1.2.3 From 4ec7c925e46cebe461cf6c8b21c35b58afb96c78 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: Sat, 28 Sep 2019 12:50:55 +0800 Subject: Fix header guard --- qicclient/client.hxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'qicclient/client.hxx') diff --git a/qicclient/client.hxx b/qicclient/client.hxx index 131f3f4..a8b50f4 100644 --- a/qicclient/client.hxx +++ b/qicclient/client.hxx @@ -1,5 +1,5 @@ -#ifndef QRTCLIENT_CLIENT_HXX -#define QRTCLIENT_CLIENT_HXX +#ifndef QICCLIENT_CLIENT_HXX +#define QICCLIENT_CLIENT_HXX #include #include @@ -61,4 +61,4 @@ namespace ICClient { } -#endif // QRTCLIENT_CLIENT_HXX +#endif // QICCLIENT_CLIENT_HXX -- cgit v1.2.3 From bffd7c68508f793fc00c7453850668f7c654e1d0 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: Sat, 28 Sep 2019 13:05:03 +0800 Subject: The app should be able to accept the catalog in QICClient's form --- qicclient/client.hxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'qicclient/client.hxx') 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)); -- cgit v1.2.3 From 73851e44295b0a1e1963689036a0f60c4cbb8330 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: Sat, 28 Sep 2019 15:54:09 +0800 Subject: Client triggers catalog to update directly since getting all products would only be good for catalog. Besides, emitting there seems to cause crash somehow. --- qicclient/client.hxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'qicclient/client.hxx') diff --git a/qicclient/client.hxx b/qicclient/client.hxx index bccd665..5531d53 100644 --- a/qicclient/client.hxx +++ b/qicclient/client.hxx @@ -3,8 +3,8 @@ #include #include +#include "catalog.hxx" -struct icclient_catalog; struct icclient_order; namespace ICClient { @@ -17,7 +17,8 @@ namespace ICClient { Client(char const* url, char const* certificate = nullptr); ~Client(); - void allProducts(size_t (*handler)(void* contents + void allProducts(Catalog* catalog + , size_t (*handler)(void* contents , size_t size, size_t nmemb , void* userdata)); @@ -52,7 +53,6 @@ namespace ICClient { */ signals: - void gotAllProducts(icclient_catalog* catalog); void ordered(icclient_order* order); void loggedIn(QString const& userName); void loggedOut(); -- cgit v1.2.3 From 0640cec9e13edd30b85c50da9943f6fb56aec0df 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 Sep 2019 07:40:23 +0800 Subject: Revert "Client triggers catalog to update directly" This reverts commit 73851e44295b0a1e1963689036a0f60c4cbb8330. --- qicclient/client.hxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'qicclient/client.hxx') diff --git a/qicclient/client.hxx b/qicclient/client.hxx index 5531d53..bccd665 100644 --- a/qicclient/client.hxx +++ b/qicclient/client.hxx @@ -3,8 +3,8 @@ #include #include -#include "catalog.hxx" +struct icclient_catalog; struct icclient_order; namespace ICClient { @@ -17,8 +17,7 @@ namespace ICClient { Client(char const* url, char const* certificate = nullptr); ~Client(); - void allProducts(Catalog* catalog - , size_t (*handler)(void* contents + void allProducts(size_t (*handler)(void* contents , size_t size, size_t nmemb , void* userdata)); @@ -53,6 +52,7 @@ namespace ICClient { */ signals: + void gotAllProducts(icclient_catalog* catalog); void ordered(icclient_order* order); void loggedIn(QString const& userName); void loggedOut(); -- cgit v1.2.3