summaryrefslogtreecommitdiff
path: root/client.cxx
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2021-07-10 18:58:44 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2021-07-10 18:58:44 +0800
commit597163edb74e7cef5da39361f67686c2d5cac902 (patch)
treea405425cf6a79f90d6d730ae840c7df8e0aba24d /client.cxx
parent0ffa08d177f3bdf10751af5818c9fc7127486fee (diff)
Wrapper for icclient_path
Diffstat (limited to 'client.cxx')
-rw-r--r--client.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/client.cxx b/client.cxx
index 37875b1..4c54605 100644
--- a/client.cxx
+++ b/client.cxx
@@ -37,6 +37,14 @@ namespace QICClient {
}, nullptr);
}
+ void Client::path(QString const& path)
+ {
+ icclient_path(path.toLatin1().constData(), [](icclient_response* response) {
+ client->emitPath(QString{response->data});
+ icclient_free_response(response);
+ });
+ }
+
void Client::defaultCatalog(QString const& prodGroup)
{
icclient_catalog(prodGroup.toLatin1().constData(), nullptr, [](struct icclient_catalog* catalog) {
@@ -59,6 +67,11 @@ namespace QICClient {
emit gotProduct(product);
}
+ void Client::emitPath(QString const& path)
+ {
+ emit gotPath(path);
+ }
+
void Client::order(QString const& sku, Catalog const& catalog, Ord& order)
{
auto c_order = order.data();