#define USERS_H
#include <pthread.h>
+
#include <ctime>
#include <string>
#include <map>
public:
PROPERTY_NOTIFER_IP_BEFORE(USERS & us, user_iter u) : users(us), user(u) {};
void Notify(const uint32_t & oldValue, const uint32_t & newValue);
- user_iter GetUser() { return user; };
+ user_iter GetUser() const { return user; };
private:
USERS & users;
user_iter user;
public:
PROPERTY_NOTIFER_IP_AFTER(USERS & us, user_iter u) : users(us), user(u) {};
void Notify(const uint32_t & oldValue, const uint32_t & newValue);
- user_iter GetUser() { return user; };
+ user_iter GetUser() const { return user; };
private:
USERS & users;
user_iter user;
int Start();
int Stop();
- int SendMessage(const string & login, time_t sndTtime, time_t showTime, char type, const string & text) const;
-
private:
void AddToIPIdx(user_iter);
void DelFromIPIdx(uint32_t ip);
void DelUserFromIndexes(user_iter user);
static void * Run(void *);
- void NewMinute(const struct tm * t);
- void NewDay(const struct tm * t);
- void DayResetTraff(const struct tm * t);
+ void NewMinute(const struct tm & t);
+ void NewDay(const struct tm & t);
+ void DayResetTraff(const struct tm & t);
- bool TimeToWriteDetailStat(const struct tm * t);
+ bool TimeToWriteDetailStat(const struct tm & t);
list<USER> users;
list<USER_TO_DEL> usersToDelete;