summaryrefslogtreecommitdiff
path: root/src/login/LoginModel.h
blob: 121d78e2973912379cb874b7ed44693a0cf4ae18 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
 * LoginModel.h
 *
 *  Created on: Jan 24, 2012
 *      Author: Simon
 */

#ifndef LOGINMODEL_H_
#define LOGINMODEL_H_

#include <vector>
#include <string>
#include "LoginView.h"
#include "client/Client.h"

using namespace std;

class LoginView;
class LoginModel {
	vector<LoginView*> observers;
	string statusText;
	bool loginStatus;
	void notifyStatusChanged();
	User currentUser;
public:
	LoginModel();
	void Login(string username, string password);
	void AddObserver(LoginView * observer);
	string GetStatusText();
	bool GetStatus();
	User GetUser();
	virtual ~LoginModel();
};

#endif /* LOGINMODEL_H_ */