summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2021-06-13 09:43:35 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2021-06-13 09:43:35 +0800
commit0f3c9898430995259fe709235bf9fa27c0fc7329 (patch)
tree475e0a40314f1b08587ad7a2e767be3a9ef645b0
parentdf2437eb869fe404aac56f03aa5015fca8bcaaf1 (diff)
Conform to updated libicclient interface
-rw-r--r--catalog.cxx4
-rw-r--r--client.cxx8
-rw-r--r--qicclient/client.hxx6
-rw-r--r--qicclient/product.hxx2
4 files changed, 4 insertions, 16 deletions
diff --git a/catalog.cxx b/catalog.cxx
index 2fdd826..271dedd 100644
--- a/catalog.cxx
+++ b/catalog.cxx
@@ -1,7 +1,5 @@
#include <cstddef>
-#include <icclient/catalog.h>
-#include <icclient/typedefs.h>
-#include <icclient/client.h>
+#include <icclient.h>
#include "qicclient/catalog.hxx"
namespace QICClient {
diff --git a/client.cxx b/client.cxx
index 7c69b84..243313d 100644
--- a/client.cxx
+++ b/client.cxx
@@ -2,12 +2,8 @@
#include <memory>
#include <QObject>
#include <icclient/typedefs.h>
-#include <icclient/catalog.h>
-#include <icclient/client.h>
#include "qicclient/catalog.hxx"
-#ifndef __EMSCRIPTEN__
#include "qicclient/ord.hxx"
-#endif
#include "qicclient/client.hxx"
static QICClient::Client *client;
@@ -15,7 +11,7 @@ static QICClient::Client *client;
static void callback(icclient_catalog* catalog)
{
client->emitCatalog(catalog);
- icclient_catalog_free(catalog);
+ icclient_free_catalog(catalog);
}
namespace QICClient {
@@ -53,7 +49,6 @@ namespace QICClient {
if (product) emit gotFlyPage(shared_ptr<Product>{new Product{product}});
}
-#ifndef __EMSCRIPTEN__
void Client::order(QString const& sku, Catalog const& catalog, Ord& order)
{
auto c_order = order.data();
@@ -61,6 +56,5 @@ namespace QICClient {
&c_order);
order.setData(c_order);
}
-#endif
}
diff --git a/qicclient/client.hxx b/qicclient/client.hxx
index 1bc5ea4..1a86a36 100644
--- a/qicclient/client.hxx
+++ b/qicclient/client.hxx
@@ -2,15 +2,13 @@
#define QICCLIENT_CLIENT_HXX
#include <QObject>
-#include <icclient/typedefs.h>
+#include <icclient.h>
namespace QICClient {
using std::shared_ptr;
class Catalog;
-#ifndef __EMSCRIPTEN__
class Ord;
-#endif
class Client : public QObject
{
@@ -47,7 +45,6 @@ namespace QICClient {
*/
void flyPage(QString const& sku, icclient_handler handler);
-#ifndef __EMSCRIPTEN__
/*!
* \brief For putting an item to a cart.
* \param sku The SKU of the item to order.
@@ -55,7 +52,6 @@ namespace QICClient {
* \param order The order.
*/
void order(QString const& sku, Catalog const& catalog, Ord& order);
-#endif
signals:
void gotResults(Catalog* catalog);
diff --git a/qicclient/product.hxx b/qicclient/product.hxx
index 8d7bef3..5d19d41 100644
--- a/qicclient/product.hxx
+++ b/qicclient/product.hxx
@@ -1,7 +1,7 @@
#ifndef QICCLIENT_PRODUCT_HXX
#define QICCLIENT_PRODUCT_HXX
-#include <icclient/product.h>
+#include <icclient.h>
namespace QICClient {