diff options
-rw-r--r-- | catalog.cxx | 1 | ||||
-rw-r--r-- | client.cxx | 6 | ||||
m--------- | libicclient | 10 | ||||
-rw-r--r-- | qicclient/client.hxx | 2 |
4 files changed, 12 insertions, 7 deletions
diff --git a/catalog.cxx b/catalog.cxx index ecc01a0..8cdc64a 100644 --- a/catalog.cxx +++ b/catalog.cxx @@ -57,7 +57,6 @@ namespace ICClient { if (catalog) { for (size_t i = 0; i < catalog->length; i++) addProduct(Product{catalog->products[i]}); - icclient_freecatalog(catalog); emit updated(); } } @@ -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() diff --git a/libicclient b/libicclient -Subproject 6fa0df3c46986b15dec3be672f41eb7ea62c20e +Subproject e8ae8fbeab89beb43138e26465965d3510edd1c diff --git a/qicclient/client.hxx b/qicclient/client.hxx index 6121c5e..470018a 100644 --- a/qicclient/client.hxx +++ b/qicclient/client.hxx @@ -19,10 +19,10 @@ namespace ICClient { void allProducts(size_t (*handler)(void* contents , size_t size, size_t nmemb , void* userdata)); + void order(QString const& sku, icclient_catalog* catalog); public slots: /* - void order(QString const& sku); void remove(unsigned int const& indices); void checkout(); */ |