the first part of reimplementing has been done
now we have app object and singletons are only: log logn plugin and app git-svn-id: svn://ttmath.org/publicrep/winix/trunk@628 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
20
core/users.h
20
core/users.h
@@ -13,26 +13,32 @@
|
||||
#include <map>
|
||||
#include "user.h"
|
||||
#include "ugcontainer.h"
|
||||
|
||||
|
||||
#include "lastcontainer.h"
|
||||
#include "request.h"
|
||||
#include "db.h"
|
||||
|
||||
|
||||
class Users
|
||||
{
|
||||
|
||||
typedef UGContainer<User> Table;
|
||||
Table table;
|
||||
|
||||
Request * request;
|
||||
long how_many_logged;
|
||||
|
||||
public:
|
||||
|
||||
typedef Table::Iterator Iterator;
|
||||
typedef Table::SizeType SizeType;
|
||||
|
||||
LastContainer last;
|
||||
|
||||
Users();
|
||||
|
||||
void SetRequest(Request * request);
|
||||
|
||||
void Clear();
|
||||
void ReadUsers();
|
||||
void ReadUsers(Db * db);
|
||||
bool AddUser(const User & user);
|
||||
bool IsUser(const std::string & name);
|
||||
User * GetUser(long user_id);
|
||||
@@ -42,6 +48,12 @@ public:
|
||||
Iterator End();
|
||||
SizeType Size();
|
||||
User & operator[](SizeType pos);
|
||||
|
||||
void LoginUser(long user_id, bool remember_me);
|
||||
void LogoutCurrentUser();
|
||||
|
||||
void IncrementLoggedUsers();
|
||||
long HowManyLogged();
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user