From 7931bc869d46b367e676948f142dabdc57b06c0d 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: Thu, 17 Jun 2021 17:11:17 +0800 Subject: Conform to success, fail, and next pages interface removals --- admin.cxx | 12 ++---------- member.cxx | 12 ++---------- qicclient/admin.hxx | 6 +----- qicclient/member.hxx | 6 +----- 4 files changed, 6 insertions(+), 30 deletions(-) diff --git a/admin.cxx b/admin.cxx index ed26562..6fad89f 100644 --- a/admin.cxx +++ b/admin.cxx @@ -5,18 +5,10 @@ namespace QICClient { - std::shared_ptr Admin::logIn(QString const& username, - QString const& password, QString const& successPage, - QString const& nextPage, QString const& failPage, - void (*handler)(icclient_fetch_t *)) + std::shared_ptr Admin::logIn(QString const& username, QString const& password, void (*handler)(icclient_fetch_t *)) { auto admin = new Admin{}; - admin->setData(icclient_admin_login(username.toLatin1().constData(), - password.toLatin1().constData(), - successPage.toLatin1().constData(), - nextPage.toLatin1().constData(), - failPage.toLatin1().constData(), - handler)); + admin->setData(icclient_admin_login(username.toLatin1().constData(), password.toLatin1().constData(), handler)); return std::shared_ptr{admin}; } diff --git a/member.cxx b/member.cxx index 75114f7..545d77d 100644 --- a/member.cxx +++ b/member.cxx @@ -5,18 +5,10 @@ namespace QICClient { - std::shared_ptr Member::logIn(QString const& username, - QString const& password, QString const& successPage, - QString const& nextPage, QString const& failPage, - void (*handler)(icclient_fetch_t *)) + std::shared_ptr Member::logIn(QString const& username, QString const& password, void (*handler)(icclient_fetch_t *)) { auto member = new Member{}; - member->setData(icclient_member_login(username.toLatin1().constData(), - password.toLatin1().constData(), - successPage.toLatin1().constData(), - nextPage.toLatin1().constData(), - failPage.toLatin1().constData(), - handler)); + member->setData(icclient_member_login(username.toLatin1().constData(), password.toLatin1().constData(), handler)); return std::shared_ptr{member}; } diff --git a/qicclient/admin.hxx b/qicclient/admin.hxx index 52920e4..b93ea2a 100644 --- a/qicclient/admin.hxx +++ b/qicclient/admin.hxx @@ -27,11 +27,7 @@ namespace QICClient { m_data{nullptr} {} ~Admin() {} - static std::shared_ptr logIn(QString const& username, - QString const& password, - QString const& successPage = nullptr, - QString const& nextPage = nullptr, - QString const& failPage = nullptr, + static std::shared_ptr logIn(QString const& username, QString const& password, void (*handler)(icclient_fetch_t *) = nullptr); QString const& userName() const { return m_userName; } diff --git a/qicclient/member.hxx b/qicclient/member.hxx index e2a3dcb..b5e1f5b 100644 --- a/qicclient/member.hxx +++ b/qicclient/member.hxx @@ -57,11 +57,7 @@ namespace QICClient { m_data{nullptr} {} ~Member() {} - static std::shared_ptr logIn(QString const& username, - QString const& password, - QString const& successPage = nullptr, - QString const& nextPage = nullptr, - QString const& failPage = nullptr, + static std::shared_ptr logIn(QString const& username, QString const& password, void (*handler)(icclient_fetch_t *) = nullptr); QString const& userName() const { return m_userName; } -- cgit v1.2.3