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
11#include "AndroidHelper.h"11#include "AndroidHelper.h"
12#include <QDebug>12#include <QDebug>
13 13
14AndroidHelper::AndroidHelper() :
15_accountManager ()
16{
17 workerThread.start();
18}
19
20AndroidHelper::~AndroidHelper() {
21 workerThread.quit();
22 workerThread.wait();
23}
24
25QSharedPointer<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
14void AndroidHelper::requestActivity(const QString &activityName) {35void AndroidHelper::requestActivity(const QString &activityName) {
15 emit androidActivityRequested(activityName);36 emit androidActivityRequested(activityName);
16}37}
17 38
39void AndroidHelper::notifyLoadComplete() {
40 emit qtAppLoadComplete();
41}
42
18void AndroidHelper::goBackFromAndroidActivity() {43void AndroidHelper::goBackFromAndroidActivity() {
19 emit backFromAndroidActivity();44 emit backFromAndroidActivity();
45}
46
47void AndroidHelper::notifyLoginComplete(bool success) {
48 emit loginComplete(success);
20}49}