summaryrefslogtreecommitdiff
path: root/member.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'member.cxx')
-rw-r--r--member.cxx29
1 files changed, 16 insertions, 13 deletions
diff --git a/member.cxx b/member.cxx
index 7a9d66e..82222bb 100644
--- a/member.cxx
+++ b/member.cxx
@@ -1,9 +1,25 @@
#include <cstddef>
+#include <memory>
#include <icclient/member.h>
#include "qicclient/member.hxx"
namespace QICClient {
+ std::shared_ptr<Member> 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*))
+ {
+ 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));
+ return std::shared_ptr<Member>{member};
+ }
+
void Member::setUserName(QString const& userName)
{
if (m_userName != userName) {
@@ -256,19 +272,6 @@ namespace QICClient {
if (m_data != data) m_data = data;
}
- 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,