-#include "admins_methods.h"
+#include <ostream> // xmlrpc-c devs have missed something :)
+#include "stg/common.h"
+#include "admins_methods.h"
#include "rpcconfig.h"
//------------------------------------------------------------------------------
return;
}
-ADMIN admin;
+ADMIN * admin;
-if (admins->FindAdmin(login, &admin))
+if (admins->Find(login, &admin))
{
structVal["result"] = xmlrpc_c::value_boolean(false);
*retvalPtr = xmlrpc_c::value_struct(structVal);
}
structVal["result"] = xmlrpc_c::value_boolean(true);
-structVal["login"] = xmlrpc_c::value_string(admin.GetLogin());
-structVal["password"] = xmlrpc_c::value_string(admin.GetPassword());
+structVal["login"] = xmlrpc_c::value_string(admin->GetLogin());
+structVal["password"] = xmlrpc_c::value_string(admin->GetPassword());
-const PRIV * priv = admin.GetPriv();
+const PRIV * priv = admin->GetPriv();
structVal["user_stat"] = xmlrpc_c::value_boolean(priv->userStat);
structVal["user_conf"] = xmlrpc_c::value_boolean(priv->userConf);
return;
}
-ADMIN admin;
+ADMIN * admin;
-if (admins->FindAdmin(adminInfo.admin, &admin))
+if (admins->Find(adminInfo.admin, &admin))
{
printfd(__FILE__, "METHOD_ADMIN_ADD::execute(): 'Invalid admin (logged)'\n");
*retvalPtr = xmlrpc_c::value_boolean(false);
return;
}
-ADMIN admin;
+ADMIN * admin;
-if (admins->FindAdmin(adminInfo.admin, &admin))
+if (admins->Find(adminInfo.admin, &admin))
{
*retvalPtr = xmlrpc_c::value_boolean(false);
return;
return;
}
-ADMIN loggedAdmin;
+ADMIN * loggedAdmin;
-if (admins->FindAdmin(adminInfo.admin, &loggedAdmin))
+if (admins->Find(adminInfo.admin, &loggedAdmin))
{
*retvalPtr = xmlrpc_c::value_boolean(false);
return;
}
-ADMIN admin;
+ADMIN * admin;
-if (admins->FindAdmin(login, &admin))
+if (admins->Find(login, &admin))
{
*retvalPtr = xmlrpc_c::value_boolean(false);
return;
ADMIN_CONF conf;
-conf.priv = *admin.GetPriv();
-conf.password = admin.GetPassword();
+conf.priv = *admin->GetPriv();
+conf.password = admin->GetPassword();
conf.login = login;
std::map<std::string, xmlrpc_c::value> structVal(