added: winix function: rmuser
changed: UGContainer<> now uses std::list as a storage (previously it was using std::vector with pointers) removed: now we don't have the operator[] for UGContainer<> git-svn-id: svn://ttmath.org/publicrep/winix/trunk@816 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
13
core/users.h
13
core/users.h
@@ -2,7 +2,7 @@
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2008-2010, Tomasz Sowa
|
||||
* Copyright (c) 2008-2012, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
@@ -17,6 +17,8 @@
|
||||
#include "cur.h"
|
||||
#include "db/db.h"
|
||||
|
||||
class SessionManager;
|
||||
|
||||
|
||||
class Users
|
||||
{
|
||||
@@ -24,6 +26,7 @@ typedef UGContainer<User> Table;
|
||||
Table table;
|
||||
|
||||
Cur * cur;
|
||||
SessionManager * session_manager;
|
||||
long how_many_logged;
|
||||
|
||||
public:
|
||||
@@ -36,6 +39,7 @@ public:
|
||||
Users();
|
||||
|
||||
void SetCur(Cur * pcur);
|
||||
void SetSessionManager(SessionManager * sm);
|
||||
|
||||
void Clear();
|
||||
void ReadUsers(Db * db);
|
||||
@@ -48,10 +52,11 @@ public:
|
||||
Iterator Begin();
|
||||
Iterator End();
|
||||
SizeType Size();
|
||||
User & operator[](SizeType pos);
|
||||
bool Remove(long user_id);
|
||||
|
||||
bool LoginUser(long user_id, bool remember_me, bool use_ses_log = false);
|
||||
void LogoutCurrentUser();
|
||||
bool LoginUser(long user_id, bool remember_me, bool use_ses_log = false);
|
||||
size_t LogoutUser(long user_id);
|
||||
void LogoutCurrentUser();
|
||||
|
||||
void IncrementLoggedUsers();
|
||||
long HowManyLogged();
|
||||
|
Reference in New Issue
Block a user