]> git.stg.codes - stg.git/blobdiff - stargazer/admin_impl.cpp
Some more BSD-related issues.
[stg.git] / stargazer / admin_impl.cpp
index 9788cec4c76d58af2c4b0fbf2737f53c44847264..86764e086da1748b0a37df6671560d610b123e1d 100644 (file)
 
 #include "stg/common.h"
 
 
 #include "stg/common.h"
 
+using STG::AdminImpl;
+
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
-ADMIN_IMPL::ADMIN_IMPL()
-    : ip(0)
-{
-}
-//-----------------------------------------------------------------------------
-ADMIN_IMPL::ADMIN_IMPL(const ADMIN_CONF & ac)
-    : conf(ac),
-      ip(0)
-{
-}
-//-----------------------------------------------------------------------------
-ADMIN_IMPL::ADMIN_IMPL(const PRIV & priv,
-                       const std::string & login,
-                       const std::string & password)
-    : conf(priv, login, password),
-      ip(0)
-{
-}
-//-----------------------------------------------------------------------------
-ADMIN_IMPL & ADMIN_IMPL::operator=(const ADMIN_CONF & ac)
-{
-conf = ac;
-return *this;
-}
-//-----------------------------------------------------------------------------
-bool ADMIN_IMPL::operator==(const ADMIN_IMPL & rhs) const
-{
-return conf.login == rhs.conf.login;
-}
-//-----------------------------------------------------------------------------
-bool ADMIN_IMPL::operator!=(const ADMIN_IMPL & rhs) const
-{
-return conf.login != rhs.conf.login;
-}
-//-----------------------------------------------------------------------------
-bool ADMIN_IMPL::operator<(const ADMIN_IMPL & rhs) const
-{
-return conf.login < rhs.conf.login;
-}
-//-----------------------------------------------------------------------------
-bool ADMIN_IMPL::operator<=(const ADMIN_IMPL & rhs) const
-{
-return conf.login <= rhs.conf.login;
-}
-//-----------------------------------------------------------------------------
-std::string ADMIN_IMPL::GetIPStr() const
+std::string AdminImpl::GetIPStr() const
 {
 {
-return inet_ntostring(ip);
+    return inet_ntostring(ip);
 }
 //-----------------------------------------------------------------------------
 }
 //-----------------------------------------------------------------------------
-void ADMIN_IMPL::Print() const
+void AdminImpl::Print() const
 {
 {
-printfd(__FILE__, "=======================================\n");
-printfd(__FILE__, "login %s\n",     conf.login.c_str());
-printfd(__FILE__, "password %s\n",  conf.password.c_str());
-printfd(__FILE__, "ChgConf %d\n",   conf.priv.userConf);
-printfd(__FILE__, "ChgStat %d\n",   conf.priv.userStat);
-printfd(__FILE__, "ChgCash %d\n",   conf.priv.userCash);
-printfd(__FILE__, "UsrAddDel %d\n", conf.priv.userAddDel);
-printfd(__FILE__, "ChgAdmin %d\n",  conf.priv.adminChg);
-printfd(__FILE__, "ChgTariff %d\n", conf.priv.tariffChg);
-printfd(__FILE__, "=======================================\n");
+    printfd(__FILE__, "=======================================\n");
+    printfd(__FILE__, "login %s\n",     conf.login.c_str());
+    printfd(__FILE__, "password %s\n",  conf.password.c_str());
+    printfd(__FILE__, "ChgConf %d\n",   conf.priv.userConf);
+    printfd(__FILE__, "ChgStat %d\n",   conf.priv.userStat);
+    printfd(__FILE__, "ChgCash %d\n",   conf.priv.userCash);
+    printfd(__FILE__, "UsrAddDel %d\n", conf.priv.userAddDel);
+    printfd(__FILE__, "ChgAdmin %d\n",  conf.priv.adminChg);
+    printfd(__FILE__, "ChgTariff %d\n", conf.priv.tariffChg);
+    printfd(__FILE__, "=======================================\n");
 }
 //-----------------------------------------------------------------------------
 }
 //-----------------------------------------------------------------------------
-const std::string ADMIN_IMPL::GetLogStr() const
+const std::string AdminImpl::GetLogStr() const
 {
 {
-return "Admin \'" + conf.login + "\', " + GetIPStr() + ":";
+    return "Admin \'" + conf.login + "\', " + GetIPStr() + ":";
 }
 //-----------------------------------------------------------------------------
 }
 //-----------------------------------------------------------------------------