summaryrefslogtreecommitdiff
path: root/src/login/LoginController.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2013-03-24 12:24:17 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2013-03-24 12:24:17 (GMT)
commit9b5b85f9b01cbda7ef9a7ec2a15b2a35630a5b9d (patch)
treeac7d040253b459ce102e476cb19ab59e3cfa90d7 /src/login/LoginController.cpp
parent6bf98ccdca39936a3c51367862eed7c49f8786ec (diff)
parentbdc69f31c0be94191015838886bdcc2bc67f1acb (diff)
downloadpowder-9b5b85f9b01cbda7ef9a7ec2a15b2a35630a5b9d.zip
powder-9b5b85f9b01cbda7ef9a7ec2a15b2a35630a5b9d.tar.gz
Merge branch 'reorganisation' of github.com:FacialTurd/The-Powder-Toy
Diffstat (limited to 'src/login/LoginController.cpp')
-rw-r--r--src/login/LoginController.cpp51
1 files changed, 0 insertions, 51 deletions
diff --git a/src/login/LoginController.cpp b/src/login/LoginController.cpp
deleted file mode 100644
index fd8e576..0000000
--- a/src/login/LoginController.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-#include "LoginController.h"
-#include "client/User.h"
-#include "client/Client.h"
-
-LoginController::LoginController(ControllerCallback * callback):
- HasExited(false)
-{
- loginView = new LoginView();
- loginModel = new LoginModel();
-
- loginView->AttachController(this);
- loginModel->AddObserver(loginView);
-
- this->callback = callback;
-
-}
-
-void LoginController::Login(string username, string password)
-{
- loginModel->Login(username, password);
-}
-
-User LoginController::GetUser()
-{
- return loginModel->GetUser();
-}
-
-void LoginController::Exit()
-{
- if(ui::Engine::Ref().GetWindow() == loginView)
- {
- ui::Engine::Ref().CloseWindow();
- }
- if(callback)
- callback->ControllerExit();
- else
- {
- Client::Ref().SetAuthUser(loginModel->GetUser());
- }
- HasExited = true;
-}
-
-LoginController::~LoginController() {
- if(ui::Engine::Ref().GetWindow() == loginView)
- {
- ui::Engine::Ref().CloseWindow();
- }
- delete loginModel;
- delete loginView;
-}
-