X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/5cf7604389d8846f9c1c21dbb6915f7639659c4c..cabe2c96b204b7b0cafcb57290f7592e0c040570:/projects/stargazer/traffcounter_impl.h?ds=sidebyside diff --git a/projects/stargazer/traffcounter_impl.h b/projects/stargazer/traffcounter_impl.h index eb476239..27e7c03c 100644 --- a/projects/stargazer/traffcounter_impl.h +++ b/projects/stargazer/traffcounter_impl.h @@ -35,13 +35,13 @@ #include #include -#include "traffcounter.h" -#include "os_int.h" -#include "stg_logger.h" -#include "raw_ip_packet.h" -#include "users.h" +#include "stg/traffcounter.h" +#include "stg/os_int.h" +#include "stg/stg_logger.h" +#include "stg/raw_ip_packet.h" +#include "stg/users.h" +#include "stg/noncopyable.h" #include "actions.h" -#include "noncopyable.h" #include "eventloop.h" #define PROTOMAX (5) @@ -154,7 +154,7 @@ private: TRAFFCOUNTER_IMPL & traffCnt; }; //----------------------------------------------------------------------------- -class TRAFFCOUNTER : public TRAFFCOUNTER, private NONCOPYABLE { +class TRAFFCOUNTER_IMPL : public TRAFFCOUNTER, private NONCOPYABLE { friend class ADD_USER_NONIFIER; friend class DEL_USER_NONIFIER; friend class TRF_IP_BEFORE; @@ -232,7 +232,7 @@ void TRF_IP_BEFORE::Notify(const uint32_t & oldValue, const uint32_t &) if (!oldValue) return; -EVENT_LOOP_SINGLETON::GetInstance().Enqueue(traffCnt, &TRAFFCOUNTER::DelUser, oldValue); +EVENT_LOOP_SINGLETON::GetInstance().Enqueue(traffCnt, &TRAFFCOUNTER_IMPL::DelUser, oldValue); } //----------------------------------------------------------------------------- inline @@ -242,20 +242,20 @@ void TRF_IP_AFTER::Notify(const uint32_t &, const uint32_t & newValue) if (!newValue) return; -EVENT_LOOP_SINGLETON::GetInstance().Enqueue(traffCnt, &TRAFFCOUNTER::AddUser, user); +EVENT_LOOP_SINGLETON::GetInstance().Enqueue(traffCnt, &TRAFFCOUNTER_IMPL::AddUser, user); } //----------------------------------------------------------------------------- inline void ADD_USER_NONIFIER::Notify(const USER_PTR & user) { -EVENT_LOOP_SINGLETON::GetInstance().Enqueue(traffCnt, &TRAFFCOUNTER::SetUserNotifiers, user); +EVENT_LOOP_SINGLETON::GetInstance().Enqueue(traffCnt, &TRAFFCOUNTER_IMPL::SetUserNotifiers, user); } //----------------------------------------------------------------------------- inline void DEL_USER_NONIFIER::Notify(const USER_PTR & user) { -EVENT_LOOP_SINGLETON::GetInstance().Enqueue(traffCnt, &TRAFFCOUNTER::UnSetUserNotifiers, user); -EVENT_LOOP_SINGLETON::GetInstance().Enqueue(traffCnt, &TRAFFCOUNTER::DelUser, user->GetCurrIP()); +EVENT_LOOP_SINGLETON::GetInstance().Enqueue(traffCnt, &TRAFFCOUNTER_IMPL::UnSetUserNotifiers, user); +EVENT_LOOP_SINGLETON::GetInstance().Enqueue(traffCnt, &TRAFFCOUNTER_IMPL::DelUser, user->GetCurrIP()); } //----------------------------------------------------------------------------- #endif //TRAFFCOUNTER_H