-#include <ostream> // xmlrpc-c devs have missed something :)
-
-#include "stg/common.h"
#include "admins_methods.h"
#include "rpcconfig.h"
+#include "stg/common.h"
+
+#include "stg/admins.h"
+#include "stg/admin.h"
+#include "stg/admin_conf.h"
+
+#include <ostream> // xmlrpc-c devs have missed something :)
+
//------------------------------------------------------------------------------
void METHOD_ADMIN_GET::execute(xmlrpc_c::paramList const & paramList,
return;
}
-ADMIN * admin;
+STG::Admin * admin;
if (admins->Find(login, &admin))
{
structVal["login"] = xmlrpc_c::value_string(admin->GetLogin());
structVal["password"] = xmlrpc_c::value_string(admin->GetPassword());
-const PRIV * priv = admin->GetPriv();
+const auto priv = admin->GetPriv();
structVal["user_stat"] = xmlrpc_c::value_boolean(priv->userStat);
structVal["user_conf"] = xmlrpc_c::value_boolean(priv->userConf);
return;
}
-ADMIN * admin;
+STG::Admin * admin;
if (admins->Find(adminInfo.admin, &admin))
{
return;
}
-ADMIN * admin;
+STG::Admin * admin;
if (admins->Find(adminInfo.admin, &admin))
{
return;
}
-ADMIN * loggedAdmin;
+STG::Admin * loggedAdmin;
if (admins->Find(adminInfo.admin, &loggedAdmin))
{
return;
}
-ADMIN * admin;
+STG::Admin * admin;
if (admins->Find(login, &admin))
{
return;
}
-ADMIN_CONF conf;
+STG::AdminConf conf;
conf.priv = *admin->GetPriv();
conf.password = admin->GetPassword();
return;
}
-ADMIN_CONF ac;
+STG::AdminConf ac;
int h = admins->OpenSearch();
while (admins->SearchNext(h, &ac) == 0)