diff options
author | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2020-06-29 15:38:47 +0800 |
---|---|---|
committer | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2020-06-29 15:38:47 +0800 |
commit | 228307e324190e760dc298ef84c3ffb29d4c8237 (patch) | |
tree | 36f97ddb46c12ac98fb81b5969dbf6c64b474702 /client.cxx | |
parent | a2a5964bddaf61c830f9a2a2a9bf6226c0168e64 (diff) |
C++ instances keep a pointer to the C version
Diffstat (limited to 'client.cxx')
-rw-r--r-- | client.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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*) |