summaryrefslogtreecommitdiff
path: root/client.cxx
diff options
context:
space:
mode:
authorꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2020-06-29 15:38:47 +0800
committerꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2020-06-29 15:38:47 +0800
commit228307e324190e760dc298ef84c3ffb29d4c8237 (patch)
tree36f97ddb46c12ac98fb81b5969dbf6c64b474702 /client.cxx
parenta2a5964bddaf61c830f9a2a2a9bf6226c0168e64 (diff)
C++ instances keep a pointer to the C version
Diffstat (limited to 'client.cxx')
-rw-r--r--client.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/client.cxx b/client.cxx
index 7f74127..5ca3ce6 100644
--- a/client.cxx
+++ b/client.cxx
@@ -4,6 +4,7 @@
#include <icclient/client.h>
#include <icclient/member.h>
#include "qicclient/catalog.hxx"
+#include "qicclient/basket.hxx"
#include "qicclient/client.hxx"
namespace ICClient {
@@ -43,12 +44,11 @@ namespace ICClient {
if (product) emit gotFlyPage(shared_ptr<Product>{new Product{product}});
}
- void Client::order(icclient_ord_order** orderPtr, QString const& sku
- , icclient_catalog* catalog)
+ void Client::order(QString const& sku, Catalog const& catalog, Basket& order)
{
- icclient_order(orderPtr, sku.toLatin1().constData(), catalog);
- icclient_ord_order* order = *orderPtr;
- emit ordered(order);
+ auto c_order = order.c_order();
+ icclient_order(sku.toLatin1().constData(), catalog.c_catalog(),
+ &c_order);
}
void Client::logIn(size_t (*handler)(void*, size_t, size_t, void*)