X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/e5499c61083684b28bcbc6950aae66cbf0938703..e9ae1f101b5418c0ba2e6c9d86b23c12f0140982:/stargazer/plugins/other/smux/tables.cpp diff --git a/stargazer/plugins/other/smux/tables.cpp b/stargazer/plugins/other/smux/tables.cpp index a9b5e822..21173b70 100644 --- a/stargazer/plugins/other/smux/tables.cpp +++ b/stargazer/plugins/other/smux/tables.cpp @@ -5,17 +5,18 @@ #include "stg/user_property.h" #include "stg/tariffs.h" +#include "stg/tariff_conf.h" #include "stg/users.h" #include "tables.h" -std::pair TD2Info(const TARIFF_DATA & td); +std::pair TD2Info(const STG::TariffData & td); void TariffUsersTable::UpdateSensors(Sensors & sensors) const { std::map data; -std::vector tdl; +std::vector tdl; tariffs.GetTariffsData(&tdl); std::transform(tdl.begin(), tdl.end(), @@ -25,12 +26,12 @@ std::transform(tdl.begin(), int handle = users.OpenSearch(); assert(handle && "USERS::OpenSearch is always correct"); -USER_PTR user; +STG::User* user; while (!users.SearchNext(handle, &user)) { if (user->GetDeleted()) continue; - std::string tariffName(user->GetProperty().tariffName.ConstData()); + std::string tariffName(user->GetProperties().tariffName.ConstData()); std::map::iterator it(data.lower_bound(tariffName)); if (it == data.end() || it->first != tariffName) @@ -58,7 +59,7 @@ while (it != data.end()) } } -std::pair TD2Info(const TARIFF_DATA & td) +std::pair TD2Info(const STG::TariffData & td) { return std::make_pair(td.tariffConf.name, 0); }