X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/9701b7ab4dc4cd709ad4dcaa750fc0021f15e231..2d8751468836d2c5d92dee3328f22ceefbc0c47b:/include/stg/user.h diff --git a/include/stg/user.h b/include/stg/user.h index adf140de..204899ac 100644 --- a/include/stg/user.h +++ b/include/stg/user.h @@ -26,7 +26,7 @@ #include "os_int.h" #include "notifer.h" -#include "stg_message.h" +#include "message.h" #include "tariff.h" #include "user_traff.h" @@ -35,6 +35,7 @@ class AUTH; class USER { public: + virtual ~USER() {} virtual int WriteConf() = 0; virtual int WriteStat() = 0; @@ -62,24 +63,16 @@ public: virtual const TARIFF * GetTariff() const = 0; virtual void ResetNextTariff() = 0; - #ifdef TRAFF_STAT_WITH_PORTS - virtual void AddTraffStatU(int dir, uint32_t ip, uint16_t port, uint32_t len) = 0; - virtual void AddTraffStatD(int dir, uint32_t ip, uint16_t port, uint32_t len) = 0; - #else - virtual void AddTraffStatU(int dir, uint32_t ip, uint32_t len) = 0; - virtual void AddTraffStatD(int dir, uint32_t ip, uint32_t len) = 0; - #endif - virtual const DIR_TRAFF & GetSessionUpload() const = 0; virtual const DIR_TRAFF & GetSessionDownload() const = 0; virtual bool GetConnected() const = 0; virtual time_t GetConnectedModificationTime() const = 0; virtual int GetAuthorized() const = 0; - virtual int Authorize(uint32_t ip, + /*virtual int Authorize(uint32_t ip, uint32_t enabledDirs, const AUTH * auth) = 0; - virtual void Unauthorize(const AUTH * auth) = 0; + virtual void Unauthorize(const AUTH * auth) = 0;*/ virtual bool IsAuthorizedBy(const AUTH * auth) const = 0; virtual int AddMessage(STG_MSG * msg) = 0; @@ -107,5 +100,6 @@ public: }; typedef USER * USER_PTR; +typedef const USER * CONST_USER_PTR; #endif