diff options
-rw-r--r-- | member.cxx | 74 | ||||
-rw-r--r-- | qicclient/member.hxx | 19 |
2 files changed, 50 insertions, 43 deletions
@@ -4,39 +4,6 @@ namespace QICClient { - void Member::logIn(QString const& username, QString const& password, - QString const& successPage, QString const& nextPage, - QString const& failPage, - size_t (*handler)(void*, size_t, size_t, void*)) - { - setData(icclient_member_login(username.toLatin1().constData(), - password.toLatin1().constData(), - successPage.toLatin1().constData(), - nextPage.toLatin1().constData(), - failPage.toLatin1().constData(), - handler)); - } - - void Member::account(QString const& firstName, QString const& lastName, - QString const& address1, QString const& address2, - QString const& city, QString const& state, QString const& zip, - QString const& email, QString const& phoneDay) - { - icclient_member_account(firstName.toLatin1().constData(), - lastName.toLatin1().constData(), - address1.toLatin1().constData(), - address2.toLatin1().constData(), - city.toLatin1().constData(), state.toLatin1().constData(), - zip.toLatin1().constData(), email.toLatin1().constData(), - phoneDay.toLatin1().constData()); - } - - void Member::logOut() - { - icclient_member_logout(m_data); - setData(nullptr); - } - void Member::setUserName(QString const& userName) { if (m_userName != userName) { @@ -270,4 +237,45 @@ namespace QICClient { } else setEmail(""); } + void Member::logIn(QString const& username, QString const& password, + QString const& successPage, QString const& nextPage, + QString const& failPage, + size_t (*handler)(void*, size_t, size_t, void*)) + { + setData(icclient_member_login(username.toLatin1().constData(), + password.toLatin1().constData(), + successPage.toLatin1().constData(), + nextPage.toLatin1().constData(), + failPage.toLatin1().constData(), + handler)); + } + + void Member::account(QString const& firstName, QString const& lastName, + QString const& address1, QString const& address2, + QString const& city, QString const& state, QString const& zip, + QString const& email, QString const& phoneDay) + { + icclient_member_account(firstName.toLatin1().constData(), + lastName.toLatin1().constData(), + address1.toLatin1().constData(), + address2.toLatin1().constData(), + city.toLatin1().constData(), state.toLatin1().constData(), + zip.toLatin1().constData(), email.toLatin1().constData(), + phoneDay.toLatin1().constData()); + } + + void Member::changePassword(QString const& passwordOld, QString const& password, + QString const& verify) + { + icclient_member_changepassword(passwordOld.toLatin1().constData(), + password.toLatin1().constData(), + verify.toLatin1().constData()); + } + + void Member::logOut() + { + icclient_member_logout(m_data); + setData(nullptr); + } + } diff --git a/qicclient/member.hxx b/qicclient/member.hxx index aac831e..86289c0 100644 --- a/qicclient/member.hxx +++ b/qicclient/member.hxx @@ -57,16 +57,6 @@ namespace QICClient { {} ~Member() {} - void logIn(QString const& username, QString const& password, - QString const& successPage = nullptr, - QString const& nextPage = nullptr, - QString const& failPage = nullptr, - size_t (*handler)(void*, size_t, size_t, - void*) = nullptr); - void changePassword(QString const& passwordOld, - QString const& password, - QString const& verify) {} - QString const& userName() const { return m_userName; } QString const& userNick() const { return m_userNick; } QString const& password() const { return m_password; } @@ -107,12 +97,21 @@ namespace QICClient { void setPhoneDay(QString const& phoneDay); void setEmail(QString const& email); + void logIn(QString const& username, QString const& password, + QString const& successPage = nullptr, + QString const& nextPage = nullptr, + QString const& failPage = nullptr, + size_t (*handler)(void*, size_t, size_t, + void*) = nullptr); + public slots: void account(QString const& firstName, QString const& lastName, QString const& address1, QString const& address2, QString const& city, QString const& state, QString const& zip, QString const& email, QString const& phoneDay); + void changePassword(QString const& passwordOld, + QString const& password, QString const& verify); void logOut(); signals: |