2022-01-06 19:29:19 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "accounts/service_interface.h"
|
|
|
|
#include "app_controller_delegate.h"
|
|
|
|
#include "controller.h"
|
|
|
|
#include "interfaces/module_controller_delegate_interface.h"
|
|
|
|
#include "interfaces/module_login_delegate_interface.h"
|
|
|
|
#include "interfaces/module_onboarding_delegate_interface.h"
|
|
|
|
#include "interfaces/module_view_delegate_interface.h"
|
|
|
|
#include "login/module_access_interface.h"
|
|
|
|
#include "module_access_interface.h"
|
|
|
|
#include "onboarding/module_access_interface.h"
|
|
|
|
#include "view.h"
|
|
|
|
#include <QVariant>
|
|
|
|
|
|
|
|
namespace Modules
|
|
|
|
{
|
|
|
|
namespace Startup
|
|
|
|
{
|
|
|
|
class Module : public ModuleAccessInterface,
|
2022-02-21 18:03:38 +00:00
|
|
|
ModuleOnboardingDelegateInterface,
|
|
|
|
ModuleLoginDelegateInterface,
|
|
|
|
ModuleControllerDelegateInterface,
|
|
|
|
ModuleViewDelegateInterface
|
2022-01-06 19:29:19 +00:00
|
|
|
{
|
|
|
|
private:
|
2022-02-21 18:03:38 +00:00
|
|
|
AppControllerDelegate* m_delegate;
|
|
|
|
View* m_view;
|
|
|
|
Controller* m_controller;
|
2022-01-06 19:29:19 +00:00
|
|
|
|
2022-02-21 18:03:38 +00:00
|
|
|
Modules::Startup::Onboarding::ModuleAccessInterface* m_onboardingModule;
|
|
|
|
Modules::Startup::Login::ModuleAccessInterface* m_loginModule;
|
2022-01-06 19:29:19 +00:00
|
|
|
|
|
|
|
public:
|
2022-02-21 18:03:38 +00:00
|
|
|
Module(AppControllerDelegate* delegate,
|
|
|
|
/*keychainService,*/ Accounts::ServiceInterface* accountsService);
|
|
|
|
~Module();
|
|
|
|
void load() override;
|
|
|
|
void checkIfModuleDidLoad();
|
|
|
|
void viewDidLoad() override;
|
|
|
|
void onboardingDidLoad();
|
|
|
|
void loginDidLoad();
|
|
|
|
void userLoggedIn() override;
|
|
|
|
void moveToAppState() override;
|
|
|
|
void emitLogOut() override;
|
2022-01-06 19:29:19 +00:00
|
|
|
};
|
|
|
|
}; // namespace Startup
|
2022-02-21 18:03:38 +00:00
|
|
|
}; // namespace Modules
|