X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/5924017d951d69132f2b8522dfa04927abc417d0..d5b7462f9c0fe95644ddbd117bacc4ef367cac9a:/stglibs/pinger.lib/pinger.h?ds=sidebyside diff --git a/stglibs/pinger.lib/pinger.h b/stglibs/pinger.lib/pinger.h index 1398332d..b1b77781 100644 --- a/stglibs/pinger.lib/pinger.h +++ b/stglibs/pinger.lib/pinger.h @@ -9,7 +9,6 @@ #include #include -#include #include #include @@ -28,9 +27,7 @@ #include #endif -#include "os_int.h" - -using namespace std; +#include "stg/os_int.h" //----------------------------------------------------------------------------- struct ICMP_HDR @@ -95,12 +92,11 @@ public: void AddIP(uint32_t ip); void DelIP(uint32_t ip); int GetPingIPNum() const; - //void GetAllIP(vector * ipTime) const; void PrintAllIP(); int GetIPTime(uint32_t ip, time_t * t) const; - void SetDelayTime(time_t delay); - time_t GetDelayTime() const; - string GetStrError() const; + void SetDelayTime(time_t d) { delay = d; } + time_t GetDelayTime() const { return delay; } + const std::string & GetStrError() const { return errorStr; } private: uint16_t PingCheckSum(void * data, int len); @@ -124,11 +120,11 @@ private: PING_MESSAGE pmSend; uint32_t pid; - string errorStr; + std::string errorStr; - multimap pingIP; - list ipToAdd; - list ipToDel; + std::multimap pingIP; + std::list ipToAdd; + std::list ipToDel; mutable pthread_mutex_t mutex; };