]> git.stg.codes - stg.git/blobdiff - projects/stargazer/users.h
README converted from KOI8 to UTF8
[stg.git] / projects / stargazer / users.h
index e882dcc1d8a793ecb76640298a71d8ebfdba3f35..424958da4d465ba78a221a211ccecd4c3e738f0d 100644 (file)
@@ -29,6 +29,7 @@ $Author: faust $
 #define USERS_H
 
 #include <pthread.h>
 #define USERS_H
 
 #include <pthread.h>
+
 #include <ctime>
 #include <string>
 #include <map>
 #include <ctime>
 #include <string>
 #include <map>
@@ -56,7 +57,7 @@ class PROPERTY_NOTIFER_IP_BEFORE: public PROPERTY_NOTIFIER_BASE<uint32_t>
 public:
     PROPERTY_NOTIFER_IP_BEFORE(USERS & us, user_iter u) : users(us), user(u) {};
     void        Notify(const uint32_t & oldValue, const uint32_t & newValue);
 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;
 private:
     USERS &     users;
     user_iter   user;
@@ -67,7 +68,7 @@ class PROPERTY_NOTIFER_IP_AFTER: public PROPERTY_NOTIFIER_BASE<uint32_t>
 public:
     PROPERTY_NOTIFER_IP_AFTER(USERS & us, user_iter u) : users(us), user(u) {};
     void        Notify(const uint32_t & oldValue, const uint32_t & newValue);
 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;
 private:
     USERS &     users;
     user_iter   user;
@@ -119,8 +120,6 @@ public:
     int             Start();
     int             Stop();
 
     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);
 private:
     void            AddToIPIdx(user_iter);
     void            DelFromIPIdx(uint32_t ip);
@@ -138,11 +137,11 @@ private:
     void            DelUserFromIndexes(user_iter user);
 
     static void *   Run(void *);
     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;
 
     list<USER>          users;
     list<USER_TO_DEL>   usersToDelete;