History

Add login activity

Gabriel Calero committed 8 years ago

Commit 120de921 parent a073cba23 files · +577 −396Browse files

Showing the changes to interface/src/AndroidHelper.cpp (1 of 23 files). Show all

Unified · Split

interface/src/AndroidHelper.cpp+29−0
@@ -11,10 +11,39 @@ · 10 unmodified lines
1111 #include "AndroidHelper.h"
1212 #include <QDebug>
1313
14+AndroidHelper::AndroidHelper() :
15+_accountManager ()
16+{
17+ workerThread.start();
18+}
19+
20+AndroidHelper::~AndroidHelper() {
21+ workerThread.quit();
22+ workerThread.wait();
23+}
24+
25+QSharedPointer<AccountManager> AndroidHelper::getAccountManager() {
26+
27+ _accountManager = QSharedPointer<AccountManager>(new AccountManager, &QObject::deleteLater);
28+ _accountManager->setIsAgent(true);
29+ _accountManager->setAuthURL(NetworkingConstants::METAVERSE_SERVER_URL());
30+ _accountManager->moveToThread(&workerThread);
31+
32+ return _accountManager;
33+}
34+
1435 void AndroidHelper::requestActivity(const QString &activityName) {
1536 emit androidActivityRequested(activityName);
1637 }
1738
39+void AndroidHelper::notifyLoadComplete() {
40+ emit qtAppLoadComplete();
41+}
42+
1843 void AndroidHelper::goBackFromAndroidActivity() {
1944 emit backFromAndroidActivity();
45+}
46+
47+void AndroidHelper::notifyLoginComplete(bool success) {
48+ emit loginComplete(success);
2049 }