From 93a857da620f0f102ceb310dff48dac3573c7dc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Tue, 13 Jul 2021 08:34:50 +0800 Subject: Conform to icclient_page --- client.cxx | 18 +++++++++--------- qicclient.hxx | 6 +++--- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/client.cxx b/client.cxx index 4c54605..28a97fb 100644 --- a/client.cxx +++ b/client.cxx @@ -37,10 +37,10 @@ namespace QICClient { }, nullptr); } - void Client::path(QString const& path) + void Client::page(QString const& path) { - icclient_path(path.toLatin1().constData(), [](icclient_response* response) { - client->emitPath(QString{response->data}); + icclient_page(path.toLatin1().constData(), [](icclient_response* response) { + client->emitPage(QString{response->data}); icclient_free_response(response); }); } @@ -57,19 +57,19 @@ namespace QICClient { defaultCatalog("All-Products"); } - void Client::emitCatalog(QString const& catalog) + void Client::emitCatalog(QString const& response) { - emit gotCatalog(catalog); + emit gotCatalog(response); } - void Client::emitProduct(QString const& product) + void Client::emitProduct(QString const& response) { - emit gotProduct(product); + emit gotProduct(response); } - void Client::emitPath(QString const& path) + void Client::emitPage(QString const& response) { - emit gotPath(path); + emit gotPage(response); } void Client::order(QString const& sku, Catalog const& catalog, Ord& order) diff --git a/qicclient.hxx b/qicclient.hxx index 88f07d8..e52145e 100644 --- a/qicclient.hxx +++ b/qicclient.hxx @@ -51,7 +51,7 @@ namespace QICClient { * \brief For fetching data from a specific path. * \param path The path. */ - void path(QString const& path); + void page(QString const& path); /*! * \brief For fetching products that belong a specific group. * \param prodGroup The name of the product group. @@ -65,12 +65,12 @@ namespace QICClient { signals: void gotCatalog(QString const& response); void gotProduct(QString const& response); - void gotPath(QString const& response); + void gotPage(QString const& response); protected: void emitCatalog(QString const& response); void emitProduct(QString const& response); - void emitPath(QString const& response); + void emitPage(QString const& response); }; } -- cgit v1.2.3